X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6762286db6cf974817dead5b88bebf0e390dbb7e..75377698450fc438a4a474c57ddd39e3587a8297:/include/wx/osx/app.h?ds=inline diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h index 2ebb72cc1a..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,9 +37,8 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase DECLARE_DYNAMIC_CLASS(wxApp) wxApp(); - virtual ~wxApp() {} + virtual ~wxApp(); - virtual bool Yield(bool onlyIfNeeded = FALSE); virtual void WakeUpIdle(); virtual void SetPrintMode(int mode) { m_printMode = mode; } @@ -51,6 +51,8 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase virtual bool OnInitGui(); #endif // wxUSE_GUI + virtual int OnRun(); + virtual bool ProcessIdle(); // implementation only @@ -60,6 +62,7 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase protected: int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT + wxMacAutoreleasePool* m_macPool; public: @@ -79,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 ; @@ -88,12 +92,11 @@ public: private: // mac specifics virtual bool DoInitGui(); - virtual void DoCleanUp(); + virtual void DoCleanUp(); WXEVENTHANDLERREF m_macEventHandler ; WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ; WXEVENTREF m_macCurrentEvent ; - CFRunLoopSourceRef m_macEventPosted ; public: static long s_macAboutMenuItemId ; @@ -119,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) ;