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
);
59 virtual void OnAssert(const wxChar
*file
, int line
, const wxChar
* cond
, const wxChar
*msg
);
64 virtual bool Initialize(int& argc
, wxChar
**argv
);
65 virtual void CleanUp();
67 WXWindow
GetTopLevelWidget() const { return m_topLevelWidget
; }
68 WXColormap
GetMainColormap(WXDisplay
* display
);
69 long GetMaxRequestSize() const { return m_maxRequestSize
; }
71 // This handler is called when a property change event occurs
72 virtual bool HandlePropertyChange(WXEvent
*event
);
74 // Values that can be passed on the command line.
75 // Returns -1, -1 if none specified.
76 const wxSize
& GetInitialSize() const { return m_initialSize
; }
77 bool GetShowIconic() const { return m_showIconic
; }
80 // Global context for Pango layout. Either use X11
81 // or use Xft rendering according to GDK_USE_XFT
82 // environment variable
83 PangoContext
* GetPangoContext();
86 wxXVisualInfo
* GetVisualInfo(WXDisplay
* WXUNUSED(display
))
88 // this should be implemented correctly for wxBitmap to work
89 // with multiple display
94 static long sm_lastMessageTime
;
99 wxXVisualInfo
* m_visualInfo
;
103 WXWindow m_topLevelWidget
;
104 WXColormap m_mainColormap
;
105 long m_maxRequestSize
;
107 DECLARE_DYNAMIC_CLASS(wxApp
)
110 #endif // _WX_X11_APP_H_