1 """Suite Legacy suite: Operations formerly handled by the Finder, but now automatically delegated to other applications
4 Generated from /System/Library/CoreServices/Finder.app
5 AETE/AEUT resource version 0/144, language 0, script 0
13 class Legacy_suite_Events
:
15 def restart(self
, _no_object
=None, _attributes
={}, **_arguments
):
16 """restart: Restart the computer
17 Keyword argument _attributes: AppleEvent attribute dictionary
22 if _arguments
: raise TypeError, 'No optional args expected'
23 if _no_object
!= None: raise TypeError, 'No direct arg expected'
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
['----']
34 def shut_down(self
, _no_object
=None, _attributes
={}, **_arguments
):
35 """shut down: Shut Down the computer
36 Keyword argument _attributes: AppleEvent attribute dictionary
41 if _arguments
: raise TypeError, 'No optional args expected'
42 if _no_object
!= None: raise TypeError, 'No direct arg expected'
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
['----']
53 def sleep(self
, _no_object
=None, _attributes
={}, **_arguments
):
54 """sleep: Put the computer to sleep
55 Keyword argument _attributes: AppleEvent attribute dictionary
60 if _arguments
: raise TypeError, 'No optional args expected'
61 if _no_object
!= None: raise TypeError, 'No direct arg expected'
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
['----']
73 class application(aetools
.ComponentItem
):
74 """application - The Finder """
76 class _Prop_desktop_picture(aetools
.NProperty
):
77 """desktop picture - the desktop picture of the main monitor """
81 class application_process(aetools
.ComponentItem
):
82 """application process - A process launched from an application file """
84 class _Prop__3c_Inheritance_3e_(aetools
.NProperty
):
85 """<Inheritance> - inherits some of its properties from the process class """
88 class _Prop_application_file(aetools
.NProperty
):
89 """application file - the application file from which this process was launched """
93 application_processes
= application_process
95 class desk_accessory_process(aetools
.ComponentItem
):
96 """desk accessory process - A process launched from a desk accessory file """
98 class _Prop_desk_accessory_file(aetools
.NProperty
):
99 """desk accessory file - the desk accessory file from which this process was launched """
103 desk_accessory_processes
= desk_accessory_process
105 class process(aetools
.ComponentItem
):
106 """process - A process running on this computer """
108 class _Prop_accepts_high_level_events(aetools
.NProperty
):
109 """accepts high level events - Is the process high-level event aware (accepts open application, open document, print document, and quit)? """
112 class _Prop_accepts_remote_events(aetools
.NProperty
):
113 """accepts remote events - Does the process accept remote events? """
116 class _Prop_creator_type(aetools
.NProperty
):
117 """creator type - the OSType of the creator of the process (the signature) """
120 class _Prop_file(aetools
.NProperty
):
121 """file - the file from which the process was launched """
124 class _Prop_file_type(aetools
.NProperty
):
125 """file type - the OSType of the file type of the process """
128 class _Prop_frontmost(aetools
.NProperty
):
129 """frontmost - Is the process the frontmost process? """
132 class _Prop_has_scripting_terminology(aetools
.NProperty
):
133 """has scripting terminology - Does the process have a scripting terminology, i.e., can it be scripted? """
136 class _Prop_name(aetools
.NProperty
):
137 """name - the name of the process """
140 class _Prop_partition_space_used(aetools
.NProperty
):
141 """partition space used - the number of bytes currently used in the process' partition """
144 class _Prop_total_partition_size(aetools
.NProperty
):
145 """total partition size - the size of the partition with which the process was launched """
148 class _Prop_visible(aetools
.NProperty
):
149 """visible - Is the process' layer visible? """
154 application
._superclassnames
= []
155 application
._privpropdict
= {
156 'desktop_picture' : _Prop_desktop_picture
,
158 application
._privelemdict
= {
160 application_process
._superclassnames
= ['process']
161 application_process
._privpropdict
= {
162 '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_
,
163 'application_file' : _Prop_application_file
,
165 application_process
._privelemdict
= {
167 desk_accessory_process
._superclassnames
= ['process']
168 desk_accessory_process
._privpropdict
= {
169 '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_
,
170 'desk_accessory_file' : _Prop_desk_accessory_file
,
172 desk_accessory_process
._privelemdict
= {
174 process
._superclassnames
= []
175 process
._privpropdict
= {
176 'accepts_high_level_events' : _Prop_accepts_high_level_events
,
177 'accepts_remote_events' : _Prop_accepts_remote_events
,
178 'creator_type' : _Prop_creator_type
,
180 'file_type' : _Prop_file_type
,
181 'frontmost' : _Prop_frontmost
,
182 'has_scripting_terminology' : _Prop_has_scripting_terminology
,
184 'partition_space_used' : _Prop_partition_space_used
,
185 'total_partition_size' : _Prop_total_partition_size
,
186 'visible' : _Prop_visible
,
188 process
._privelemdict
= {
192 # Indices of types declared in this module
194 _classdeclarations
= {
195 'capp' : application
,
196 'pcap' : application_process
,
197 'pcda' : desk_accessory_process
,
201 _propdeclarations
= {
202 'appf' : _Prop_application_file
,
203 'appt' : _Prop_total_partition_size
,
204 'asty' : _Prop_file_type
,
205 'c@#^' : _Prop__3c_Inheritance_3e_
,
206 'dafi' : _Prop_desk_accessory_file
,
207 'dpic' : _Prop_desktop_picture
,
208 'fcrt' : _Prop_creator_type
,
210 'hscr' : _Prop_has_scripting_terminology
,
211 'isab' : _Prop_accepts_high_level_events
,
212 'pisf' : _Prop_frontmost
,
214 'pusd' : _Prop_partition_space_used
,
215 'pvis' : _Prop_visible
,
216 'revt' : _Prop_accepts_remote_events
,
219 _compdeclarations
= {
222 _enumdeclarations
= {