]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
8461e4c2 | 2 | // Name: wx/gtk/app.h |
d48b06bd | 3 | // Purpose: wxApp definition for wxGTK |
c801d85f | 4 | // Author: Robert Roebling |
dbf858b5 | 5 | // Id: $Id$ |
01111366 | 6 | // Copyright: (c) 1998 Robert Roebling, Julian Smart |
65571936 | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
4f13428c PC |
10 | #ifndef _WX_GTK_APP_H_ |
11 | #define _WX_GTK_APP_H_ | |
c801d85f KB |
12 | |
13 | //----------------------------------------------------------------------------- | |
14 | // classes | |
15 | //----------------------------------------------------------------------------- | |
16 | ||
a1abca32 | 17 | #if wxUSE_THREADS |
b5dbe15d | 18 | class WXDLLIMPEXP_FWD_BASE wxMutex; |
a1abca32 | 19 | #endif |
c801d85f | 20 | |
e2f3bc41 VZ |
21 | #if wxUSE_LIBHILDON |
22 | typedef struct _HildonProgram HildonProgram; | |
23 | #endif // wxUSE_LIBHILDON | |
24 | ||
c801d85f KB |
25 | //----------------------------------------------------------------------------- |
26 | // wxApp | |
27 | //----------------------------------------------------------------------------- | |
28 | ||
20123d49 | 29 | class WXDLLIMPEXP_CORE wxApp: public wxAppBase |
c801d85f | 30 | { |
094637f6 | 31 | public: |
bbe0af5b | 32 | wxApp(); |
a6f5aa49 | 33 | virtual ~wxApp(); |
a3622daa | 34 | |
094637f6 VZ |
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(). */ | |
c50c6fb2 | 39 | virtual bool SetNativeTheme(const wxString& theme); |
bbe0af5b | 40 | virtual bool OnInitGui(); |
094637f6 VZ |
41 | |
42 | // override base class (pure) virtuals | |
e2478fde | 43 | virtual void WakeUpIdle(); |
53010e52 | 44 | |
05e2b077 | 45 | virtual bool Initialize(int& argc, wxChar **argv); |
94826170 | 46 | virtual void CleanUp(); |
a3622daa | 47 | |
a5f1fd3e | 48 | #ifdef __WXDEBUG__ |
2d97237d VZ |
49 | virtual void OnAssertFailure(const wxChar *file, |
50 | int line, | |
51 | const wxChar *func, | |
52 | const wxChar *cond, | |
53 | const wxChar *msg); | |
a5f1fd3e | 54 | #endif // __WXDEBUG__ |
094637f6 | 55 | |
498ace9e VZ |
56 | // GTK-specific methods |
57 | // ------------------- | |
58 | ||
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) | |
61 | // | |
62 | // must return XVisualInfo pointer (it is not freed by caller) | |
63 | virtual void *GetXVisualInfo() { return NULL; } | |
64 | ||
e2f3bc41 VZ |
65 | #if wxUSE_LIBHILDON |
66 | // Maemo-specific method: get the main program object | |
67 | HildonProgram *GetHildonProgram() const { return m_hildonProgram; } | |
68 | #endif // wxUSE_LIBHILDON | |
498ace9e VZ |
69 | |
70 | // implementation only from now on | |
71 | // ------------------------------- | |
72 | ||
005f5d18 RR |
73 | // This returns the current visual: either that used by wxRootWindow |
74 | // or the XVisualInfo* for SGI. | |
75 | GdkVisual *GetGdkVisual(); | |
498ace9e | 76 | |
a1abca32 PC |
77 | // check for pending events, without interference from our idle source |
78 | bool EventsPending(); | |
79 | bool DoIdle(); | |
80 | ||
094637f6 | 81 | private: |
a5f1fd3e VZ |
82 | // true if we're inside an assert modal dialog |
83 | #ifdef __WXDEBUG__ | |
84 | bool m_isInAssert; | |
85 | #endif // __WXDEBUG__ | |
a1abca32 PC |
86 | #if wxUSE_THREADS |
87 | wxMutex* m_idleMutex; | |
88 | #endif | |
89 | guint m_idleSourceId; | |
094637f6 | 90 | |
e2f3bc41 VZ |
91 | #if wxUSE_LIBHILDON |
92 | HildonProgram *m_hildonProgram; | |
93 | #endif // wxUSE_LIBHILDON | |
94 | ||
8636aed8 | 95 | DECLARE_DYNAMIC_CLASS(wxApp) |
c801d85f KB |
96 | }; |
97 | ||
4f13428c | 98 | #endif // _WX_GTK_APP_H_ |