]> git.saurik.com Git - wxWidgets.git/blame - src/mgl/app.cpp
More small fixes
[wxWidgets.git] / src / mgl / app.cpp
CommitLineData
32b8ec41
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: app.cpp
3// Purpose:
4// Author: Vaclav Slavik
5// Id: $Id$
6// Copyright: (c) 2001 Vaclav Slavik
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:
25MGLDevCtx *g_displayDC = NULL;
26
27// ----
28
29wxApp *wxTheApp = (wxApp *) NULL;
30wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NULL;
31
32// FIXME_MGL - whole file
33
34
35extern bool g_isIdle;
36
37bool g_mainThreadLocked = FALSE;
38
39void wxExit()
40{
41 exit(0);
42}
43
44//-----------------------------------------------------------------------------
45// wxYield
46//-----------------------------------------------------------------------------
47
48bool wxYield()
49{
50 return TRUE;
51}
52
53//-----------------------------------------------------------------------------
54// wxWakeUpIdle
55//-----------------------------------------------------------------------------
56
57void wxWakeUpIdle()
58{
59}
60
61//-----------------------------------------------------------------------------
62// wxApp
63//-----------------------------------------------------------------------------
64
65IMPLEMENT_DYNAMIC_CLASS(wxApp,wxEvtHandler)
66
67BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
68 EVT_IDLE(wxApp::OnIdle)
69END_EVENT_TABLE()
70
71
72int 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
80bool 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