]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/app.h
Compilation fix after r62754.
[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_LIBHILDON || wxUSE_LIBHILDON2
18 typedef struct _HildonProgram HildonProgram;
19 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
20
21 //-----------------------------------------------------------------------------
22 // wxApp
23 //-----------------------------------------------------------------------------
24
25 class WXDLLIMPEXP_CORE wxApp: public wxAppBase
26 {
27 public:
28 wxApp();
29 virtual ~wxApp();
30
31 /* override for altering the way wxGTK intializes the GUI
32 * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
33 * default. when overriding this method, the code in it is likely to be
34 * platform dependent, otherwise use OnInit(). */
35 virtual bool SetNativeTheme(const wxString& theme);
36 virtual bool OnInitGui();
37
38 // override base class (pure) virtuals
39 virtual void WakeUpIdle();
40
41 virtual bool Initialize(int& argc, wxChar **argv);
42 virtual void CleanUp();
43
44 virtual void OnAssertFailure(const wxChar *file,
45 int line,
46 const wxChar *func,
47 const wxChar *cond,
48 const wxChar *msg);
49
50 // GTK-specific methods
51 // -------------------
52
53 // this can be overridden to return a specific visual to be used for GTK+
54 // instead of the default one (it's used by wxGLApp)
55 //
56 // must return XVisualInfo pointer (it is not freed by caller)
57 virtual void *GetXVisualInfo() { return NULL; }
58
59 #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
60 // Maemo-specific method: get the main program object
61 HildonProgram *GetHildonProgram();
62 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
63
64 // implementation only from now on
65 // -------------------------------
66
67 // This returns the current visual: either that used by wxRootWindow
68 // or the XVisualInfo* for SGI.
69 GdkVisual *GetGdkVisual();
70
71 // check for pending events, without interference from our idle source
72 bool EventsPending();
73 bool DoIdle();
74
75 private:
76 // true if we're inside an assert modal dialog
77 bool m_isInAssert;
78
79 #if wxUSE_THREADS
80 wxMutex m_idleMutex;
81 #endif
82 guint m_idleSourceId;
83
84 #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
85 HildonProgram *m_hildonProgram;
86 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
87
88 DECLARE_DYNAMIC_CLASS(wxApp)
89 };
90
91 #endif // _WX_GTK_APP_H_