X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5271933eeb7b0512b54363ee54370a9ff66156fe..c6ac78a61edd08ccfd0f1e5b37ee48ceb7bfa474:/src/common/utilscmn.cpp diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 2b812d81bf..724f54de2a 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -36,6 +36,7 @@ #include "wx/log.h" #if wxUSE_GUI + #include "wx/app.h" #include "wx/window.h" #include "wx/frame.h" #include "wx/menu.h" @@ -1312,4 +1313,25 @@ long wxExecute(const wxString& command, return wxDoExecuteWithCapture(command, output, &error); } +// ---------------------------------------------------------------------------- +// wxApp::Yield() wrappers for backwards compatibility +// ---------------------------------------------------------------------------- + +bool wxYield() +{ +#if wxUSE_GUI + return wxTheApp && wxTheApp->Yield(); +#else + return FALSE; +#endif +} + +bool wxYieldIfNeeded() +{ +#if wxUSE_GUI + return wxTheApp && wxTheApp->Yield(TRUE); +#else + return FALSE; +#endif +}