/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
- #pragma implementation "appbase.h"
#pragma implementation "app.h"
#endif
wxApp *wxTheApp = (wxApp *) NULL;
wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NULL;
-#if wxUSE_THREADS
-extern wxList *wxPendingEvents;
-extern wxCriticalSection *wxPendingEventsLocker;
-#endif
extern wxResourceCache *wxTheResourceCache;
extern bool g_isIdle;
// local functions
//-----------------------------------------------------------------------------
-extern void wxFlushResources(void);
+extern void wxFlushResources();
//-----------------------------------------------------------------------------
// global functions
return TRUE;
}
-#endif
+
+#endif // wxUSE_THREADS
//-----------------------------------------------------------------------------
// wxApp
s_inOnIdle = TRUE;
-#if wxUSE_THREADS
/* Resend in the main thread events which have been prepared in other
threads */
ProcessPendingEvents();
-#endif
/* 'Garbage' collection of windows deleted with Close(). */
DeletePendingObjects();
gtk_main_iteration();
}
-#if wxUSE_THREADS
-void wxApp::ProcessPendingEvents()
-{
- wxNode *node = wxPendingEvents->First();
- wxCriticalSectionLocker locker(*wxPendingEventsLocker);
-
- while (node)
- {
- wxEvtHandler *handler = (wxEvtHandler *)node->Data();
-
- handler->ProcessPendingEvents();
-
- delete node;
-
- node = wxPendingEvents->First();
- }
-}
-#endif // wxUSE_THREADS
-
void wxApp::DeletePendingObjects()
{
wxNode *node = wxPendingDelete.First();
wxLog *oldLog = wxLog::SetActiveTarget( (wxLog*) NULL );
if (oldLog)
delete oldLog;
-}
-
#endif // wxUSE_LOG
+}
//-----------------------------------------------------------------------------
// wxEntry