X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/72ddb593f1a430b8aab993e43b4184bc16acb665..339e0cf110a611428409733cda80b875b9fe6809:/include/wx/mac/app.h diff --git a/include/wx/mac/app.h b/include/wx/mac/app.h index 5f269ffc05..0241b2e649 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; } @@ -87,7 +88,6 @@ public: virtual bool OnInit(); void DeletePendingObjects(); - bool ProcessIdle(); bool IsExiting() { return !m_keepGoing ; } public: @@ -95,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; @@ -108,6 +109,8 @@ public: static bool s_macDefaultEncodingIsPC ; static bool s_macSupportPCMenuShortcuts ; static long s_macAboutMenuItemId ; + static long s_macPreferencesMenuItemId ; + static long s_macExitMenuItemId ; static wxString s_macHelpMenuTitleName ; static bool s_macHasAppearance ; @@ -135,6 +138,7 @@ public: void MacDoOneEvent() ; void MacHandleOneEvent( WXEVENTREF ev ) ; + void MacHandleModifierEvents( WXEVENTREF ev ) ; WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; } // primary events @@ -158,6 +162,13 @@ public: 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() }; @@ -176,7 +187,9 @@ private: } ; // TODO: add platform-specific arguments +#ifndef __DARWIN__ int WXDLLEXPORT wxEntry( int argc, char *argv[] , bool enterLoop = TRUE); +#endif void wxMacConvertFromPCForControls( char * p ) ;