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_CORE wxLog
;
31 class WXDLLIMPEXP_FWD_CORE wxXVisualInfo
;
33 // ----------------------------------------------------------------------------
34 // the wxApp class for wxX11 - see wxAppBase for more details
35 // ----------------------------------------------------------------------------
37 class WXDLLEXPORT wxApp
: public wxAppBase
43 // override base class (pure) virtuals
44 // -----------------------------------
48 virtual bool Yield(bool onlyIfNeeded
= FALSE
);
49 virtual void WakeUpIdle();
51 virtual bool OnInitGui();
53 // implementation from now on
54 // --------------------------
56 // Processes an X event.
57 virtual bool ProcessXEvent(WXEvent
* event
);
60 virtual void OnAssert(const wxChar
*file
, int line
, const wxChar
* cond
, const wxChar
*msg
);
65 virtual bool Initialize(int& argc
, wxChar
**argv
);
66 virtual void CleanUp();
68 WXWindow
GetTopLevelWidget() const { return m_topLevelWidget
; }
69 WXColormap
GetMainColormap(WXDisplay
* display
);
70 long GetMaxRequestSize() const { return m_maxRequestSize
; }
72 // This handler is called when a property change event occurs
73 virtual bool HandlePropertyChange(WXEvent
*event
);
75 // Values that can be passed on the command line.
76 // Returns -1, -1 if none specified.
77 const wxSize
& GetInitialSize() const { return m_initialSize
; }
78 bool GetShowIconic() const { return m_showIconic
; }
81 // Global context for Pango layout. Either use X11
82 // or use Xft rendering according to GDK_USE_XFT
83 // environment variable
84 PangoContext
* GetPangoContext();
87 wxXVisualInfo
* GetVisualInfo(WXDisplay
* display
)
89 // this should be implemented correctly for wxBitmap to work
90 // with multiple display
95 static long sm_lastMessageTime
;
100 wxXVisualInfo
* m_visualInfo
;
104 WXWindow m_topLevelWidget
;
105 WXColormap m_mainColormap
;
106 long m_maxRequestSize
;
108 DECLARE_DYNAMIC_CLASS(wxApp
)
111 #endif // _WX_X11_APP_H_