]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/cocoa/evtloop.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / osx / cocoa / evtloop.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/cocoa/evtloop.h
3 // Purpose: declaration of wxGUIEventLoop for wxOSX/Cocoa
4 // Author: Vadim Zeitlin
5 // Created: 2008-12-28
6 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_OSX_COCOA_EVTLOOP_H_
11 #define _WX_OSX_COCOA_EVTLOOP_H_
12
13 class WXDLLIMPEXP_BASE wxGUIEventLoop : public wxCFEventLoop
14 {
15 public:
16 wxGUIEventLoop();
17 ~wxGUIEventLoop();
18
19 void BeginModalSession( wxWindow* modalWindow );
20
21 void EndModalSession();
22
23 virtual void WakeUp();
24
25 void OSXUseLowLevelWakeup(bool useIt)
26 { m_osxLowLevelWakeUp = useIt ; }
27
28 protected:
29 virtual int DoDispatchTimeout(unsigned long timeout);
30
31 virtual void OSXDoRun();
32 virtual void OSXDoStop();
33
34 virtual CFRunLoopRef CFGetCurrentRunLoop() const;
35
36 void* m_modalSession;
37
38 wxWindow* m_modalWindow;
39
40 WXWindow m_dummyWindow;
41
42 int m_modalNestedLevel;
43
44 bool m_osxLowLevelWakeUp;
45 };
46
47 #endif // _WX_OSX_COCOA_EVTLOOP_H_
48