]> git.saurik.com Git - wxWidgets.git/commitdiff
added AppleEvent Handler, somehow the standard event handler does not take care of...
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 31 Jan 2003 15:50:09 +0000 (15:50 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 31 Jan 2003 15:50:09 +0000 (15:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/app.cpp
src/mac/carbon/app.cpp

index 39edccb181a3195056dac01a12209291e859f6e6..3fd360674802b1013b9db4c4de3d4944349d76d0 100644 (file)
@@ -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 ;
     }
index 39edccb181a3195056dac01a12209291e859f6e6..3fd360674802b1013b9db4c4de3d4944349d76d0 100644 (file)
@@ -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 ;
     }