When the classes in wave.py opened files themselves, their .close() methods
[python/dscho.git] / Mac / Lib / lib-scriptpackages / Netscape / Standard_Suite.py
blobcccdbdfcecf987a003a1242f53b6da37bedcb159
1 """Suite Standard Suite: Common terms for most applications
2 Level 1, version 1
4 Generated from Macintosh HD:Internet:Internet-programma's:Netscape Communicator�-map:Netscape Communicator�
5 AETE/AEUT resource version 1/0, language 0, script 0
6 """
8 import aetools
9 import MacOS
11 _code = 'CoRe'
13 class Standard_Suite_Events:
15 def close(self, _object, _attributes={}, **_arguments):
16 """close: Close an object
17 Required argument: the objects to close
18 Keyword argument _attributes: AppleEvent attribute dictionary
19 """
20 _code = 'core'
21 _subcode = 'clos'
23 if _arguments: raise TypeError, 'No optional args expected'
24 _arguments['----'] = _object
27 _reply, _arguments, _attributes = self.send(_code, _subcode,
28 _arguments, _attributes)
29 if _arguments.has_key('errn'):
30 raise aetools.Error, aetools.decodeerror(_arguments)
31 # XXXX Optionally decode result
32 if _arguments.has_key('----'):
33 return _arguments['----']
35 def data_size(self, _object, _attributes={}, **_arguments):
36 """data size: Return the size in bytes of an object
37 Required argument: the object whose data size is to be returned
38 Keyword argument _attributes: AppleEvent attribute dictionary
39 Returns: the size of the object in bytes
40 """
41 _code = 'core'
42 _subcode = 'dsiz'
44 if _arguments: raise TypeError, 'No optional args expected'
45 _arguments['----'] = _object
48 _reply, _arguments, _attributes = self.send(_code, _subcode,
49 _arguments, _attributes)
50 if _arguments.has_key('errn'):
51 raise aetools.Error, aetools.decodeerror(_arguments)
52 # XXXX Optionally decode result
53 if _arguments.has_key('----'):
54 return _arguments['----']
56 def get(self, _object, _attributes={}, **_arguments):
57 """get: Get the data for an object
58 Required argument: the object whose data is to be returned
59 Keyword argument _attributes: AppleEvent attribute dictionary
60 Returns: The data from the object
61 """
62 _code = 'core'
63 _subcode = 'getd'
65 if _arguments: raise TypeError, 'No optional args expected'
66 _arguments['----'] = _object
69 _reply, _arguments, _attributes = self.send(_code, _subcode,
70 _arguments, _attributes)
71 if _arguments.has_key('errn'):
72 raise aetools.Error, aetools.decodeerror(_arguments)
73 # XXXX Optionally decode result
74 if _arguments.has_key('----'):
75 return _arguments['----']
77 _argmap_set = {
78 'to' : 'data',
81 def set(self, _object, _attributes={}, **_arguments):
82 """set: Set an object¹s data
83 Required argument: the object to change
84 Keyword argument to: the new value
85 Keyword argument _attributes: AppleEvent attribute dictionary
86 """
87 _code = 'core'
88 _subcode = 'setd'
90 aetools.keysubst(_arguments, self._argmap_set)
91 _arguments['----'] = _object
94 _reply, _arguments, _attributes = self.send(_code, _subcode,
95 _arguments, _attributes)
96 if _arguments.has_key('errn'):
97 raise aetools.Error, aetools.decodeerror(_arguments)
98 # XXXX Optionally decode result
99 if _arguments.has_key('----'):
100 return _arguments['----']
103 class application(aetools.ComponentItem):
104 """application - An application program """
105 want = 'capp'
106 class alert_application(aetools.NProperty):
107 """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¹d like to conform to the standard. """
108 which = 'ALAP'
109 want = 'type'
110 class kiosk_mode(aetools.NProperty):
111 """kiosk mode - Kiosk mode leaves very few menus enabled """
112 which = 'KOSK'
113 want = 'long'
114 # element 'cwin' as ['indx', 'name', 'ID ']
116 class window(aetools.ComponentItem):
117 """window - A Window """
118 want = 'cwin'
119 class bounds(aetools.NProperty):
120 """bounds - the boundary rectangle for the window """
121 which = 'pbnd'
122 want = 'qdrt'
123 class closeable(aetools.NProperty):
124 """closeable - Does the window have a close box? """
125 which = 'hclb'
126 want = 'bool'
127 class titled(aetools.NProperty):
128 """titled - Does the window have a title bar? """
129 which = 'ptit'
130 want = 'bool'
131 class index(aetools.NProperty):
132 """index - the number of the window """
133 which = 'pidx'
134 want = 'long'
135 class floating(aetools.NProperty):
136 """floating - Does the window float? """
137 which = 'isfl'
138 want = 'bool'
139 class modal(aetools.NProperty):
140 """modal - Is the window modal? """
141 which = 'pmod'
142 want = 'bool'
143 class resizable(aetools.NProperty):
144 """resizable - Is the window resizable? """
145 which = 'prsz'
146 want = 'bool'
147 class zoomable(aetools.NProperty):
148 """zoomable - Is the window zoomable? """
149 which = 'iszm'
150 want = 'bool'
151 class zoomed(aetools.NProperty):
152 """zoomed - Is the window zoomed? """
153 which = 'pzum'
154 want = 'bool'
155 class name(aetools.NProperty):
156 """name - the title of the window """
157 which = 'pnam'
158 want = 'itxt'
159 class visible(aetools.NProperty):
160 """visible - is the window visible? """
161 which = 'pvis'
162 want = 'bool'
163 class position(aetools.NProperty):
164 """position - upper left coordinates of window """
165 which = 'ppos'
166 want = 'QDpt'
167 class URL(aetools.NProperty):
168 """URL - Current URL """
169 which = 'curl'
170 want = 'TEXT'
171 class unique_ID(aetools.NProperty):
172 """unique ID - Window¹s unique ID (a bridge between WWW! suite window id¹s and standard AE windows) """
173 which = 'wiid'
174 want = 'long'
175 class busy(aetools.NProperty):
176 """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 """
177 which = 'busy'
178 want = 'long'
179 application._propdict = {
180 'alert_application' : alert_application,
181 'kiosk_mode' : kiosk_mode,
183 application._elemdict = {
184 'window' : window,
186 window._propdict = {
187 'bounds' : bounds,
188 'closeable' : closeable,
189 'titled' : titled,
190 'index' : index,
191 'floating' : floating,
192 'modal' : modal,
193 'resizable' : resizable,
194 'zoomable' : zoomable,
195 'zoomed' : zoomed,
196 'name' : name,
197 'visible' : visible,
198 'position' : position,
199 'URL' : URL,
200 'unique_ID' : unique_ID,
201 'busy' : busy,
203 window._elemdict = {
207 # Indices of types declared in this module
209 _classdeclarations = {
210 'cwin' : window,
211 'capp' : application,
214 _propdeclarations = {
215 'ptit' : titled,
216 'pidx' : index,
217 'ppos' : position,
218 'curl' : URL,
219 'pnam' : name,
220 'pbnd' : bounds,
221 'isfl' : floating,
222 'hclb' : closeable,
223 'ALAP' : alert_application,
224 'iszm' : zoomable,
225 'pmod' : modal,
226 'pzum' : zoomed,
227 'pvis' : visible,
228 'KOSK' : kiosk_mode,
229 'busy' : busy,
230 'prsz' : resizable,
231 'wiid' : unique_ID,
234 _compdeclarations = {
237 _enumdeclarations = {