]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/app.h
reorganized/improved fixed size int types definitions; in particular use __int64...
[wxWidgets.git] / include / wx / x11 / app.h
CommitLineData
83df96d6
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: 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
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
83df96d6
JS
16#pragma interface "app.h"
17#endif
18
19// ----------------------------------------------------------------------------
20// headers
21// ----------------------------------------------------------------------------
22
23#include "wx/gdicmn.h"
24#include "wx/event.h"
25
26// ----------------------------------------------------------------------------
27// forward declarations
28// ----------------------------------------------------------------------------
29
30class WXDLLEXPORT wxFrame;
31class WXDLLEXPORT wxWindow;
32class WXDLLEXPORT wxApp;
33class WXDLLEXPORT wxKeyEvent;
34class WXDLLEXPORT wxLog;
9ce8d6a2 35class WXDLLEXPORT wxXVisualInfo;
83df96d6
JS
36
37// ----------------------------------------------------------------------------
256d631a 38// the wxApp class for wxX11 - see wxAppBase for more details
83df96d6
JS
39// ----------------------------------------------------------------------------
40
41class WXDLLEXPORT wxApp : public wxAppBase
42{
43 DECLARE_DYNAMIC_CLASS(wxApp)
1bf77ee5 44
83df96d6
JS
45public:
46 wxApp();
dc4025af 47 ~wxApp();
1bf77ee5 48
83df96d6
JS
49 // override base class (pure) virtuals
50 // -----------------------------------
1bf77ee5 51
83df96d6 52 virtual bool Initialized();
e2478fde
VZ
53
54 virtual void Exit();
55
83df96d6 56 virtual bool Yield(bool onlyIfNeeded = FALSE);
e2478fde 57 virtual void WakeUpIdle();
1bf77ee5 58
83df96d6 59 virtual bool OnInitGui();
1bf77ee5 60
83df96d6
JS
61 // implementation from now on
62 // --------------------------
1bf77ee5 63
83df96d6 64 // Processes an X event.
086fd560 65 virtual bool ProcessXEvent(WXEvent* event);
1bf77ee5 66
d715d419 67#ifdef __WXDEBUG__
5968a0dc 68 virtual void OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg);
d715d419 69#endif // __WXDEBUG__
1bf77ee5 70
83df96d6
JS
71protected:
72 bool m_showOnInit;
1bf77ee5 73
83df96d6
JS
74public:
75 // Implementation
05e2b077 76 virtual bool Initialize(int& argc, wxChar **argv);
94826170 77 virtual void CleanUp();
1bf77ee5 78
7eaac9f5 79 WXWindow GetTopLevelWidget() const { return m_topLevelWidget; }
83df96d6 80 WXColormap GetMainColormap(WXDisplay* display);
83df96d6 81 long GetMaxRequestSize() const { return m_maxRequestSize; }
1bf77ee5 82
83df96d6 83 // This handler is called when a property change event occurs
086fd560 84 virtual bool HandlePropertyChange(WXEvent *event);
1bf77ee5 85
256d631a
JS
86 // Values that can be passed on the command line.
87 // Returns -1, -1 if none specified.
88 const wxSize& GetInitialSize() const { return m_initialSize; }
89 bool GetShowIconic() const { return m_showIconic; }
1bf77ee5 90
2b5f62a0
VZ
91#if wxUSE_UNICODE
92 // Global context for Pango layout. Either use X11
93 // or use Xft rendering according to GDK_USE_XFT
94 // environment variable
95 PangoContext* GetPangoContext();
1bf77ee5 96#endif
9ce8d6a2
MB
97
98 wxXVisualInfo* GetVisualInfo(WXDisplay* display)
99 {
100 // this should be implemented correctly for wxBitmap to work
101 // with multiple display
102 return m_visualInfo;
103 }
104
dc4025af
RR
105 // We need this before creating the app
106 static WXDisplay* GetDisplay() { return ms_display; }
107 static WXDisplay* ms_display;
108
83df96d6 109public:
256d631a 110 static long sm_lastMessageTime;
1bf77ee5 111 bool m_showIconic;
256d631a 112 wxSize m_initialSize;
8601b2e1 113
9ce8d6a2
MB
114#if !wxUSE_NANOX
115 wxXVisualInfo* m_visualInfo;
8601b2e1 116#endif
1bf77ee5 117
83df96d6
JS
118protected:
119 bool m_keepGoing;
1bf77ee5 120
7eaac9f5 121 WXWindow m_topLevelWidget;
83df96d6 122 WXColormap m_mainColormap;
83df96d6 123 long m_maxRequestSize;
1bf77ee5 124
83df96d6
JS
125 DECLARE_EVENT_TABLE()
126};
127
6abf9dac 128#endif // _WX_APP_H_
83df96d6 129