]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/app.h
Fixed bug: wxPGProperty::SetName() crashed if it was called before property was added...
[wxWidgets.git] / include / wx / gtk / app.h
CommitLineData
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 18class WXDLLIMPEXP_FWD_BASE wxMutex;
a1abca32 19#endif
c801d85f 20
e2f3bc41
VZ
21#if wxUSE_LIBHILDON
22typedef struct _HildonProgram HildonProgram;
23#endif // wxUSE_LIBHILDON
24
c801d85f
KB
25//-----------------------------------------------------------------------------
26// wxApp
27//-----------------------------------------------------------------------------
28
20123d49 29class WXDLLIMPEXP_CORE wxApp: public wxAppBase
c801d85f 30{
094637f6 31public:
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
2d97237d
VZ
48 virtual void OnAssertFailure(const wxChar *file,
49 int line,
50 const wxChar *func,
51 const wxChar *cond,
52 const wxChar *msg);
094637f6 53
498ace9e
VZ
54 // GTK-specific methods
55 // -------------------
56
57 // this can be overridden to return a specific visual to be used for GTK+
58 // instead of the default one (it's used by wxGLApp)
59 //
60 // must return XVisualInfo pointer (it is not freed by caller)
61 virtual void *GetXVisualInfo() { return NULL; }
62
e2f3bc41
VZ
63#if wxUSE_LIBHILDON
64 // Maemo-specific method: get the main program object
65 HildonProgram *GetHildonProgram() const { return m_hildonProgram; }
66#endif // wxUSE_LIBHILDON
498ace9e
VZ
67
68 // implementation only from now on
69 // -------------------------------
70
005f5d18
RR
71 // This returns the current visual: either that used by wxRootWindow
72 // or the XVisualInfo* for SGI.
73 GdkVisual *GetGdkVisual();
498ace9e 74
a1abca32
PC
75 // check for pending events, without interference from our idle source
76 bool EventsPending();
77 bool DoIdle();
78
094637f6 79private:
a5f1fd3e 80 // true if we're inside an assert modal dialog
a5f1fd3e 81 bool m_isInAssert;
657a8a35 82
a1abca32
PC
83#if wxUSE_THREADS
84 wxMutex* m_idleMutex;
85#endif
86 guint m_idleSourceId;
094637f6 87
e2f3bc41
VZ
88#if wxUSE_LIBHILDON
89 HildonProgram *m_hildonProgram;
90#endif // wxUSE_LIBHILDON
91
8636aed8 92 DECLARE_DYNAMIC_CLASS(wxApp)
c801d85f
KB
93};
94
4f13428c 95#endif // _WX_GTK_APP_H_