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 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 wxEventLoop
;
32 class WXDLLIMPEXP_FWD_CORE wxXVisualInfo
;
33 class WXDLLIMPEXP_FWD_CORE wxPerDisplayData
;
35 // ----------------------------------------------------------------------------
36 // the wxApp class for Motif - see wxAppBase for more details
37 // ----------------------------------------------------------------------------
39 WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData
*, wxPerDisplayDataMap
);
41 class WXDLLIMPEXP_CORE wxApp
: public wxAppBase
43 DECLARE_DYNAMIC_CLASS(wxApp
)
49 // override base class (pure) virtuals
50 // -----------------------------------
52 virtual int MainLoop();
56 virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
58 // implementation from now on
59 // --------------------------
66 virtual bool Initialize(int& argc
, wxChar
**argv
);
67 virtual void CleanUp();
68 virtual bool DoYield(bool onlyIfNeeded
, long eventsToProcess
);
71 WXAppContext
GetAppContext() const { return m_appContext
; }
72 WXWidget
GetTopLevelWidget();
73 WXWidget
GetTopLevelRealizedWidget();
74 WXColormap
GetMainColormap(WXDisplay
* display
);
75 WXDisplay
* GetInitialDisplay() const { return m_initialDisplay
; }
77 void SetTopLevelWidget(WXDisplay
* display
, WXWidget widget
);
78 void SetTopLevelRealizedWidget(WXDisplay
* display
,
81 // This handler is called when a property change event occurs
82 virtual void HandlePropertyChange(WXEvent
*event
);
84 wxXVisualInfo
* GetVisualInfo(WXDisplay
* display
);
88 WXAppContext m_appContext
;
89 WXColormap m_mainColormap
;
90 WXDisplay
* m_initialDisplay
;
91 wxPerDisplayDataMap
* m_perDisplayData
;