]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/app.h
support retina display
[wxWidgets.git] / include / wx / x11 / app.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/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_X11_APP_H_
13 #define _WX_X11_APP_H_
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 #include "wx/gdicmn.h"
20 #include "wx/event.h"
21
22 // ----------------------------------------------------------------------------
23 // forward declarations
24 // ----------------------------------------------------------------------------
25
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 wxXVisualInfo;
32
33 // ----------------------------------------------------------------------------
34 // the wxApp class for wxX11 - see wxAppBase for more details
35 // ----------------------------------------------------------------------------
36
37 class WXDLLIMPEXP_CORE wxApp : public wxAppBase
38 {
39 public:
40 wxApp();
41 virtual ~wxApp();
42
43 // override base class (pure) virtuals
44 // -----------------------------------
45
46 virtual void Exit();
47
48 virtual void WakeUpIdle();
49
50 virtual bool OnInitGui();
51
52 // implementation from now on
53 // --------------------------
54
55 // Processes an X event.
56 virtual bool ProcessXEvent(WXEvent* event);
57
58 public:
59 // Implementation
60 virtual bool Initialize(int& argc, wxChar **argv);
61 virtual void CleanUp();
62
63 WXWindow GetTopLevelWidget() const { return m_topLevelWidget; }
64 WXColormap GetMainColormap(WXDisplay* display);
65 long GetMaxRequestSize() const { return m_maxRequestSize; }
66
67 // This handler is called when a property change event occurs
68 virtual bool HandlePropertyChange(WXEvent *event);
69
70 // Values that can be passed on the command line.
71 // Returns -1, -1 if none specified.
72 const wxSize& GetInitialSize() const { return m_initialSize; }
73 bool GetShowIconic() const { return m_showIconic; }
74
75 #if wxUSE_UNICODE
76 // Global context for Pango layout. Either use X11
77 // or use Xft rendering according to GDK_USE_XFT
78 // environment variable
79 PangoContext* GetPangoContext();
80 #endif
81
82 wxXVisualInfo* GetVisualInfo(WXDisplay* WXUNUSED(display))
83 {
84 // this should be implemented correctly for wxBitmap to work
85 // with multiple display
86 return m_visualInfo;
87 }
88
89 public:
90 static long sm_lastMessageTime;
91 bool m_showIconic;
92 wxSize m_initialSize;
93
94 #if !wxUSE_NANOX
95 wxXVisualInfo* m_visualInfo;
96 #endif
97
98 protected:
99 WXWindow m_topLevelWidget;
100 WXColormap m_mainColormap;
101 long m_maxRequestSize;
102
103 DECLARE_DYNAMIC_CLASS(wxApp)
104 };
105
106 #endif // _WX_X11_APP_H_
107