diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-03 11:25:13 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-03 11:25:13 +0000 |
commit | 458120dd40db6b4df55a4e96b650e16798ef06a0 (patch) | |
tree | 8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/lib/python/plat-mac/lib-scriptpackages/Terminal | |
parent | 3a742c699f6806c1145aea5149bf15de15a0afd7 (diff) |
add hg and python
Diffstat (limited to 'sys/lib/python/plat-mac/lib-scriptpackages/Terminal')
4 files changed, 1120 insertions, 0 deletions
diff --git a/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py b/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py new file mode 100644 index 000000000..035290f32 --- /dev/null +++ b/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py @@ -0,0 +1,582 @@ +"""Suite Standard Suite: Common classes and commands for most applications. +Level 1, version 1 + +Generated from /Applications/Utilities/Terminal.app +AETE/AEUT resource version 1/0, language 0, script 0 +""" + +import aetools +import MacOS + +_code = '????' + +class Standard_Suite_Events: + + _argmap_close = { + 'saving_in' : 'kfil', + 'saving' : 'savo', + } + + def close(self, _object, _attributes={}, **_arguments): + """close: Close an object. + Required argument: the object for the command + Keyword argument saving_in: The file in which to save the object. + Keyword argument saving: Specifies whether changes should be saved before closing. + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'core' + _subcode = 'clos' + + aetools.keysubst(_arguments, self._argmap_close) + _arguments['----'] = _object + + aetools.enumsubst(_arguments, 'savo', _Enum_savo) + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + _argmap_count = { + 'each' : 'kocl', + } + + def count(self, _object, _attributes={}, **_arguments): + """count: Return the number of elements of a particular class within an object. + Required argument: the object for the command + Keyword argument each: The class of objects to be counted. + Keyword argument _attributes: AppleEvent attribute dictionary + Returns: the reply for the command + """ + _code = 'core' + _subcode = 'cnte' + + aetools.keysubst(_arguments, self._argmap_count) + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + def delete(self, _object, _attributes={}, **_arguments): + """delete: Delete an object. + Required argument: the object for the command + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'core' + _subcode = 'delo' + + if _arguments: raise TypeError, 'No optional args expected' + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + _argmap_duplicate = { + 'to' : 'insh', + 'with_properties' : 'prdt', + } + + def duplicate(self, _object, _attributes={}, **_arguments): + """duplicate: Copy object(s) and put the copies at a new location. + Required argument: the object for the command + Keyword argument to: The location for the new object(s). + Keyword argument with_properties: Properties to be set in the new duplicated object(s). + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'core' + _subcode = 'clon' + + aetools.keysubst(_arguments, self._argmap_duplicate) + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + def exists(self, _object, _attributes={}, **_arguments): + """exists: Verify if an object exists. + Required argument: the object for the command + Keyword argument _attributes: AppleEvent attribute dictionary + Returns: the reply for the command + """ + _code = 'core' + _subcode = 'doex' + + if _arguments: raise TypeError, 'No optional args expected' + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + def get(self, _object, _attributes={}, **_arguments): + """get: Get the data for an object. + Required argument: the object for the command + Keyword argument _attributes: AppleEvent attribute dictionary + Returns: the reply for the command + """ + _code = 'core' + _subcode = 'getd' + + if _arguments: raise TypeError, 'No optional args expected' + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + _argmap_make = { + 'at' : 'insh', + 'new' : 'kocl', + 'with_data' : 'data', + 'with_properties' : 'prdt', + } + + def make(self, _no_object=None, _attributes={}, **_arguments): + """make: Make a new object. + Keyword argument at: The location at which to insert the object. + Keyword argument new: The class of the new object. + Keyword argument with_data: The initial data for the object. + Keyword argument with_properties: The initial values for properties of the object. + Keyword argument _attributes: AppleEvent attribute dictionary + Returns: the reply for the command + """ + _code = 'core' + _subcode = 'crel' + + aetools.keysubst(_arguments, self._argmap_make) + if _no_object != None: raise TypeError, 'No direct arg expected' + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + _argmap_move = { + 'to' : 'insh', + } + + def move(self, _object, _attributes={}, **_arguments): + """move: Move object(s) to a new location. + Required argument: the object for the command + Keyword argument to: The new location for the object(s). + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'core' + _subcode = 'move' + + aetools.keysubst(_arguments, self._argmap_move) + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + def open(self, _object=None, _attributes={}, **_arguments): + """open: Open an object. + Required argument: list of objects + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'aevt' + _subcode = 'odoc' + + if _arguments: raise TypeError, 'No optional args expected' + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + def print_(self, _object=None, _attributes={}, **_arguments): + """print: Print an object. + Required argument: list of objects + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'aevt' + _subcode = 'pdoc' + + if _arguments: raise TypeError, 'No optional args expected' + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + _argmap_quit = { + 'saving' : 'savo', + } + + def quit(self, _object, _attributes={}, **_arguments): + """quit: Quit an application. + Required argument: the object for the command + Keyword argument saving: Specifies whether changes should be saved before quitting. + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'aevt' + _subcode = 'quit' + + aetools.keysubst(_arguments, self._argmap_quit) + _arguments['----'] = _object + + aetools.enumsubst(_arguments, 'savo', _Enum_savo) + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + _argmap_save = { + 'in_' : 'kfil', + 'as' : 'fltp', + } + + def save(self, _object, _attributes={}, **_arguments): + """save: Save an object. + Required argument: the object for the command + Keyword argument in_: The file in which to save the object. + Keyword argument as: The file type in which to save the data. + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'core' + _subcode = 'save' + + aetools.keysubst(_arguments, self._argmap_save) + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + _argmap_set = { + 'to' : 'data', + } + + def set(self, _object, _attributes={}, **_arguments): + """set: Set an object's data. + Required argument: the object for the command + Keyword argument to: The new value. + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'core' + _subcode = 'setd' + + aetools.keysubst(_arguments, self._argmap_set) + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + +class application(aetools.ComponentItem): + """application - An application's top level scripting object. """ + want = 'capp' +class _Prop__3c_Inheritance_3e_(aetools.NProperty): + """<Inheritance> - All of the properties of the superclass. """ + which = 'c@#^' + want = 'cobj' +_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_() +class _Prop_frontmost(aetools.NProperty): + """frontmost - Is this the frontmost (active) application? """ + which = 'pisf' + want = 'bool' +frontmost = _Prop_frontmost() +class _Prop_name(aetools.NProperty): + """name - The name of the application. """ + which = 'pnam' + want = 'utxt' +name = _Prop_name() +class _Prop_version(aetools.NProperty): + """version - The version of the application. """ + which = 'vers' + want = 'utxt' +version = _Prop_version() +# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID '] +# element 'docu' as ['name', 'indx', 'rele', 'rang', 'test'] + +applications = application + +class item(aetools.ComponentItem): + """item - A scriptable object. """ + want = 'cobj' +class _Prop_class_(aetools.NProperty): + """class - The class of the object. """ + which = 'pcls' + want = 'type' +class _Prop_properties(aetools.NProperty): + """properties - All of the object's properties. """ + which = 'pALL' + want = 'reco' + +items = item + +class color(aetools.ComponentItem): + """color - A color. """ + want = 'colr' + +colors = color + +class window(aetools.ComponentItem): + """window - A window. """ + want = 'cwin' +class _Prop_bounds(aetools.NProperty): + """bounds - The bounding rectangle of the window. """ + which = 'pbnd' + want = 'qdrt' +class _Prop_closeable(aetools.NProperty): + """closeable - Whether the window has a close box. """ + which = 'hclb' + want = 'bool' +class _Prop_document(aetools.NProperty): + """document - The document whose contents are being displayed in the window. """ + which = 'docu' + want = 'docu' +class _Prop_floating(aetools.NProperty): + """floating - Whether the window floats. """ + which = 'isfl' + want = 'bool' +class _Prop_id(aetools.NProperty): + """id - The unique identifier of the window. """ + which = 'ID ' + want = 'long' +class _Prop_index(aetools.NProperty): + """index - The index of the window in the back-to-front window ordering. """ + which = 'pidx' + want = 'long' +class _Prop_miniaturizable(aetools.NProperty): + """miniaturizable - Whether the window can be miniaturized. """ + which = 'ismn' + want = 'bool' +class _Prop_miniaturized(aetools.NProperty): + """miniaturized - Whether the window is currently miniaturized. """ + which = 'pmnd' + want = 'bool' +class _Prop_modal(aetools.NProperty): + """modal - Whether the window is the application's current modal window. """ + which = 'pmod' + want = 'bool' +class _Prop_resizable(aetools.NProperty): + """resizable - Whether the window can be resized. """ + which = 'prsz' + want = 'bool' +class _Prop_titled(aetools.NProperty): + """titled - Whether the window has a title bar. """ + which = 'ptit' + want = 'bool' +class _Prop_visible(aetools.NProperty): + """visible - Whether the window is currently visible. """ + which = 'pvis' + want = 'bool' +class _Prop_zoomable(aetools.NProperty): + """zoomable - Whether the window can be zoomed. """ + which = 'iszm' + want = 'bool' +class _Prop_zoomed(aetools.NProperty): + """zoomed - Whether the window is currently zoomed. """ + which = 'pzum' + want = 'bool' + +windows = window + +class document(aetools.ComponentItem): + """document - A document. """ + want = 'docu' +class _Prop_modified(aetools.NProperty): + """modified - Has the document been modified since the last save? """ + which = 'imod' + want = 'bool' +class _Prop_path(aetools.NProperty): + """path - The document's path. """ + which = 'ppth' + want = 'utxt' + +documents = document +application._superclassnames = ['item'] +application._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'frontmost' : _Prop_frontmost, + 'name' : _Prop_name, + 'version' : _Prop_version, +} +application._privelemdict = { + 'document' : document, + 'window' : window, +} +item._superclassnames = [] +item._privpropdict = { + 'class_' : _Prop_class_, + 'properties' : _Prop_properties, +} +item._privelemdict = { +} +color._superclassnames = ['item'] +color._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, +} +color._privelemdict = { +} +window._superclassnames = ['item'] +window._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'bounds' : _Prop_bounds, + 'closeable' : _Prop_closeable, + 'document' : _Prop_document, + 'floating' : _Prop_floating, + 'id' : _Prop_id, + 'index' : _Prop_index, + 'miniaturizable' : _Prop_miniaturizable, + 'miniaturized' : _Prop_miniaturized, + 'modal' : _Prop_modal, + 'name' : _Prop_name, + 'resizable' : _Prop_resizable, + 'titled' : _Prop_titled, + 'visible' : _Prop_visible, + 'zoomable' : _Prop_zoomable, + 'zoomed' : _Prop_zoomed, +} +window._privelemdict = { +} +document._superclassnames = ['item'] +document._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'modified' : _Prop_modified, + 'name' : _Prop_name, + 'path' : _Prop_path, +} +document._privelemdict = { +} +class _3c_(aetools.NComparison): + """< - Less than """ +class _3d_(aetools.NComparison): + """= - Equal """ +class _3e_(aetools.NComparison): + """> - Greater than """ +class contains(aetools.NComparison): + """contains - Contains """ +class ends_with(aetools.NComparison): + """ends with - Ends with """ +class starts_with(aetools.NComparison): + """starts with - Starts with """ +class _b2_(aetools.NComparison): + """\xb2 - Less than or equal to """ +class _b3_(aetools.NComparison): + """\xb3 - Greater than or equal to """ +_Enum_savo = { + 'ask' : 'ask ', # Ask the user whether or not to save the file. + 'yes' : 'yes ', # Save the file. + 'no' : 'no ', # Do not save the file. +} + + +# +# Indices of types declared in this module +# +_classdeclarations = { + 'capp' : application, + 'cobj' : item, + 'colr' : color, + 'cwin' : window, + 'docu' : document, +} + +_propdeclarations = { + 'ID ' : _Prop_id, + 'c@#^' : _Prop__3c_Inheritance_3e_, + 'docu' : _Prop_document, + 'hclb' : _Prop_closeable, + 'imod' : _Prop_modified, + 'isfl' : _Prop_floating, + 'ismn' : _Prop_miniaturizable, + 'iszm' : _Prop_zoomable, + 'pALL' : _Prop_properties, + 'pbnd' : _Prop_bounds, + 'pcls' : _Prop_class_, + 'pidx' : _Prop_index, + 'pisf' : _Prop_frontmost, + 'pmnd' : _Prop_miniaturized, + 'pmod' : _Prop_modal, + 'pnam' : _Prop_name, + 'ppth' : _Prop_path, + 'prsz' : _Prop_resizable, + 'ptit' : _Prop_titled, + 'pvis' : _Prop_visible, + 'pzum' : _Prop_zoomed, + 'vers' : _Prop_version, +} + +_compdeclarations = { + '< ' : _3c_, + '<= ' : _b2_, + '= ' : _3d_, + '> ' : _3e_, + '>= ' : _b3_, + 'bgwt' : starts_with, + 'cont' : contains, + 'ends' : ends_with, +} + +_enumdeclarations = { + 'savo' : _Enum_savo, +} diff --git a/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py b/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py new file mode 100644 index 000000000..afa02b39f --- /dev/null +++ b/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py @@ -0,0 +1,254 @@ +"""Suite Terminal Suite: Terms and Events for controlling the Terminal application +Level 1, version 1 + +Generated from /Applications/Utilities/Terminal.app +AETE/AEUT resource version 1/0, language 0, script 0 +""" + +import aetools +import MacOS + +_code = 'trmx' + +class Terminal_Suite_Events: + + def GetURL(self, _object, _attributes={}, **_arguments): + """GetURL: Opens a telnet: URL + Required argument: the object for the command + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'GURL' + _subcode = 'GURL' + + if _arguments: raise TypeError, 'No optional args expected' + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + _argmap_do_script = { + 'in_' : 'kfil', + 'with_command' : 'cmnd', + } + + def do_script(self, _object, _attributes={}, **_arguments): + """do script: Run a UNIX shell script or command + Required argument: the object for the command + Keyword argument in_: the window in which to execute the command + Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter + Keyword argument _attributes: AppleEvent attribute dictionary + Returns: the reply for the command + """ + _code = 'core' + _subcode = 'dosc' + + aetools.keysubst(_arguments, self._argmap_do_script) + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + +class application(aetools.ComponentItem): + """application - The Terminal program """ + want = 'capp' +class _Prop__3c_Inheritance_3e_(aetools.NProperty): + """<Inheritance> - All of the properties of the superclass. """ + which = 'c@#^' + want = 'capp' +_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_() +class _Prop_properties(aetools.NProperty): + """properties - every property of the Terminal program """ + which = 'pALL' + want = '****' +properties = _Prop_properties() +# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID '] +# element 'docu' as ['name', 'indx', 'rele', 'rang', 'test'] + +applications = application + +class window(aetools.ComponentItem): + """window - A Terminal window """ + want = 'cwin' +class _Prop_background_color(aetools.NProperty): + """background color - the background color for the window """ + which = 'pbcl' + want = '****' +class _Prop_bold_text_color(aetools.NProperty): + """bold text color - the bold text color for the window """ + which = 'pbtc' + want = '****' +class _Prop_bounds(aetools.NProperty): + """bounds - the boundary rectangle for the window, relative to the upper left corner of the screen """ + which = 'pbnd' + want = '****' +class _Prop_busy(aetools.NProperty): + """busy - Is the window busy running a process? """ + which = 'busy' + want = 'bool' +class _Prop_contents(aetools.NProperty): + """contents - the currently visible contents of the window """ + which = 'pcnt' + want = 'utxt' +class _Prop_cursor_color(aetools.NProperty): + """cursor color - the cursor color for the window """ + which = 'pcuc' + want = '****' +class _Prop_custom_title(aetools.NProperty): + """custom title - the custom title for the window """ + which = 'titl' + want = 'utxt' +class _Prop_frame(aetools.NProperty): + """frame - the origin and size of the window """ + which = 'pfra' + want = '****' +class _Prop_frontmost(aetools.NProperty): + """frontmost - Is the window in front of the other Terminal windows? """ + which = 'pisf' + want = 'bool' +class _Prop_history(aetools.NProperty): + """history - the contents of the entire scrolling buffer of the window """ + which = 'hist' + want = 'utxt' +class _Prop_normal_text_color(aetools.NProperty): + """normal text color - the normal text color for the window """ + which = 'ptxc' + want = '****' +class _Prop_number_of_columns(aetools.NProperty): + """number of columns - the number of columns in the window """ + which = 'ccol' + want = 'long' +class _Prop_number_of_rows(aetools.NProperty): + """number of rows - the number of rows in the window """ + which = 'crow' + want = 'long' +class _Prop_origin(aetools.NProperty): + """origin - the lower left coordinates of the window, relative to the lower left corner of the screen """ + which = 'pori' + want = '****' +class _Prop_position(aetools.NProperty): + """position - the upper left coordinates of the window, relative to the upper left corner of the screen """ + which = 'ppos' + want = '****' +class _Prop_processes(aetools.NProperty): + """processes - a list of the currently running processes """ + which = 'prcs' + want = 'utxt' +class _Prop_size(aetools.NProperty): + """size - the width and height of the window """ + which = 'psiz' + want = '****' +class _Prop_title_displays_custom_title(aetools.NProperty): + """title displays custom title - Does the title for the window contain a custom title? """ + which = 'tdct' + want = 'bool' +class _Prop_title_displays_device_name(aetools.NProperty): + """title displays device name - Does the title for the window contain the device name? """ + which = 'tddn' + want = 'bool' +class _Prop_title_displays_file_name(aetools.NProperty): + """title displays file name - Does the title for the window contain the file name? """ + which = 'tdfn' + want = 'bool' +class _Prop_title_displays_shell_path(aetools.NProperty): + """title displays shell path - Does the title for the window contain the shell path? """ + which = 'tdsp' + want = 'bool' +class _Prop_title_displays_window_size(aetools.NProperty): + """title displays window size - Does the title for the window contain the window size? """ + which = 'tdws' + want = 'bool' + +windows = window +application._superclassnames = [] +import Standard_Suite +application._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'properties' : _Prop_properties, +} +application._privelemdict = { + 'document' : Standard_Suite.document, + 'window' : window, +} +window._superclassnames = [] +window._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'background_color' : _Prop_background_color, + 'bold_text_color' : _Prop_bold_text_color, + 'bounds' : _Prop_bounds, + 'busy' : _Prop_busy, + 'contents' : _Prop_contents, + 'cursor_color' : _Prop_cursor_color, + 'custom_title' : _Prop_custom_title, + 'frame' : _Prop_frame, + 'frontmost' : _Prop_frontmost, + 'history' : _Prop_history, + 'normal_text_color' : _Prop_normal_text_color, + 'number_of_columns' : _Prop_number_of_columns, + 'number_of_rows' : _Prop_number_of_rows, + 'origin' : _Prop_origin, + 'position' : _Prop_position, + 'processes' : _Prop_processes, + 'properties' : _Prop_properties, + 'size' : _Prop_size, + 'title_displays_custom_title' : _Prop_title_displays_custom_title, + 'title_displays_device_name' : _Prop_title_displays_device_name, + 'title_displays_file_name' : _Prop_title_displays_file_name, + 'title_displays_shell_path' : _Prop_title_displays_shell_path, + 'title_displays_window_size' : _Prop_title_displays_window_size, +} +window._privelemdict = { +} + +# +# Indices of types declared in this module +# +_classdeclarations = { + 'capp' : application, + 'cwin' : window, +} + +_propdeclarations = { + 'busy' : _Prop_busy, + 'c@#^' : _Prop__3c_Inheritance_3e_, + 'ccol' : _Prop_number_of_columns, + 'crow' : _Prop_number_of_rows, + 'hist' : _Prop_history, + 'pALL' : _Prop_properties, + 'pbcl' : _Prop_background_color, + 'pbnd' : _Prop_bounds, + 'pbtc' : _Prop_bold_text_color, + 'pcnt' : _Prop_contents, + 'pcuc' : _Prop_cursor_color, + 'pfra' : _Prop_frame, + 'pisf' : _Prop_frontmost, + 'pori' : _Prop_origin, + 'ppos' : _Prop_position, + 'prcs' : _Prop_processes, + 'psiz' : _Prop_size, + 'ptxc' : _Prop_normal_text_color, + 'tdct' : _Prop_title_displays_custom_title, + 'tddn' : _Prop_title_displays_device_name, + 'tdfn' : _Prop_title_displays_file_name, + 'tdsp' : _Prop_title_displays_shell_path, + 'tdws' : _Prop_title_displays_window_size, + 'titl' : _Prop_custom_title, +} + +_compdeclarations = { +} + +_enumdeclarations = { +} diff --git a/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/Text_Suite.py b/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/Text_Suite.py new file mode 100644 index 000000000..62f4744b2 --- /dev/null +++ b/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/Text_Suite.py @@ -0,0 +1,195 @@ +"""Suite Text Suite: A set of basic classes for text processing. +Level 1, version 1 + +Generated from /Applications/Utilities/Terminal.app +AETE/AEUT resource version 1/0, language 0, script 0 +""" + +import aetools +import MacOS + +_code = '????' + +class Text_Suite_Events: + + pass + + +class attachment(aetools.ComponentItem): + """attachment - Represents an inline text attachment. This class is used mainly for make commands. """ + want = 'atts' +class _Prop__3c_Inheritance_3e_(aetools.NProperty): + """<Inheritance> - All of the properties of the superclass. """ + which = 'c@#^' + want = 'ctxt' +class _Prop_file_name(aetools.NProperty): + """file name - The path to the file for the attachment """ + which = 'atfn' + want = 'utxt' +# element 'catr' as ['indx', 'rele', 'rang', 'test'] +# element 'cha ' as ['indx', 'rele', 'rang', 'test'] +# element 'cpar' as ['indx', 'rele', 'rang', 'test'] +# element 'cwor' as ['indx', 'rele', 'rang', 'test'] + +class attribute_run(aetools.ComponentItem): + """attribute run - This subdivides the text into chunks that all have the same attributes. """ + want = 'catr' +class _Prop_color(aetools.NProperty): + """color - The color of the first character. """ + which = 'colr' + want = 'colr' +class _Prop_font(aetools.NProperty): + """font - The name of the font of the first character. """ + which = 'font' + want = 'utxt' +class _Prop_size(aetools.NProperty): + """size - The size in points of the first character. """ + which = 'ptsz' + want = 'long' +# element 'catr' as ['indx', 'rele', 'rang', 'test'] +# element 'cha ' as ['indx', 'rele', 'rang', 'test'] +# element 'cpar' as ['indx', 'rele', 'rang', 'test'] +# element 'cwor' as ['indx', 'rele', 'rang', 'test'] + +attribute_runs = attribute_run + +class character(aetools.ComponentItem): + """character - This subdivides the text into characters. """ + want = 'cha ' +# element 'catr' as ['indx', 'rele', 'rang', 'test'] +# element 'cha ' as ['indx', 'rele', 'rang', 'test'] +# element 'cpar' as ['indx', 'rele', 'rang', 'test'] +# element 'cwor' as ['indx', 'rele', 'rang', 'test'] + +characters = character + +class paragraph(aetools.ComponentItem): + """paragraph - This subdivides the text into paragraphs. """ + want = 'cpar' +# element 'catr' as ['indx', 'rele', 'rang', 'test'] +# element 'cha ' as ['indx', 'rele', 'rang', 'test'] +# element 'cpar' as ['indx', 'rele', 'rang', 'test'] +# element 'cwor' as ['indx', 'rele', 'rang', 'test'] + +paragraphs = paragraph + +class text(aetools.ComponentItem): + """text - Rich (styled) text """ + want = 'ctxt' +# element 'catr' as ['indx', 'rele', 'rang', 'test'] +# element 'cha ' as ['indx', 'rele', 'rang', 'test'] +# element 'cpar' as ['indx', 'rele', 'rang', 'test'] +# element 'cwor' as ['indx', 'rele', 'rang', 'test'] + +class word(aetools.ComponentItem): + """word - This subdivides the text into words. """ + want = 'cwor' +# element 'catr' as ['indx', 'rele', 'rang', 'test'] +# element 'cha ' as ['indx', 'rele', 'rang', 'test'] +# element 'cpar' as ['indx', 'rele', 'rang', 'test'] +# element 'cwor' as ['indx', 'rele', 'rang', 'test'] + +words = word +attachment._superclassnames = ['text'] +attachment._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'file_name' : _Prop_file_name, +} +attachment._privelemdict = { + 'attribute_run' : attribute_run, + 'character' : character, + 'paragraph' : paragraph, + 'word' : word, +} +import Standard_Suite +attribute_run._superclassnames = ['item'] +attribute_run._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'color' : _Prop_color, + 'font' : _Prop_font, + 'size' : _Prop_size, +} +attribute_run._privelemdict = { + 'attribute_run' : attribute_run, + 'character' : character, + 'paragraph' : paragraph, + 'word' : word, +} +character._superclassnames = ['item'] +character._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'color' : _Prop_color, + 'font' : _Prop_font, + 'size' : _Prop_size, +} +character._privelemdict = { + 'attribute_run' : attribute_run, + 'character' : character, + 'paragraph' : paragraph, + 'word' : word, +} +paragraph._superclassnames = ['item'] +paragraph._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'color' : _Prop_color, + 'font' : _Prop_font, + 'size' : _Prop_size, +} +paragraph._privelemdict = { + 'attribute_run' : attribute_run, + 'character' : character, + 'paragraph' : paragraph, + 'word' : word, +} +text._superclassnames = ['item'] +text._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'color' : _Prop_color, + 'font' : _Prop_font, + 'size' : _Prop_size, +} +text._privelemdict = { + 'attribute_run' : attribute_run, + 'character' : character, + 'paragraph' : paragraph, + 'word' : word, +} +word._superclassnames = ['item'] +word._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'color' : _Prop_color, + 'font' : _Prop_font, + 'size' : _Prop_size, +} +word._privelemdict = { + 'attribute_run' : attribute_run, + 'character' : character, + 'paragraph' : paragraph, + 'word' : word, +} + +# +# Indices of types declared in this module +# +_classdeclarations = { + 'atts' : attachment, + 'catr' : attribute_run, + 'cha ' : character, + 'cpar' : paragraph, + 'ctxt' : text, + 'cwor' : word, +} + +_propdeclarations = { + 'atfn' : _Prop_file_name, + 'c@#^' : _Prop__3c_Inheritance_3e_, + 'colr' : _Prop_color, + 'font' : _Prop_font, + 'ptsz' : _Prop_size, +} + +_compdeclarations = { +} + +_enumdeclarations = { +} diff --git a/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/__init__.py b/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/__init__.py new file mode 100644 index 000000000..47b75f2ae --- /dev/null +++ b/sys/lib/python/plat-mac/lib-scriptpackages/Terminal/__init__.py @@ -0,0 +1,89 @@ +""" +Package generated from /Applications/Utilities/Terminal.app +""" +import aetools +Error = aetools.Error +import Standard_Suite +import Text_Suite +import Terminal_Suite + + +_code_to_module = { + '????' : Standard_Suite, + '????' : Text_Suite, + 'trmx' : Terminal_Suite, +} + + + +_code_to_fullname = { + '????' : ('Terminal.Standard_Suite', 'Standard_Suite'), + '????' : ('Terminal.Text_Suite', 'Text_Suite'), + 'trmx' : ('Terminal.Terminal_Suite', 'Terminal_Suite'), +} + +from Standard_Suite import * +from Text_Suite import * +from Terminal_Suite import * + +def getbaseclasses(v): + if not getattr(v, '_propdict', None): + v._propdict = {} + v._elemdict = {} + for superclassname in getattr(v, '_superclassnames', []): + superclass = eval(superclassname) + getbaseclasses(superclass) + v._propdict.update(getattr(superclass, '_propdict', {})) + v._elemdict.update(getattr(superclass, '_elemdict', {})) + v._propdict.update(getattr(v, '_privpropdict', {})) + v._elemdict.update(getattr(v, '_privelemdict', {})) + +import StdSuites + +# +# Set property and element dictionaries now that all classes have been defined +# +getbaseclasses(color) +getbaseclasses(window) +getbaseclasses(application) +getbaseclasses(item) +getbaseclasses(document) +getbaseclasses(window) +getbaseclasses(application) +getbaseclasses(character) +getbaseclasses(attachment) +getbaseclasses(paragraph) +getbaseclasses(word) +getbaseclasses(attribute_run) +getbaseclasses(text) + +# +# Indices of types declared in this module +# +_classdeclarations = { + 'colr' : color, + 'cwin' : window, + 'capp' : application, + 'cobj' : item, + 'docu' : document, + 'cwin' : window, + 'capp' : application, + 'cha ' : character, + 'atts' : attachment, + 'cpar' : paragraph, + 'cwor' : word, + 'catr' : attribute_run, + 'ctxt' : text, +} + + +class Terminal(Standard_Suite_Events, + Text_Suite_Events, + Terminal_Suite_Events, + aetools.TalkTo): + _signature = 'trmx' + + _moduleName = 'Terminal' + + _elemdict = application._elemdict + _propdict = application._propdict |