Mac OS 9
AppleScript.h
Go to the documentation of this file.
1 
19 #ifndef __APPLESCRIPT__
20 #define __APPLESCRIPT__
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 #ifndef __TEXTEDIT__
35 #include <TextEdit.h>
36 #endif
37 
38 #if PRAGMA_ONCE
39 #pragma once
40 #endif
41 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46 
47 #if PRAGMA_IMPORT
48 #pragma import on
49 #endif
50 
51 #if PRAGMA_STRUCT_ALIGN
52 #pragma options align = mac68k
53 #elif PRAGMA_STRUCT_PACKPUSH
54 #pragma pack(push, 2)
55 #elif PRAGMA_STRUCT_PACK
56 #pragma pack(2)
57 #endif
58 
59  /**************************************************************************
60  Types and Constants
61  **************************************************************************/
66  enum
67  {
68  typeAppleScript = FOUR_CHAR_CODE('ascr'),
69  kAppleScriptSubtype = typeAppleScript,
70  typeASStorage = typeAppleScript
71  };
72 
73  /**************************************************************************
74  Component Selectors
75  **************************************************************************/
76 
77  enum
78  {
79  kASSelectInit = 0x1001,
80  kASSelectSetSourceStyles = 0x1002,
81  kASSelectGetSourceStyles = 0x1003,
82  kASSelectGetSourceStyleNames = 0x1004
83  };
84 
85  /**************************************************************************
86  OSAGetScriptInfo Selectors
87  **************************************************************************/
88  enum
89  {
90  kASHasOpenHandler = FOUR_CHAR_CODE('hsod')
91  };
92 
100  /**************************************************************************
101  Initialization
102  **************************************************************************/
111  OSAError
112  ASInit(ComponentInstance scriptingComponent, long modeFlags, long minStackSize,
113  long preferredStackSize, long maxStackSize, long minHeapSize,
114  long preferredHeapSize, long maxHeapSize);
115 
131  enum
132  {
133  kASDefaultMinStackSize = 4 * 1024,
134  kASDefaultPreferredStackSize = 16 * 1024,
135  kASDefaultMaxStackSize = 16 * 1024,
136  kASDefaultMinHeapSize = 4 * 1024,
137  kASDefaultPreferredHeapSize = 16 * 1024,
138  kASDefaultMaxHeapSize = 32L * 1024 * 1024
139  };
140 
141  /**************************************************************************
142  Source Styles
143  **************************************************************************/
152  OSAError
153  ASSetSourceStyles(ComponentInstance scriptingComponent, STHandle sourceStyles);
154 
168  OSAError
170  STHandle *resultingSourceStyles);
171 
185  OSAError
186  ASGetSourceStyleNames(ComponentInstance scriptingComponent, long modeFlags,
187  AEDescList *resultingSourceStyleNamesList);
188 
203  enum
204  {
205  kASSourceStyleUncompiledText = 0,
206  kASSourceStyleNormalText = 1,
207  kASSourceStyleLanguageKeyword = 2,
208  kASSourceStyleApplicationKeyword = 3,
209  kASSourceStyleComment = 4,
210  kASSourceStyleLiteral = 5,
211  kASSourceStyleUserSymbol = 6,
212  kASSourceStyleObjectSpecifier = 7,
213  kASNumberOfSourceStyles = 8
214  };
215 
216 #if PRAGMA_STRUCT_ALIGN
217 #pragma options align = reset
218 #elif PRAGMA_STRUCT_PACKPUSH
219 #pragma pack(pop)
220 #elif PRAGMA_STRUCT_PACK
221 #pragma pack()
222 #endif
223 
224 #ifdef PRAGMA_IMPORT_OFF
225 #pragma import off
226 #elif PRAGMA_IMPORT
227 #pragma import reset
228 #endif
229 
230 #ifdef __cplusplus
231 }
232 #endif
233 
234 #endif /* __APPLESCRIPT__ */
AppleEvent Package Interfaces.
OSAError ASSetSourceStyles(ComponentInstance scriptingComponent, STHandle sourceStyles)
OSAError ASInit(ComponentInstance scriptingComponent, long modeFlags, long minStackSize, long preferredStackSize, long maxStackSize, long minHeapSize, long preferredHeapSize, long maxHeapSize)
OSAError ASGetSourceStyles(ComponentInstance scriptingComponent, STHandle *resultingSourceStyles)
OSAError ASGetSourceStyleNames(ComponentInstance scriptingComponent, long modeFlags, AEDescList *resultingSourceStyleNamesList)
OSErr codes.
Open Scripting Architecture Client Interfaces.
TextEdit Interfaces.
Definition: AEDataModel.h:175
Definition: Components.h:220
Definition: TextEdit.h:432