X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/293a13bad79ec53c9e0d665b031262428eec9e41..8325504f4bf9dc557745f4dcb26b43c029d5106d:/include/wx/osx/evtloop.h?ds=sidebyside diff --git a/include/wx/osx/evtloop.h b/include/wx/osx/evtloop.h index 100804ae2a..45b411e903 100644 --- a/include/wx/osx/evtloop.h +++ b/include/wx/osx/evtloop.h @@ -59,31 +59,58 @@ protected: virtual CFRunLoopRef CFGetCurrentRunLoop() const; virtual int DoDispatchTimeout(unsigned long timeout); + + virtual void DoRun(); + virtual void DoStop(); + // should we exit the loop? bool m_shouldExit; // the loop exit code int m_exitcode; + // cfrunloop + CFRunLoopRef m_runLoop; + // runloop observer CFRunLoopObserverRef m_runLoopObserver; - + private: // process all already pending events and dispatch a new one (blocking // until it appears in the event queue if necessary) // // returns the return value of DoDispatchTimeout() int DoProcessEvents(); - }; #if wxUSE_GUI - #ifdef __WXOSX_COCOA__ - #include "wx/osx/cocoa/evtloop.h" - #else - #include "wx/osx/carbon/evtloop.h" - #endif + +#ifdef __WXOSX_COCOA__ + #include "wx/osx/cocoa/evtloop.h" +#else + #include "wx/osx/carbon/evtloop.h" +#endif + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxNonOwnedWindow; + +class WXDLLIMPEXP_CORE wxModalEventLoop : public wxGUIEventLoop +{ +public: + wxModalEventLoop(wxWindow *modalWindow); + wxModalEventLoop(WXWindow modalNativeWindow); + +protected: + virtual void DoRun(); + + virtual void DoStop(); + + // (in case) the modal window for this event loop + wxNonOwnedWindow* m_modalWindow; + WXWindow m_modalNativeWindow; +}; + #endif // wxUSE_GUI #endif // _WX_OSX_EVTLOOP_H_