1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxApp definition for wxGTK
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling, Julian Smart
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
10 #define _WX_GTK_APP_H_
12 //-----------------------------------------------------------------------------
14 //-----------------------------------------------------------------------------
16 #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
17 typedef struct _HildonProgram HildonProgram
;
18 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
24 class WXDLLIMPEXP_CORE wxApp
: public wxAppBase
30 /* override for altering the way wxGTK intializes the GUI
31 * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
32 * default. when overriding this method, the code in it is likely to be
33 * platform dependent, otherwise use OnInit(). */
34 virtual bool SetNativeTheme(const wxString
& theme
);
35 virtual bool OnInitGui();
37 // override base class (pure) virtuals
38 virtual void WakeUpIdle();
40 virtual bool Initialize(int& argc
, wxChar
**argv
);
41 virtual void CleanUp();
43 virtual void OnAssertFailure(const wxChar
*file
,
49 // GTK-specific methods
50 // -------------------
52 // this can be overridden to return a specific visual to be used for GTK+
53 // instead of the default one (it's used by wxGLApp)
55 // must return XVisualInfo pointer (it is not freed by caller)
56 virtual void *GetXVisualInfo() { return NULL
; }
58 // Check if we're using a global menu. Currently this is only true when
59 // running under Ubuntu Unity and global menu is not disabled.
61 // This is mostly used in the implementation in order to work around
62 // various bugs arising due to this.
63 static bool GTKIsUsingGlobalMenu();
65 #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
66 // Maemo-specific method: get the main program object
67 HildonProgram
*GetHildonProgram();
68 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
70 // implementation only from now on
71 // -------------------------------
73 // check for pending events, without interference from our idle source
78 // true if we're inside an assert modal dialog
84 unsigned m_idleSourceId
;
86 #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
87 HildonProgram
*m_hildonProgram
;
88 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
90 DECLARE_DYNAMIC_CLASS(wxApp
)
93 #endif // _WX_GTK_APP_H_