Fix a bug in the ``compiler`` package that caused invalid code to be
[python/dscho.git] / Lib / plat-mac / lib-scriptpackages / Netscape / Standard_Suite.py
blob5c3e927893ce6498a1b84c124d2001f0ce35e980
1 """Suite Standard Suite: Common terms for most applications
2 Level 1, version 1
4 Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
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 def close(self, _object, _attributes={}, **_arguments):
17 """close: Close an object
18 Required argument: the objects to close
19 Keyword argument _attributes: AppleEvent attribute dictionary
20 """
21 _code = 'core'
22 _subcode = 'clos'
24 if _arguments: raise TypeError, 'No optional args expected'
25 _arguments['----'] = _object
28 _reply, _arguments, _attributes = self.send(_code, _subcode,
29 _arguments, _attributes)
30 if _arguments.get('errn', 0):
31 raise aetools.Error, aetools.decodeerror(_arguments)
32 # XXXX Optionally decode result
33 if _arguments.has_key('----'):
34 return _arguments['----']
36 def data_size(self, _object, _attributes={}, **_arguments):
37 """data size: Return the size in bytes of an object
38 Required argument: the object whose data size is to be returned
39 Keyword argument _attributes: AppleEvent attribute dictionary
40 Returns: the size of the object in bytes
41 """
42 _code = 'core'
43 _subcode = 'dsiz'
45 if _arguments: raise TypeError, 'No optional args expected'
46 _arguments['----'] = _object
49 _reply, _arguments, _attributes = self.send(_code, _subcode,
50 _arguments, _attributes)
51 if _arguments.get('errn', 0):
52 raise aetools.Error, aetools.decodeerror(_arguments)
53 # XXXX Optionally decode result
54 if _arguments.has_key('----'):
55 return _arguments['----']
57 def get(self, _object, _attributes={}, **_arguments):
58 """get: Get the data for an object
59 Required argument: the object whose data is to be returned
60 Keyword argument _attributes: AppleEvent attribute dictionary
61 Returns: The data from the object
62 """
63 _code = 'core'
64 _subcode = 'getd'
66 if _arguments: raise TypeError, 'No optional args expected'
67 _arguments['----'] = _object
70 _reply, _arguments, _attributes = self.send(_code, _subcode,
71 _arguments, _attributes)
72 if _arguments.get('errn', 0):
73 raise aetools.Error, aetools.decodeerror(_arguments)
74 # XXXX Optionally decode result
75 if _arguments.has_key('----'):
76 return _arguments['----']
78 _argmap_set = {
79 'to' : 'data',
82 def set(self, _object, _attributes={}, **_arguments):
83 """set: Set an object\xd5s data
84 Required argument: the object to change
85 Keyword argument to: the new value
86 Keyword argument _attributes: AppleEvent attribute dictionary
87 """
88 _code = 'core'
89 _subcode = 'setd'
91 aetools.keysubst(_arguments, self._argmap_set)
92 _arguments['----'] = _object
95 _reply, _arguments, _attributes = self.send(_code, _subcode,
96 _arguments, _attributes)
97 if _arguments.get('errn', 0):
98 raise aetools.Error, aetools.decodeerror(_arguments)
99 # XXXX Optionally decode result
100 if _arguments.has_key('----'):
101 return _arguments['----']
104 class application(aetools.ComponentItem):
105 """application - An application program """
106 want = 'capp'
107 class _Prop_alert_application(aetools.NProperty):
108 """alert application - Most of the alerts will be sent to this application using yet unspecified AE interface. We need a few alert boxes: alert, confirm and notify. Any ideas on how to design this event? mailto:atotic@netscape.com. I\xd5d like to conform to the standard. """
109 which = 'ALAP'
110 want = 'type'
111 alert_application = _Prop_alert_application()
112 class _Prop_kiosk_mode(aetools.NProperty):
113 """kiosk mode - Kiosk mode leaves very few menus enabled """
114 which = 'KOSK'
115 want = 'long'
116 kiosk_mode = _Prop_kiosk_mode()
117 # element 'cwin' as ['indx', 'name', 'ID ']
119 class window(aetools.ComponentItem):
120 """window - A Window """
121 want = 'cwin'
122 class _Prop_URL(aetools.NProperty):
123 """URL - Current URL """
124 which = 'curl'
125 want = 'TEXT'
126 class _Prop_bounds(aetools.NProperty):
127 """bounds - the boundary rectangle for the window """
128 which = 'pbnd'
129 want = 'qdrt'
130 class _Prop_busy(aetools.NProperty):
131 """busy - Is window loading something right now. 2, window is busy and will reject load requests. 1, window is busy, but will interrupt outstanding loads """
132 which = 'busy'
133 want = 'long'
134 class _Prop_closeable(aetools.NProperty):
135 """closeable - Does the window have a close box? """
136 which = 'hclb'
137 want = 'bool'
138 class _Prop_floating(aetools.NProperty):
139 """floating - Does the window float? """
140 which = 'isfl'
141 want = 'bool'
142 class _Prop_index(aetools.NProperty):
143 """index - the number of the window """
144 which = 'pidx'
145 want = 'long'
146 class _Prop_modal(aetools.NProperty):
147 """modal - Is the window modal? """
148 which = 'pmod'
149 want = 'bool'
150 class _Prop_name(aetools.NProperty):
151 """name - the title of the window """
152 which = 'pnam'
153 want = 'itxt'
154 class _Prop_position(aetools.NProperty):
155 """position - upper left coordinates of window """
156 which = 'ppos'
157 want = 'QDpt'
158 class _Prop_resizable(aetools.NProperty):
159 """resizable - Is the window resizable? """
160 which = 'prsz'
161 want = 'bool'
162 class _Prop_titled(aetools.NProperty):
163 """titled - Does the window have a title bar? """
164 which = 'ptit'
165 want = 'bool'
166 class _Prop_unique_ID(aetools.NProperty):
167 """unique ID - Window\xd5s unique ID (a bridge between WWW! suite window id\xd5s and standard AE windows) """
168 which = 'wiid'
169 want = 'long'
170 class _Prop_visible(aetools.NProperty):
171 """visible - is the window visible? """
172 which = 'pvis'
173 want = 'bool'
174 class _Prop_zoomable(aetools.NProperty):
175 """zoomable - Is the window zoomable? """
176 which = 'iszm'
177 want = 'bool'
178 class _Prop_zoomed(aetools.NProperty):
179 """zoomed - Is the window zoomed? """
180 which = 'pzum'
181 want = 'bool'
182 application._superclassnames = []
183 application._privpropdict = {
184 'alert_application' : _Prop_alert_application,
185 'kiosk_mode' : _Prop_kiosk_mode,
187 application._privelemdict = {
188 'window' : window,
190 window._superclassnames = []
191 window._privpropdict = {
192 'URL' : _Prop_URL,
193 'bounds' : _Prop_bounds,
194 'busy' : _Prop_busy,
195 'closeable' : _Prop_closeable,
196 'floating' : _Prop_floating,
197 'index' : _Prop_index,
198 'modal' : _Prop_modal,
199 'name' : _Prop_name,
200 'position' : _Prop_position,
201 'resizable' : _Prop_resizable,
202 'titled' : _Prop_titled,
203 'unique_ID' : _Prop_unique_ID,
204 'visible' : _Prop_visible,
205 'zoomable' : _Prop_zoomable,
206 'zoomed' : _Prop_zoomed,
208 window._privelemdict = {
212 # Indices of types declared in this module
214 _classdeclarations = {
215 'capp' : application,
216 'cwin' : window,
219 _propdeclarations = {
220 'ALAP' : _Prop_alert_application,
221 'KOSK' : _Prop_kiosk_mode,
222 'busy' : _Prop_busy,
223 'curl' : _Prop_URL,
224 'hclb' : _Prop_closeable,
225 'isfl' : _Prop_floating,
226 'iszm' : _Prop_zoomable,
227 'pbnd' : _Prop_bounds,
228 'pidx' : _Prop_index,
229 'pmod' : _Prop_modal,
230 'pnam' : _Prop_name,
231 'ppos' : _Prop_position,
232 'prsz' : _Prop_resizable,
233 'ptit' : _Prop_titled,
234 'pvis' : _Prop_visible,
235 'pzum' : _Prop_zoomed,
236 'wiid' : _Prop_unique_ID,
239 _compdeclarations = {
242 _enumdeclarations = {