]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
8461e4c2 | 2 | // Name: wx/gtk/app.h |
d48b06bd | 3 | // Purpose: wxApp definition for wxGTK |
c801d85f | 4 | // Author: Robert Roebling |
01111366 | 5 | // Copyright: (c) 1998 Robert Roebling, Julian Smart |
65571936 | 6 | // Licence: wxWindows licence |
c801d85f KB |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
4f13428c PC |
9 | #ifndef _WX_GTK_APP_H_ |
10 | #define _WX_GTK_APP_H_ | |
c801d85f KB |
11 | |
12 | //----------------------------------------------------------------------------- | |
13 | // classes | |
14 | //----------------------------------------------------------------------------- | |
15 | ||
426d19f1 | 16 | #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 17 | typedef struct _HildonProgram HildonProgram; |
426d19f1 | 18 | #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 19 | |
c801d85f KB |
20 | //----------------------------------------------------------------------------- |
21 | // wxApp | |
22 | //----------------------------------------------------------------------------- | |
23 | ||
20123d49 | 24 | class WXDLLIMPEXP_CORE wxApp: public wxAppBase |
c801d85f | 25 | { |
094637f6 | 26 | public: |
bbe0af5b | 27 | wxApp(); |
a6f5aa49 | 28 | virtual ~wxApp(); |
a3622daa | 29 | |
094637f6 VZ |
30 | /* override for altering the way wxGTK intializes the GUI |
31 | * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by | |
32 | * default. when overriding this method, the code in it is likely to be | |
33 | * platform dependent, otherwise use OnInit(). */ | |
c50c6fb2 | 34 | virtual bool SetNativeTheme(const wxString& theme); |
bbe0af5b | 35 | virtual bool OnInitGui(); |
094637f6 VZ |
36 | |
37 | // override base class (pure) virtuals | |
e2478fde | 38 | virtual void WakeUpIdle(); |
53010e52 | 39 | |
05e2b077 | 40 | virtual bool Initialize(int& argc, wxChar **argv); |
94826170 | 41 | virtual void CleanUp(); |
a3622daa | 42 | |
2d97237d VZ |
43 | virtual void OnAssertFailure(const wxChar *file, |
44 | int line, | |
45 | const wxChar *func, | |
46 | const wxChar *cond, | |
47 | const wxChar *msg); | |
094637f6 | 48 | |
498ace9e VZ |
49 | // GTK-specific methods |
50 | // ------------------- | |
51 | ||
52 | // this can be overridden to return a specific visual to be used for GTK+ | |
53 | // instead of the default one (it's used by wxGLApp) | |
54 | // | |
55 | // must return XVisualInfo pointer (it is not freed by caller) | |
56 | virtual void *GetXVisualInfo() { return NULL; } | |
57 | ||
93c609c7 VZ |
58 | // Check if we're using a global menu. Currently this is only true when |
59 | // running under Ubuntu Unity and global menu is not disabled. | |
60 | // | |
61 | // This is mostly used in the implementation in order to work around | |
62 | // various bugs arising due to this. | |
63 | static bool GTKIsUsingGlobalMenu(); | |
64 | ||
426d19f1 | 65 | #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 66 | // Maemo-specific method: get the main program object |
426d19f1 JS |
67 | HildonProgram *GetHildonProgram(); |
68 | #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 | |
498ace9e VZ |
69 | |
70 | // implementation only from now on | |
71 | // ------------------------------- | |
72 | ||
a1abca32 PC |
73 | // check for pending events, without interference from our idle source |
74 | bool EventsPending(); | |
75 | bool DoIdle(); | |
76 | ||
094637f6 | 77 | private: |
a5f1fd3e | 78 | // true if we're inside an assert modal dialog |
a5f1fd3e | 79 | bool m_isInAssert; |
657a8a35 | 80 | |
a1abca32 | 81 | #if wxUSE_THREADS |
4d4ec2a5 | 82 | wxMutex m_idleMutex; |
a1abca32 | 83 | #endif |
29e461a2 | 84 | unsigned m_idleSourceId; |
094637f6 | 85 | |
426d19f1 | 86 | #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 87 | HildonProgram *m_hildonProgram; |
426d19f1 | 88 | #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 |
e2f3bc41 | 89 | |
8636aed8 | 90 | DECLARE_DYNAMIC_CLASS(wxApp) |
c801d85f KB |
91 | }; |
92 | ||
4f13428c | 93 | #endif // _WX_GTK_APP_H_ |