Debian Codegraph @

cpython27/Lib/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py

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