X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ada175836e7b9e456b7f32d82bfb5f6b21d5608d..75377698450fc438a4a474c57ddd39e3587a8297:/include/wx/osx/app.h diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h index 2dc67c2566..011d0dd021 100644 --- a/include/wx/osx/app.h +++ b/include/wx/osx/app.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: app.h +// Name: wx/osx/app.h // Purpose: wxApp class // Author: Stefan Csomor // Modified by: @@ -22,6 +22,7 @@ class WXDLLIMPEXP_FWD_CORE wxWindowMac; class WXDLLIMPEXP_FWD_CORE wxApp ; class WXDLLIMPEXP_FWD_CORE wxKeyEvent; class WXDLLIMPEXP_FWD_BASE wxLog; +class WXDLLIMPEXP_FWD_CORE wxMacAutoreleasePool; // Force an exit from main loop void WXDLLIMPEXP_CORE wxExit(); @@ -36,7 +37,7 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase DECLARE_DYNAMIC_CLASS(wxApp) wxApp(); - virtual ~wxApp() {} + virtual ~wxApp(); virtual void WakeUpIdle(); @@ -61,6 +62,7 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase protected: int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT + wxMacAutoreleasePool* m_macPool; public: @@ -80,6 +82,7 @@ public: // we want to delete and cannot do it immediately // TODO change semantics to be in line with cocoa (make autrelease NOT increase the count) void MacAddToAutorelease( void* cfrefobj ); + void MacReleaseAutoreleasePool(); public: static wxWindow* s_captureWindow ; static long s_lastModifiers ; @@ -94,7 +97,6 @@ private: WXEVENTHANDLERREF m_macEventHandler ; WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ; WXEVENTREF m_macCurrentEvent ; - CFRunLoopSourceRef m_macEventPosted ; public: static long s_macAboutMenuItemId ; @@ -120,7 +122,10 @@ public: virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; #endif - // in response of an open-document apple event + // in response of an openFiles message with Cocoa and an + // open-document apple event with Carbon + virtual void MacOpenFiles(const wxArrayString &fileNames) ; + // called by MacOpenFiles for each file. virtual void MacOpenFile(const wxString &fileName) ; // in response of a get-url apple event virtual void MacOpenURL(const wxString &url) ;