From 007ae8d09da858fd29824ac58e31a237b56b41fd Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Thu, 19 Apr 2001 19:16:56 +0000 Subject: [PATCH] Corrections for Mac OS X git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/app.cpp | 24 ++++++++++++++++++++---- src/mac/carbon/app.cpp | 24 ++++++++++++++++++++---- src/mac/carbon/mimetmac.cpp | 16 ++++++++++++---- src/mac/carbon/statbrma.cpp | 2 +- src/mac/mimetmac.cpp | 16 ++++++++++++---- src/mac/statbrma.cpp | 2 +- 6 files changed, 66 insertions(+), 18 deletions(-) diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 71f441209d..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,13 +363,13 @@ 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 diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 71f441209d..b30fd5576d 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/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,13 +363,13 @@ 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 diff --git a/src/mac/carbon/mimetmac.cpp b/src/mac/carbon/mimetmac.cpp index 77e60cbc20..21b804c85b 100644 --- a/src/mac/carbon/mimetmac.cpp +++ b/src/mac/carbon/mimetmac.cpp @@ -47,10 +47,6 @@ class WXDLLEXPORT wxIcon; - - - - bool wxFileTypeImpl::GetCommand(wxString *command, const char *verb) const { return FALSE; @@ -98,6 +94,11 @@ bool wxFileTypeImpl::GetDescription(wxString *desc) const return FALSE; } +bool wxFileTypeImpl::Unassociate() +{ + return FALSE; +} + // extension -> file type wxFileType * wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& e) @@ -186,3 +187,10 @@ size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& mimetypes) return 0; } +wxFileType * +wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) +{ + wxFAIL_MSG( _T("TODO") ); + + return NULL; +} diff --git a/src/mac/carbon/statbrma.cpp b/src/mac/carbon/statbrma.cpp index a73cfcaecf..f40b9b7e8d 100644 --- a/src/mac/carbon/statbrma.cpp +++ b/src/mac/carbon/statbrma.cpp @@ -10,7 +10,7 @@ /////////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma implementation "statusbr.h" +#pragma implementation "statbar.h" #endif // ---------------------------------------------------------------------------- diff --git a/src/mac/mimetmac.cpp b/src/mac/mimetmac.cpp index 77e60cbc20..21b804c85b 100644 --- a/src/mac/mimetmac.cpp +++ b/src/mac/mimetmac.cpp @@ -47,10 +47,6 @@ class WXDLLEXPORT wxIcon; - - - - bool wxFileTypeImpl::GetCommand(wxString *command, const char *verb) const { return FALSE; @@ -98,6 +94,11 @@ bool wxFileTypeImpl::GetDescription(wxString *desc) const return FALSE; } +bool wxFileTypeImpl::Unassociate() +{ + return FALSE; +} + // extension -> file type wxFileType * wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& e) @@ -186,3 +187,10 @@ size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& mimetypes) return 0; } +wxFileType * +wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) +{ + wxFAIL_MSG( _T("TODO") ); + + return NULL; +} diff --git a/src/mac/statbrma.cpp b/src/mac/statbrma.cpp index a73cfcaecf..f40b9b7e8d 100644 --- a/src/mac/statbrma.cpp +++ b/src/mac/statbrma.cpp @@ -10,7 +10,7 @@ /////////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma implementation "statusbr.h" +#pragma implementation "statbar.h" #endif // ---------------------------------------------------------------------------- -- 2.45.2