X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf4ce62c26bcbd5a707e3054f611d0164617b012..f9e19204bf8327f1e71f127e5542ee8306282280:/include/wx/osx/app.h?ds=inline diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h index d075cb8431..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(); @@ -50,9 +51,7 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase virtual bool OnInitGui(); #endif // wxUSE_GUI -#ifdef __WXOSX_IPHONE__ virtual int OnRun(); -#endif virtual bool ProcessIdle(); @@ -63,6 +62,7 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase protected: int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT + wxMacAutoreleasePool* m_macPool; public: @@ -82,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 ; @@ -96,7 +97,6 @@ private: WXEVENTHANDLERREF m_macEventHandler ; WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ; WXEVENTREF m_macCurrentEvent ; - CFRunLoopSourceRef m_macEventPosted ; public: static long s_macAboutMenuItemId ; @@ -122,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) ;