From: Stefan Csomor Date: Fri, 31 Jan 2003 15:50:09 +0000 (+0000) Subject: added AppleEvent Handler, somehow the standard event handler does not take care of... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/597a3d06bf4ec87c5298bbd01d37ba5306ea33f4 added AppleEvent Handler, somehow the standard event handler does not take care of all of them.. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 39edccb181..3fd3606748 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -299,6 +299,8 @@ void wxApp::MacNewFile() // handling the quit event is not recommended by apple // rather using the quit apple event - which we do + { kEventClassAppleEvent , kEventAppleEvent } , + { kEventClassMouse , kEventMouseDown } , } ; @@ -428,6 +430,13 @@ pascal OSStatus wxAppEventHandler( EventHandlerCallRef handler , EventRef event case kEventClassMouse : result = MouseEventHandler( handler , event , data ) ; break ; + case kEventClassAppleEvent : + { + EventRecord rec ; + wxMacConvertEventToRecord( event , &rec ) ; + result = AEProcessAppleEvent( &rec ) ; + } + break ; default : break ; } diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 39edccb181..3fd3606748 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -299,6 +299,8 @@ void wxApp::MacNewFile() // handling the quit event is not recommended by apple // rather using the quit apple event - which we do + { kEventClassAppleEvent , kEventAppleEvent } , + { kEventClassMouse , kEventMouseDown } , } ; @@ -428,6 +430,13 @@ pascal OSStatus wxAppEventHandler( EventHandlerCallRef handler , EventRef event case kEventClassMouse : result = MouseEventHandler( handler , event , data ) ; break ; + case kEventClassAppleEvent : + { + EventRecord rec ; + wxMacConvertEventToRecord( event , &rec ) ; + result = AEProcessAppleEvent( &rec ) ; + } + break ; default : break ; }