]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/app.h
no changes, just remove #if'd out code
[wxWidgets.git] / include / wx / gtk / app.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/app.h
3 // Purpose: wxApp definition for wxGTK
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 void WakeUpIdle();
44
45 virtual bool Initialize(int& argc, wxChar **argv);
46 virtual void CleanUp();
47
48 virtual void OnAssertFailure(const wxChar *file,
49 int line,
50 const wxChar *func,
51 const wxChar *cond,
52 const wxChar *msg);
53
54 // GTK-specific methods
55 // -------------------
56
57 // this can be overridden to return a specific visual to be used for GTK+
58 // instead of the default one (it's used by wxGLApp)
59 //
60 // must return XVisualInfo pointer (it is not freed by caller)
61 virtual void *GetXVisualInfo() { return NULL; }
62
63 #if wxUSE_LIBHILDON
64 // Maemo-specific method: get the main program object
65 HildonProgram *GetHildonProgram() const { return m_hildonProgram; }
66 #endif // wxUSE_LIBHILDON
67
68 // implementation only from now on
69 // -------------------------------
70
71 // This returns the current visual: either that used by wxRootWindow
72 // or the XVisualInfo* for SGI.
73 GdkVisual *GetGdkVisual();
74
75 // check for pending events, without interference from our idle source
76 bool EventsPending();
77 bool DoIdle();
78
79 private:
80 // true if we're inside an assert modal dialog
81 bool m_isInAssert;
82
83 #if wxUSE_THREADS
84 wxMutex* m_idleMutex;
85 #endif
86 guint m_idleSourceId;
87
88 #if wxUSE_LIBHILDON
89 HildonProgram *m_hildonProgram;
90 #endif // wxUSE_LIBHILDON
91
92 DECLARE_DYNAMIC_CLASS(wxApp)
93 };
94
95 #endif // _WX_GTK_APP_H_