]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Changed CanPaste to just check IsSupported.
[wxWidgets.git] / src / common / utilscmn.cpp
index 348cea4272075146f1ab5c2aa373f32096d070f9..724f54de2a05e8435fcf737fba6c4aa6a7587a12 100644 (file)
     #include "wx/log.h"
 
     #if wxUSE_GUI
+        #include "wx/app.h"
         #include "wx/window.h"
         #include "wx/frame.h"
         #include "wx/menu.h"
         #include "wx/msgdlg.h"
         #include "wx/textdlg.h"
+        #include "wx/textctrl.h"    // for wxTE_PASSWORD
         #if wxUSE_ACCEL
             #include "wx/menuitem.h"
             #include "wx/accel.h"
 // string functions
 // ----------------------------------------------------------------------------
 
-#ifdef __WXMAC__
+#if defined(__WXMAC__) && !defined(__DARWIN__)
 int strcasecmp(const char *str_1, const char *str_2)
 {
   register char c1, c2;
@@ -133,7 +135,7 @@ int strncasecmp(const char *str_1, const char *str_2, size_t maxchar)
   return 0 ;
 
 }
-#endif // wxMAC
+#endif // __WXMAC__ && !__DARWIN__
 
 #if defined( __VMS__ ) && ( __VMS_VER < 70000000 )
 // we have no strI functions under VMS, therefore I have implemented
@@ -1071,6 +1073,21 @@ bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
 
 #endif // wxUSE_GUI
 
+const wxChar *wxGetInstallPrefix()
+{
+    wxString prefix;
+    
+    if ( wxGetEnv(wxT("WX_PREFIX"), &prefix) )
+        return prefix.c_str();
+    
+#ifdef wxINSTALL_PREFIX
+    return wxT(wxINSTALL_PREFIX);
+#else 
+    return wxT("");
+#endif
+}
+
+
 // ----------------------------------------------------------------------------
 // network and user id functions
 // ----------------------------------------------------------------------------
@@ -1296,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
+}