]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/evtloop.cpp
compile fix
[wxWidgets.git] / src / palmos / evtloop.cpp
CommitLineData
ffecfa5a 1///////////////////////////////////////////////////////////////////////////////
e2731512 2// Name: src/palmos/evtloop.cpp
b46b1d59 3// Purpose: implements wxGUIEventLoop for Palm OS
e2731512 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10.14.04
e2731512 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// License: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
ffecfa5a
JS
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
27#ifndef WX_PRECOMP
28 #include "wx/window.h"
29 #include "wx/app.h"
30#endif //WX_PRECOMP
31
32#include "wx/evtloop.h"
33
34#include "wx/tooltip.h"
35#include "wx/except.h"
36#include "wx/ptr_scpd.h"
37
38#if wxUSE_THREADS
39 #include "wx/thread.h"
40
41 // define the array of MSG strutures
42 WX_DECLARE_OBJARRAY(MSG, wxMsgArray);
43
44 #include "wx/arrimpl.cpp"
45
46 WX_DEFINE_OBJARRAY(wxMsgArray);
47#endif // wxUSE_THREADS
48
20bc5ad8
WS
49#include <Event.h>
50#include <SystemMgr.h>
51#include <Menu.h>
52#include <Form.h>
53
ffecfa5a 54// ============================================================================
b46b1d59 55// wxGUIEventLoop implementation
ffecfa5a
JS
56// ============================================================================
57
ffecfa5a
JS
58// ----------------------------------------------------------------------------
59// ctor/dtor
60// ----------------------------------------------------------------------------
61
b46b1d59 62wxGUIEventLoop::wxGUIEventLoop()
ffecfa5a
JS
63{
64 m_shouldExit = false;
65 m_exitcode = 0;
66}
67
68// ----------------------------------------------------------------------------
b46b1d59 69// wxGUIEventLoop message processing
ffecfa5a
JS
70// ----------------------------------------------------------------------------
71
b46b1d59 72void wxGUIEventLoop::ProcessMessage(WXMSG *msg)
ffecfa5a
JS
73{
74}
75
b46b1d59 76bool wxGUIEventLoop::PreProcessMessage(WXMSG *msg)
ffecfa5a 77{
e2731512 78 return false;
ffecfa5a
JS
79}
80
81// ----------------------------------------------------------------------------
b46b1d59 82// wxGUIEventLoop running and exiting
ffecfa5a
JS
83// ----------------------------------------------------------------------------
84
b46b1d59 85bool wxGUIEventLoop::IsRunning() const
ffecfa5a
JS
86{
87 return true;
88}
89
b46b1d59 90int wxGUIEventLoop::Run()
ffecfa5a
JS
91{
92 status_t error;
93 EventType event;
94
77fb1a02
VZ
95 wxEventLoopActivator activate(this);
96
ffecfa5a
JS
97 do {
98 wxTheApp && wxTheApp->ProcessIdle();
e2731512 99
ffecfa5a
JS
100 EvtGetEvent(&event, evtWaitForever);
101
102 if (SysHandleEvent(&event))
103 continue;
e2731512 104
ffecfa5a
JS
105 if (MenuHandleEvent(0, &event, &error))
106 continue;
e2731512 107
ffecfa5a
JS
108 FrmDispatchEvent(&event);
109
e2731512
WS
110 } while (event.eType != appStopEvent);
111
ffecfa5a
JS
112 return 0;
113}
114
b46b1d59 115void wxGUIEventLoop::Exit(int rc)
ffecfa5a
JS
116{
117 FrmCloseAllForms();
118
119 EventType AppStop;
120 AppStop.eType=appStopEvent;
121 EvtAddEventToQueue(&AppStop);
122}
123
124// ----------------------------------------------------------------------------
b46b1d59 125// wxGUIEventLoop message processing dispatching
ffecfa5a
JS
126// ----------------------------------------------------------------------------
127
b46b1d59 128bool wxGUIEventLoop::Pending() const
ffecfa5a 129{
e2731512 130 return false;
ffecfa5a
JS
131}
132
b46b1d59 133bool wxGUIEventLoop::Dispatch()
ffecfa5a
JS
134{
135 return false;
136}
137