]> git.saurik.com Git - wxWidgets.git/blob - src/common/appcmn.cpp
unused param warning fixed
[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 #include "wx/confbase.h"
38
39 // ===========================================================================
40 // implementation
41 // ===========================================================================
42
43 // ---------------------------------------------------------------------------
44 // wxAppBase
45 // ----------------------------------------------------------------------------
46
47 void wxAppBase::ProcessPendingEvents()
48 {
49 // ensure that we're the only thread to modify the pending events list
50 wxCRIT_SECT_LOCKER(locker, wxPendingEventsLocker);
51
52 if ( !wxPendingEvents )
53 return;
54
55 // iterate until the list becomes empty
56 wxNode *node = wxPendingEvents->First();
57 while (node)
58 {
59 wxEvtHandler *handler = (wxEvtHandler *)node->Data();
60
61 handler->ProcessPendingEvents();
62
63 delete node;
64 node = wxPendingEvents->First();
65 }
66 }
67
68 int wxAppBase::OnExit()
69 {
70 #if wxUSE_CONFIG
71 // delete the config object if any (don't use Get() here, but Set()
72 // because Get() could create a new config object)
73 delete wxConfigBase::Set((wxConfigBase *) NULL);
74 #endif // wxUSE_CONFIG
75
76 return 0;
77 }