1 """Suite Finder items: Commands used with file system items, and basic item definition
4 Generated from /System/Library/CoreServices/Finder.app
5 AETE/AEUT resource version 0/144, language 0, script 0
13 class Finder_items_Events
:
15 def add_to_favorites(self
, _object
, _attributes
={}, **_arguments
):
16 """add to favorites: (NOT AVAILABLE YET) Add the items to the user\xd5s Favorites
17 Required argument: the items to add to the collection of Favorites
18 Keyword argument _attributes: AppleEvent attribute dictionary
23 if _arguments
: raise TypeError, 'No optional args expected'
24 _arguments
['----'] = _object
27 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
28 _arguments
, _attributes
)
29 if _arguments
.get('errn', 0):
30 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
31 # XXXX Optionally decode result
32 if _arguments
.has_key('----'):
33 return _arguments
['----']
39 def clean_up(self
, _object
, _attributes
={}, **_arguments
):
40 """clean up: (NOT AVAILABLE YET) Arrange items in window nicely (only applies to open windows in icon view that are not kept arranged)
41 Required argument: the window to clean up
42 Keyword argument by: the order in which to clean up the objects (name, index, date, etc.)
43 Keyword argument _attributes: AppleEvent attribute dictionary
48 aetools
.keysubst(_arguments
, self
._argmap
_clean
_up
)
49 _arguments
['----'] = _object
52 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
53 _arguments
, _attributes
)
54 if _arguments
.get('errn', 0):
55 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
56 # XXXX Optionally decode result
57 if _arguments
.has_key('----'):
58 return _arguments
['----']
60 def eject(self
, _object
=None, _attributes
={}, **_arguments
):
61 """eject: Eject the specified disk(s)
62 Required argument: the disk(s) to eject
63 Keyword argument _attributes: AppleEvent attribute dictionary
68 if _arguments
: raise TypeError, 'No optional args expected'
69 _arguments
['----'] = _object
72 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
73 _arguments
, _attributes
)
74 if _arguments
.get('errn', 0):
75 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
76 # XXXX Optionally decode result
77 if _arguments
.has_key('----'):
78 return _arguments
['----']
80 def empty(self
, _object
=None, _attributes
={}, **_arguments
):
81 """empty: Empty the trash
82 Required argument: \xd2empty\xd3 and \xd2empty trash\xd3 both do the same thing
83 Keyword argument _attributes: AppleEvent attribute dictionary
88 if _arguments
: raise TypeError, 'No optional args expected'
89 _arguments
['----'] = _object
92 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
93 _arguments
, _attributes
)
94 if _arguments
.get('errn', 0):
95 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
96 # XXXX Optionally decode result
97 if _arguments
.has_key('----'):
98 return _arguments
['----']
100 def erase(self
, _object
, _attributes
={}, **_arguments
):
101 """erase: (NOT AVAILABLE) Erase the specified disk(s)
102 Required argument: the items to erase
103 Keyword argument _attributes: AppleEvent attribute dictionary
108 if _arguments
: raise TypeError, 'No optional args expected'
109 _arguments
['----'] = _object
112 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
113 _arguments
, _attributes
)
114 if _arguments
.get('errn', 0):
115 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
116 # XXXX Optionally decode result
117 if _arguments
.has_key('----'):
118 return _arguments
['----']
120 def reveal(self
, _object
, _attributes
={}, **_arguments
):
121 """reveal: Bring the specified object(s) into view
122 Required argument: the object to be made visible
123 Keyword argument _attributes: AppleEvent attribute dictionary
128 if _arguments
: raise TypeError, 'No optional args expected'
129 _arguments
['----'] = _object
132 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
133 _arguments
, _attributes
)
134 if _arguments
.get('errn', 0):
135 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
136 # XXXX Optionally decode result
137 if _arguments
.has_key('----'):
138 return _arguments
['----']
141 'necessity' : 'nec?',
142 'registering_applications' : 'reg?',
145 def update(self
, _object
, _attributes
={}, **_arguments
):
146 """update: Update the display of the specified object(s) to match their on-disk representation
147 Required argument: the item to update
148 Keyword argument necessity: only update if necessary (i.e. a finder window is open). default is false
149 Keyword argument registering_applications: register applications. default is true
150 Keyword argument _attributes: AppleEvent attribute dictionary
155 aetools
.keysubst(_arguments
, self
._argmap
_update
)
156 _arguments
['----'] = _object
159 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
160 _arguments
, _attributes
)
161 if _arguments
.get('errn', 0):
162 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
163 # XXXX Optionally decode result
164 if _arguments
.has_key('----'):
165 return _arguments
['----']
168 class item(aetools
.ComponentItem
):
169 """item - An item """
171 class _Prop_bounds(aetools
.NProperty
):
172 """bounds - the bounding rectangle of the item (can only be set for an item in a window viewed as icons or buttons) """
175 class _Prop_comment(aetools
.NProperty
):
176 """comment - the comment of the item, displayed in the \xd2Get Info\xd3 window """
179 class _Prop_container(aetools
.NProperty
):
180 """container - the container of the item """
183 class _Prop_creation_date(aetools
.NProperty
):
184 """creation date - the date on which the item was created """
187 class _Prop_description(aetools
.NProperty
):
188 """description - a description of the item """
191 class _Prop_disk(aetools
.NProperty
):
192 """disk - the disk on which the item is stored """
195 class _Prop_displayed_name(aetools
.NProperty
):
196 """displayed name - the user-visible name of the item """
199 class _Prop_everyones_privileges(aetools
.NProperty
):
200 """everyones privileges - """
203 class _Prop_extension_hidden(aetools
.NProperty
):
204 """extension hidden - Is the item's extension hidden from the user? """
207 class _Prop_group(aetools
.NProperty
):
208 """group - the user or group that has special access to the container """
211 class _Prop_group_privileges(aetools
.NProperty
):
212 """group privileges - """
215 class _Prop_icon(aetools
.NProperty
):
216 """icon - the icon bitmap of the item """
219 class _Prop_index(aetools
.NProperty
):
220 """index - the index in the front-to-back ordering within its container """
223 class _Prop_information_window(aetools
.NProperty
):
224 """information window - the information window for the item """
227 class _Prop_kind(aetools
.NProperty
):
228 """kind - the kind of the item """
231 class _Prop_label_index(aetools
.NProperty
):
232 """label index - the label of the item """
235 class _Prop_locked(aetools
.NProperty
):
236 """locked - Is the file locked? """
239 class _Prop_modification_date(aetools
.NProperty
):
240 """modification date - the date on which the item was last modified """
243 class _Prop_name(aetools
.NProperty
):
244 """name - the name of the item """
247 class _Prop_name_extension(aetools
.NProperty
):
248 """name extension - the name extension of the item (such as \xd2txt\xd3) """
251 class _Prop_owner(aetools
.NProperty
):
252 """owner - the user that owns the container """
255 class _Prop_owner_privileges(aetools
.NProperty
):
256 """owner privileges - """
259 class _Prop_physical_size(aetools
.NProperty
):
260 """physical size - the actual space used by the item on disk """
263 class _Prop_position(aetools
.NProperty
):
264 """position - the position of the item within its parent window (can only be set for an item in a window viewed as icons or buttons) """
267 class _Prop_properties(aetools
.NProperty
):
268 """properties - every property of an item """
271 class _Prop_size(aetools
.NProperty
):
272 """size - the logical size of the item """
275 class _Prop_url(aetools
.NProperty
):
276 """url - the url of the item """
281 item
._superclassnames
= []
282 item
._privpropdict
= {
283 'bounds' : _Prop_bounds
,
284 'comment' : _Prop_comment
,
285 'container' : _Prop_container
,
286 'creation_date' : _Prop_creation_date
,
287 'description' : _Prop_description
,
289 'displayed_name' : _Prop_displayed_name
,
290 'everyones_privileges' : _Prop_everyones_privileges
,
291 'extension_hidden' : _Prop_extension_hidden
,
292 'group' : _Prop_group
,
293 'group_privileges' : _Prop_group_privileges
,
295 'index' : _Prop_index
,
296 'information_window' : _Prop_information_window
,
298 'label_index' : _Prop_label_index
,
299 'locked' : _Prop_locked
,
300 'modification_date' : _Prop_modification_date
,
302 'name_extension' : _Prop_name_extension
,
303 'owner' : _Prop_owner
,
304 'owner_privileges' : _Prop_owner_privileges
,
305 'physical_size' : _Prop_physical_size
,
306 'position' : _Prop_position
,
307 'properties' : _Prop_properties
,
311 item
._privelemdict
= {
315 # Indices of types declared in this module
317 _classdeclarations
= {
321 _propdeclarations
= {
322 'ascd' : _Prop_creation_date
,
323 'aslk' : _Prop_locked
,
324 'asmo' : _Prop_modification_date
,
326 'comt' : _Prop_comment
,
327 'ctnr' : _Prop_container
,
328 'dnam' : _Prop_displayed_name
,
329 'dscr' : _Prop_description
,
330 'gppr' : _Prop_group_privileges
,
331 'gstp' : _Prop_everyones_privileges
,
332 'hidx' : _Prop_extension_hidden
,
334 'iwnd' : _Prop_information_window
,
336 'labi' : _Prop_label_index
,
337 'nmxt' : _Prop_name_extension
,
338 'ownr' : _Prop_owner_privileges
,
339 'pALL' : _Prop_properties
,
341 'pbnd' : _Prop_bounds
,
342 'phys' : _Prop_physical_size
,
343 'pidx' : _Prop_index
,
345 'posn' : _Prop_position
,
347 'sgrp' : _Prop_group
,
348 'sown' : _Prop_owner
,
351 _compdeclarations
= {
354 _enumdeclarations
= {