]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/app.cpp
document On{Open,Save}Document()
[wxWidgets.git] / src / mac / carbon / app.cpp
index 566f3a34a7931297a85a9de229829abc96ea064f..a75a5112791edbd1017e102887922ca70e09cd54 100644 (file)
@@ -822,7 +822,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
         CFRelease( url ) ;
         CFStringRef path = CFURLCopyFileSystemPath ( urlParent , kCFURLPOSIXPathStyle ) ;
         CFRelease( urlParent ) ;
         CFRelease( url ) ;
         CFStringRef path = CFURLCopyFileSystemPath ( urlParent , kCFURLPOSIXPathStyle ) ;
         CFRelease( urlParent ) ;
-        wxString cwd = wxMacCFStringHolder(path).AsString(wxLocale::GetSystemEncoding());
+        wxString cwd = wxCFStringRef(path).AsString(wxLocale::GetSystemEncoding());
         wxSetWorkingDirectory( cwd ) ;
     }
 
         wxSetWorkingDirectory( cwd ) ;
     }
 
@@ -1472,7 +1472,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
 
     bool handled = false ;
 
 
     bool handled = false ;
 
-    wxTopLevelWindowMac *tlw = focus->MacGetTopLevelWindow() ;
+    wxNonOwnedWindow *tlw = focus->MacGetTopLevelWindow() ;
 
     if (tlw)
     {
 
     if (tlw)
     {
@@ -1635,3 +1635,14 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess
     event.SetTimestamp(when);
     event.SetEventObject(focus);
 }
     event.SetTimestamp(when);
     event.SetEventObject(focus);
 }
+
+
+void wxApp::MacHideApp()
+{
+    wxMacCarbonEvent event( kEventClassCommand , kEventCommandProcess );
+    HICommand command;
+    memset( &command, 0 , sizeof(command) );
+    command.commandID = kHICommandHide ;
+    event.SetParameter<HICommand>(kEventParamDirectObject, command );       
+    SendEventToApplication( event );
+}