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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       OSAGeneric.h
  3.  
  4.      Contains:   AppleScript Generic Component Interfaces.
  5.  
  6.      Version:    Technology: AppleScript 1.1
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1992-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 __OSAGENERIC__
  18. #define __OSAGENERIC__
  19. #ifndef __MACERRORS__
  20. #include "MacErrors.h"
  21. #endif
  22. #ifndef __APPLEEVENTS__
  23. #include "AppleEvents.h"
  24. #endif
  25. #ifndef __OSA__
  26. #include "OSA.h"
  27. #endif
  28. #if PRAGMA_ONCE
  29. #pragma once
  30. #endif
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. #if PRAGMA_IMPORT
  35. #pragma import on
  36. #endif
  37. #if PRAGMA_STRUCT_ALIGN
  38.     #pragma options align=mac68k
  39. #elif PRAGMA_STRUCT_PACKPUSH
  40.     #pragma pack(push, 2)
  41. #elif PRAGMA_STRUCT_PACK
  42.     #pragma pack(2)
  43. #endif
  44. /*    NOTE:   This interface defines a "generic scripting component."
  45.             The Generic Scripting Component allows automatic dispatch to a
  46.             specific scripting component that conforms to the OSA interface.
  47.             This component supports OSA, by calling AppleScript or some other 
  48.             scripting component.  Additionally it provides access to the default
  49.             and the user-prefered scripting component.
  50. */
  51. enum {
  52.                                                                 /* Component version this header file describes */
  53.     kGenericComponentVersion    = 0x0100
  54. };
  55. enum {
  56.     kGSSSelectGetDefaultScriptingComponent = 0x1001,
  57.     kGSSSelectSetDefaultScriptingComponent = 0x1002,
  58.     kGSSSelectGetScriptingComponent = 0x1003,
  59.     kGSSSelectGetScriptingComponentFromStored = 0x1004,
  60.     kGSSSelectGenericToRealID   = 0x1005,
  61.     kGSSSelectRealToGenericID   = 0x1006,
  62.     kGSSSelectOutOfRange        = 0x1007
  63. };
  64. typedef OSType                          ScriptingComponentSelector;
  65. typedef OSAID                           GenericID;
  66. /* get and set the default scripting component */
  67. EXTERN_API( OSAError )
  68. OSAGetDefaultScriptingComponent (ComponentInstance      genericScriptingComponent,
  69.                                  ScriptingComponentSelector * scriptingSubType)             FIVEWORDINLINE(0x2F3C, 0x0004, 0x1001, 0x7000, 0xA82A);
  70. EXTERN_API( OSAError )
  71. OSASetDefaultScriptingComponent (ComponentInstance      genericScriptingComponent,
  72.                                  ScriptingComponentSelector  scriptingSubType)              FIVEWORDINLINE(0x2F3C, 0x0004, 0x1002, 0x7000, 0xA82A);
  73. /* get a scripting component instance from its subtype code */
  74. EXTERN_API( OSAError )
  75. OSAGetScriptingComponent        (ComponentInstance      genericScriptingComponent,
  76.                                  ScriptingComponentSelector  scriptingSubType,
  77.                                  ComponentInstance *    scriptingInstance)                  FIVEWORDINLINE(0x2F3C, 0x0008, 0x1003, 0x7000, 0xA82A);
  78. /* get a scripting component selector (subType) from a stored script */
  79. EXTERN_API( OSAError )
  80. OSAGetScriptingComponentFromStored (ComponentInstance   genericScriptingComponent,
  81.                                  const AEDesc *         scriptData,
  82.                                  ScriptingComponentSelector * scriptingSubType)             FIVEWORDINLINE(0x2F3C, 0x0008, 0x1004, 0x7000, 0xA82A);
  83. /* get a real component instance and script id from a generic id */
  84. EXTERN_API( OSAError )
  85. OSAGenericToRealID              (ComponentInstance      genericScriptingComponent,
  86.                                  OSAID *                theScriptID,
  87.                                  ComponentInstance *    theExactComponent)                  FIVEWORDINLINE(0x2F3C, 0x0008, 0x1005, 0x7000, 0xA82A);
  88. /* get a generic id from a real component instance and script id */
  89. EXTERN_API( OSAError )
  90. OSARealToGenericID              (ComponentInstance      genericScriptingComponent,
  91.                                  OSAID *                theScriptID,
  92.                                  ComponentInstance      theExactComponent)                  FIVEWORDINLINE(0x2F3C, 0x0008, 0x1006, 0x7000, 0xA82A);
  93. #if PRAGMA_STRUCT_ALIGN
  94.     #pragma options align=reset
  95. #elif PRAGMA_STRUCT_PACKPUSH
  96.     #pragma pack(pop)
  97. #elif PRAGMA_STRUCT_PACK
  98.     #pragma pack()
  99. #endif
  100. #ifdef PRAGMA_IMPORT_OFF
  101. #pragma import off
  102. #elif PRAGMA_IMPORT
  103. #pragma import reset
  104. #endif
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108. #endif /* __OSAGENERIC__ */