1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/app.h
3 // Purpose: wxApp class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
19 #include "wx/hashmap.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 wxEventLoop
;
31 class WXDLLIMPEXP_FWD_CORE wxXVisualInfo
;
32 class WXDLLIMPEXP_FWD_CORE wxPerDisplayData
;
34 // ----------------------------------------------------------------------------
35 // the wxApp class for Motif - see wxAppBase for more details
36 // ----------------------------------------------------------------------------
38 WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData
*, wxPerDisplayDataMap
);
40 class WXDLLIMPEXP_CORE wxApp
: public wxAppBase
42 DECLARE_DYNAMIC_CLASS(wxApp
)
48 // override base class (pure) virtuals
49 // -----------------------------------
51 virtual int MainLoop();
55 virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
57 // implementation from now on
58 // --------------------------
65 virtual bool Initialize(int& argc
, wxChar
**argv
);
66 virtual void CleanUp();
69 WXAppContext
GetAppContext() const { return m_appContext
; }
70 WXWidget
GetTopLevelWidget();
71 WXWidget
GetTopLevelRealizedWidget();
72 WXColormap
GetMainColormap(WXDisplay
* display
);
73 WXDisplay
* GetInitialDisplay() const { return m_initialDisplay
; }
75 void SetTopLevelWidget(WXDisplay
* display
, WXWidget widget
);
76 void SetTopLevelRealizedWidget(WXDisplay
* display
,
79 // This handler is called when a property change event occurs
80 virtual void HandlePropertyChange(WXEvent
*event
);
82 wxXVisualInfo
* GetVisualInfo(WXDisplay
* display
);
86 WXAppContext m_appContext
;
87 WXColormap m_mainColormap
;
88 WXDisplay
* m_initialDisplay
;
89 wxPerDisplayDataMap
* m_perDisplayData
;