Move setting of ioready 'wait' earlier in call chain, to
[python/dscho.git] / Lib / plat-mac / lib-scriptpackages / CodeWarrior / Standard_Suite.py
blob0213b980deb60e29305f005f856cb56b92a451f8
1 """Suite Standard Suite: Common terms for most applications
2 Level 1, version 1
4 Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
5 AETE/AEUT resource version 1/0, language 0, script 0
6 """
8 import aetools
9 import MacOS
11 _code = 'CoRe'
13 from StdSuites.Standard_Suite import *
14 class Standard_Suite_Events(Standard_Suite_Events):
16 _argmap_close = {
17 'saving' : 'savo',
18 'saving_in' : 'kfil',
21 def close(self, _object, _attributes={}, **_arguments):
22 """close: close an object
23 Required argument: the object to close
24 Keyword argument saving: specifies whether or not changes should be saved before closing
25 Keyword argument saving_in: the file in which to save the object
26 Keyword argument _attributes: AppleEvent attribute dictionary
27 """
28 _code = 'core'
29 _subcode = 'clos'
31 aetools.keysubst(_arguments, self._argmap_close)
32 _arguments['----'] = _object
34 aetools.enumsubst(_arguments, 'savo', _Enum_savo)
36 _reply, _arguments, _attributes = self.send(_code, _subcode,
37 _arguments, _attributes)
38 if _arguments.get('errn', 0):
39 raise aetools.Error, aetools.decodeerror(_arguments)
40 # XXXX Optionally decode result
41 if _arguments.has_key('----'):
42 return _arguments['----']
44 _argmap_count = {
45 'each' : 'kocl',
48 def count(self, _object, _attributes={}, **_arguments):
49 """count: return the number of elements of a particular class within an object
50 Required argument: the object whose elements are to be counted
51 Keyword argument each: the class of the elements to be counted. Keyword 'each' is optional in AppleScript
52 Keyword argument _attributes: AppleEvent attribute dictionary
53 Returns: the number of elements
54 """
55 _code = 'core'
56 _subcode = 'cnte'
58 aetools.keysubst(_arguments, self._argmap_count)
59 _arguments['----'] = _object
62 _reply, _arguments, _attributes = self.send(_code, _subcode,
63 _arguments, _attributes)
64 if _arguments.get('errn', 0):
65 raise aetools.Error, aetools.decodeerror(_arguments)
66 # XXXX Optionally decode result
67 if _arguments.has_key('----'):
68 return _arguments['----']
70 _argmap_get = {
71 'as' : 'rtyp',
74 def get(self, _object, _attributes={}, **_arguments):
75 """get: get the data for an object
76 Required argument: the object whose data is to be returned
77 Keyword argument as: the desired types for the data, in order of preference
78 Keyword argument _attributes: AppleEvent attribute dictionary
79 Returns: The data from the object
80 """
81 _code = 'core'
82 _subcode = 'getd'
84 aetools.keysubst(_arguments, self._argmap_get)
85 _arguments['----'] = _object
88 _reply, _arguments, _attributes = self.send(_code, _subcode,
89 _arguments, _attributes)
90 if _arguments.get('errn', 0):
91 raise aetools.Error, aetools.decodeerror(_arguments)
92 # XXXX Optionally decode result
93 if _arguments.has_key('----'):
94 return _arguments['----']
96 _argmap_make = {
97 'new' : 'kocl',
98 'as' : 'rtyp',
99 'at' : 'insh',
100 'with_data' : 'data',
101 'with_properties' : 'prdt',
104 def make(self, _no_object=None, _attributes={}, **_arguments):
105 """make: make a new element
106 Keyword argument new: the class of the new element\xd1keyword 'new' is optional in AppleScript
107 Keyword argument as: the desired types for the data, in order of preference
108 Keyword argument at: the location at which to insert the element
109 Keyword argument with_data: the initial data for the element
110 Keyword argument with_properties: the initial values for the properties of the element
111 Keyword argument _attributes: AppleEvent attribute dictionary
112 Returns: to the new object(s)
114 _code = 'core'
115 _subcode = 'crel'
117 aetools.keysubst(_arguments, self._argmap_make)
118 if _no_object != None: raise TypeError, 'No direct arg expected'
121 _reply, _arguments, _attributes = self.send(_code, _subcode,
122 _arguments, _attributes)
123 if _arguments.get('errn', 0):
124 raise aetools.Error, aetools.decodeerror(_arguments)
125 # XXXX Optionally decode result
126 if _arguments.has_key('----'):
127 return _arguments['----']
129 def select(self, _object=None, _attributes={}, **_arguments):
130 """select: select the specified object
131 Required argument: the object to select
132 Keyword argument _attributes: AppleEvent attribute dictionary
134 _code = 'misc'
135 _subcode = 'slct'
137 if _arguments: raise TypeError, 'No optional args expected'
138 _arguments['----'] = _object
141 _reply, _arguments, _attributes = self.send(_code, _subcode,
142 _arguments, _attributes)
143 if _arguments.get('errn', 0):
144 raise aetools.Error, aetools.decodeerror(_arguments)
145 # XXXX Optionally decode result
146 if _arguments.has_key('----'):
147 return _arguments['----']
149 _argmap_set = {
150 'to' : 'data',
153 def set(self, _object, _attributes={}, **_arguments):
154 """set: set an object's data
155 Required argument: the object to change
156 Keyword argument to: the new value
157 Keyword argument _attributes: AppleEvent attribute dictionary
159 _code = 'core'
160 _subcode = 'setd'
162 aetools.keysubst(_arguments, self._argmap_set)
163 _arguments['----'] = _object
166 _reply, _arguments, _attributes = self.send(_code, _subcode,
167 _arguments, _attributes)
168 if _arguments.get('errn', 0):
169 raise aetools.Error, aetools.decodeerror(_arguments)
170 # XXXX Optionally decode result
171 if _arguments.has_key('----'):
172 return _arguments['----']
175 class application(aetools.ComponentItem):
176 """application - an application program """
177 want = 'capp'
178 class user_interaction(aetools.NProperty):
179 """user interaction - user interaction level """
180 which = 'inte'
181 want = 'Inte'
182 # element 'docu' as ['indx', 'name', 'rang']
183 # element 'cwin' as ['indx', 'name', 'rang']
185 class character(aetools.ComponentItem):
186 """character - a character """
187 want = 'cha '
188 class offset(aetools.NProperty):
189 """offset - offset of a text object from the beginning of the document (first char has offset 1) """
190 which = 'pOff'
191 want = 'long'
192 class length(aetools.NProperty):
193 """length - length in characters of this object """
194 which = 'pLen'
195 want = 'long'
197 class document(aetools.ComponentItem):
198 """document - a document """
199 want = 'docu'
200 class name(aetools.NProperty):
201 """name - the title of the document """
202 which = 'pnam'
203 want = 'itxt'
204 class kind(aetools.NProperty):
205 """kind - the kind of document """
206 which = 'DKND'
207 want = 'DKND'
208 class index(aetools.NProperty):
209 """index - the number of the document """
210 which = 'pidx'
211 want = 'long'
212 class location(aetools.NProperty):
213 """location - the file of the document """
214 which = 'FILE'
215 want = 'fss '
216 class file_permissions(aetools.NProperty):
217 """file permissions - the file permissions for the document """
218 which = 'PERM'
219 want = 'PERM'
220 class window(aetools.NProperty):
221 """window - the window of the document. """
222 which = 'cwin'
223 want = 'cwin'
225 documents = document
227 class file(aetools.ComponentItem):
228 """file - A file """
229 want = 'file'
231 files = file
233 class insertion_point(aetools.ComponentItem):
234 """insertion point - An insertion location between two objects """
235 want = 'cins'
237 class line(aetools.ComponentItem):
238 """line - lines of text """
239 want = 'clin'
240 # element 'cha ' as ['indx', 'rang', 'rele']
242 lines = line
244 class selection_2d_object(aetools.ComponentItem):
245 """selection-object - the selection visible to the user """
246 want = 'csel'
247 class contents(aetools.NProperty):
248 """contents - the contents of the selection """
249 which = 'pcnt'
250 want = 'type'
251 # element 'cha ' as ['indx', 'rele', 'rang', 'test']
252 # element 'clin' as ['indx', 'rang', 'rele']
253 # element 'ctxt' as ['rang']
255 class text(aetools.ComponentItem):
256 """text - Text """
257 want = 'ctxt'
258 # element 'cha ' as ['indx', 'rele', 'rang']
259 # element 'cins' as ['rele']
260 # element 'clin' as ['indx', 'rang', 'rele']
261 # element 'ctxt' as ['rang']
263 class window(aetools.ComponentItem):
264 """window - A window """
265 want = 'cwin'
266 class bounds(aetools.NProperty):
267 """bounds - the boundary rectangle for the window """
268 which = 'pbnd'
269 want = 'qdrt'
270 class document(aetools.NProperty):
271 """document - the document that owns this window """
272 which = 'docu'
273 want = 'docu'
274 class position(aetools.NProperty):
275 """position - upper left coordinates of window """
276 which = 'ppos'
277 want = 'QDpt'
278 class visible(aetools.NProperty):
279 """visible - is the window visible? """
280 which = 'pvis'
281 want = 'bool'
282 class zoomed(aetools.NProperty):
283 """zoomed - Is the window zoomed? """
284 which = 'pzum'
285 want = 'bool'
287 windows = window
288 application._superclassnames = []
289 application._privpropdict = {
290 'user_interaction' : user_interaction,
292 application._privelemdict = {
293 'document' : document,
294 'window' : window,
296 character._superclassnames = []
297 character._privpropdict = {
298 'offset' : offset,
299 'length' : length,
301 character._privelemdict = {
303 document._superclassnames = []
304 document._privpropdict = {
305 'name' : name,
306 'kind' : kind,
307 'index' : index,
308 'location' : location,
309 'file_permissions' : file_permissions,
310 'window' : window,
312 document._privelemdict = {
314 file._superclassnames = []
315 file._privpropdict = {
317 file._privelemdict = {
319 insertion_point._superclassnames = []
320 insertion_point._privpropdict = {
321 'length' : length,
322 'offset' : offset,
324 insertion_point._privelemdict = {
326 line._superclassnames = []
327 line._privpropdict = {
328 'index' : index,
329 'offset' : offset,
330 'length' : length,
332 line._privelemdict = {
333 'character' : character,
335 selection_2d_object._superclassnames = []
336 selection_2d_object._privpropdict = {
337 'contents' : contents,
338 'length' : length,
339 'offset' : offset,
341 selection_2d_object._privelemdict = {
342 'character' : character,
343 'line' : line,
344 'text' : text,
346 text._superclassnames = []
347 text._privpropdict = {
348 'length' : length,
349 'offset' : offset,
351 text._privelemdict = {
352 'character' : character,
353 'insertion_point' : insertion_point,
354 'line' : line,
355 'text' : text,
357 window._superclassnames = []
358 window._privpropdict = {
359 'name' : name,
360 'index' : index,
361 'bounds' : bounds,
362 'document' : document,
363 'position' : position,
364 'visible' : visible,
365 'zoomed' : zoomed,
367 window._privelemdict = {
371 # Indices of types declared in this module
373 _classdeclarations = {
374 'cha ' : character,
375 'ctxt' : text,
376 'cwin' : window,
377 'file' : file,
378 'clin' : line,
379 'csel' : selection_2d_object,
380 'capp' : application,
381 'cins' : insertion_point,
382 'docu' : document,
385 _propdeclarations = {
386 'inte' : user_interaction,
387 'pvis' : visible,
388 'DKND' : kind,
389 'pbnd' : bounds,
390 'PERM' : file_permissions,
391 'docu' : document,
392 'pidx' : index,
393 'pOff' : offset,
394 'cwin' : window,
395 'FILE' : location,
396 'pnam' : name,
397 'pLen' : length,
398 'ppos' : position,
399 'pzum' : zoomed,
400 'pcnt' : contents,
403 _compdeclarations = {
406 _enumdeclarations = {