Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

264 lines
6.7 KiB

  1. /*
  2. File: Retrace.h
  3. Contains: Vertical Retrace Interfaces.
  4. Version: Technology: System 7.5
  5. Release: QuickTime 7.3
  6. Copyright: (c) 2007 (c) 1985-1993, 1995-1999 by Apple Computer, Inc., all rights reserved
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://developer.apple.com/bugreporter/
  10. */
  11. #ifndef __RETRACE__
  12. #define __RETRACE__
  13. #ifndef __MACTYPES__
  14. #include <MacTypes.h>
  15. #endif
  16. #ifndef __OSUTILS__
  17. #include <OSUtils.h>
  18. #endif
  19. #if PRAGMA_ONCE
  20. #pragma once
  21. #endif
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #if PRAGMA_IMPORT
  26. #pragma import on
  27. #endif
  28. #if PRAGMA_STRUCT_ALIGN
  29. #pragma options align=mac68k
  30. #elif PRAGMA_STRUCT_PACKPUSH
  31. #pragma pack(push, 2)
  32. #elif PRAGMA_STRUCT_PACK
  33. #pragma pack(2)
  34. #endif
  35. typedef struct VBLTask VBLTask;
  36. typedef VBLTask * VBLTaskPtr;
  37. typedef CALLBACK_API_REGISTER68K( void , VBLProcPtr, (VBLTaskPtr vblTaskPtr) );
  38. typedef REGISTER_UPP_TYPE(VBLProcPtr) VBLUPP;
  39. struct VBLTask {
  40. QElemPtr qLink;
  41. short qType;
  42. VBLUPP vblAddr;
  43. short vblCount;
  44. short vblPhase;
  45. };
  46. #if CALL_NOT_IN_CARBON
  47. /*
  48. * NewVBLUPP()
  49. *
  50. * Availability:
  51. * Non-Carbon CFM: available as macro/inline
  52. * CarbonLib: not available
  53. * Mac OS X: not available
  54. */
  55. EXTERN_API_C( VBLUPP )
  56. NewVBLUPP(VBLProcPtr userRoutine);
  57. #if !OPAQUE_UPP_TYPES
  58. enum { uppVBLProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
  59. #ifdef __cplusplus
  60. inline DEFINE_API_C(VBLUPP) NewVBLUPP(VBLProcPtr userRoutine) { return (VBLUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppVBLProcInfo, GetCurrentArchitecture()); }
  61. #else
  62. #define NewVBLUPP(userRoutine) (VBLUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppVBLProcInfo, GetCurrentArchitecture())
  63. #endif
  64. #endif
  65. /*
  66. * DisposeVBLUPP()
  67. *
  68. * Availability:
  69. * Non-Carbon CFM: available as macro/inline
  70. * CarbonLib: not available
  71. * Mac OS X: not available
  72. */
  73. EXTERN_API_C( void )
  74. DisposeVBLUPP(VBLUPP userUPP);
  75. #if !OPAQUE_UPP_TYPES
  76. #ifdef __cplusplus
  77. inline DEFINE_API_C(void) DisposeVBLUPP(VBLUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  78. #else
  79. #define DisposeVBLUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  80. #endif
  81. #endif
  82. /*
  83. * InvokeVBLUPP()
  84. *
  85. * Availability:
  86. * Non-Carbon CFM: available as macro/inline
  87. * CarbonLib: not available
  88. * Mac OS X: not available
  89. */
  90. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  91. #pragma parameter InvokeVBLUPP(__A0, __A1)
  92. #endif
  93. EXTERN_API_C( void )
  94. InvokeVBLUPP(
  95. VBLTaskPtr vblTaskPtr,
  96. VBLUPP userUPP) ONEWORDINLINE(0x4E91);
  97. #if !OPAQUE_UPP_TYPES && (!TARGET_OS_MAC || !TARGET_CPU_68K || TARGET_RT_MAC_CFM)
  98. #ifdef __cplusplus
  99. inline DEFINE_API_C(void) InvokeVBLUPP(VBLTaskPtr vblTaskPtr, VBLUPP userUPP) { CALL_ONE_PARAMETER_UPP(userUPP, uppVBLProcInfo, vblTaskPtr); }
  100. #else
  101. #define InvokeVBLUPP(vblTaskPtr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppVBLProcInfo, (vblTaskPtr))
  102. #endif
  103. #endif
  104. #endif /* CALL_NOT_IN_CARBON */
  105. #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
  106. /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
  107. #define NewVBLProc(userRoutine) NewVBLUPP(userRoutine)
  108. #define CallVBLProc(userRoutine, vblTaskPtr) InvokeVBLUPP(vblTaskPtr, userRoutine)
  109. #endif /* CALL_NOT_IN_CARBON */
  110. #if CALL_NOT_IN_CARBON
  111. #if CALL_NOT_IN_CARBON
  112. /*
  113. * GetVBLQHdr()
  114. *
  115. * Availability:
  116. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  117. * CarbonLib: not available
  118. * Mac OS X: not available
  119. */
  120. EXTERN_API( QHdrPtr )
  121. GetVBLQHdr(void) THREEWORDINLINE(0x2EBC, 0x0000, 0x0160);
  122. /*
  123. * SlotVInstall()
  124. *
  125. * Availability:
  126. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  127. * CarbonLib: not available
  128. * Mac OS X: not available
  129. */
  130. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  131. #pragma parameter __D0 SlotVInstall(__A0, __D0)
  132. #endif
  133. EXTERN_API( OSErr )
  134. SlotVInstall(
  135. QElemPtr vblBlockPtr,
  136. short theSlot) ONEWORDINLINE(0xA06F);
  137. /*
  138. * SlotVRemove()
  139. *
  140. * Availability:
  141. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  142. * CarbonLib: not available
  143. * Mac OS X: not available
  144. */
  145. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  146. #pragma parameter __D0 SlotVRemove(__A0, __D0)
  147. #endif
  148. EXTERN_API( OSErr )
  149. SlotVRemove(
  150. QElemPtr vblBlockPtr,
  151. short theSlot) ONEWORDINLINE(0xA070);
  152. /*
  153. * AttachVBL()
  154. *
  155. * Availability:
  156. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  157. * CarbonLib: not available
  158. * Mac OS X: not available
  159. */
  160. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  161. #pragma parameter __D0 AttachVBL(__D0)
  162. #endif
  163. EXTERN_API( OSErr )
  164. AttachVBL(short theSlot) ONEWORDINLINE(0xA071);
  165. /*
  166. * DoVBLTask()
  167. *
  168. * Availability:
  169. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  170. * CarbonLib: not available
  171. * Mac OS X: not available
  172. */
  173. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  174. #pragma parameter __D0 DoVBLTask(__D0)
  175. #endif
  176. EXTERN_API( OSErr )
  177. DoVBLTask(short theSlot) ONEWORDINLINE(0xA072);
  178. /*
  179. * VInstall()
  180. *
  181. * Availability:
  182. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  183. * CarbonLib: not available
  184. * Mac OS X: not available
  185. */
  186. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  187. #pragma parameter __D0 VInstall(__A0)
  188. #endif
  189. EXTERN_API( OSErr )
  190. VInstall(QElemPtr vblTaskPtr) ONEWORDINLINE(0xA033);
  191. /*
  192. * VRemove()
  193. *
  194. * Availability:
  195. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  196. * CarbonLib: not available
  197. * Mac OS X: not available
  198. */
  199. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  200. #pragma parameter __D0 VRemove(__A0)
  201. #endif
  202. EXTERN_API( OSErr )
  203. VRemove(QElemPtr vblTaskPtr) ONEWORDINLINE(0xA034);
  204. #endif /* CALL_NOT_IN_CARBON */
  205. #endif /* CALL_NOT_IN_CARBON */
  206. #if PRAGMA_STRUCT_ALIGN
  207. #pragma options align=reset
  208. #elif PRAGMA_STRUCT_PACKPUSH
  209. #pragma pack(pop)
  210. #elif PRAGMA_STRUCT_PACK
  211. #pragma pack()
  212. #endif
  213. #ifdef PRAGMA_IMPORT_OFF
  214. #pragma import off
  215. #elif PRAGMA_IMPORT
  216. #pragma import reset
  217. #endif
  218. #ifdef __cplusplus
  219. }
  220. #endif
  221. #endif /* __RETRACE__ */