]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/cocoa/evtloop.h
7ae6981b29250eccf9897dffde0ee51ff1e76f89
[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 int Run();
20
21 void BeginModalSession( wxWindow* modalWindow );
22
23 void EndModalSession();
24
25 virtual void WakeUp();
26
27 void OSXUseLowLevelWakeup(bool useIt)
28 { m_osxLowLevelWakeUp = useIt ; }
29
30 void OSXOnWillTerminate();
31
32 protected:
33 virtual int DoDispatchTimeout(unsigned long timeout);
34
35 virtual void OSXDoRun();
36 virtual void OSXDoStop();
37
38 virtual CFRunLoopRef CFGetCurrentRunLoop() const;
39
40 void* m_modalSession;
41
42 wxWindow* m_modalWindow;
43
44 WXWindow m_dummyWindow;
45
46 int m_modalNestedLevel;
47
48 bool m_osxLowLevelWakeUp;
49 };
50
51 #endif // _WX_OSX_COCOA_EVTLOOP_H_
52