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.

175 lines
4.9 KiB

  1. /*
  2. File: OSAGeneric.h
  3. Contains: AppleScript Generic Component 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 __OSAGENERIC__
  11. #define __OSAGENERIC__
  12. #ifndef __MACERRORS__
  13. #include <MacErrors.h>
  14. #endif
  15. #ifndef __OSA__
  16. #include <OSA.h>
  17. #endif
  18. #if PRAGMA_ONCE
  19. #pragma once
  20. #endif
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #if PRAGMA_IMPORT
  25. #pragma import on
  26. #endif
  27. /* NOTE: This interface defines a "generic scripting component."
  28. The Generic Scripting Component allows automatic dispatch to a
  29. specific scripting component that conforms to the OSA interface.
  30. This component supports OSA, by calling AppleScript or some other
  31. scripting component. Additionally it provides access to the default
  32. and the user-prefered scripting component.
  33. */
  34. enum {
  35. /* Component version this header file describes */
  36. kGenericComponentVersion = 0x0100
  37. };
  38. enum {
  39. kGSSSelectGetDefaultScriptingComponent = 0x1001,
  40. kGSSSelectSetDefaultScriptingComponent = 0x1002,
  41. kGSSSelectGetScriptingComponent = 0x1003,
  42. kGSSSelectGetScriptingComponentFromStored = 0x1004,
  43. kGSSSelectGenericToRealID = 0x1005,
  44. kGSSSelectRealToGenericID = 0x1006,
  45. kGSSSelectOutOfRange = 0x1007
  46. };
  47. typedef OSType ScriptingComponentSelector;
  48. typedef OSAID GenericID;
  49. /* get and set the default scripting component */
  50. /*
  51. * OSAGetDefaultScriptingComponent()
  52. *
  53. * Availability:
  54. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  55. * CarbonLib: in CarbonLib 1.0 and later
  56. * Mac OS X: in version 10.0 and later
  57. */
  58. EXTERN_API( OSAError )
  59. OSAGetDefaultScriptingComponent(
  60. ComponentInstance genericScriptingComponent,
  61. ScriptingComponentSelector * scriptingSubType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x1001, 0x7000, 0xA82A);
  62. /*
  63. * OSASetDefaultScriptingComponent()
  64. *
  65. * Availability:
  66. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  67. * CarbonLib: in CarbonLib 1.0 and later
  68. * Mac OS X: in version 10.0 and later
  69. */
  70. EXTERN_API( OSAError )
  71. OSASetDefaultScriptingComponent(
  72. ComponentInstance genericScriptingComponent,
  73. ScriptingComponentSelector scriptingSubType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x1002, 0x7000, 0xA82A);
  74. /* get a scripting component instance from its subtype code */
  75. /*
  76. * OSAGetScriptingComponent()
  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. OSAGetScriptingComponent(
  85. ComponentInstance genericScriptingComponent,
  86. ScriptingComponentSelector scriptingSubType,
  87. ComponentInstance * scriptingInstance) FIVEWORDINLINE(0x2F3C, 0x0008, 0x1003, 0x7000, 0xA82A);
  88. /* get a scripting component selector (subType) from a stored script */
  89. /*
  90. * OSAGetScriptingComponentFromStored()
  91. *
  92. * Availability:
  93. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  94. * CarbonLib: in CarbonLib 1.0 and later
  95. * Mac OS X: in version 10.0 and later
  96. */
  97. EXTERN_API( OSAError )
  98. OSAGetScriptingComponentFromStored(
  99. ComponentInstance genericScriptingComponent,
  100. const AEDesc * scriptData,
  101. ScriptingComponentSelector * scriptingSubType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x1004, 0x7000, 0xA82A);
  102. /* get a real component instance and script id from a generic id */
  103. /*
  104. * OSAGenericToRealID()
  105. *
  106. * Availability:
  107. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  108. * CarbonLib: in CarbonLib 1.0 and later
  109. * Mac OS X: in version 10.0 and later
  110. */
  111. EXTERN_API( OSAError )
  112. OSAGenericToRealID(
  113. ComponentInstance genericScriptingComponent,
  114. OSAID * theScriptID,
  115. ComponentInstance * theExactComponent) FIVEWORDINLINE(0x2F3C, 0x0008, 0x1005, 0x7000, 0xA82A);
  116. /* get a generic id from a real component instance and script id */
  117. /*
  118. * OSARealToGenericID()
  119. *
  120. * Availability:
  121. * Non-Carbon CFM: in AppleScriptLib 1.1 and later
  122. * CarbonLib: in CarbonLib 1.0 and later
  123. * Mac OS X: in version 10.0 and later
  124. */
  125. EXTERN_API( OSAError )
  126. OSARealToGenericID(
  127. ComponentInstance genericScriptingComponent,
  128. OSAID * theScriptID,
  129. ComponentInstance theExactComponent) FIVEWORDINLINE(0x2F3C, 0x0008, 0x1006, 0x7000, 0xA82A);
  130. #ifdef PRAGMA_IMPORT_OFF
  131. #pragma import off
  132. #elif PRAGMA_IMPORT
  133. #pragma import reset
  134. #endif
  135. #ifdef __cplusplus
  136. }
  137. #endif
  138. #endif /* __OSAGENERIC__ */