]>
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 | ||
426d19f1 | 17 | #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 18 | typedef struct _HildonProgram HildonProgram; |
426d19f1 | 19 | #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 20 | |
c801d85f KB |
21 | //----------------------------------------------------------------------------- |
22 | // wxApp | |
23 | //----------------------------------------------------------------------------- | |
24 | ||
20123d49 | 25 | class WXDLLIMPEXP_CORE wxApp: public wxAppBase |
c801d85f | 26 | { |
094637f6 | 27 | public: |
bbe0af5b | 28 | wxApp(); |
a6f5aa49 | 29 | virtual ~wxApp(); |
a3622daa | 30 | |
094637f6 VZ |
31 | /* override for altering the way wxGTK intializes the GUI |
32 | * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by | |
33 | * default. when overriding this method, the code in it is likely to be | |
34 | * platform dependent, otherwise use OnInit(). */ | |
c50c6fb2 | 35 | virtual bool SetNativeTheme(const wxString& theme); |
bbe0af5b | 36 | virtual bool OnInitGui(); |
094637f6 VZ |
37 | |
38 | // override base class (pure) virtuals | |
e2478fde | 39 | virtual void WakeUpIdle(); |
53010e52 | 40 | |
05e2b077 | 41 | virtual bool Initialize(int& argc, wxChar **argv); |
94826170 | 42 | virtual void CleanUp(); |
a3622daa | 43 | |
2d97237d VZ |
44 | virtual void OnAssertFailure(const wxChar *file, |
45 | int line, | |
46 | const wxChar *func, | |
47 | const wxChar *cond, | |
48 | const wxChar *msg); | |
094637f6 | 49 | |
498ace9e VZ |
50 | // GTK-specific methods |
51 | // ------------------- | |
52 | ||
53 | // this can be overridden to return a specific visual to be used for GTK+ | |
54 | // instead of the default one (it's used by wxGLApp) | |
55 | // | |
56 | // must return XVisualInfo pointer (it is not freed by caller) | |
57 | virtual void *GetXVisualInfo() { return NULL; } | |
58 | ||
426d19f1 | 59 | #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 60 | // Maemo-specific method: get the main program object |
426d19f1 JS |
61 | HildonProgram *GetHildonProgram(); |
62 | #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 | |
498ace9e VZ |
63 | |
64 | // implementation only from now on | |
65 | // ------------------------------- | |
66 | ||
005f5d18 RR |
67 | // This returns the current visual: either that used by wxRootWindow |
68 | // or the XVisualInfo* for SGI. | |
69 | GdkVisual *GetGdkVisual(); | |
498ace9e | 70 | |
a1abca32 PC |
71 | // check for pending events, without interference from our idle source |
72 | bool EventsPending(); | |
73 | bool DoIdle(); | |
74 | ||
094637f6 | 75 | private: |
a5f1fd3e | 76 | // true if we're inside an assert modal dialog |
a5f1fd3e | 77 | bool m_isInAssert; |
657a8a35 | 78 | |
a1abca32 | 79 | #if wxUSE_THREADS |
4d4ec2a5 | 80 | wxMutex m_idleMutex; |
a1abca32 PC |
81 | #endif |
82 | guint m_idleSourceId; | |
094637f6 | 83 | |
426d19f1 | 84 | #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 85 | HildonProgram *m_hildonProgram; |
426d19f1 | 86 | #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 87 | |
8636aed8 | 88 | DECLARE_DYNAMIC_CLASS(wxApp) |
c801d85f KB |
89 | }; |
90 | ||
4f13428c | 91 | #endif // _WX_GTK_APP_H_ |