]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/app.h
Small fix
[wxWidgets.git] / include / wx / gtk / app.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8461e4c2 2// Name: wx/gtk/app.h
c801d85f
KB
3// Purpose:
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
c801d85f
KB
21//-----------------------------------------------------------------------------
22// wxApp
23//-----------------------------------------------------------------------------
24
20123d49 25class WXDLLIMPEXP_CORE wxApp: public wxAppBase
c801d85f 26{
094637f6 27public:
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(). */
bbe0af5b 35 virtual bool OnInitGui();
094637f6
VZ
36
37 // override base class (pure) virtuals
8461e4c2 38 virtual bool Yield(bool onlyIfNeeded = FALSE);
e2478fde 39 virtual void WakeUpIdle();
53010e52 40
05e2b077 41 virtual bool Initialize(int& argc, wxChar **argv);
94826170 42 virtual void CleanUp();
a3622daa 43
a5f1fd3e 44#ifdef __WXDEBUG__
2d97237d
VZ
45 virtual void OnAssertFailure(const wxChar *file,
46 int line,
47 const wxChar *func,
48 const wxChar *cond,
49 const wxChar *msg);
a5f1fd3e 50#endif // __WXDEBUG__
094637f6 51
498ace9e
VZ
52 // GTK-specific methods
53 // -------------------
54
55 // this can be overridden to return a specific visual to be used for GTK+
56 // instead of the default one (it's used by wxGLApp)
57 //
58 // must return XVisualInfo pointer (it is not freed by caller)
59 virtual void *GetXVisualInfo() { return NULL; }
60
61
62 // implementation only from now on
63 // -------------------------------
64
005f5d18
RR
65 // This returns the current visual: either that used by wxRootWindow
66 // or the XVisualInfo* for SGI.
67 GdkVisual *GetGdkVisual();
498ace9e 68
a1abca32
PC
69 // check for pending events, without interference from our idle source
70 bool EventsPending();
71 bool DoIdle();
72
094637f6 73private:
a5f1fd3e
VZ
74 // true if we're inside an assert modal dialog
75#ifdef __WXDEBUG__
76 bool m_isInAssert;
77#endif // __WXDEBUG__
a1abca32
PC
78#if wxUSE_THREADS
79 wxMutex* m_idleMutex;
80#endif
81 guint m_idleSourceId;
094637f6 82
8636aed8 83 DECLARE_DYNAMIC_CLASS(wxApp)
c801d85f
KB
84};
85
4f13428c 86#endif // _WX_GTK_APP_H_