1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/evtloop.h
3 // Purpose: declaration of wxEventLoop for wxMac
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MAC_CARBON_EVTLOOP_H_
13 #define _WX_MAC_CARBON_EVTLOOP_H_
15 // set wxOSX_USE_RUN_APP_EVENT_LOOP to 1 if the standard
16 // RunApplicationEventLoop function should be used, otherwise
17 // the lower level CarbonEventLoop will be used
19 // in the long run we should make this 1 by default but we will have to clean
20 // up event handling to make sure we don't miss handling of things like pending
21 // events etc and perhaps we will also have to pipe events through an
22 // ueber-event-handler to make sure we have one place to do all these
23 // house-keeping functions
24 #define wxOSX_USE_RUN_APP_EVENT_LOOP 0
26 // ----------------------------------------------------------------------------
28 // ----------------------------------------------------------------------------
30 #if wxOSX_USE_RUN_APP_EVENT_LOOP
32 class WXDLLIMPEXP_CORE wxGUIEventLoop
: public wxEventLoopBase
35 wxGUIEventLoop() { m_exitcode
= 0; }
37 // implement base class pure virtuals
39 virtual void Exit(int rc
= 0);
40 virtual bool Pending() const;
41 virtual bool Dispatch();
47 #else // manual event loop
49 class WXDLLIMPEXP_CORE wxGUIEventLoop
: public wxEventLoopManual
54 virtual bool Pending() const;
55 virtual bool Dispatch();
57 // implement base class pure virtual
58 virtual void WakeUp();
61 #endif // auto/manual event loop
63 #endif // _WX_MAC_CARBON_EVTLOOP_H_