1 /////////////////////////////////////////////////////////////////////////////
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 bool Yield(bool onlyIfNeeded
= FALSE
);
44 virtual void WakeUpIdle();
46 virtual bool Initialize(int& argc
, wxChar
**argv
);
47 virtual void CleanUp();
50 virtual void OnAssertFailure(const wxChar
*file
,
57 // GTK-specific methods
58 // -------------------
60 // this can be overridden to return a specific visual to be used for GTK+
61 // instead of the default one (it's used by wxGLApp)
63 // must return XVisualInfo pointer (it is not freed by caller)
64 virtual void *GetXVisualInfo() { return NULL
; }
67 // Maemo-specific method: get the main program object
68 HildonProgram
*GetHildonProgram() const { return m_hildonProgram
; }
69 #endif // wxUSE_LIBHILDON
71 // implementation only from now on
72 // -------------------------------
74 // This returns the current visual: either that used by wxRootWindow
75 // or the XVisualInfo* for SGI.
76 GdkVisual
*GetGdkVisual();
78 // check for pending events, without interference from our idle source
83 // true if we're inside an assert modal dialog
93 HildonProgram
*m_hildonProgram
;
94 #endif // wxUSE_LIBHILDON
96 DECLARE_DYNAMIC_CLASS(wxApp
)
99 #endif // _WX_GTK_APP_H_