X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/079f4130b861d094c79e0952966caad8b85dab67..058f225a44d83d42ba9d773efc705badbf0e5e3c:/include/wx/app.h diff --git a/include/wx/app.h b/include/wx/app.h index d61b3b5613..d4ff103779 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -221,6 +221,16 @@ public: virtual int FilterEvent(wxEvent& event); #if wxUSE_EXCEPTIONS + // execute the functor to handle the given event + // + // this is a generalization of HandleEvent() below and the base class + // implementation of CallEventHandler() still calls HandleEvent() for + // compatibility for functors which are just wxEventFunctions (i.e. methods + // of wxEvtHandler) + virtual void CallEventHandler(wxEvtHandler *handler, + wxEventFunctor& functor, + wxEvent& event) const; + // call the specified handler on the given object with the given event // // this method only exists to allow catching the exceptions thrown by any @@ -454,6 +464,10 @@ public: // with _extreme_ care or, better, don't use at all! virtual bool Yield(bool onlyIfNeeded = false) = 0; + // returns true if the main thread is inside a Yield() call + bool IsYielding() const + { return m_isInsideYield; } + // this virtual function is called in the GUI mode when the application // becomes idle and normally just sends wxIdleEvent to all interested // parties @@ -576,6 +590,7 @@ protected: // does any of our windows have focus? bool m_isActive; + bool m_isInsideYield; DECLARE_NO_COPY_CLASS(wxAppBase) }; @@ -643,7 +658,7 @@ protected: // ------------------------------------------------------ // Force an exit from main loop -extern void WXDLLIMPEXP_BASE wxExit(); +WXDLLIMPEXP_BASE void wxExit(); // avoid redeclaring this function here if it had been already declated by // wx/utils.h, this results in warnings from g++ with -Wredundant-decls @@ -651,12 +666,12 @@ extern void WXDLLIMPEXP_BASE wxExit(); #define wx_YIELD_DECLARED // Yield to other apps/messages -extern bool WXDLLIMPEXP_BASE wxYield(); +WXDLLIMPEXP_CORE bool wxYield(); #endif // wx_YIELD_DECLARED // Yield to other apps/messages -extern void WXDLLIMPEXP_BASE wxWakeUpIdle(); +WXDLLIMPEXP_BASE void wxWakeUpIdle(); // ---------------------------------------------------------------------------- // macros for dynamic creation of the application object