]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/app.h
disable new event code unconditionally for now
[wxWidgets.git] / include / wx / gtk / app.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/app.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK_APP_H_
11 #define _WX_GTK_APP_H_
12
13 //-----------------------------------------------------------------------------
14 // classes
15 //-----------------------------------------------------------------------------
16
17 #if wxUSE_THREADS
18 class WXDLLIMPEXP_FWD_BASE wxMutex;
19 #endif
20
21 #if wxUSE_LIBHILDON
22 typedef struct _HildonProgram HildonProgram;
23 #endif // wxUSE_LIBHILDON
24
25 //-----------------------------------------------------------------------------
26 // wxApp
27 //-----------------------------------------------------------------------------
28
29 class WXDLLIMPEXP_CORE wxApp: public wxAppBase
30 {
31 public:
32 wxApp();
33 virtual ~wxApp();
34
35 /* override for altering the way wxGTK intializes the GUI
36 * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
37 * default. when overriding this method, the code in it is likely to be
38 * platform dependent, otherwise use OnInit(). */
39 virtual bool SetNativeTheme(const wxString& theme);
40 virtual bool OnInitGui();
41
42 // override base class (pure) virtuals
43 virtual bool Yield(bool onlyIfNeeded = FALSE);
44 virtual void WakeUpIdle();
45
46 virtual bool Initialize(int& argc, wxChar **argv);
47 virtual void CleanUp();
48
49 #ifdef __WXDEBUG__
50 virtual void OnAssertFailure(const wxChar *file,
51 int line,
52 const wxChar *func,
53 const wxChar *cond,
54 const wxChar *msg);
55 #endif // __WXDEBUG__
56
57 // GTK-specific methods
58 // -------------------
59
60 // this can be overridden to return a specific visual to be used for GTK+
61 // instead of the default one (it's used by wxGLApp)
62 //
63 // must return XVisualInfo pointer (it is not freed by caller)
64 virtual void *GetXVisualInfo() { return NULL; }
65
66 #if wxUSE_LIBHILDON
67 // Maemo-specific method: get the main program object
68 HildonProgram *GetHildonProgram() const { return m_hildonProgram; }
69 #endif // wxUSE_LIBHILDON
70
71 // implementation only from now on
72 // -------------------------------
73
74 // This returns the current visual: either that used by wxRootWindow
75 // or the XVisualInfo* for SGI.
76 GdkVisual *GetGdkVisual();
77
78 // check for pending events, without interference from our idle source
79 bool EventsPending();
80 bool DoIdle();
81
82 private:
83 // true if we're inside an assert modal dialog
84 #ifdef __WXDEBUG__
85 bool m_isInAssert;
86 #endif // __WXDEBUG__
87 #if wxUSE_THREADS
88 wxMutex* m_idleMutex;
89 #endif
90 guint m_idleSourceId;
91
92 #if wxUSE_LIBHILDON
93 HildonProgram *m_hildonProgram;
94 #endif // wxUSE_LIBHILDON
95
96 DECLARE_DYNAMIC_CLASS(wxApp)
97 };
98
99 #endif // _WX_GTK_APP_H_