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.

353 lines
9.5 KiB

  1. /*
  2. File: ASDebugging.h
  3. Contains: AppleScript Debugging Interfaces.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1992-2001 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __ASDEBUGGING__
  11. #define __ASDEBUGGING__
  12. #ifndef __MACTYPES__
  13. #include <MacTypes.h>
  14. #endif
  15. #ifndef __FILES__
  16. #include <Files.h>
  17. #endif
  18. #ifndef __COMPONENTS__
  19. #include <Components.h>
  20. #endif
  21. #ifndef __APPLEEVENTS__
  22. #include <AppleEvents.h>
  23. #endif
  24. #ifndef __APPLESCRIPT__
  25. #include <AppleScript.h>
  26. #endif
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. #if PRAGMA_IMPORT
  34. #pragma import on
  35. #endif
  36. #if PRAGMA_STRUCT_ALIGN
  37. #pragma options align=mac68k
  38. #elif PRAGMA_STRUCT_PACKPUSH
  39. #pragma pack(push, 2)
  40. #elif PRAGMA_STRUCT_PACK
  41. #pragma pack(2)
  42. #endif
  43. /**************************************************************************
  44. Mode Flags
  45. **************************************************************************/
  46. /* This mode flag can be passed to OSASetProperty or OSASetHandler
  47. and will prevent properties or handlers from being defined in a context
  48. that doesn't already have bindings for them. An error is returned if
  49. a current binding doesn't already exist.
  50. */
  51. enum {
  52. kOSAModeDontDefine = 0x0001
  53. };
  54. /**************************************************************************
  55. Component Selectors
  56. **************************************************************************/
  57. enum {
  58. kASSelectSetPropertyObsolete = 0x1101,
  59. kASSelectGetPropertyObsolete = 0x1102,
  60. kASSelectSetHandlerObsolete = 0x1103,
  61. kASSelectGetHandlerObsolete = 0x1104,
  62. kASSelectGetAppTerminologyObsolete = 0x1105,
  63. kASSelectSetProperty = 0x1106,
  64. kASSelectGetProperty = 0x1107,
  65. kASSelectSetHandler = 0x1108,
  66. kASSelectGetHandler = 0x1109,
  67. kASSelectGetAppTerminology = 0x110A,
  68. kASSelectGetSysTerminology = 0x110B,
  69. kASSelectGetPropertyNames = 0x110C,
  70. kASSelectGetHandlerNames = 0x110D
  71. };
  72. /**************************************************************************
  73. Context Accessors
  74. **************************************************************************/
  75. /*
  76. * OSASetProperty()
  77. *
  78. * Availability:
  79. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  80. * CarbonLib: in CarbonLib 1.0 and later
  81. * Mac OS X: in version 10.0 and later
  82. */
  83. EXTERN_API( OSAError )
  84. OSASetProperty(
  85. ComponentInstance scriptingComponent,
  86. long modeFlags,
  87. OSAID contextID,
  88. const AEDesc * variableName,
  89. OSAID scriptValueID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x1106, 0x7000, 0xA82A);
  90. /*
  91. * OSAGetProperty()
  92. *
  93. * Availability:
  94. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  95. * CarbonLib: in CarbonLib 1.0 and later
  96. * Mac OS X: in version 10.0 and later
  97. */
  98. EXTERN_API( OSAError )
  99. OSAGetProperty(
  100. ComponentInstance scriptingComponent,
  101. long modeFlags,
  102. OSAID contextID,
  103. const AEDesc * variableName,
  104. OSAID * resultingScriptValueID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x1107, 0x7000, 0xA82A);
  105. /*
  106. * OSAGetPropertyNames()
  107. *
  108. * Availability:
  109. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  110. * CarbonLib: in CarbonLib 1.0 and later
  111. * Mac OS X: in version 10.0 and later
  112. */
  113. EXTERN_API( OSAError )
  114. OSAGetPropertyNames(
  115. ComponentInstance scriptingComponent,
  116. long modeFlags,
  117. OSAID contextID,
  118. AEDescList * resultingPropertyNames) FIVEWORDINLINE(0x2F3C, 0x000C, 0x110C, 0x7000, 0xA82A);
  119. /*
  120. * OSASetHandler()
  121. *
  122. * Availability:
  123. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  124. * CarbonLib: in CarbonLib 1.0 and later
  125. * Mac OS X: in version 10.0 and later
  126. */
  127. EXTERN_API( OSAError )
  128. OSASetHandler(
  129. ComponentInstance scriptingComponent,
  130. long modeFlags,
  131. OSAID contextID,
  132. const AEDesc * handlerName,
  133. OSAID compiledScriptID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x1108, 0x7000, 0xA82A);
  134. /*
  135. * OSAGetHandler()
  136. *
  137. * Availability:
  138. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  139. * CarbonLib: in CarbonLib 1.0 and later
  140. * Mac OS X: in version 10.0 and later
  141. */
  142. EXTERN_API( OSAError )
  143. OSAGetHandler(
  144. ComponentInstance scriptingComponent,
  145. long modeFlags,
  146. OSAID contextID,
  147. const AEDesc * handlerName,
  148. OSAID * resultingCompiledScriptID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x1109, 0x7000, 0xA82A);
  149. /*
  150. * OSAGetHandlerNames()
  151. *
  152. * Availability:
  153. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  154. * CarbonLib: in CarbonLib 1.0 and later
  155. * Mac OS X: in version 10.0 and later
  156. */
  157. EXTERN_API( OSAError )
  158. OSAGetHandlerNames(
  159. ComponentInstance scriptingComponent,
  160. long modeFlags,
  161. OSAID contextID,
  162. AEDescList * resultingHandlerNames) FIVEWORDINLINE(0x2F3C, 0x000C, 0x110D, 0x7000, 0xA82A);
  163. /*
  164. * OSAGetAppTerminology()
  165. *
  166. * Availability:
  167. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  168. * CarbonLib: in CarbonLib 1.0 and later
  169. * Mac OS X: in version 10.0 and later
  170. */
  171. EXTERN_API( OSAError )
  172. OSAGetAppTerminology(
  173. ComponentInstance scriptingComponent,
  174. long modeFlags,
  175. FSSpec * fileSpec,
  176. short terminologyID,
  177. Boolean * didLaunch,
  178. AEDesc * terminologyList) FIVEWORDINLINE(0x2F3C, 0x0012, 0x110A, 0x7000, 0xA82A);
  179. /* Errors:
  180. errOSASystemError operation failed
  181. */
  182. /*
  183. * OSAGetSysTerminology()
  184. *
  185. * Availability:
  186. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  187. * CarbonLib: in CarbonLib 1.0 and later
  188. * Mac OS X: in version 10.0 and later
  189. */
  190. EXTERN_API( OSAError )
  191. OSAGetSysTerminology(
  192. ComponentInstance scriptingComponent,
  193. long modeFlags,
  194. short terminologyID,
  195. AEDesc * terminologyList) FIVEWORDINLINE(0x2F3C, 0x000A, 0x110B, 0x7000, 0xA82A);
  196. /* Errors:
  197. errOSASystemError operation failed
  198. */
  199. /* Notes on terminology ID
  200. A terminology ID is derived from script code and language code
  201. as follows;
  202. terminologyID = ((scriptCode & 0x7F) << 8) | (langCode & 0xFF)
  203. */
  204. /**************************************************************************
  205. Obsolete versions provided for backward compatibility:
  206. */
  207. /*
  208. * ASSetProperty()
  209. *
  210. * Availability:
  211. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  212. * CarbonLib: in CarbonLib 1.0 and later
  213. * Mac OS X: in version 10.0 and later
  214. */
  215. EXTERN_API( OSAError )
  216. ASSetProperty(
  217. ComponentInstance scriptingComponent,
  218. OSAID contextID,
  219. const AEDesc * variableName,
  220. OSAID scriptValueID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x1101, 0x7000, 0xA82A);
  221. /*
  222. * ASGetProperty()
  223. *
  224. * Availability:
  225. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  226. * CarbonLib: in CarbonLib 1.0 and later
  227. * Mac OS X: in version 10.0 and later
  228. */
  229. EXTERN_API( OSAError )
  230. ASGetProperty(
  231. ComponentInstance scriptingComponent,
  232. OSAID contextID,
  233. const AEDesc * variableName,
  234. OSAID * resultingScriptValueID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x1102, 0x7000, 0xA82A);
  235. /*
  236. * ASSetHandler()
  237. *
  238. * Availability:
  239. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  240. * CarbonLib: in CarbonLib 1.0 and later
  241. * Mac OS X: in version 10.0 and later
  242. */
  243. EXTERN_API( OSAError )
  244. ASSetHandler(
  245. ComponentInstance scriptingComponent,
  246. OSAID contextID,
  247. const AEDesc * handlerName,
  248. OSAID compiledScriptID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x1103, 0x7000, 0xA82A);
  249. /*
  250. * ASGetHandler()
  251. *
  252. * Availability:
  253. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  254. * CarbonLib: in CarbonLib 1.0 and later
  255. * Mac OS X: in version 10.0 and later
  256. */
  257. EXTERN_API( OSAError )
  258. ASGetHandler(
  259. ComponentInstance scriptingComponent,
  260. OSAID contextID,
  261. const AEDesc * handlerName,
  262. OSAID * resultingCompiledScriptID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x1104, 0x7000, 0xA82A);
  263. /*
  264. * ASGetAppTerminology()
  265. *
  266. * Availability:
  267. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  268. * CarbonLib: in CarbonLib 1.0 and later
  269. * Mac OS X: in version 10.0 and later
  270. */
  271. EXTERN_API( OSAError )
  272. ASGetAppTerminology(
  273. ComponentInstance scriptingComponent,
  274. FSSpec * fileSpec,
  275. short terminologID,
  276. Boolean * didLaunch,
  277. AEDesc * terminologyList) FIVEWORDINLINE(0x2F3C, 0x000E, 0x1105, 0x7000, 0xA82A);
  278. /* Errors:
  279. errOSASystemError operation failed
  280. */
  281. /**************************************************************************/
  282. #if PRAGMA_STRUCT_ALIGN
  283. #pragma options align=reset
  284. #elif PRAGMA_STRUCT_PACKPUSH
  285. #pragma pack(pop)
  286. #elif PRAGMA_STRUCT_PACK
  287. #pragma pack()
  288. #endif
  289. #ifdef PRAGMA_IMPORT_OFF
  290. #pragma import off
  291. #elif PRAGMA_IMPORT
  292. #pragma import reset
  293. #endif
  294. #ifdef __cplusplus
  295. }
  296. #endif
  297. #endif /* __ASDEBUGGING__ */