]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/app.h
removed redundant code
[wxWidgets.git] / include / wx / gtk / app.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/app.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling, Julian Smart
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef __GTKAPPH__
11#define __GTKAPPH__
12
13#ifdef __GNUG__
14#pragma interface
15#endif
16
17#include "wx/frame.h"
18#include "wx/icon.h"
19
20//-----------------------------------------------------------------------------
21// classes
22//-----------------------------------------------------------------------------
23
24class wxApp;
25class wxLog;
26
27//-----------------------------------------------------------------------------
28// wxApp
29//-----------------------------------------------------------------------------
30
31class wxApp: public wxAppBase
32{
33public:
34 wxApp();
35 virtual ~wxApp();
36
37 /* override for altering the way wxGTK intializes the GUI
38 * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
39 * default. when overriding this method, the code in it is likely to be
40 * platform dependent, otherwise use OnInit(). */
41 virtual bool OnInitGui();
42
43 // override base class (pure) virtuals
44 virtual int MainLoop();
45 virtual void ExitMainLoop();
46 virtual bool Initialized();
47 virtual bool Pending();
48 virtual void Dispatch();
49 virtual bool Yield(bool onlyIfNeeded = FALSE);
50
51 // implementation only from now on
52 void OnIdle( wxIdleEvent &event );
53 bool SendIdleEvents();
54 bool SendIdleEvents( wxWindow* win );
55
56 static bool Initialize();
57 static bool InitialzeVisual();
58 static void CleanUp();
59
60 bool ProcessIdle();
61 void DeletePendingObjects();
62
63#ifdef __WXDEBUG__
64 virtual void OnAssert(const wxChar *file, int line, const wxChar *msg);
65
66 bool IsInAssert() const { return m_isInAssert; }
67#endif // __WXDEBUG__
68
69 bool m_initialized;
70
71 gint m_idleTag;
72#if wxUSE_THREADS
73 gint m_wakeUpTimerTag;
74#endif
75 unsigned char *m_colorCube;
76
77 // Used by the the wxGLApp and wxGLCanvas class for GL-based X visual
78 // selection; this is actually an XVisualInfo*
79 void *m_glVisualInfo;
80 // This returns the current visual: either that used by wxRootWindow
81 // or the XVisualInfo* for SGI.
82 GdkVisual *GetGdkVisual();
83
84private:
85 // true if we're inside an assert modal dialog
86#ifdef __WXDEBUG__
87 bool m_isInAssert;
88#endif // __WXDEBUG__
89
90 DECLARE_DYNAMIC_CLASS(wxApp)
91 DECLARE_EVENT_TABLE()
92};
93
94int WXDLLEXPORT wxEntry( int argc, char *argv[] );
95
96#endif // __GTKAPPH__