Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsAEEventHandling.cpp File Reference
#include "nsAEEventHandling.h"
#include "nsAECoreClass.h"

Go to the source code of this file.

Functions

OSErr CreateAEHandlerClasses (Boolean suspendFirstEvent)
OSErr ResumeAEHandling (AppleEvent *appleEvent, AppleEvent *reply, Boolean dispatchEvent)
OSErr GetSuspendedEvent (AppleEvent *theEvent, AppleEvent *reply)
OSErr ShutdownAEHandlerClasses (void)

Function Documentation

OSErr CreateAEHandlerClasses ( Boolean  suspendFirstEvent)

Definition at line 50 of file nsAEEventHandling.cpp.

{
       OSErr  err = noErr;
       
       // if we have one, assume we have all
       if (AECoreClass::sAECoreHandler)
              return noErr;
       
       try
       {
              AECoreClass::sAECoreHandler = new AECoreClass(suspendFirstEvent);
       }
       catch(OSErr catchErr)
       {
              err = catchErr;
       }
       catch( ... )
       {
              err = paramErr;
       }
       
       return err;
}
OSErr GetSuspendedEvent ( AppleEvent *  theEvent,
AppleEvent *  reply 
)

Definition at line 109 of file nsAEEventHandling.cpp.

{
       OSErr  err = noErr;
       
       theEvent->descriptorType = typeNull;
       theEvent->dataHandle = nil;
       
       reply->descriptorType = typeNull;
       reply->dataHandle = nil;
       
       if (!AECoreClass::sAECoreHandler)
              return paramErr;
       
       try
       {
              AECoreClass::sAECoreHandler->GetSuspendedEvent(theEvent, reply);
       }
       catch(OSErr catchErr)
       {
              err = catchErr;
       }
       catch( ... )
       {
              err = paramErr;
       }
       
       return err;
}
OSErr ResumeAEHandling ( AppleEvent *  appleEvent,
AppleEvent *  reply,
Boolean  dispatchEvent 
)

Definition at line 80 of file nsAEEventHandling.cpp.

{
       OSErr  err = noErr;
       
       if (!AECoreClass::sAECoreHandler)
              return paramErr;
       
       try
       {
              AECoreClass::sAECoreHandler->ResumeEventHandling(appleEvent, reply, dispatchEvent);
       }
       catch(OSErr catchErr)
       {
              err = catchErr;
       }
       catch( ... )
       {
              err = paramErr;
       }

       return err;
}

Definition at line 143 of file nsAEEventHandling.cpp.

{
       if (!AECoreClass::sAECoreHandler)
              return noErr;
       
       try
       {
              delete AECoreClass::sAECoreHandler;
       }
       catch(...)
       {
       }
       
       AECoreClass::sAECoreHandler = nil;
       return noErr;
}