X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c6eb3a84be918dcfed2496d014549e13af0f0e9..bb6720bb9e4bbc17bcea2d933e80ba7cb8246d67:/include/wx/osx/carbon/app.h diff --git a/include/wx/osx/carbon/app.h b/include/wx/osx/carbon/app.h index 66796866a4..5f6321dc46 100644 --- a/include/wx/osx/carbon/app.h +++ b/include/wx/osx/carbon/app.h @@ -44,17 +44,20 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase virtual void SetPrintMode(int mode) { m_printMode = mode; } virtual int GetPrintMode() const { return m_printMode; } + // calling OnInit with an auto-release pool ready ... + virtual bool CallOnInit(); #if wxUSE_GUI // setting up all MacOS Specific Event-Handlers etc virtual bool OnInitGui(); #endif // wxUSE_GUI + + virtual bool ProcessIdle(); + // implementation only void OnIdle(wxIdleEvent& event); void OnEndSession(wxCloseEvent& event); void OnQueryEndSession(wxCloseEvent& event); - void MacDoOneEvent() ; - protected: int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT @@ -84,6 +87,8 @@ public: private: // mac specifics + virtual bool DoInitGui(); + virtual void DoCleanUp(); WXEVENTHANDLERREF m_macEventHandler ; WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ; @@ -97,7 +102,6 @@ public: static wxString s_macHelpMenuTitleName ; WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; } - void MacHandleOneEvent( WXEVENTREF ev ) ; // For embedded use. By default does nothing. virtual void MacHandleUnhandledEvent( WXEVENTREF ev ); @@ -106,13 +110,15 @@ public: bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ; bool MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ; void MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ; +#if wxOSX_USE_COCOA_OR_CARBON + // we only have applescript on these virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; virtual short MacHandleAEGURL(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; 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 virtual void MacOpenFile(const wxString &fileName) ; // in response of a get-url apple event