]> git.saurik.com Git - wxWidgets.git/blob - src/common/appcmn.cpp
added operator[](unsigned int) const -- testing it now on Linux/axp,
[wxWidgets.git] / src / common / appcmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: common/appcmn.cpp
3 // Purpose: wxAppBase methods common to all platforms
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 18.10.99
7 // RCS-ID: $Id$
8 // Copyright: (c) Vadim Zeitlin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ---------------------------------------------------------------------------
17 // headers
18 // ---------------------------------------------------------------------------
19
20 #ifdef __GNUG__
21 #pragma implementation "appbase.h"
22 #endif
23
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
26
27 #if defined(__BORLANDC__)
28 #pragma hdrstop
29 #endif
30
31 #ifndef WX_PRECOMP
32 #include "wx/app.h"
33 #include "wx/list.h"
34 #endif
35
36 #include "wx/thread.h"
37
38 // ===========================================================================
39 // implementation
40 // ===========================================================================
41
42 // ---------------------------------------------------------------------------
43 // wxAppBase
44 // ----------------------------------------------------------------------------
45
46 void wxAppBase::ProcessPendingEvents()
47 {
48 // ensure that we're the only thread to modify the pending events list
49 wxCRIT_SECT_LOCKER(locker, wxPendingEventsLocker);
50
51 if ( !wxPendingEvents )
52 return;
53
54 // iterate until the list becomes empty
55 wxNode *node = wxPendingEvents->First();
56 while (node)
57 {
58 wxEvtHandler *handler = (wxEvtHandler *)node->Data();
59
60 handler->ProcessPendingEvents();
61
62 delete node;
63 node = wxPendingEvents->First();
64 }
65 }
66