1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxApp definition for wxGTK
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_APP_H_
11 #define _WX_GTK_APP_H_
13 //-----------------------------------------------------------------------------
15 //-----------------------------------------------------------------------------
17 #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
18 typedef struct _HildonProgram HildonProgram
;
19 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
25 class WXDLLIMPEXP_CORE wxApp
: public wxAppBase
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();
38 // override base class (pure) virtuals
39 virtual void WakeUpIdle();
41 virtual bool Initialize(int& argc
, wxChar
**argv
);
42 virtual void CleanUp();
44 virtual void OnAssertFailure(const wxChar
*file
,
50 // GTK-specific methods
51 // -------------------
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)
56 // must return XVisualInfo pointer (it is not freed by caller)
57 virtual void *GetXVisualInfo() { return NULL
; }
59 // Check if we're using a global menu. Currently this is only true when
60 // running under Ubuntu Unity and global menu is not disabled.
62 // This is mostly used in the implementation in order to work around
63 // various bugs arising due to this.
64 static bool GTKIsUsingGlobalMenu();
66 #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
67 // Maemo-specific method: get the main program object
68 HildonProgram
*GetHildonProgram();
69 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
71 // implementation only from now on
72 // -------------------------------
74 // check for pending events, without interference from our idle source
79 // true if we're inside an assert modal dialog
85 unsigned m_idleSourceId
;
87 #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
88 HildonProgram
*m_hildonProgram
;
89 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
91 DECLARE_DYNAMIC_CLASS(wxApp
)
94 #endif // _WX_GTK_APP_H_