X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ce6da52a1d67ebe79fac0d8add6ad8f19b38528..f86190702bb433f139dc2c335e2c551755def81f:/include/wx/osx/core/evtloop.h diff --git a/include/wx/osx/core/evtloop.h b/include/wx/osx/core/evtloop.h index 79e7f2d9ba..c5bb71b643 100644 --- a/include/wx/osx/core/evtloop.h +++ b/include/wx/osx/core/evtloop.h @@ -15,7 +15,7 @@ DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoop ); DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoopObserver ); -class WXDLLIMPEXP_BASE wxCFEventLoopPauseIdleEvents; +class WXDLLIMPEXP_FWD_BASE wxCFEventLoopPauseIdleEvents; class WXDLLIMPEXP_BASE wxCFEventLoop : public wxEventLoopBase { @@ -54,6 +54,14 @@ public: AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags); #endif // wxUSE_EVENTLOOP_SOURCE + bool ShouldProcessIdleEvents() const { return m_processIdleEvents ; } + +#if wxUSE_UIACTIONSIMULATOR + // notifies Yield and Dispatch to wait for at least one event before + // returning, this is necessary, because the synthesized events need to be + // converted by the OS before being available on the native event queue + void SetShouldWaitForEvent(bool should) { m_shouldWaitForEvent = should; } +#endif protected: void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity); void DefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity); @@ -91,6 +99,9 @@ protected: // set to false to avoid idling at unexpected moments - eg when having native message boxes bool m_processIdleEvents; +#if wxUSE_UIACTIONSIMULATOR + bool m_shouldWaitForEvent; +#endif private: // process all already pending events and dispatch a new one (blocking // until it appears in the event queue if necessary) @@ -106,6 +117,8 @@ class WXDLLIMPEXP_BASE wxCFEventLoopPauseIdleEvents : public wxObject public: wxCFEventLoopPauseIdleEvents(); virtual ~wxCFEventLoopPauseIdleEvents(); +private: + bool m_formerState; }; #endif // _WX_OSX_EVTLOOP_H_