]>
git.saurik.com Git - wxWidgets.git/blob - src/common/appcmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: common/appcmn.cpp
3 // Purpose: wxAppBase methods common to all platforms
4 // Author: Vadim Zeitlin
8 // Copyright: (c) Vadim Zeitlin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ---------------------------------------------------------------------------
18 // ---------------------------------------------------------------------------
21 #pragma implementation "appbase.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
27 #if defined(__BORLANDC__)
36 #include "wx/thread.h"
38 // ===========================================================================
40 // ===========================================================================
42 // ---------------------------------------------------------------------------
44 // ----------------------------------------------------------------------------
46 void wxAppBase::ProcessPendingEvents()
48 // ensure that we're the only thread to modify the pending events list
49 wxCRIT_SECT_LOCKER(locker
, wxPendingEventsLocker
);
51 if ( !wxPendingEvents
)
54 // iterate until the list becomes empty
55 wxNode
*node
= wxPendingEvents
->First();
58 wxEvtHandler
*handler
= (wxEvtHandler
*)node
->Data();
60 handler
->ProcessPendingEvents();
63 node
= wxPendingEvents
->First();