]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/app.h
support SDK < 10.6, fixes #14902
[wxWidgets.git] / include / wx / x11 / app.h
CommitLineData
83df96d6 1/////////////////////////////////////////////////////////////////////////////
b886fae6 2// Name: wx/x11/app.h
83df96d6
JS
3// Purpose: wxApp class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
83df96d6
JS
10/////////////////////////////////////////////////////////////////////////////
11
b886fae6
VZ
12#ifndef _WX_X11_APP_H_
13#define _WX_X11_APP_H_
83df96d6 14
83df96d6
JS
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19#include "wx/gdicmn.h"
20#include "wx/event.h"
21
22// ----------------------------------------------------------------------------
23// forward declarations
24// ----------------------------------------------------------------------------
25
b5dbe15d
VS
26class WXDLLIMPEXP_FWD_CORE wxFrame;
27class WXDLLIMPEXP_FWD_CORE wxWindow;
28class WXDLLIMPEXP_FWD_CORE wxApp;
29class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
4f7d425f 30class WXDLLIMPEXP_FWD_BASE wxLog;
b5dbe15d 31class WXDLLIMPEXP_FWD_CORE wxXVisualInfo;
83df96d6
JS
32
33// ----------------------------------------------------------------------------
256d631a 34// the wxApp class for wxX11 - see wxAppBase for more details
83df96d6
JS
35// ----------------------------------------------------------------------------
36
53a2db12 37class WXDLLIMPEXP_CORE wxApp : public wxAppBase
83df96d6 38{
83df96d6
JS
39public:
40 wxApp();
d3c7fc99 41 virtual ~wxApp();
1bf77ee5 42
83df96d6
JS
43 // override base class (pure) virtuals
44 // -----------------------------------
1bf77ee5 45
e2478fde
VZ
46 virtual void Exit();
47
e2478fde 48 virtual void WakeUpIdle();
1bf77ee5 49
83df96d6 50 virtual bool OnInitGui();
1bf77ee5 51
83df96d6
JS
52 // implementation from now on
53 // --------------------------
1bf77ee5 54
83df96d6 55 // Processes an X event.
086fd560 56 virtual bool ProcessXEvent(WXEvent* event);
1bf77ee5 57
83df96d6
JS
58public:
59 // Implementation
05e2b077 60 virtual bool Initialize(int& argc, wxChar **argv);
94826170 61 virtual void CleanUp();
1bf77ee5 62
7eaac9f5 63 WXWindow GetTopLevelWidget() const { return m_topLevelWidget; }
83df96d6 64 WXColormap GetMainColormap(WXDisplay* display);
83df96d6 65 long GetMaxRequestSize() const { return m_maxRequestSize; }
1bf77ee5 66
83df96d6 67 // This handler is called when a property change event occurs
086fd560 68 virtual bool HandlePropertyChange(WXEvent *event);
1bf77ee5 69
256d631a
JS
70 // Values that can be passed on the command line.
71 // Returns -1, -1 if none specified.
72 const wxSize& GetInitialSize() const { return m_initialSize; }
73 bool GetShowIconic() const { return m_showIconic; }
1bf77ee5 74
2b5f62a0
VZ
75#if wxUSE_UNICODE
76 // Global context for Pango layout. Either use X11
77 // or use Xft rendering according to GDK_USE_XFT
78 // environment variable
79 PangoContext* GetPangoContext();
1bf77ee5 80#endif
9ce8d6a2 81
89954433 82 wxXVisualInfo* GetVisualInfo(WXDisplay* WXUNUSED(display))
9ce8d6a2
MB
83 {
84 // this should be implemented correctly for wxBitmap to work
85 // with multiple display
86 return m_visualInfo;
87 }
88
83df96d6 89public:
256d631a 90 static long sm_lastMessageTime;
1bf77ee5 91 bool m_showIconic;
256d631a 92 wxSize m_initialSize;
8601b2e1 93
9ce8d6a2
MB
94#if !wxUSE_NANOX
95 wxXVisualInfo* m_visualInfo;
8601b2e1 96#endif
1bf77ee5 97
83df96d6 98protected:
7eaac9f5 99 WXWindow m_topLevelWidget;
83df96d6 100 WXColormap m_mainColormap;
83df96d6 101 long m_maxRequestSize;
1bf77ee5 102
b886fae6 103 DECLARE_DYNAMIC_CLASS(wxApp)
83df96d6
JS
104};
105
b886fae6 106#endif // _WX_X11_APP_H_
83df96d6 107