home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks96 / FontMancer.sit / FontMancer / Common / AEHandler.c < prev    next >
C/C++ Source or Header  |  1996-06-21  |  1KB  |  39 lines

  1. #include "AEHandler.h"
  2. #include "Display.h"
  3.  
  4. extern Boolean gQuit;
  5. extern Boolean gDManager;
  6.  
  7. void InitAEAccept()
  8. {
  9.     long        response;
  10.     OSErr        error;
  11.  
  12.     error = AEInstallEventHandler(kCoreEventClass,kAEOpenApplication,NewAEEventHandlerProc(AEHandleOpenApp),0,FALSE);
  13.     error = AEInstallEventHandler(kCoreEventClass,kAEOpenDocuments,NewAEEventHandlerProc(AEHandleOpenDoc),0,FALSE);
  14.     error = AEInstallEventHandler(kCoreEventClass,kAEPrintDocuments,NewAEEventHandlerProc(AEHandlePrint),0,FALSE);
  15.     error = AEInstallEventHandler(kCoreEventClass,kAEQuitApplication,NewAEEventHandlerProc(AEHandleQuit),0,FALSE);
  16.     if (gDManager)
  17.         error = InstallAEDMNotification();
  18. }
  19.  
  20. pascal OSErr AEHandleOpenApp(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
  21. {
  22.     return(noErr);
  23. }
  24.  
  25. pascal OSErr AEHandleOpenDoc(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
  26. {
  27.     return(noErr);
  28. }
  29.  
  30. pascal OSErr AEHandlePrint(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
  31. {
  32.     return(noErr);
  33. }
  34.  
  35. pascal OSErr AEHandleQuit(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
  36. {
  37.     gQuit = TRUE;
  38.     return(noErr);
  39. }