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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       Patches.h
  3.  
  4.      Contains:   Patch Manager Interfaces.
  5.  
  6.      Version:    Technology: System 8
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1994-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 __PATCHES__
  18. #define __PATCHES__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #if PRAGMA_ONCE
  23. #pragma once
  24. #endif
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. #if PRAGMA_IMPORT
  29. #pragma import on
  30. #endif
  31. #if PRAGMA_STRUCT_ALIGN
  32.     #pragma options align=mac68k
  33. #elif PRAGMA_STRUCT_PACKPUSH
  34.     #pragma pack(push, 2)
  35. #elif PRAGMA_STRUCT_PACK
  36.     #pragma pack(2)
  37. #endif
  38. #if CALL_NOT_IN_CARBON
  39. enum {
  40.     kOSTrapType                 = 0,
  41.     kToolboxTrapType            = 1
  42. };
  43. typedef SignedByte                      TrapType;
  44. enum {
  45.     OSTrap                      = kOSTrapType,                  /* old name */
  46.     ToolTrap                    = kToolboxTrapType              /* old name */
  47. };
  48. /*
  49.     GetTrapAddress and SetTrapAddress are obsolete and should not
  50.     be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  51.     The old routines will not be supported for PowerPC apps.
  52. */
  53. #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  54. #if CALL_NOT_IN_CARBON
  55.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  56.                                                                                             #pragma parameter __A0 GetTrapAddress(__D0)
  57.                                                                                             #endif
  58. EXTERN_API( UniversalProcPtr )
  59. GetTrapAddress                  (UInt16                 trapNum)                            ONEWORDINLINE(0xA146);
  60.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  61.                                                                                             #pragma parameter SetTrapAddress(__A0, __D0)
  62.                                                                                             #endif
  63. EXTERN_API( void )
  64. SetTrapAddress                  (UniversalProcPtr       trapAddr,
  65.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA047);
  66. #endif  /* CALL_NOT_IN_CARBON */
  67. #endif  /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM */
  68. #if CALL_NOT_IN_CARBON
  69. EXTERN_API( UniversalProcPtr )
  70. NGetTrapAddress                 (UInt16                 trapNum,
  71.                                  TrapType               tTyp);
  72. EXTERN_API( void )
  73. NSetTrapAddress                 (UniversalProcPtr       trapAddr,
  74.                                  UInt16                 trapNum,
  75.                                  TrapType               tTyp);
  76. #endif  /* CALL_NOT_IN_CARBON */
  77. #if CALL_NOT_IN_CARBON
  78.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  79.                                                                                             #pragma parameter __A0 GetOSTrapAddress(__D0)
  80.                                                                                             #endif
  81. EXTERN_API( UniversalProcPtr )
  82. GetOSTrapAddress                (UInt16                 trapNum)                            ONEWORDINLINE(0xA346);
  83.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  84.                                                                                             #pragma parameter SetOSTrapAddress(__A0, __D0)
  85.                                                                                             #endif
  86. EXTERN_API( void )
  87. SetOSTrapAddress                (UniversalProcPtr       trapAddr,
  88.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA247);
  89.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  90.                                                                                             #pragma parameter __A0 GetToolTrapAddress(__D0)
  91.                                                                                             #endif
  92. EXTERN_API( UniversalProcPtr )
  93. GetToolTrapAddress              (UInt16                 trapNum)                            ONEWORDINLINE(0xA746);
  94.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  95.                                                                                             #pragma parameter SetToolTrapAddress(__A0, __D0)
  96.                                                                                             #endif
  97. EXTERN_API( void )
  98. SetToolTrapAddress              (UniversalProcPtr       trapAddr,
  99.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA647);
  100.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  101.                                                                                             #pragma parameter __A0 GetToolboxTrapAddress(__D0)
  102.                                                                                             #endif
  103. EXTERN_API( UniversalProcPtr )
  104. GetToolboxTrapAddress           (UInt16                 trapNum)                            ONEWORDINLINE(0xA746);
  105.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  106.                                                                                             #pragma parameter SetToolboxTrapAddress(__A0, __D0)
  107.                                                                                             #endif
  108. EXTERN_API( void )
  109. SetToolboxTrapAddress           (UniversalProcPtr       trapAddr,
  110.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA647);
  111. #endif  /* CALL_NOT_IN_CARBON */
  112. #if TARGET_CPU_PPC
  113. #if CALL_NOT_IN_CARBON
  114. EXTERN_API( UniversalProcHandle )
  115. GetTrapVector                   (UInt16                 trapNumber);
  116. #endif  /* CALL_NOT_IN_CARBON */
  117. #endif  /* TARGET_CPU_PPC */
  118. #endif  /* CALL_NOT_IN_CARBON */
  119. #if PRAGMA_STRUCT_ALIGN
  120.     #pragma options align=reset
  121. #elif PRAGMA_STRUCT_PACKPUSH
  122.     #pragma pack(pop)
  123. #elif PRAGMA_STRUCT_PACK
  124.     #pragma pack()
  125. #endif
  126. #ifdef PRAGMA_IMPORT_OFF
  127. #pragma import off
  128. #elif PRAGMA_IMPORT
  129. #pragma import reset
  130. #endif
  131. #ifdef __cplusplus
  132. }
  133. #endif
  134. #endif /* __PATCHES__ */