git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2031
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if wxUSE_THREADS
/* To put pending event handlers */
#if wxUSE_THREADS
/* To put pending event handlers */
-extern wxList wxPendingEvents;
-extern wxCriticalSection wxPendingEventsLocker;
+extern wxList *wxPendingEvents;
+extern wxCriticalSection *wxPendingEventsLocker;
m_pendingEvents->Append(event_main);
m_pendingEvents->Append(event_main);
- wxPendingEventsLocker.Enter();
- wxPendingEvents.Append(this);
- wxPendingEventsLocker.Leave();
+ wxPendingEventsLocker->Enter();
+ wxPendingEvents->Append(this);
+ wxPendingEventsLocker->Leave();
extern wxList wxPendingDelete;
#if wxUSE_THREADS
extern wxList wxPendingDelete;
#if wxUSE_THREADS
-extern wxList wxPendingEvents;
-extern wxCriticalSection wxPendingEventsLocker;
+extern wxList *wxPendingEvents;
+extern wxCriticalSection *wxPendingEventsLocker;
#endif
extern wxResourceCache *wxTheResourceCache;
#endif
extern wxResourceCache *wxTheResourceCache;
#if wxUSE_THREADS
void wxApp::ProcessPendingEvents()
{
#if wxUSE_THREADS
void wxApp::ProcessPendingEvents()
{
- wxNode *node = wxPendingEvents.First();
- wxCriticalSectionLocker locker(wxPendingEventsLocker);
+ wxNode *node = wxPendingEvents->First();
+ wxCriticalSectionLocker locker(*wxPendingEventsLocker);
- node = wxPendingEvents.First();
+ node = wxPendingEvents->First();
wxSystemSettings::Init();
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();
/*
wxTheFontNameDirectory = new wxFontNameDirectory;
wxTheFontNameDirectory->Initialize();
delete wxTheApp;
wxTheApp = (wxApp*) NULL;
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();
delete[] wxBuffer;
wxSystemSettings::Done();
delete[] wxBuffer;
#if wxUSE_THREADS
/* List of events pending processing */
#if wxUSE_THREADS
/* List of events pending processing */
-wxList wxPendingEvents;
-wxCriticalSection wxPendingEventsLocker;
+wxList *wxPendingEvents = NULL;
+wxCriticalSection *wxPendingEventsLocker = NULL;
#endif
/* Current cursor, in order to hang on to
#endif
/* Current cursor, in order to hang on to
extern wxList wxPendingDelete;
#if wxUSE_THREADS
extern wxList wxPendingDelete;
#if wxUSE_THREADS
-extern wxList wxPendingEvents;
-extern wxCriticalSection wxPendingEventsLocker;
+extern wxList *wxPendingEvents;
+extern wxCriticalSection *wxPendingEventsLocker;
#endif
extern wxResourceCache *wxTheResourceCache;
#endif
extern wxResourceCache *wxTheResourceCache;
#if wxUSE_THREADS
void wxApp::ProcessPendingEvents()
{
#if wxUSE_THREADS
void wxApp::ProcessPendingEvents()
{
- wxNode *node = wxPendingEvents.First();
- wxCriticalSectionLocker locker(wxPendingEventsLocker);
+ wxNode *node = wxPendingEvents->First();
+ wxCriticalSectionLocker locker(*wxPendingEventsLocker);
- node = wxPendingEvents.First();
+ node = wxPendingEvents->First();
wxSystemSettings::Init();
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();
/*
wxTheFontNameDirectory = new wxFontNameDirectory;
wxTheFontNameDirectory->Initialize();
delete wxTheApp;
wxTheApp = (wxApp*) NULL;
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();
delete[] wxBuffer;
wxSystemSettings::Done();
delete[] wxBuffer;
#if wxUSE_THREADS
/* List of events pending processing */
#if wxUSE_THREADS
/* List of events pending processing */
-wxList wxPendingEvents;
-wxCriticalSection wxPendingEventsLocker;
+wxList *wxPendingEvents = NULL;
+wxCriticalSection *wxPendingEventsLocker = NULL;
#endif
/* Current cursor, in order to hang on to
#endif
/* Current cursor, in order to hang on to
extern wxList wxPendingDelete;
#if wxUSE_THREADS
extern wxList wxPendingDelete;
#if wxUSE_THREADS
-extern wxList wxPendingEvents;
-extern wxCriticalSection wxPendingEventsLocker;
+extern wxList *wxPendingEvents;
+extern wxCriticalSection *wxPendingEventsLocker;
#endif // wxUSE_THREADS
wxApp *wxTheApp = NULL;
#endif // wxUSE_THREADS
wxApp *wxTheApp = NULL;
wxClassInfo::InitializeClasses();
wxClassInfo::InitializeClasses();
+ // 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
+
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
delete wxTheApp;
wxTheApp = NULL;
delete wxTheApp;
wxTheApp = 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
+
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
// At this point we want to check if there are any memory
// blocks that aren't part of the wxDebugContext itself,
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
// At this point we want to check if there are any memory
// blocks that aren't part of the wxDebugContext itself,
#if wxUSE_THREADS
void wxApp::ProcessPendingEvents()
{
#if wxUSE_THREADS
void wxApp::ProcessPendingEvents()
{
- wxNode *node = wxPendingEvents.First();
- wxCriticalSectionLocker locker(wxPendingEventsLocker);
+ wxNode *node = wxPendingEvents->First();
+ wxCriticalSectionLocker locker(*wxPendingEventsLocker);
handler->ProcessPendingEvents();
delete node;
handler->ProcessPendingEvents();
delete node;
- node = wxPendingEvents.First();
+ node = wxPendingEvents->First();
}
}
#endif // wxUSE_THREADS
}
}
#endif // wxUSE_THREADS
#if wxUSE_THREADS
// List of events pending propagation
#if wxUSE_THREADS
// List of events pending propagation
-wxList wxPendingEvents;
-wxCriticalSection wxPendingEventsLocker;
+wxList *wxPendingEvents = NULL;
+wxCriticalSection *wxPendingEventsLocker = NULL;
extern wxList *wxWinHandleList;
extern wxList WXDLLEXPORT wxPendingDelete;
#if wxUSE_THREADS
extern wxList *wxWinHandleList;
extern wxList WXDLLEXPORT wxPendingDelete;
#if wxUSE_THREADS
-extern wxList wxPendingEvents;
-extern wxCriticalSection wxPendingEventsLocker;
+extern wxList *wxPendingEvents;
+extern wxCriticalSection *wxPendingEventsLocker;
#endif
extern void wxSetKeyboardHook(bool doIt);
extern wxCursor *g_globalCursor;
#endif
extern void wxSetKeyboardHook(bool doIt);
extern wxCursor *g_globalCursor;
wxGetResource("wxWindows", "OsVersion", &wxOsVersion);
#endif
wxGetResource("wxWindows", "OsVersion", &wxOsVersion);
#endif
+ // 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
+
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
if (wxWinHandleList)
delete wxWinHandleList ;
if (wxWinHandleList)
delete wxWinHandleList ;
+ // 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
+
wxClassInfo::CleanUpClasses();
delete wxTheApp;
wxClassInfo::CleanUpClasses();
delete wxTheApp;
#if wxUSE_THREADS
void wxApp::ProcessPendingEvents()
{
#if wxUSE_THREADS
void wxApp::ProcessPendingEvents()
{
- wxNode *node = wxPendingEvents.First();
- wxCriticalSectionLocker locker(wxPendingEventsLocker);
+ wxNode *node = wxPendingEvents->First();
+ wxCriticalSectionLocker locker(*wxPendingEventsLocker);
handler->ProcessPendingEvents();
delete node;
handler->ProcessPendingEvents();
delete node;
- node = wxPendingEvents.First();
+ node = wxPendingEvents->First();
// List of events pending processing
#if wxUSE_THREADS
// List of events pending processing
#if wxUSE_THREADS
-wxList wxPendingEvents;
-wxCriticalSection wxPendingEventsLocker;
+wxList *wxPendingEvents = NULL;
+wxCriticalSection *wxPendingEventsLocker = NULL;
#endif
// Current cursor, in order to hang on to
#endif
// Current cursor, in order to hang on to