X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96d49f0eea53dbaae6fd926d6a2107f9f6e87e7d..30e24d9dd5a5abf1c9a375ea259eb239b122b7f7:/wxPython/src/_evtloop.i?ds=inline diff --git a/wxPython/src/_evtloop.i b/wxPython/src/_evtloop.i index 168666ecb1..de95253c70 100644 --- a/wxPython/src/_evtloop.i +++ b/wxPython/src/_evtloop.i @@ -20,7 +20,27 @@ %newgroup %{ +#if 0 // #ifdef __WXMAC__ + +// A dummy class that raises an exception if used... +class wxEventLoop +{ +public: + wxEventLoop() { wxPyRaiseNotImplemented(); } + int Run() { return 0; } + void Exit(int rc = 0) {} + bool Pending() const { return false; } + bool Dispatch() { return false; } + bool IsRunning() const { return false; } + static wxEventLoop *GetActive() { wxPyRaiseNotImplemented(); return NULL; } + static void SetActive(wxEventLoop* loop) { wxPyRaiseNotImplemented(); } +}; + +#else + #include + +#endif %} class wxEventLoop @@ -52,4 +72,17 @@ public: }; + +// This object sets the wxEventLoop given to the ctor as the currently active +// one and unsets it in its dtor, this is especially useful in presence of +// exceptions but is more tidy even when we don't use them +class wxEventLoopActivator +{ +public: + wxEventLoopActivator(wxEventLoop *evtLoop); + ~wxEventLoopActivator(); +}; + + + //---------------------------------------------------------------------------