PageRenderTime 74ms CodeModel.GetById 20ms app.highlight 35ms RepoModel.GetById 15ms app.codeStats 1ms

/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py

http://unladen-swallow.googlecode.com/
Python | 237 lines | 212 code | 16 blank | 9 comment | 4 complexity | c10083bca613cff6ae0df3136d6b9da9 MD5 | raw file
  1"""
  2Package generated from /System/Library/CoreServices/Finder.app
  3"""
  4
  5from warnings import warnpy3k
  6warnpy3k("In 3.x, the Finder package is removed.", stacklevel=2)
  7
  8import aetools
  9Error = aetools.Error
 10import Standard_Suite
 11import Legacy_suite
 12import Containers_and_folders
 13import Files
 14import Finder_Basics
 15import Finder_items
 16import Window_classes
 17import Type_Definitions
 18import Enumerations
 19
 20
 21_code_to_module = {
 22    'CoRe' : Standard_Suite,
 23    'fleg' : Legacy_suite,
 24    'fndr' : Containers_and_folders,
 25    'fndr' : Files,
 26    'fndr' : Finder_Basics,
 27    'fndr' : Finder_items,
 28    'fndr' : Window_classes,
 29    'tpdf' : Type_Definitions,
 30    'tpnm' : Enumerations,
 31}
 32
 33
 34
 35_code_to_fullname = {
 36    'CoRe' : ('Finder.Standard_Suite', 'Standard_Suite'),
 37    'fleg' : ('Finder.Legacy_suite', 'Legacy_suite'),
 38    'fndr' : ('Finder.Containers_and_folders', 'Containers_and_folders'),
 39    'fndr' : ('Finder.Files', 'Files'),
 40    'fndr' : ('Finder.Finder_Basics', 'Finder_Basics'),
 41    'fndr' : ('Finder.Finder_items', 'Finder_items'),
 42    'fndr' : ('Finder.Window_classes', 'Window_classes'),
 43    'tpdf' : ('Finder.Type_Definitions', 'Type_Definitions'),
 44    'tpnm' : ('Finder.Enumerations', 'Enumerations'),
 45}
 46
 47from Standard_Suite import *
 48from Legacy_suite import *
 49from Containers_and_folders import *
 50from Files import *
 51from Finder_Basics import *
 52from Finder_items import *
 53from Window_classes import *
 54from Type_Definitions import *
 55from Enumerations import *
 56
 57def getbaseclasses(v):
 58    if not getattr(v, '_propdict', None):
 59        v._propdict = {}
 60        v._elemdict = {}
 61        for superclassname in getattr(v, '_superclassnames', []):
 62            superclass = eval(superclassname)
 63            getbaseclasses(superclass)
 64            v._propdict.update(getattr(superclass, '_propdict', {}))
 65            v._elemdict.update(getattr(superclass, '_elemdict', {}))
 66        v._propdict.update(getattr(v, '_privpropdict', {}))
 67        v._elemdict.update(getattr(v, '_privelemdict', {}))
 68
 69import StdSuites
 70
 71#
 72# Set property and element dictionaries now that all classes have been defined
 73#
 74getbaseclasses(StdSuites.Type_Names_Suite.small_integer)
 75getbaseclasses(StdSuites.Type_Names_Suite.system_dictionary)
 76getbaseclasses(StdSuites.Type_Names_Suite.color_table)
 77getbaseclasses(StdSuites.Type_Names_Suite.fixed_point)
 78getbaseclasses(StdSuites.Type_Names_Suite.string)
 79getbaseclasses(StdSuites.Type_Names_Suite.type_element_info)
 80getbaseclasses(StdSuites.Type_Names_Suite.machine_location)
 81getbaseclasses(StdSuites.Type_Names_Suite.PostScript_picture)
 82getbaseclasses(StdSuites.Type_Names_Suite.type_property_info)
 83getbaseclasses(StdSuites.Type_Names_Suite.menu_item)
 84getbaseclasses(StdSuites.Type_Names_Suite.scrap_styles)
 85getbaseclasses(StdSuites.Type_Names_Suite.fixed_rectangle)
 86getbaseclasses(StdSuites.Type_Names_Suite.null)
 87getbaseclasses(StdSuites.Type_Names_Suite.type_event_info)
 88getbaseclasses(StdSuites.Type_Names_Suite.rotation)
 89getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_rectangle)
 90getbaseclasses(StdSuites.Type_Names_Suite.long_point)
 91getbaseclasses(StdSuites.Type_Names_Suite.target_id)
 92getbaseclasses(StdSuites.Type_Names_Suite.type_suite_info)
 93getbaseclasses(StdSuites.Type_Names_Suite.type_parameter_info)
 94getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_point)
 95getbaseclasses(StdSuites.Type_Names_Suite.bounding_rectangle)
 96getbaseclasses(StdSuites.Type_Names_Suite.TIFF_picture)
 97getbaseclasses(StdSuites.Type_Names_Suite.long_fixed)
 98getbaseclasses(StdSuites.Type_Names_Suite.version)
 99getbaseclasses(StdSuites.Type_Names_Suite.RGB16_color)
