Notification.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:5k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       Notification.h
  3.  
  4.      Contains:   Notification Manager interfaces
  5.  
  6.      Version:    Technology: System 7.5
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1989-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __NOTIFICATION__
  18. #define __NOTIFICATION__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __OSUTILS__
  23. #include "OSUtils.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=mac68k
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. typedef struct NMRec                    NMRec;
  42. typedef NMRec *                         NMRecPtr;
  43. typedef CALLBACK_API( void , NMProcPtr )(NMRecPtr nmReqPtr);
  44. typedef STACK_UPP_TYPE(NMProcPtr)                               NMUPP;
  45. struct NMRec {
  46.     QElemPtr                        qLink;                      /* next queue entry*/
  47.     short                           qType;                      /* queue type -- ORD(nmType) = 8*/
  48.     short                           nmFlags;                    /* reserved*/
  49.     long                            nmPrivate;                  /* reserved*/
  50.     short                           nmReserved;                 /* reserved*/
  51.     short                           nmMark;                     /* item to mark in Apple menu*/
  52.     Handle                          nmIcon;                     /* handle to small icon*/
  53.     Handle                          nmSound;                    /* handle to sound record*/
  54.     StringPtr                       nmStr;                      /* string to appear in alert*/
  55.     NMUPP                           nmResp;                     /* pointer to response routine*/
  56.     long                            nmRefCon;                   /* for application use*/
  57. };
  58. #if OPAQUE_UPP_TYPES
  59.     EXTERN_API(NMUPP)
  60.     NewNMUPP                       (NMProcPtr               userRoutine);
  61.     EXTERN_API(void)
  62.     DisposeNMUPP                   (NMUPP                   userUPP);
  63.     EXTERN_API(void)
  64.     InvokeNMUPP                    (NMRecPtr                nmReqPtr,
  65.                                     NMUPP                   userUPP);
  66. #else
  67.     enum { uppNMProcInfo = 0x000000C0 };                            /* pascal no_return_value Func(4_bytes) */
  68.     #define NewNMUPP(userRoutine)                                   (NMUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNMProcInfo, GetCurrentArchitecture())
  69.     #define DisposeNMUPP(userUPP)                                   DisposeRoutineDescriptor(userUPP)
  70.     #define InvokeNMUPP(nmReqPtr, userUPP)                          CALL_ONE_PARAMETER_UPP((userUPP), uppNMProcInfo, (nmReqPtr))
  71. #endif
  72. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  73. #define NewNMProc(userRoutine)                                  NewNMUPP(userRoutine)
  74. #define CallNMProc(userRoutine, nmReqPtr)                       InvokeNMUPP(nmReqPtr, userRoutine)
  75.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  76.                                                                                             #pragma parameter __D0 NMInstall(__A0)
  77.                                                                                             #endif
  78. EXTERN_API( OSErr )
  79. NMInstall                       (NMRecPtr               nmReqPtr)                           ONEWORDINLINE(0xA05E);
  80.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  81.                                                                                             #pragma parameter __D0 NMRemove(__A0)
  82.                                                                                             #endif
  83. EXTERN_API( OSErr )
  84. NMRemove                        (NMRecPtr               nmReqPtr)                           ONEWORDINLINE(0xA05F);
  85. #if PRAGMA_STRUCT_ALIGN
  86.     #pragma options align=reset
  87. #elif PRAGMA_STRUCT_PACKPUSH
  88.     #pragma pack(pop)
  89. #elif PRAGMA_STRUCT_PACK
  90.     #pragma pack()
  91. #endif
  92. #ifdef PRAGMA_IMPORT_OFF
  93. #pragma import off
  94. #elif PRAGMA_IMPORT
  95. #pragma import reset
  96. #endif
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100. #endif /* __NOTIFICATION__ */