X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5f4f5b58f6557eedf795696cca090e2308f329a9..c5d99d7b5c4afa4fba509d751937d5e6cb7b2703:/include/wx/app.h?ds=inline diff --git a/include/wx/app.h b/include/wx/app.h index 4eae440186..a68433c157 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -251,6 +251,10 @@ public: // make sure that idle events are sent again virtual void WakeUpIdle() { } + // this is just a convenience: by providing its implementation here we + // avoid #ifdefs in the code using it + static bool IsMainLoopRunning() { return false; } + // debugging support // ----------------- @@ -378,10 +382,11 @@ public: // return true if we're running main loop, i.e. if the events can // (already) be dispatched - bool IsMainLoopRunning() const + static bool IsMainLoopRunning() { #if wxUSE_EVTLOOP_IN_APP - return m_mainLoop != NULL; + wxAppBase *app = wx_static_cast(wxAppBase *, GetInstance()); + return app && app->m_mainLoop != NULL; #else return false; #endif @@ -556,7 +561,9 @@ protected: // ---------------------------------------------------------------------------- #if wxUSE_GUI - #if defined(__WXMSW__) + #if defined(__PALMOS__) + #include "wx/palmos/app.h" + #elif defined(__WXMSW__) #include "wx/msw/app.h" #elif defined(__WXMOTIF__) #include "wx/motif/app.h"