]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/app.h
use wxRound(x) instead of int( x+0.5 )
[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
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
8461e4c2 43 virtual bool Yield(bool onlyIfNeeded = FALSE);
e2478fde 44 virtual void WakeUpIdle();
53010e52 45
05e2b077 46 virtual bool Initialize(int& argc, wxChar **argv);
94826170 47 virtual void CleanUp();
a3622daa 48
a5f1fd3e 49#ifdef __WXDEBUG__
2d97237d
VZ
50 virtual void OnAssertFailure(const wxChar *file,
51 int line,
52 const wxChar *func,
53 const wxChar *cond,
54 const wxChar *msg);
a5f1fd3e 55#endif // __WXDEBUG__
094637f6 56
498ace9e
VZ
57 // GTK-specific methods
58 // -------------------
59
60 // this can be overridden to return a specific visual to be used for GTK+
61 // instead of the default one (it's used by wxGLApp)
62 //
63 // must return XVisualInfo pointer (it is not freed by caller)
64 virtual void *GetXVisualInfo() { return NULL; }
65
e2f3bc41
VZ
66#if wxUSE_LIBHILDON
67 // Maemo-specific method: get the main program object
68 HildonProgram *GetHildonProgram() const { return m_hildonProgram; }
69#endif // wxUSE_LIBHILDON
498ace9e
VZ
70
71 // implementation only from now on
72 // -------------------------------
73
005f5d18
RR
74 // This returns the current visual: either that used by wxRootWindow
75 // or the XVisualInfo* for SGI.
76 GdkVisual *GetGdkVisual();
498ace9e 77
a1abca32
PC
78 // check for pending events, without interference from our idle source
79 bool EventsPending();
80 bool DoIdle();
81
094637f6 82private:
a5f1fd3e
VZ
83 // true if we're inside an assert modal dialog
84#ifdef __WXDEBUG__
85 bool m_isInAssert;
86#endif // __WXDEBUG__
a1abca32
PC
87#if wxUSE_THREADS
88 wxMutex* m_idleMutex;
89#endif
90 guint m_idleSourceId;
094637f6 91
e2f3bc41
VZ
92#if wxUSE_LIBHILDON
93 HildonProgram *m_hildonProgram;
94#endif // wxUSE_LIBHILDON
95
8636aed8 96 DECLARE_DYNAMIC_CLASS(wxApp)
c801d85f
KB
97};
98
4f13428c 99#endif // _WX_GTK_APP_H_