]> git.saurik.com Git - wxWidgets.git/blame - src/common/appcmn.cpp
VC++ 1.5 makefile fixes (lib split, C objs)
[wxWidgets.git] / src / common / appcmn.cpp
CommitLineData
72cdf4c9
VZ
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"
e87271f3 33 #include "wx/list.h"
72cdf4c9
VZ
34#endif
35
36#include "wx/thread.h"
e1ee679c 37
d54598dd
VZ
38// ===========================================================================
39// implementation
40// ===========================================================================
41
72cdf4c9
VZ
42// ---------------------------------------------------------------------------
43// wxAppBase
44// ----------------------------------------------------------------------------
45
46void 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