1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/app.h
3 // Purpose: wxApp class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
20 #include "wx/hashmap.h"
22 // ----------------------------------------------------------------------------
23 // forward declarations
24 // ----------------------------------------------------------------------------
26 class WXDLLEXPORT wxFrame
;
27 class WXDLLEXPORT wxWindow
;
28 class WXDLLEXPORT wxApp
;
29 class WXDLLEXPORT wxKeyEvent
;
30 class WXDLLEXPORT wxLog
;
31 class WXDLLEXPORT wxEventLoop
;
32 class WXDLLEXPORT wxXVisualInfo
;
33 class WXDLLEXPORT wxPerDisplayData
;
35 // ----------------------------------------------------------------------------
36 // the wxApp class for Motif - see wxAppBase for more details
37 // ----------------------------------------------------------------------------
39 WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData
*, wxPerDisplayDataMap
);
41 class WXDLLEXPORT wxApp
: public wxAppBase
43 DECLARE_DYNAMIC_CLASS(wxApp
)
49 // override base class (pure) virtuals
50 // -----------------------------------
52 virtual int MainLoop();
56 virtual bool Yield(bool onlyIfNeeded
= false);
57 virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
59 virtual bool OnInitGui();
61 // implementation from now on
62 // --------------------------
69 virtual bool Initialize(int& argc
, wxChar
**argv
);
70 virtual void CleanUp();
73 WXAppContext
GetAppContext() const { return m_appContext
; }
74 WXWidget
GetTopLevelWidget();
75 WXWidget
GetTopLevelRealizedWidget();
76 WXColormap
GetMainColormap(WXDisplay
* display
);
77 WXDisplay
* GetInitialDisplay() const { return m_initialDisplay
; }
79 void SetTopLevelWidget(WXDisplay
* display
, WXWidget widget
);
80 void SetTopLevelRealizedWidget(WXDisplay
* display
,
83 // This handler is called when a property change event occurs
84 virtual void HandlePropertyChange(WXEvent
*event
);
86 wxXVisualInfo
* GetVisualInfo(WXDisplay
* display
);
90 WXAppContext m_appContext
;
91 WXColormap m_mainColormap
;
92 WXDisplay
* m_initialDisplay
;
93 wxPerDisplayDataMap
* m_perDisplayData
;