1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxApp class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_X11_APP_H_
12 #define _WX_X11_APP_H_
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
18 #include "wx/gdicmn.h"
21 // ----------------------------------------------------------------------------
22 // forward declarations
23 // ----------------------------------------------------------------------------
25 class WXDLLIMPEXP_FWD_CORE wxFrame
;
26 class WXDLLIMPEXP_FWD_CORE wxWindow
;
27 class WXDLLIMPEXP_FWD_CORE wxApp
;
28 class WXDLLIMPEXP_FWD_CORE wxKeyEvent
;
29 class WXDLLIMPEXP_FWD_BASE wxLog
;
30 class WXDLLIMPEXP_FWD_CORE wxXVisualInfo
;
32 // ----------------------------------------------------------------------------
33 // the wxApp class for wxX11 - see wxAppBase for more details
34 // ----------------------------------------------------------------------------
36 class WXDLLIMPEXP_CORE wxApp
: public wxAppBase
42 // override base class (pure) virtuals
43 // -----------------------------------
47 virtual void WakeUpIdle();
49 virtual bool OnInitGui();
51 // implementation from now on
52 // --------------------------
54 // Processes an X event.
55 virtual bool ProcessXEvent(WXEvent
* event
);
59 virtual bool Initialize(int& argc
, wxChar
**argv
);
60 virtual void CleanUp();
62 WXWindow
GetTopLevelWidget() const { return m_topLevelWidget
; }
63 WXColormap
GetMainColormap(WXDisplay
* display
);
64 long GetMaxRequestSize() const { return m_maxRequestSize
; }
66 // This handler is called when a property change event occurs
67 virtual bool HandlePropertyChange(WXEvent
*event
);
69 // Values that can be passed on the command line.
70 // Returns -1, -1 if none specified.
71 const wxSize
& GetInitialSize() const { return m_initialSize
; }
72 bool GetShowIconic() const { return m_showIconic
; }
75 // Global context for Pango layout. Either use X11
76 // or use Xft rendering according to GDK_USE_XFT
77 // environment variable
78 PangoContext
* GetPangoContext();
81 wxXVisualInfo
* GetVisualInfo(WXDisplay
* WXUNUSED(display
))
83 // this should be implemented correctly for wxBitmap to work
84 // with multiple display
89 static long sm_lastMessageTime
;
94 wxXVisualInfo
* m_visualInfo
;
98 WXWindow m_topLevelWidget
;
99 WXColormap m_mainColormap
;
100 long m_maxRequestSize
;
102 DECLARE_DYNAMIC_CLASS(wxApp
)
105 #endif // _WX_X11_APP_H_