]> git.saurik.com Git - wxWidgets.git/blob - src/mgl/app.cpp
compilation fix
[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 wxApp *wxTheApp = (wxApp *) NULL;
25 wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NULL;
26
27 // FIXME_MGL - whole file
28
29
30 extern bool g_isIdle;
31
32 bool g_mainThreadLocked = FALSE;
33
34 void wxExit()
35 {
36 exit(0);
37 }
38
39 //-----------------------------------------------------------------------------
40 // wxYield
41 //-----------------------------------------------------------------------------
42
43 bool wxYield()
44 {
45 return TRUE;
46 }
47
48 //-----------------------------------------------------------------------------
49 // wxWakeUpIdle
50 //-----------------------------------------------------------------------------
51
52 void wxWakeUpIdle()
53 {
54 }
55
56 //-----------------------------------------------------------------------------
57 // wxApp
58 //-----------------------------------------------------------------------------
59
60 IMPLEMENT_DYNAMIC_CLASS(wxApp,wxEvtHandler)
61
62 BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
63 EVT_IDLE(wxApp::OnIdle)
64 END_EVENT_TABLE()
65
66
67 int wxEntry( int argc, char *argv[] )
68 {
69 return 0;
70 }
71
72
73 // FIXME_MGL - this is temporary solution, will be removed
74 // once I have wxApp up and running
75 bool wxMGL_Initialize()
76 {
77 wxBuffer = new wxChar[BUFSIZ + 512];
78
79 wxClassInfo::InitializeClasses();
80 wxSystemSettings::Init();
81 wxTheColourDatabase = new wxColourDatabase( wxKEY_STRING );
82 wxTheColourDatabase->Initialize();
83 wxInitializeStockLists();
84 wxInitializeStockObjects();
85 wxModule::RegisterModules();
86 if (!wxModule::InitializeModules()) return FALSE;
87 return TRUE;
88 }
89