- return needMore ;
-}
-
-int wxApp::MainLoop()
-{
- gtk_main();
- return 0;
-}
-
-void wxApp::ExitMainLoop()
-{
- if (gtk_main_level() > 0)
- gtk_main_quit();
-}
-
-bool wxApp::Initialized()
-{
- return m_initialized;
-}
-
-bool wxApp::Pending()
-{
- return (gtk_events_pending() > 0);
-}
-
-void wxApp::Dispatch()
-{
- gtk_main_iteration();
-}
-
-void wxApp::DeletePendingObjects()
-{
- wxNode *node = wxPendingDelete.First();
- while (node)
- {
- wxObject *obj = (wxObject *)node->Data();
-
- delete obj;
-
- if (wxPendingDelete.Find(obj))
- delete node;
-
- node = wxPendingDelete.First();
- }
-}
-
-bool wxApp::Initialize()
-{
- wxBuffer = new wxChar[BUFSIZ + 512];
-
- wxClassInfo::InitializeClasses();
-
- wxSystemSettings::Init();
-
- // GL: I'm annoyed ... I don't know where to put this and I don't want to
- // create a module for that as it's part of the core.
-#if wxUSE_THREADS
- wxPendingEvents = new wxList();
- wxPendingEventsLocker = new wxCriticalSection();
-#endif
-
-/*
- wxTheFontNameDirectory = new wxFontNameDirectory;
- wxTheFontNameDirectory->Initialize();
-*/
-
- wxTheColourDatabase = new wxColourDatabase( wxKEY_STRING );
- wxTheColourDatabase->Initialize();
-
- wxInitializeStockLists();
- wxInitializeStockObjects();
-
-#if wxUSE_WX_RESOURCES
- wxTheResourceCache = new wxResourceCache( wxKEY_STRING );
-
- wxInitializeResourceSystem();
-#endif
-
- wxModule::RegisterModules();
- if (!wxModule::InitializeModules()) return FALSE;
-
- return TRUE;
-}
-
-void wxApp::CleanUp()
-{
- wxModule::CleanUpModules();
-
-#if wxUSE_WX_RESOURCES
- wxFlushResources();
-
- if (wxTheResourceCache)
- delete wxTheResourceCache;
- wxTheResourceCache = (wxResourceCache*) NULL;
-
- wxCleanUpResourceSystem();
-#endif
-
- if (wxTheColourDatabase)
- delete wxTheColourDatabase;
- wxTheColourDatabase = (wxColourDatabase*) NULL;
-
-/*
- if (wxTheFontNameDirectory) delete wxTheFontNameDirectory;
- wxTheFontNameDirectory = (wxFontNameDirectory*) NULL;
-*/
-
- wxDeleteStockObjects();
-
- wxDeleteStockLists();
-
- delete wxTheApp;
- wxTheApp = (wxApp*) NULL;
-
- // GL: I'm annoyed ... I don't know where to put this and I don't want to
- // create a module for that as it's part of the core.
-#if wxUSE_THREADS
- delete wxPendingEvents;
- delete wxPendingEventsLocker;
-#endif
-
- wxSystemSettings::Done();