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 OnInitGui();
41 // override base class (pure) virtuals
42 virtual bool Yield(bool onlyIfNeeded
= FALSE
);
43 virtual void WakeUpIdle();
45 virtual bool Initialize(int& argc
, wxChar
**argv
);
46 virtual void CleanUp();
49 virtual void OnAssertFailure(const wxChar
*file
,
56 // GTK-specific methods
57 // -------------------
59 // this can be overridden to return a specific visual to be used for GTK+
60 // instead of the default one (it's used by wxGLApp)
62 // must return XVisualInfo pointer (it is not freed by caller)
63 virtual void *GetXVisualInfo() { return NULL
; }
66 // Maemo-specific method: get the main program object
67 HildonProgram
*GetHildonProgram() const { return m_hildonProgram
; }
68 #endif // wxUSE_LIBHILDON
70 // implementation only from now on
71 // -------------------------------
73 // This returns the current visual: either that used by wxRootWindow
74 // or the XVisualInfo* for SGI.
75 GdkVisual
*GetGdkVisual();
77 // check for pending events, without interference from our idle source
82 // true if we're inside an assert modal dialog
92 HildonProgram
*m_hildonProgram
;
93 #endif // wxUSE_LIBHILDON
95 DECLARE_DYNAMIC_CLASS(wxApp
)
98 #endif // _WX_GTK_APP_H_