X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fbbdb7cd4c288d6d297bb93b34d360152f9b6225..7b108a5e8cae8552840b532e364536e2dbe47dc7:/include/wx/mac/app.h?ds=sidebyside diff --git a/include/wx/mac/app.h b/include/wx/mac/app.h index bdd9d9c648..7b475d5bb2 100644 --- a/include/wx/mac/app.h +++ b/include/wx/mac/app.h @@ -12,7 +12,7 @@ #ifndef _WX_APP_H_ #define _WX_APP_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "app.h" #endif @@ -53,6 +53,7 @@ class WXDLLEXPORT wxApp: public wxAppBase virtual bool Pending() ; virtual void Dispatch() ; virtual bool Yield(bool onlyIfNeeded = FALSE); + virtual bool ProcessIdle(); virtual void SetPrintMode(int mode) { m_printMode = mode; } virtual int GetPrintMode() const { return m_printMode; } @@ -85,8 +86,8 @@ public: static bool Initialize(); static void CleanUp(); + virtual bool OnInit(); void DeletePendingObjects(); - bool ProcessIdle(); bool IsExiting() { return !m_keepGoing ; } public: @@ -94,6 +95,7 @@ public: static wxWindow* s_captureWindow ; static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right static WXHRGN s_macCursorRgn ; + static long s_lastModifiers ; WXEVENTREF m_macCurrentEvent ; int m_nCmdShow; @@ -134,6 +136,7 @@ public: void MacDoOneEvent() ; void MacHandleOneEvent( WXEVENTREF ev ) ; + void MacHandleModifierEvents( WXEVENTREF ev ) ; WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; } // primary events @@ -149,11 +152,21 @@ public: virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ; virtual void MacHandleMenuSelect( int menuid , int menuitem ) ; + virtual bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ; + virtual 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) ; + // in response of a print-document apple event + virtual void MacPrintFile(const wxString &fileName) ; + // in response of a open-application apple event + virtual void MacNewFile() ; + DECLARE_EVENT_TABLE() };