]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/motif/app.h
build fix for wxGTK/Univ build (#9706)
[wxWidgets.git] / include / wx / motif / app.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/motif/app.h
3// Purpose: wxApp class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_APP_H_
13#define _WX_APP_H_
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19#include "wx/event.h"
20#include "wx/hashmap.h"
21
22// ----------------------------------------------------------------------------
23// forward declarations
24// ----------------------------------------------------------------------------
25
26class WXDLLIMPEXP_FWD_CORE wxFrame;
27class WXDLLIMPEXP_FWD_CORE wxWindow;
28class WXDLLIMPEXP_FWD_CORE wxApp;
29class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
30class WXDLLIMPEXP_FWD_BASE wxLog;
31class WXDLLIMPEXP_FWD_CORE wxEventLoop;
32class WXDLLIMPEXP_FWD_CORE wxXVisualInfo;
33class WXDLLIMPEXP_FWD_CORE wxPerDisplayData;
34
35// ----------------------------------------------------------------------------
36// the wxApp class for Motif - see wxAppBase for more details
37// ----------------------------------------------------------------------------
38
39WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData*, wxPerDisplayDataMap );
40
41class WXDLLIMPEXP_CORE wxApp : public wxAppBase
42{
43 DECLARE_DYNAMIC_CLASS(wxApp)
44
45public:
46 wxApp();
47 virtual ~wxApp();
48
49 // override base class (pure) virtuals
50 // -----------------------------------
51
52 virtual int MainLoop();
53
54 virtual void Exit();
55
56 virtual bool Yield(bool onlyIfNeeded = false);
57 virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
58
59 // implementation from now on
60 // --------------------------
61
62protected:
63 bool m_showOnInit;
64
65public:
66 // Implementation
67 virtual bool Initialize(int& argc, wxChar **argv);
68 virtual void CleanUp();
69
70 // Motif-specific
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; }
76
77 void SetTopLevelWidget(WXDisplay* display, WXWidget widget);
78 void SetTopLevelRealizedWidget(WXDisplay* display,
79 WXWidget widget);
80
81 // This handler is called when a property change event occurs
82 virtual void HandlePropertyChange(WXEvent *event);
83
84 wxXVisualInfo* GetVisualInfo(WXDisplay* display);
85
86private:
87 // Motif-specific
88 WXAppContext m_appContext;
89 WXColormap m_mainColormap;
90 WXDisplay* m_initialDisplay;
91 wxPerDisplayDataMap* m_perDisplayData;
92};
93
94#endif
95// _WX_APP_H_