]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
make --static flag act on --cppflags too.
[wxWidgets.git] / src / common / utilscmn.cpp
index 1867cc1d445b2f9cecb9d63070dd89ad578e6934..724f54de2a05e8435fcf737fba6c4aa6a7587a12 100644 (file)
@@ -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"
 // 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
+}