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 //-----------------------------------------------------------------------------
18 class WXDLLIMPEXP_FWD_BASE wxMutex
;
22 typedef struct _HildonProgram HildonProgram
;
23 #endif // wxUSE_LIBHILDON
25 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
29 class WXDLLIMPEXP_CORE wxApp
: public wxAppBase
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();
42 // override base class (pure) virtuals
43 virtual void WakeUpIdle();
45 virtual bool Initialize(int& argc
, wxChar
**argv
);
46 virtual void CleanUp();
48 virtual void OnAssertFailure(const wxChar
*file
,
54 // GTK-specific methods
55 // -------------------
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)
60 // must return XVisualInfo pointer (it is not freed by caller)
61 virtual void *GetXVisualInfo() { return NULL
; }
64 // Maemo-specific method: get the main program object
65 HildonProgram
*GetHildonProgram() const { return m_hildonProgram
; }
66 #endif // wxUSE_LIBHILDON
68 // implementation only from now on
69 // -------------------------------
71 // This returns the current visual: either that used by wxRootWindow
72 // or the XVisualInfo* for SGI.
73 GdkVisual
*GetGdkVisual();
75 // check for pending events, without interference from our idle source
80 // true if we're inside an assert modal dialog
89 HildonProgram
*m_hildonProgram
;
90 #endif // wxUSE_LIBHILDON
92 DECLARE_DYNAMIC_CLASS(wxApp
)
95 #endif // _WX_GTK_APP_H_