ยปCore Development>Code coverage>Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py

Python code coverage for Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py

#countcontent
1n/a"""Suite Standard Suite: Common terms for most applications
2n/aLevel 1, version 1
3n/a
4n/aGenerated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
5n/aAETE/AEUT resource version 1/0, language 0, script 0
6n/a"""
7n/a
8n/aimport aetools
9n/aimport MacOS
10n/a
11n/a_code = 'CoRe'
12n/a
13n/afrom StdSuites.Standard_Suite import *
14n/aclass Standard_Suite_Events(Standard_Suite_Events):
15n/a
16n/a def close(self, _object, _attributes={}, **_arguments):
17n/a """close: Close an object
18n/a Required argument: the objects to close
19n/a Keyword argument _attributes: AppleEvent attribute dictionary
20n/a """
21n/a _code = 'core'
22n/a _subcode = 'clos'
23n/a
24n/a if _arguments: raise TypeError, 'No optional args expected'
25n/a _arguments['----'] = _object
26n/a
27n/a
28n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
29n/a _arguments, _attributes)
30n/a if _arguments.get('errn', 0):
31n/a raise aetools.Error, aetools.decodeerror(_arguments)
32n/a # XXXX Optionally decode result
33n/a if _arguments.has_key('----'):
34n/a return _arguments['----']
35n/a
36n/a def data_size(self, _object, _attributes={}, **_arguments):
37n/a """data size: Return the size in bytes of an object
38n/a Required argument: the object whose data size is to be returned
39n/a Keyword argument _attributes: AppleEvent attribute dictionary
40n/a Returns: the size of the object in bytes
41n/a """
42n/a _code = 'core'
43n/a _subcode = 'dsiz'
44n/a
45n/a if _arguments: raise TypeError, 'No optional args expected'
46n/a _arguments['----'] = _object
47n/a
48n/a
49n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
50n/a _arguments, _attributes)
51n/a if _arguments.get('errn', 0):
52n/a raise aetools.Error, aetools.decodeerror(_arguments)
53n/a # XXXX Optionally decode result
54n/a if _arguments.has_key('----'):
55n/a return _arguments['----']
56n/a
57n/a def get(self, _object, _attributes={}, **_arguments):
58n/a """get: Get the data for an object
59n/a Required argument: the object whose data is to be returned
60n/a Keyword argument _attributes: AppleEvent attribute dictionary
61n/a Returns: The data from the object
62n/a """
63n/a _code = 'core'
64n/a _subcode = 'getd'
65n/a
66n/a if _arguments: raise TypeError, 'No optional args expected'
67n/a _arguments['----'] = _object
68n/a
69n/a
70n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
71n/a _arguments, _attributes)
72n/a if _arguments.get('errn', 0):
73n/a raise aetools.Error, aetools.decodeerror(_arguments)
74n/a # XXXX Optionally decode result
75n/a if _arguments.has_key('----'):
76n/a return _arguments['----']
77n/a
78n/a _argmap_set = {
79n/a 'to' : 'data',
80n/a }
81n/a
82n/a def set(self, _object, _attributes={}, **_arguments):
83n/a """set: Set an object\xd5s data
84n/a Required argument: the object to change
85n/a Keyword argument to: the new value
86n/a Keyword argument _attributes: AppleEvent attribute dictionary
87n/a """
88n/a _code = 'core'
89n/a _subcode = 'setd'
90n/a
91n/a aetools.keysubst(_arguments, self._argmap_set)
92n/a _arguments['----'] = _object
93n/a
94n/a
95n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
96n/a _arguments, _attributes)
97n/a if _arguments.get('errn', 0):
98n/a raise aetools.Error, aetools.decodeerror(_arguments)
99n/a # XXXX Optionally decode result
100n/a if _arguments.has_key('----'):
101n/a return _arguments['----']
102n/a
103n/a
104n/aclass application(aetools.ComponentItem):
105n/a """application - An application program """
106n/a want = 'capp'
107n/aclass _Prop_alert_application(aetools.NProperty):
108n/a """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. """
109n/a which = 'ALAP'
110n/a want = 'type'
111n/aalert_application = _Prop_alert_application()
112n/aclass _Prop_kiosk_mode(aetools.NProperty):
113n/a """kiosk mode - Kiosk mode leaves very few menus enabled """
114n/a which = 'KOSK'
115n/a want = 'long'
116n/akiosk_mode = _Prop_kiosk_mode()
117n/a# element 'cwin' as ['indx', 'name', 'ID ']
118n/a
119n/aclass window(aetools.ComponentItem):
120n/a """window - A Window """
121n/a want = 'cwin'
122n/aclass _Prop_URL(aetools.NProperty):
123n/a """URL - Current URL """
124n/a which = 'curl'
125n/a want = 'TEXT'
126n/aclass _Prop_bounds(aetools.NProperty):
127n/a """bounds - the boundary rectangle for the window """
128n/a which = 'pbnd'
129n/a want = 'qdrt'
130n/aclass _Prop_busy(aetools.NProperty):
131n/a """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 """
132n/a which = 'busy'
133n/a want = 'long'
134n/aclass _Prop_closeable(aetools.NProperty):
135n/a """closeable - Does the window have a close box? """
136n/a which = 'hclb'
137n/a want = 'bool'
138n/aclass _Prop_floating(aetools.NProperty):
139n/a """floating - Does the window float? """
140n/a which = 'isfl'
141n/a want = 'bool'
142n/aclass _Prop_index(aetools.NProperty):
143n/a """index - the number of the window """
144n/a which = 'pidx'
145n/a want = 'long'
146n/aclass _Prop_modal(aetools.NProperty):
147n/a """modal - Is the window modal? """
148n/a which = 'pmod'
149n/a want = 'bool'
150n/aclass _Prop_name(aetools.NProperty):
151n/a """name - the title of the window """
152n/a which = 'pnam'
153n/a want = 'itxt'
154n/aclass _Prop_position(aetools.NProperty):
155n/a """position - upper left coordinates of window """
156n/a which = 'ppos'
157n/a want = 'QDpt'
158n/aclass _Prop_resizable(aetools.NProperty):
159n/a """resizable - Is the window resizable? """
160n/a which = 'prsz'
161n/a want = 'bool'
162n/aclass _Prop_titled(aetools.NProperty):
163n/a """titled - Does the window have a title bar? """
164n/a which = 'ptit'
165n/a want = 'bool'
166n/aclass _Prop_unique_ID(aetools.NProperty):
167n/a """unique ID - Window\xd5s unique ID (a bridge between WWW! suite window id\xd5s and standard AE windows) """
168n/a which = 'wiid'
169n/a want = 'long'
170n/aclass _Prop_visible(aetools.NProperty):
171n/a """visible - is the window visible? """
172n/a which = 'pvis'
173n/a want = 'bool'
174n/aclass _Prop_zoomable(aetools.NProperty):
175n/a """zoomable - Is the window zoomable? """
176n/a which = 'iszm'
177n/a want = 'bool'
178n/aclass _Prop_zoomed(aetools.NProperty):
179n/a """zoomed - Is the window zoomed? """
180n/a which = 'pzum'
181n/a want = 'bool'
182n/aapplication._superclassnames = []
183n/aapplication._privpropdict = {
184n/a 'alert_application' : _Prop_alert_application,
185n/a 'kiosk_mode' : _Prop_kiosk_mode,
186n/a}
187n/aapplication._privelemdict = {
188n/a 'window' : window,
189n/a}
190n/awindow._superclassnames = []
191n/awindow._privpropdict = {
192n/a 'URL' : _Prop_URL,
193n/a 'bounds' : _Prop_bounds,
194n/a 'busy' : _Prop_busy,
195n/a 'closeable' : _Prop_closeable,
196n/a 'floating' : _Prop_floating,
197n/a 'index' : _Prop_index,
198n/a 'modal' : _Prop_modal,
199n/a 'name' : _Prop_name,
200n/a 'position' : _Prop_position,
201n/a 'resizable' : _Prop_resizable,
202n/a 'titled' : _Prop_titled,
203n/a 'unique_ID' : _Prop_unique_ID,
204n/a 'visible' : _Prop_visible,
205n/a 'zoomable' : _Prop_zoomable,
206n/a 'zoomed' : _Prop_zoomed,
207n/a}
208n/awindow._privelemdict = {
209n/a}
210n/a
211n/a#
212n/a# Indices of types declared in this module
213n/a#
214n/a_classdeclarations = {
215n/a 'capp' : application,
216n/a 'cwin' : window,
217n/a}
218n/a
219n/a_propdeclarations = {
220n/a 'ALAP' : _Prop_alert_application,
221n/a 'KOSK' : _Prop_kiosk_mode,
222n/a 'busy' : _Prop_busy,
223n/a 'curl' : _Prop_URL,
224n/a 'hclb' : _Prop_closeable,
225n/a 'isfl' : _Prop_floating,
226n/a 'iszm' : _Prop_zoomable,
227n/a 'pbnd' : _Prop_bounds,
228n/a 'pidx' : _Prop_index,
229n/a 'pmod' : _Prop_modal,
230n/a 'pnam' : _Prop_name,
231n/a 'ppos' : _Prop_position,
232n/a 'prsz' : _Prop_resizable,
233n/a 'ptit' : _Prop_titled,
234n/a 'pvis' : _Prop_visible,
235n/a 'pzum' : _Prop_zoomed,
236n/a 'wiid' : _Prop_unique_ID,
237n/a}
238n/a
239n/a_compdeclarations = {
240n/a}
241n/a
242n/a_enumdeclarations = {
243n/a}