1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxApp class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_X11_APP_H_
13 #define _WX_X11_APP_H_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 #include "wx/gdicmn.h"
22 // ----------------------------------------------------------------------------
23 // forward declarations
24 // ----------------------------------------------------------------------------
26 class WXDLLIMPEXP_FWD_CORE wxFrame
;
27 class WXDLLIMPEXP_FWD_CORE wxWindow
;
28 class WXDLLIMPEXP_FWD_CORE wxApp
;
29 class WXDLLIMPEXP_FWD_CORE wxKeyEvent
;
30 class WXDLLIMPEXP_FWD_BASE wxLog
;
31 class WXDLLIMPEXP_FWD_CORE wxXVisualInfo
;
33 // ----------------------------------------------------------------------------
34 // the wxApp class for wxX11 - see wxAppBase for more details
35 // ----------------------------------------------------------------------------
37 class WXDLLIMPEXP_CORE wxApp
: public wxAppBase
43 // override base class (pure) virtuals
44 // -----------------------------------
48 virtual void WakeUpIdle();
50 virtual bool OnInitGui();
52 // implementation from now on
53 // --------------------------
55 // Processes an X event.
56 virtual bool ProcessXEvent(WXEvent
* event
);
60 virtual bool Initialize(int& argc
, wxChar
**argv
);
61 virtual void CleanUp();
63 WXWindow
GetTopLevelWidget() const { return m_topLevelWidget
; }
64 WXColormap
GetMainColormap(WXDisplay
* display
);
65 long GetMaxRequestSize() const { return m_maxRequestSize
; }
67 // This handler is called when a property change event occurs
68 virtual bool HandlePropertyChange(WXEvent
*event
);
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
; }
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();
82 wxXVisualInfo
* GetVisualInfo(WXDisplay
* WXUNUSED(display
))
84 // this should be implemented correctly for wxBitmap to work
85 // with multiple display
90 static long sm_lastMessageTime
;
95 wxXVisualInfo
* m_visualInfo
;
99 WXWindow m_topLevelWidget
;
100 WXColormap m_mainColormap
;
101 long m_maxRequestSize
;
103 DECLARE_DYNAMIC_CLASS(wxApp
)
106 #endif // _WX_X11_APP_H_