X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed12f1dd6d40be5dcbd61140d63eec435f88e096..e26c0634d0040057f09d902842c2b77aa9f0cbfc:/src/common/utilscmn.cpp diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 1867cc1d44..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" @@ -105,7 +106,7 @@ // string functions // ---------------------------------------------------------------------------- -#if defined(__WXMAC__) && !defined(__DARWIN) +#if defined(__WXMAC__) && !defined(__DARWIN__) int strcasecmp(const char *str_1, const char *str_2) { register char c1, c2; @@ -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 +}