]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/corefoundation/stdpaths_cf.cpp
adding raster op hook to graphics context (10.4 only, partial XOR/INVERT support)
[wxWidgets.git] / src / mac / corefoundation / stdpaths_cf.cpp
index eb6e0367bf9ed7446a13d9bd464d6a94a8a3beb9..925d220ecffb3e2e1342000bccc2be7cd2c5a25d 100644 (file)
@@ -106,6 +106,24 @@ wxString wxStandardPathsCF::GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const
     return ret;
 }
 
     return ret;
 }
 
+wxString wxStandardPathsCF::GetDocumentsDir() const
+{
+#ifdef __WXMAC__
+    return wxMacFindFolderNoSeparator
+        (
+#if TARGET_API_MAC_OSX
+        kUserDomain,
+#else
+        kOnSystemDisk,
+#endif
+        kDocumentsFolderType,
+        kCreateFolder
+        );
+#else
+    return wxFileName::GetHomeDir() + wxT("/Documents");
+#endif
+}
+
 // ----------------------------------------------------------------------------
 // wxStandardPathsCF public API
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxStandardPathsCF public API
 // ----------------------------------------------------------------------------
@@ -133,6 +151,27 @@ wxString wxStandardPathsCF::GetDataDir() const
     return GetFromFunc(CFBundleCopySharedSupportURL);
 }
 
     return GetFromFunc(CFBundleCopySharedSupportURL);
 }
 
+// TODO: implement this using real CoreFoundation API instead of Carbon API
+wxString wxStandardPathsCF::GetExecutablePath() const
+{
+#ifdef __WXMAC__
+    ProcessInfoRec processinfo;
+    ProcessSerialNumber procno ;
+    FSSpec fsSpec;
+
+    procno.highLongOfPSN = 0 ;
+    procno.lowLongOfPSN = kCurrentProcess ;
+    processinfo.processInfoLength = sizeof(ProcessInfoRec);
+    processinfo.processName = NULL;
+    processinfo.processAppSpec = &fsSpec;
+
+    GetProcessInformation( &procno , &processinfo ) ;
+    return wxMacFSSpec2MacFilename(&fsSpec);
+#else
+    return wxStandardPathsBase::GetExecutablePath();
+#endif
+}
+
 wxString wxStandardPathsCF::GetLocalDataDir() const
 {
 #ifdef __WXMAC__
 wxString wxStandardPathsCF::GetLocalDataDir() const
 {
 #ifdef __WXMAC__