X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3808e191421b1337b3c688cf6d75efa43582547a..2524f1ce36c16bb6253e9d5ce156996290b830dc:/include/wx/evtloop.h diff --git a/include/wx/evtloop.h b/include/wx/evtloop.h index 4e90d3d803..95e2fce43e 100644 --- a/include/wx/evtloop.h +++ b/include/wx/evtloop.h @@ -12,7 +12,7 @@ #ifndef _WX_EVTLOOP_H_ #define _WX_EVTLOOP_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "evtloop.h" #endif @@ -44,9 +44,19 @@ public: // is the event loop running now? virtual bool IsRunning() const; + // return currently active (running) event loop, may be NULL + static wxEventLoop *GetActive() { return ms_activeLoop; } + + // set currently active (running) event loop + static void SetActive(wxEventLoop* loop) { ms_activeLoop = loop; } + protected: // the pointer to the port specific implementation class class WXDLLEXPORT wxEventLoopImpl *m_impl; + // the pointer to currently active loop + static wxEventLoop *ms_activeLoop; + + DECLARE_NO_COPY_CLASS(wxEventLoop) }; #endif // _WX_EVTLOOP_H_