]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/app.h
added wxEncodingToCodepage() and implemented it properly (using in32 API instead...
[wxWidgets.git] / include / wx / gtk1 / 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
a3622daa 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef __GTKAPPH__
11#define __GTKAPPH__
12
13#ifdef __GNUG__
14#pragma interface
15#endif
16
c801d85f 17#include "wx/frame.h"
ebea0891 18#include "wx/icon.h"
c801d85f
KB
19
20//-----------------------------------------------------------------------------
21// classes
22//-----------------------------------------------------------------------------
23
24class wxApp;
25class wxLog;
26
c801d85f
KB
27//-----------------------------------------------------------------------------
28// wxApp
29//-----------------------------------------------------------------------------
30
094637f6 31class wxApp: public wxAppBase
c801d85f 32{
094637f6 33public:
bbe0af5b 34 wxApp();
a6f5aa49 35 virtual ~wxApp();
a3622daa 36
094637f6
VZ
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(). */
bbe0af5b 41 virtual bool OnInitGui();
094637f6
VZ
42
43 // override base class (pure) virtuals
bbe0af5b 44 virtual int MainLoop();
094637f6
VZ
45 virtual void ExitMainLoop();
46 virtual bool Initialized();
bbe0af5b
RR
47 virtual bool Pending();
48 virtual void Dispatch();
8461e4c2 49 virtual bool Yield(bool onlyIfNeeded = FALSE);
53010e52 50
ebea0891 51 virtual wxIcon GetStdIcon(int which) const;
53010e52 52
094637f6 53 // implementation only from now on
a3622daa 54 void OnIdle( wxIdleEvent &event );
bbe0af5b 55 bool SendIdleEvents();
53010e52 56 bool SendIdleEvents( wxWindow* win );
a3622daa 57
0d2a2b60
RR
58 static bool Initialize();
59 static bool InitialzeVisual();
60 static void CleanUp();
a3622daa 61
bbe0af5b
RR
62 bool ProcessIdle();
63 void DeletePendingObjects();
a3622daa 64
a5f1fd3e
VZ
65#ifdef __WXDEBUG__
66 virtual void OnAssert(const wxChar *file, int line, const wxChar *msg);
67
68 bool IsInAssert() const { return m_isInAssert; }
69#endif // __WXDEBUG__
094637f6 70
f6fcbb63 71 bool m_initialized;
094637f6 72
f6fcbb63 73 gint m_idleTag;
6b3eb77a 74#if wxUSE_THREADS
7b90a8f2 75 gint m_wakeUpTimerTag;
6b3eb77a 76#endif
f6fcbb63 77 unsigned char *m_colorCube;
a3622daa 78
a6f5aa49
VZ
79 // used by the the wxGLApp and wxGLCanvas class for GL-based X visual
80 // selection; this is actually an XVisualInfo*
81 void *m_glVisualInfo;
82
094637f6 83private:
a5f1fd3e
VZ
84 // true if we're inside an assert modal dialog
85#ifdef __WXDEBUG__
86 bool m_isInAssert;
87#endif // __WXDEBUG__
094637f6 88
8636aed8 89 DECLARE_DYNAMIC_CLASS(wxApp)
094637f6 90 DECLARE_EVENT_TABLE()
c801d85f
KB
91};
92
f9201144
JJ
93int WXDLLEXPORT wxEntry( int argc, char *argv[] );
94
c801d85f 95#endif // __GTKAPPH__