100getbaseclasses(StdSuites.Type_Names_Suite.double_integer)
101getbaseclasses(StdSuites.Type_Names_Suite.location_reference)
102getbaseclasses(StdSuites.Type_Names_Suite.point)
103getbaseclasses(StdSuites.Type_Names_Suite.application_dictionary)
104getbaseclasses(StdSuites.Type_Names_Suite.unsigned_integer)
105getbaseclasses(StdSuites.Type_Names_Suite.menu)
106getbaseclasses(StdSuites.Type_Names_Suite.small_real)
107getbaseclasses(StdSuites.Type_Names_Suite.fixed)
108getbaseclasses(StdSuites.Type_Names_Suite.type_class_info)
109getbaseclasses(StdSuites.Type_Names_Suite.RGB96_color)
110getbaseclasses(StdSuites.Type_Names_Suite.dash_style)
111getbaseclasses(StdSuites.Type_Names_Suite.pixel_map_record)
112getbaseclasses(StdSuites.Type_Names_Suite.extended_real)
113getbaseclasses(StdSuites.Type_Names_Suite.long_rectangle)
114getbaseclasses(process)
115getbaseclasses(application_process)
116getbaseclasses(desk_accessory_process)
117getbaseclasses(application)
118getbaseclasses(trash_2d_object)
119getbaseclasses(desktop_2d_object)
120getbaseclasses(container)
121getbaseclasses(folder)
122getbaseclasses(disk)
123getbaseclasses(application)
124getbaseclasses(alias_file)
125getbaseclasses(package)
126getbaseclasses(file)
127getbaseclasses(application_file)
128getbaseclasses(internet_location_file)
129getbaseclasses(document_file)
130getbaseclasses(clipping)
131getbaseclasses(preferences_window)
132getbaseclasses(Finder_window)
133getbaseclasses(window)
134getbaseclasses(clipping_window)
135getbaseclasses(information_window)
136getbaseclasses(item)
137getbaseclasses(icon_view_options)
138getbaseclasses(preferences)
139getbaseclasses(alias_list)
140getbaseclasses(icon_family)
141getbaseclasses(label)
142getbaseclasses(column)
143getbaseclasses(list_view_options)
144
145#
146# Indices of types declared in this module
147#
148_classdeclarations = {
149    'shor' : StdSuites.Type_Names_Suite.small_integer,
150    'aeut' : StdSuites.Type_Names_Suite.system_dictionary,
151    'clrt' : StdSuites.Type_Names_Suite.color_table,
152    'fpnt' : StdSuites.Type_Names_Suite.fixed_point,
153    'TEXT' : StdSuites.Type_Names_Suite.string,
154    'elin' : StdSuites.Type_Names_Suite.type_element_info,
155    'mLoc' : StdSuites.Type_Names_Suite.machine_location,
156    'EPS ' : StdSuites.Type_Names_Suite.PostScript_picture,
157    'pinf' : StdSuites.Type_Names_Suite.type_property_info,
158    'cmen' : StdSuites.Type_Names_Suite.menu_item,
159    'styl' : StdSuites.Type_Names_Suite.scrap_styles,
160    'frct' : StdSuites.Type_Names_Suite.fixed_rectangle,
161    'null' : StdSuites.Type_Names_Suite.null,
162    'evin' : StdSuites.Type_Names_Suite.type_event_info,
163    'trot' : StdSuites.Type_Names_Suite.rotation,
164    'lfrc' : StdSuites.Type_Names_Suite.long_fixed_rectangle,
165    'lpnt' : StdSuites.Type_Names_Suite.long_point,
166    'targ' : StdSuites.Type_Names_Suite.target_id,
167    'suin' : StdSuites.Type_Names_Suite.type_suite_info,
168    'pmin' : StdSuites.Type_Names_Suite.type_parameter_info,
169    'lfpt' : StdSuites.Type_Names_Suite.long_fixed_point,
170    'qdrt' : StdSuites.Type_Names_Suite.bounding_rectangle,
171    'TIFF' : StdSuites.Type_Names_Suite.TIFF_picture,
172    'lfxd' : StdSuites.Type_Names_Suite.long_fixed,
173    'vers' : StdSuites.Type_Names_Suite.version,
174    'tr16' : StdSuites.Type_Names_Suite.RGB16_color,
175    'comp' : StdSuites.Type_Names_Suite.double_integer,
176    'insl' : StdSuites.Type_Names_Suite.location_reference,
177    'QDpt' : StdSuites.Type_Names_Suite.point,
178    'aete' : StdSuites.Type_Names_Suite.application_dictionary,
179    'magn' : StdSuites.Type_Names_Suite.unsigned_integer,
180    'cmnu' : StdSuites.Type_Names_Suite.menu,
181    'sing' : StdSuites.Type_Names_Suite.small_real,
182    'fixd' : StdSuites.Type_Names_Suite.fixed,
183    'gcli' : StdSuites.Type_Names_Suite.type_class_info,
184    'tr96' : StdSuites.Type_Names_Suite.RGB96_color,
185    'tdas' : StdSuites.Type_Names_Suite.dash_style,
186    'tpmm' : StdSuites.Type_Names_Suite.pixel_map_record,
187    'exte' : StdSuites.Type_Names_Suite.extended_real,
188    'lrct' : StdSuites.Type_Names_Suite.long_rectangle,
189    'prcs' : process,
190    'pcap' : application_process,
191    'pcda' : desk_accessory_process,
192    'capp' : application,
193    'ctrs' : trash_2d_object,
194    'cdsk' : desktop_2d_object,
195    'ctnr' : container,
196    'cfol' : folder,
197    'cdis' : disk,
198    'capp' : application,
199    'alia' : alias_file,
200    'pack' : package,
201    'file' : file,
202    'appf' : application_file,
203    'inlf' : internet_location_file,
204    'docf' : document_file,
205    'clpf' : clipping,
206    'pwnd' : preferences_window,
207    'brow' : Finder_window,
208    'cwin' : window,
209    'lwnd' : clipping_window,
210    'iwnd' : information_window,
211    'cobj' : item,
212    'icop' : icon_view_options,
213    'cprf' : preferences,
214    'alst' : alias_list,
215    'ifam' : icon_family,
216    'clbl' : label,
217    'lvcl' : column,
218    'lvop' : list_view_options,
219}
220
221
222class Finder(Standard_Suite_Events,
223        Legacy_suite_Events,
224        Containers_and_folders_Events,
225        Files_Events,
226        Finder_Basics_Events,
227        Finder_items_Events,
228        Window_classes_Events,
229        Type_Definitions_Events,
230        Enumerations_Events,
231        aetools.TalkTo):
232    _signature = 'MACS'
233
234    _moduleName = 'Finder'
235
236    _elemdict = application._elemdict
237    _propdict = application._propdict