]> git.saurik.com Git - wxWidgets.git/blob - src/mgl/app.cpp
Changed the pragmas to allow debugging under Linux
[wxWidgets.git] / src / mgl / app.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: app.cpp
3 // Purpose:
4 // Author: Vaclav Slavik
5 // Id: $Id$
6 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifdef __GNUG__
11 #pragma implementation "app.h"
12 #endif
13
14 #include "wx/app.h"
15 #include "wx/settings.h"
16 #include "wx/module.h"
17
18 #include <mgraph.hpp>
19
20 //-----------------------------------------------------------------------------
21 // Global data
22 //-----------------------------------------------------------------------------
23
24 // MGL's display DC:
25 MGLDevCtx *g_displayDC = NULL;
26
27 // ----
28
29 wxApp *wxTheApp = (wxApp *) NULL;
30 wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NULL;
31
32 // FIXME_MGL - whole file
33
34
35 extern bool g_isIdle;
36
37 bool g_mainThreadLocked = FALSE;
38
39 void wxExit()
40 {
41 exit(0);
42 }
43
44 //-----------------------------------------------------------------------------
45 // wxYield
46 //-----------------------------------------------------------------------------
47
48 bool wxYield()
49 {
50 return TRUE;
51 }
52
53 //-----------------------------------------------------------------------------
54 // wxWakeUpIdle
55 //-----------------------------------------------------------------------------
56
57 void wxWakeUpIdle()
58 {
59 }
60
61 //-----------------------------------------------------------------------------
62 // wxApp
63 //-----------------------------------------------------------------------------
64
65 IMPLEMENT_DYNAMIC_CLASS(wxApp,wxEvtHandler)
66
67 BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
68 EVT_IDLE(wxApp::OnIdle)
69 END_EVENT_TABLE()
70
71
72 int wxEntry( int argc, char *argv[] )
73 {
74 return 0;
75 }
76
77
78 // FIXME_MGL - this is temporary solution, will be removed
79 // once I have wxApp up and running
80 bool wxMGL_Initialize()
81 {
82 wxBuffer = new wxChar[BUFSIZ + 512];
83
84 wxClassInfo::InitializeClasses();
85 wxSystemSettings::Init();
86 wxTheColourDatabase = new wxColourDatabase( wxKEY_STRING );
87 wxTheColourDatabase->Initialize();
88 wxInitializeStockLists();
89 wxInitializeStockObjects();
90 wxModule::RegisterModules();
91 if (!wxModule::InitializeModules()) return FALSE;
92 return TRUE;
93 }
94