X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5fde6fcc9b551340a194ae4c726db5ab64b5c594..ccb220600d4a0cda7ecfc89269532476fe570c3c:/src/mac/app.cpp diff --git a/src/mac/app.cpp b/src/mac/app.cpp index c7c54a882c..b30fd5576d 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -95,25 +95,41 @@ bool wxApp::s_macSupportPCMenuShortcuts = true ; long wxApp::s_macAboutMenuItemId = wxID_ABOUT ; wxString wxApp::s_macHelpMenuTitleName = "&Help" ; +#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340) pascal OSErr AEHandleODoc( const AppleEvent *event , AppleEvent *reply , long refcon ) +#else +pascal OSErr AEHandleODoc( const AppleEvent *event , AppleEvent *reply , unsigned long refcon ) +#endif { wxApp* app = (wxApp*) refcon ; return wxTheApp->MacHandleAEODoc( (AppleEvent*) event , reply) ; } +#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340) pascal OSErr AEHandleOApp( const AppleEvent *event , AppleEvent *reply , long refcon ) +#else +pascal OSErr AEHandleOApp( const AppleEvent *event , AppleEvent *reply , unsigned long refcon ) +#endif { wxApp* app = (wxApp*) refcon ; return wxTheApp->MacHandleAEOApp( (AppleEvent*) event , reply ) ; } +#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340) pascal OSErr AEHandlePDoc( const AppleEvent *event , AppleEvent *reply , long refcon ) +#else +pascal OSErr AEHandlePDoc( const AppleEvent *event , AppleEvent *reply , unsigned long refcon ) +#endif { wxApp* app = (wxApp*) refcon ; return wxTheApp->MacHandleAEPDoc( (AppleEvent*) event , reply ) ; } +#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340) pascal OSErr AEHandleQuit( const AppleEvent *event , AppleEvent *reply , long refcon ) +#else +pascal OSErr AEHandleQuit( const AppleEvent *event , AppleEvent *reply , unsigned long refcon ) +#endif { wxApp* app = (wxApp*) refcon ; return wxTheApp->MacHandleAEQuit( (AppleEvent*) event , reply) ; @@ -347,21 +363,22 @@ bool wxApp::Initialize() (long) wxTheApp , FALSE ) ; #else AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments , NewAEEventHandlerProc(AEHandleODoc) , - (long) wxTheApp , FALSE ) ; + (long) wxTheApp , FALSE ) ; AEInstallEventHandler( kCoreEventClass , kAEOpenApplication , NewAEEventHandlerProc(AEHandleOApp) , - (long) wxTheApp , FALSE ) ; + (long) wxTheApp , FALSE ) ; AEInstallEventHandler( kCoreEventClass , kAEPrintDocuments , NewAEEventHandlerProc(AEHandlePDoc) , - (long) wxTheApp , FALSE ) ; + (long) wxTheApp , FALSE ) ; AEInstallEventHandler( kCoreEventClass , kAEQuitApplication , NewAEEventHandlerProc(AEHandleQuit) , - (long) wxTheApp , FALSE ) ; + (long) wxTheApp , FALSE ) ; #endif #ifndef __UNIX__ // test the minimal configuration necessary + #if !TARGET_CARBON long theSystem ; - long theMachine; + long theMachine; if (Gestalt(gestaltMachineType, &theMachine) != noErr) { @@ -379,7 +396,6 @@ bool wxApp::Initialize() { error = kMacSTROldSystem ; } - #if !TARGET_CARBON else if ((long)GetApplLimit() - (long)ApplicationZone() < kMacMinHeap) { error = kMacSTRSmallSize;