1. wxApp::ProcessPendingEvents() is now common, added appcmn.cpp and
regenerated the makefiles. wxPostEvent() should work for wxGTK too (untested) 2. long -> wxCoord change for wxGTK and wxMSW, use wxUSE_COMPATIBLE_COORD_TYPES to get the old behaviour 3. wxHTML compilation fixes (for !wxUSE_HTML case) 4. a couple of handy macros in thread.h added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
65
src/common/appcmn.cpp
Normal file
65
src/common/appcmn.cpp
Normal file
@@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: common/appcmn.cpp
|
||||
// Purpose: wxAppBase methods common to all platforms
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 18.10.99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// headers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "appbase.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/app.h"
|
||||
#endif
|
||||
|
||||
#include "wx/thread.h"
|
||||
|
||||
// ===========================================================================
|
||||
// implementation
|
||||
// ===========================================================================
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// wxAppBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxAppBase::ProcessPendingEvents()
|
||||
{
|
||||
// ensure that we're the only thread to modify the pending events list
|
||||
wxCRIT_SECT_LOCKER(locker, wxPendingEventsLocker);
|
||||
|
||||
if ( !wxPendingEvents )
|
||||
return;
|
||||
|
||||
// iterate until the list becomes empty
|
||||
wxNode *node = wxPendingEvents->First();
|
||||
while (node)
|
||||
{
|
||||
wxEvtHandler *handler = (wxEvtHandler *)node->Data();
|
||||
|
||||
handler->ProcessPendingEvents();
|
||||
|
||||
delete node;
|
||||
node = wxPendingEvents->First();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user