Mac OS 9
OSAGeneric.h
Go to the documentation of this file.
1 
19 #ifndef __OSAGENERIC__
20 #define __OSAGENERIC__
21 
22 #ifndef __MACERRORS__
23 #include <MacErrors.h>
24 #endif
25 
26 #ifndef __APPLEEVENTS__
27 #include <AppleEvents.h>
28 #endif
29 
30 #ifndef __OSA__
31 #include <OSA.h>
32 #endif
33 
34 #if PRAGMA_ONCE
35 #pragma once
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 
43 #if PRAGMA_IMPORT
44 #pragma import on
45 #endif
46 
47 #if PRAGMA_STRUCT_ALIGN
48 #pragma options align = mac68k
49 #elif PRAGMA_STRUCT_PACKPUSH
50 #pragma pack(push, 2)
51 #elif PRAGMA_STRUCT_PACK
52 #pragma pack(2)
53 #endif
54 
55  /* NOTE: This interface defines a "generic scripting component."
56  The Generic Scripting Component allows automatic dispatch to a
57  specific scripting component that conforms to the OSA interface.
58  This component supports OSA, by calling AppleScript or some other
59  scripting component. Additionally it provides access to the default
60  and the user-prefered scripting component.
61  */
62 
63  enum
64  {
65  /* Component version this header file describes */
66  kGenericComponentVersion = 0x0100
67  };
68 
69  enum
70  {
71  kGSSSelectGetDefaultScriptingComponent = 0x1001,
72  kGSSSelectSetDefaultScriptingComponent = 0x1002,
73  kGSSSelectGetScriptingComponent = 0x1003,
74  kGSSSelectGetScriptingComponentFromStored = 0x1004,
75  kGSSSelectGenericToRealID = 0x1005,
76  kGSSSelectRealToGenericID = 0x1006,
77  kGSSSelectOutOfRange = 0x1007
78  };
79 
80  typedef OSType ScriptingComponentSelector;
81  typedef OSAID GenericID;
82  /* get and set the default scripting component */
91  OSAError
93  ScriptingComponentSelector *scriptingSubType);
94 
103  OSAError
105  ScriptingComponentSelector scriptingSubType);
106 
107  /* get a scripting component instance from its subtype code */
116  OSAError
117  OSAGetScriptingComponent(ComponentInstance genericScriptingComponent,
118  ScriptingComponentSelector scriptingSubType,
119  ComponentInstance *scriptingInstance);
120 
121  /* get a scripting component selector (subType) from a stored script */
130  OSAError
132  const AEDesc *scriptData,
133  ScriptingComponentSelector *scriptingSubType);
134 
135  /* get a real component instance and script id from a generic id */
144  OSAError
145  OSAGenericToRealID(ComponentInstance genericScriptingComponent,
146  OSAID *theScriptID, ComponentInstance *theExactComponent);
147 
148  /* get a generic id from a real component instance and script id */
157  OSAError
158  OSARealToGenericID(ComponentInstance genericScriptingComponent,
159  OSAID *theScriptID, ComponentInstance theExactComponent);
160 
161 #if PRAGMA_STRUCT_ALIGN
162 #pragma options align = reset
163 #elif PRAGMA_STRUCT_PACKPUSH
164 #pragma pack(pop)
165 #elif PRAGMA_STRUCT_PACK
166 #pragma pack()
167 #endif
168 
169 #ifdef PRAGMA_IMPORT_OFF
170 #pragma import off
171 #elif PRAGMA_IMPORT
172 #pragma import reset
173 #endif
174 
175 #ifdef __cplusplus
176 }
177 #endif
178 
179 #endif /* __OSAGENERIC__ */
AppleEvent Package Interfaces.
OSErr codes.
OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
Open Scripting Architecture Client Interfaces.
unsigned long OSAID
Definition: OSA.h:165
Definition: AEDataModel.h:175
Definition: Components.h:220