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

Python code coverage for Lib/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py

#countcontent
1n/a"""Suite Legacy suite: Operations formerly handled by the Finder, but now automatically delegated to other applications
2n/aLevel 1, version 1
3n/a
4n/aGenerated from /System/Library/CoreServices/Finder.app
5n/aAETE/AEUT resource version 0/144, language 0, script 0
6n/a"""
7n/a
8n/aimport aetools
9n/aimport MacOS
10n/a
11n/a_code = 'fleg'
12n/a
13n/aclass Legacy_suite_Events:
14n/a
15n/a def restart(self, _no_object=None, _attributes={}, **_arguments):
16n/a """restart: Restart the computer
17n/a Keyword argument _attributes: AppleEvent attribute dictionary
18n/a """
19n/a _code = 'fndr'
20n/a _subcode = 'rest'
21n/a
22n/a if _arguments: raise TypeError, 'No optional args expected'
23n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
24n/a
25n/a
26n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
27n/a _arguments, _attributes)
28n/a if _arguments.get('errn', 0):
29n/a raise aetools.Error, aetools.decodeerror(_arguments)
30n/a # XXXX Optionally decode result
31n/a if _arguments.has_key('----'):
32n/a return _arguments['----']
33n/a
34n/a def shut_down(self, _no_object=None, _attributes={}, **_arguments):
35n/a """shut down: Shut Down the computer
36n/a Keyword argument _attributes: AppleEvent attribute dictionary
37n/a """
38n/a _code = 'fndr'
39n/a _subcode = 'shut'
40n/a
41n/a if _arguments: raise TypeError, 'No optional args expected'
42n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
43n/a
44n/a
45n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
46n/a _arguments, _attributes)
47n/a if _arguments.get('errn', 0):
48n/a raise aetools.Error, aetools.decodeerror(_arguments)
49n/a # XXXX Optionally decode result
50n/a if _arguments.has_key('----'):
51n/a return _arguments['----']
52n/a
53n/a def sleep(self, _no_object=None, _attributes={}, **_arguments):
54n/a """sleep: Put the computer to sleep
55n/a Keyword argument _attributes: AppleEvent attribute dictionary
56n/a """
57n/a _code = 'fndr'
58n/a _subcode = 'slep'
59n/a
60n/a if _arguments: raise TypeError, 'No optional args expected'
61n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
62n/a
63n/a
64n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
65n/a _arguments, _attributes)
66n/a if _arguments.get('errn', 0):
67n/a raise aetools.Error, aetools.decodeerror(_arguments)
68n/a # XXXX Optionally decode result
69n/a if _arguments.has_key('----'):
70n/a return _arguments['----']
71n/a
72n/a
73n/aclass application(aetools.ComponentItem):
74n/a """application - The Finder """
75n/a want = 'capp'
76n/aclass _Prop_desktop_picture(aetools.NProperty):
77n/a """desktop picture - the desktop picture of the main monitor """
78n/a which = 'dpic'
79n/a want = 'file'
80n/adesktop_picture = _Prop_desktop_picture()
81n/a
82n/aclass application_process(aetools.ComponentItem):
83n/a """application process - A process launched from an application file """
84n/a want = 'pcap'
85n/aclass _Prop__3c_Inheritance_3e_(aetools.NProperty):
86n/a """<Inheritance> - inherits some of its properties from the process class """
87n/a which = 'c@#^'
88n/a want = 'prcs'
89n/aclass _Prop_application_file(aetools.NProperty):
90n/a """application file - the application file from which this process was launched """
91n/a which = 'appf'
92n/a want = 'appf'
93n/a
94n/aapplication_processes = application_process
95n/a
96n/aclass desk_accessory_process(aetools.ComponentItem):
97n/a """desk accessory process - A process launched from a desk accessory file """
98n/a want = 'pcda'
99n/aclass _Prop_desk_accessory_file(aetools.NProperty):
100n/a """desk accessory file - the desk accessory file from which this process was launched """
101n/a which = 'dafi'
102n/a want = 'obj '
103n/a
104n/adesk_accessory_processes = desk_accessory_process
105n/a
106n/aclass process(aetools.ComponentItem):
107n/a """process - A process running on this computer """
108n/a want = 'prcs'
109n/aclass _Prop_accepts_high_level_events(aetools.NProperty):
110n/a """accepts high level events - Is the process high-level event aware (accepts open application, open document, print document, and quit)? """
111n/a which = 'isab'
112n/a want = 'bool'
113n/aclass _Prop_accepts_remote_events(aetools.NProperty):
114n/a """accepts remote events - Does the process accept remote events? """
115n/a which = 'revt'
116n/a want = 'bool'
117n/aclass _Prop_creator_type(aetools.NProperty):
118n/a """creator type - the OSType of the creator of the process (the signature) """
119n/a which = 'fcrt'
120n/a want = 'type'
121n/aclass _Prop_file(aetools.NProperty):
122n/a """file - the file from which the process was launched """
123n/a which = 'file'
124n/a want = 'obj '
125n/aclass _Prop_file_type(aetools.NProperty):
126n/a """file type - the OSType of the file type of the process """
127n/a which = 'asty'
128n/a want = 'type'
129n/aclass _Prop_frontmost(aetools.NProperty):
130n/a """frontmost - Is the process the frontmost process? """
131n/a which = 'pisf'
132n/a want = 'bool'
133n/aclass _Prop_has_scripting_terminology(aetools.NProperty):
134n/a """has scripting terminology - Does the process have a scripting terminology, i.e., can it be scripted? """
135n/a which = 'hscr'
136n/a want = 'bool'
137n/aclass _Prop_name(aetools.NProperty):
138n/a """name - the name of the process """
139n/a which = 'pnam'
140n/a want = 'itxt'
141n/aclass _Prop_partition_space_used(aetools.NProperty):
142n/a """partition space used - the number of bytes currently used in the process' partition """
143n/a which = 'pusd'
144n/a want = 'long'
145n/aclass _Prop_total_partition_size(aetools.NProperty):
146n/a """total partition size - the size of the partition with which the process was launched """
147n/a which = 'appt'
148n/a want = 'long'
149n/aclass _Prop_visible(aetools.NProperty):
150n/a """visible - Is the process' layer visible? """
151n/a which = 'pvis'
152n/a want = 'bool'
153n/a
154n/aprocesses = process
155n/aapplication._superclassnames = []
156n/aapplication._privpropdict = {
157n/a 'desktop_picture' : _Prop_desktop_picture,
158n/a}
159n/aapplication._privelemdict = {
160n/a}
161n/aapplication_process._superclassnames = ['process']
162n/aapplication_process._privpropdict = {
163n/a '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
164n/a 'application_file' : _Prop_application_file,
165n/a}
166n/aapplication_process._privelemdict = {
167n/a}
168n/adesk_accessory_process._superclassnames = ['process']
169n/adesk_accessory_process._privpropdict = {
170n/a '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
171n/a 'desk_accessory_file' : _Prop_desk_accessory_file,
172n/a}
173n/adesk_accessory_process._privelemdict = {
174n/a}
175n/aprocess._superclassnames = []
176n/aprocess._privpropdict = {
177n/a 'accepts_high_level_events' : _Prop_accepts_high_level_events,
178n/a 'accepts_remote_events' : _Prop_accepts_remote_events,
179n/a 'creator_type' : _Prop_creator_type,
180n/a 'file' : _Prop_file,
181n/a 'file_type' : _Prop_file_type,
182n/a 'frontmost' : _Prop_frontmost,
183n/a 'has_scripting_terminology' : _Prop_has_scripting_terminology,
184n/a 'name' : _Prop_name,
185n/a 'partition_space_used' : _Prop_partition_space_used,
186n/a 'total_partition_size' : _Prop_total_partition_size,
187n/a 'visible' : _Prop_visible,
188n/a}
189n/aprocess._privelemdict = {
190n/a}
191n/a
192n/a#
193n/a# Indices of types declared in this module
194n/a#
195n/a_classdeclarations = {
196n/a 'capp' : application,
197n/a 'pcap' : application_process,
198n/a 'pcda' : desk_accessory_process,
199n/a 'prcs' : process,
200n/a}
201n/a
202n/a_propdeclarations = {
203n/a 'appf' : _Prop_application_file,
204n/a 'appt' : _Prop_total_partition_size,
205n/a 'asty' : _Prop_file_type,
206n/a 'c@#^' : _Prop__3c_Inheritance_3e_,
207n/a 'dafi' : _Prop_desk_accessory_file,
208n/a 'dpic' : _Prop_desktop_picture,
209n/a 'fcrt' : _Prop_creator_type,
210n/a 'file' : _Prop_file,
211n/a 'hscr' : _Prop_has_scripting_terminology,
212n/a 'isab' : _Prop_accepts_high_level_events,
213n/a 'pisf' : _Prop_frontmost,
214n/a 'pnam' : _Prop_name,
215n/a 'pusd' : _Prop_partition_space_used,
216n/a 'pvis' : _Prop_visible,
217n/a 'revt' : _Prop_accepts_remote_events,
218n/a}
219n/a
220n/a_compdeclarations = {
221n/a}
222n/a
223n/a_enumdeclarations = {
224n/a}