X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cd28bcaded2c86d6434acf5a647939cd7ecd6bb5..e14d10b039e68a701a447043a4031cf43e9fa90b:/include/wx/mac/app.h?ds=sidebyside diff --git a/include/wx/mac/app.h b/include/wx/mac/app.h index 472e9697be..7269c6e0d7 100644 --- a/include/wx/mac/app.h +++ b/include/wx/mac/app.h @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: app.h // Purpose: wxApp class -// Author: AUTHOR +// Author: Stefan Csomor // Modified by: -// Created: ??/??/98 +// Created: 1998-01-01 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR +// Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -52,8 +52,11 @@ class WXDLLEXPORT wxApp: public wxAppBase virtual bool Initialized(); virtual bool Pending() ; virtual void Dispatch() ; + + virtual void Exit(); + virtual bool Yield(bool onlyIfNeeded = FALSE); - virtual bool ProcessIdle(); + virtual void WakeUpIdle(); virtual void SetPrintMode(int mode) { m_printMode = mode; } virtual int GetPrintMode() const { return m_printMode; } @@ -67,14 +70,6 @@ class WXDLLEXPORT wxApp: public wxAppBase void OnEndSession(wxCloseEvent& event); void OnQueryEndSession(wxCloseEvent& event); - // Send idle event to all top-level windows. - // Returns TRUE if more idle time is requested. - bool SendIdleEvents(); - - // Send idle event to window and all subwindows - // Returns TRUE if more idle time is requested. - bool SendIdleEvents(wxWindowMac* win); - // Windows only, but for compatibility... inline void SetAuto3D(bool flag) { m_auto3D = flag; } inline bool GetAuto3D() const { return m_auto3D; } @@ -87,14 +82,13 @@ protected: public: // Implementation - static bool Initialize(); - static void CleanUp(); + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(); - void DeletePendingObjects(); bool IsExiting() { return !m_keepGoing ; } #if TARGET_CARBON - WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; } - WXEVENTHANDLERREF MacGetCurrentEventHandlerCallRef() { return m_macCurrentEventHandlerCallRef ; } + WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; } + WXEVENTHANDLERREF MacGetCurrentEventHandlerCallRef() { return m_macCurrentEventHandlerCallRef ; } #endif public: @@ -111,8 +105,8 @@ private: // mac specifics #if TARGET_CARBON - WXEVENTHANDLERREF m_macEventHandler ; - WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ; + WXEVENTHANDLERREF m_macEventHandler ; + WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ; #endif WXEVENTREF m_macCurrentEvent ; @@ -164,21 +158,21 @@ public: #endif - void MacHandleMenuCommand( wxUint32 command ) ; - bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ; - bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ; - + void MacHandleMenuCommand( wxUint32 command ) ; + bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ; + bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ; + virtual short MacHandleAEODoc(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) ; // in response of an open-document apple event - virtual void MacOpenFile(const wxString &fileName) ; + virtual void MacOpenFile(const wxString &fileName) ; // in response of a print-document apple event - virtual void MacPrintFile(const wxString &fileName) ; + virtual void MacPrintFile(const wxString &fileName) ; // in response of a open-application apple event - virtual void MacNewFile() ; + virtual void MacNewFile() ; DECLARE_EVENT_TABLE() }; @@ -197,11 +191,6 @@ private: short m_currentRefNum ; } ; -// TODO: add platform-specific arguments -#ifndef __DARWIN__ -int WXDLLEXPORT wxEntry( int argc, char *argv[] , bool enterLoop = TRUE); -#endif - #endif // _WX_APP_H_