Bump version number to 2.4.2 to pick up the latest minor bug fixes.
[python/dscho.git] / Mac / Lib / lib-scriptpackages / Netscape / Standard_Suite.py
blob5bf2d184b2fa1fd18d531757079f02305e8af9ff
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 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 class kiosk_mode(aetools.NProperty):
112 """kiosk mode - Kiosk mode leaves very few menus enabled """
113 which = 'KOSK'
114 want = 'long'
115 # element 'cwin' as ['indx', 'name', 'ID ']
117 class window(aetools.ComponentItem):
118 """window - A Window """
119 want = 'cwin'
120 class bounds(aetools.NProperty):
121 """bounds - the boundary rectangle for the window """
122 which = 'pbnd'
123 want = 'qdrt'
124 class closeable(aetools.NProperty):
125 """closeable - Does the window have a close box? """
126 which = 'hclb'
127 want = 'bool'
128 class titled(aetools.NProperty):
129 """titled - Does the window have a title bar? """
130 which = 'ptit'
131 want = 'bool'
132 class index(aetools.NProperty):
133 """index - the number of the window """
134 which = 'pidx'
135 want = 'long'
136 class floating(aetools.NProperty):
137 """floating - Does the window float? """
138 which = 'isfl'
139 want = 'bool'
140 class modal(aetools.NProperty):
141 """modal - Is the window modal? """
142 which = 'pmod'
143 want = 'bool'
144 class resizable(aetools.NProperty):
145 """resizable - Is the window resizable? """
146 which = 'prsz'
147 want = 'bool'
148 class zoomable(aetools.NProperty):
149 """zoomable - Is the window zoomable? """
150 which = 'iszm'
151 want = 'bool'
152 class zoomed(aetools.NProperty):
153 """zoomed - Is the window zoomed? """
154 which = 'pzum'
155 want = 'bool'
156 class name(aetools.NProperty):
157 """name - the title of the window """
158 which = 'pnam'
159 want = 'itxt'
160 class visible(aetools.NProperty):
161 """visible - is the window visible? """
162 which = 'pvis'
163 want = 'bool'
164 class position(aetools.NProperty):
165 """position - upper left coordinates of window """
166 which = 'ppos'
167 want = 'QDpt'
168 class URL(aetools.NProperty):
169 """URL - Current URL """
170 which = 'curl'
171 want = 'TEXT'
172 class unique_ID(aetools.NProperty):
173 """unique ID - Window\xd5s unique ID (a bridge between WWW! suite window id\xd5s and standard AE windows) """
174 which = 'wiid'
175 want = 'long'
176 class busy(aetools.NProperty):
177 """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 """
178 which = 'busy'
179 want = 'long'
180 application._superclassnames = []
181 application._privpropdict = {
182 'alert_application' : alert_application,
183 'kiosk_mode' : kiosk_mode,
185 application._privelemdict = {
186 'window' : window,
188 window._superclassnames = []
189 window._privpropdict = {
190 'bounds' : bounds,
191 'closeable' : closeable,
192 'titled' : titled,
193 'index' : index,
194 'floating' : floating,
195 'modal' : modal,
196 'resizable' : resizable,
197 'zoomable' : zoomable,
198 'zoomed' : zoomed,
199 'name' : name,
200 'visible' : visible,
201 'position' : position,
202 'URL' : URL,
203 'unique_ID' : unique_ID,
204 'busy' : busy,
206 window._privelemdict = {
210 # Indices of types declared in this module
212 _classdeclarations = {
213 'cwin' : window,
214 'capp' : application,
217 _propdeclarations = {
218 'prsz' : resizable,
219 'busy' : busy,
220 'KOSK' : kiosk_mode,
221 'pvis' : visible,
222 'hclb' : closeable,
223 'pmod' : modal,
224 'wiid' : unique_ID,
225 'pbnd' : bounds,
226 'iszm' : zoomable,
227 'ALAP' : alert_application,
228 'pidx' : index,
229 'isfl' : floating,
230 'pnam' : name,
231 'ppos' : position,
232 'curl' : URL,
233 'pzum' : zoomed,
234 'ptit' : titled,
237 _compdeclarations = {
240 _enumdeclarations = {