_make_boundary(): Fix for SF bug #745478, broken boundary calculation
[python/dscho.git] / Lib / plat-mac / lib-scriptpackages / Finder / Legacy_suite.py
blob9bd1537ef994af045f3c338223a2dab26a641576
1 """Suite Legacy suite: Operations formerly handled by the Finder, but now automatically delegated to other applications
2 Level 1, version 1
4 Generated from /System/Library/CoreServices/Finder.app
5 AETE/AEUT resource version 0/144, language 0, script 0
6 """
8 import aetools
9 import MacOS
11 _code = 'fleg'
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
18 """
19 _code = 'fndr'
20 _subcode = 'rest'
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
37 """
38 _code = 'fndr'
39 _subcode = 'shut'
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
56 """
57 _code = 'fndr'
58 _subcode = 'slep'
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 """
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'
81 class application_process(aetools.ComponentItem):
82 """application process - A process launched from an application file """
83 want = 'pcap'
84 class _Prop__3c_Inheritance_3e_(aetools.NProperty):
85 """<Inheritance> - inherits some of its properties from the process class """
86 which = 'c@#^'
87 want = 'prcs'
88 class _Prop_application_file(aetools.NProperty):
89 """application file - the application file from which this process was launched """
90 which = 'appf'
91 want = 'appf'
93 application_processes = application_process
95 class desk_accessory_process(aetools.ComponentItem):
96 """desk accessory process - A process launched from a desk accessory file """
97 want = 'pcda'
98 class _Prop_desk_accessory_file(aetools.NProperty):
99 """desk accessory file - the desk accessory file from which this process was launched """
100 which = 'dafi'
101 want = 'obj '
103 desk_accessory_processes = desk_accessory_process
105 class process(aetools.ComponentItem):
106 """process - A process running on this computer """
107 want = 'prcs'
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)? """
110 which = 'isab'
111 want = 'bool'
112 class _Prop_accepts_remote_events(aetools.NProperty):
113 """accepts remote events - Does the process accept remote events? """
114 which = 'revt'
115 want = 'bool'
116 class _Prop_creator_type(aetools.NProperty):
117 """creator type - the OSType of the creator of the process (the signature) """
118 which = 'fcrt'
119 want = 'type'
120 class _Prop_file(aetools.NProperty):
121 """file - the file from which the process was launched """
122 which = 'file'
123 want = 'obj '
124 class _Prop_file_type(aetools.NProperty):
125 """file type - the OSType of the file type of the process """
126 which = 'asty'
127 want = 'type'
128 class _Prop_frontmost(aetools.NProperty):
129 """frontmost - Is the process the frontmost process? """
130 which = 'pisf'
131 want = 'bool'
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? """
134 which = 'hscr'
135 want = 'bool'
136 class _Prop_name(aetools.NProperty):
137 """name - the name of the process """
138 which = 'pnam'
139 want = 'itxt'
140 class _Prop_partition_space_used(aetools.NProperty):
141 """partition space used - the number of bytes currently used in the process' partition """
142 which = 'pusd'
143 want = 'long'
144 class _Prop_total_partition_size(aetools.NProperty):
145 """total partition size - the size of the partition with which the process was launched """
146 which = 'appt'
147 want = 'long'
148 class _Prop_visible(aetools.NProperty):
149 """visible - Is the process' layer visible? """
150 which = 'pvis'
151 want = 'bool'
153 processes = process
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,
179 'file' : _Prop_file,
180 'file_type' : _Prop_file_type,
181 'frontmost' : _Prop_frontmost,
182 'has_scripting_terminology' : _Prop_has_scripting_terminology,
183 'name' : _Prop_name,
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,
198 'prcs' : 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,
209 'file' : _Prop_file,
210 'hscr' : _Prop_has_scripting_terminology,
211 'isab' : _Prop_accepts_high_level_events,
212 'pisf' : _Prop_frontmost,
213 'pnam' : _Prop_name,
214 'pusd' : _Prop_partition_space_used,
215 'pvis' : _Prop_visible,
216 'revt' : _Prop_accepts_remote_events,
219 _compdeclarations = {
222 _enumdeclarations = {