Commit 3eb593c3 authored by Jack Jansen's avatar Jack Jansen

Oops, _propdeclarations and friends are needed: gensuitemodule uses them

to lookup properties declared in base classes. Looking at it I'm not sure
what the official scope if the property codes is, maybe it is only the
(OSA) class in which they are used. But giving them global scope hasn't been
a problem so far.

Regenerated the standard suites, which are now also space-indented.
parent 15eb9842
...@@ -26,9 +26,9 @@ else: ...@@ -26,9 +26,9 @@ else:
# end of lines, so don't worry about that. # end of lines, so don't worry about that.
# #
if sys.platform == 'mac': if sys.platform == 'mac':
_MWERKSDIR="Sap:Applications (Mac OS 9):Metrowerks CodeWarrior 7.0:Metrowerks CodeWarrior" _MWERKSDIR="Moes:Applications (Mac OS 9):Metrowerks CodeWarrior 7.0:Metrowerks CodeWarrior"
else: else:
_MWERKSDIR="/Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/" _MWERKSDIR="/Volumes/Moes/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/"
INCLUDEDIR=os.path.join(_MWERKSDIR, "MacOS Support", "Universal", "Interfaces", "CIncludes") INCLUDEDIR=os.path.join(_MWERKSDIR, "MacOS Support", "Universal", "Interfaces", "CIncludes")
# #
......
...@@ -987,8 +987,6 @@ class ObjectCompiler: ...@@ -987,8 +987,6 @@ class ObjectCompiler:
if self.fp: if self.fp:
self.fp.write("\n_Prop_%s = _Prop_%s\n"%(pname, othername)) self.fp.write("\n_Prop_%s = _Prop_%s\n"%(pname, othername))
else: else:
if self.hasname(pname):
pass
if self.fp: if self.fp:
self.fp.write("class _Prop_%s(aetools.NProperty):\n" % pname) self.fp.write("class _Prop_%s(aetools.NProperty):\n" % pname)
self.fp.write(' """%s - %s """\n' % (ascii(name), ascii(what[1]))) self.fp.write(' """%s - %s """\n' % (ascii(name), ascii(what[1])))
...@@ -1108,26 +1106,26 @@ class ObjectCompiler: ...@@ -1108,26 +1106,26 @@ class ObjectCompiler:
self.fp.write(" %s : %s,\n" % (`k`, v)) self.fp.write(" %s : %s,\n" % (`k`, v))
self.fp.write("}\n") self.fp.write("}\n")
## self.fp.write("\n_propdeclarations = {\n") self.fp.write("\n_propdeclarations = {\n")
## proplist = self.namemappers[0].getall('property') proplist = self.namemappers[0].getall('property')
## proplist.sort() proplist.sort()
## for k, v in proplist: for k, v in proplist:
## self.fp.write(" %s : _Prop_%s,\n" % (`k`, v)) self.fp.write(" %s : _Prop_%s,\n" % (`k`, v))
## self.fp.write("}\n") self.fp.write("}\n")
##
## self.fp.write("\n_compdeclarations = {\n") self.fp.write("\n_compdeclarations = {\n")
## complist = self.namemappers[0].getall('comparison') complist = self.namemappers[0].getall('comparison')
## complist.sort() complist.sort()
## for k, v in complist: for k, v in complist:
## self.fp.write(" %s : %s,\n" % (`k`, v)) self.fp.write(" %s : %s,\n" % (`k`, v))
## self.fp.write("}\n") self.fp.write("}\n")
##
## self.fp.write("\n_enumdeclarations = {\n") self.fp.write("\n_enumdeclarations = {\n")
## enumlist = self.namemappers[0].getall('enum') enumlist = self.namemappers[0].getall('enum')
## enumlist.sort() enumlist.sort()
## for k, v in enumlist: for k, v in enumlist:
## self.fp.write(" %s : %s,\n" % (`k`, v)) self.fp.write(" %s : %s,\n" % (`k`, v))
## self.fp.write("}\n") self.fp.write("}\n")
def compiledata(data): def compiledata(data):
[type, description, flags] = data [type, description, flags] = data
......
...@@ -13,35 +13,35 @@ _code = 'reqd' ...@@ -13,35 +13,35 @@ _code = 'reqd'
from StdSuites.Required_Suite import * from StdSuites.Required_Suite import *
class Required_Events(Required_Suite_Events): class Required_Events(Required_Suite_Events):
_argmap_open = { _argmap_open = {
'converting' : 'Conv', 'converting' : 'Conv',
} }
def open(self, _object, _attributes={}, **_arguments): def open(self, _object, _attributes={}, **_arguments):
"""open: Open the specified object(s) """open: Open the specified object(s)
Required argument: list of objects to open Required argument: list of objects to open
Keyword argument converting: Whether to convert project to latest version (yes/no; default is ask). Keyword argument converting: Whether to convert project to latest version (yes/no; default is ask).
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'aevt' _code = 'aevt'
_subcode = 'odoc' _subcode = 'odoc'
aetools.keysubst(_arguments, self._argmap_open) aetools.keysubst(_arguments, self._argmap_open)
_arguments['----'] = _object _arguments['----'] = _object
aetools.enumsubst(_arguments, 'Conv', _Enum_Conv) aetools.enumsubst(_arguments, 'Conv', _Enum_Conv)
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
_Enum_Conv = { _Enum_Conv = {
'yes' : 'yes ', # Convert the project if necessary on open 'yes' : 'yes ', # Convert the project if necessary on open
'no' : 'no ', # Do not convert the project if needed on open 'no' : 'no ', # Do not convert the project if needed on open
} }
...@@ -50,3 +50,13 @@ _Enum_Conv = { ...@@ -50,3 +50,13 @@ _Enum_Conv = {
# #
_classdeclarations = { _classdeclarations = {
} }
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
'Conv' : _Enum_Conv,
}
...@@ -10,19 +10,19 @@ import Required ...@@ -10,19 +10,19 @@ import Required
_code_to_module = { _code_to_module = {
'CWIE' : CodeWarrior_suite, 'CWIE' : CodeWarrior_suite,
'CoRe' : Standard_Suite, 'CoRe' : Standard_Suite,
'MMPR' : Metrowerks_Shell_Suite, 'MMPR' : Metrowerks_Shell_Suite,
'reqd' : Required, 'reqd' : Required,
} }
_code_to_fullname = { _code_to_fullname = {
'CWIE' : ('CodeWarrior.CodeWarrior_suite', 'CodeWarrior_suite'), 'CWIE' : ('CodeWarrior.CodeWarrior_suite', 'CodeWarrior_suite'),
'CoRe' : ('CodeWarrior.Standard_Suite', 'Standard_Suite'), 'CoRe' : ('CodeWarrior.Standard_Suite', 'Standard_Suite'),
'MMPR' : ('CodeWarrior.Metrowerks_Shell_Suite', 'Metrowerks_Shell_Suite'), 'MMPR' : ('CodeWarrior.Metrowerks_Shell_Suite', 'Metrowerks_Shell_Suite'),
'reqd' : ('CodeWarrior.Required', 'Required'), 'reqd' : ('CodeWarrior.Required', 'Required'),
} }
from CodeWarrior_suite import * from CodeWarrior_suite import *
...@@ -31,31 +31,22 @@ from Metrowerks_Shell_Suite import * ...@@ -31,31 +31,22 @@ from Metrowerks_Shell_Suite import *
from Required import * from Required import *
def getbaseclasses(v): def getbaseclasses(v):
if not getattr(v, '_propdict', None): if not getattr(v, '_propdict', None):
v._propdict = {} v._propdict = {}
v._elemdict = {} v._elemdict = {}
for superclassname in getattr(v, '_superclassnames', []): for superclassname in getattr(v, '_superclassnames', []):
superclass = eval(superclassname) superclass = eval(superclassname)
getbaseclasses(superclass) getbaseclasses(superclass)
v._propdict.update(getattr(superclass, '_propdict', {})) v._propdict.update(getattr(superclass, '_propdict', {}))
v._elemdict.update(getattr(superclass, '_elemdict', {})) v._elemdict.update(getattr(superclass, '_elemdict', {}))
v._propdict.update(getattr(v, '_privpropdict', {})) v._propdict.update(getattr(v, '_privpropdict', {}))
v._elemdict.update(getattr(v, '_privelemdict', {})) v._elemdict.update(getattr(v, '_privelemdict', {}))
import StdSuites import StdSuites
# #
# Set property and element dictionaries now that all classes have been defined # Set property and element dictionaries now that all classes have been defined
# #
getbaseclasses(character)
getbaseclasses(text)
getbaseclasses(window)
getbaseclasses(file)
getbaseclasses(line)
getbaseclasses(selection_2d_object)
getbaseclasses(application)
getbaseclasses(insertion_point)
getbaseclasses(document)
getbaseclasses(single_class_browser) getbaseclasses(single_class_browser)
getbaseclasses(project_document) getbaseclasses(project_document)
getbaseclasses(symbol_browser) getbaseclasses(symbol_browser)
...@@ -109,82 +100,91 @@ getbaseclasses(Font) ...@@ -109,82 +100,91 @@ getbaseclasses(Font)
getbaseclasses(Target_Source_Trees) getbaseclasses(Target_Source_Trees)
getbaseclasses(Debugger_Display) getbaseclasses(Debugger_Display)
getbaseclasses(class_) getbaseclasses(class_)
getbaseclasses(character)
getbaseclasses(text)
getbaseclasses(window)
getbaseclasses(file)
getbaseclasses(line)
getbaseclasses(selection_2d_object)
getbaseclasses(application)
getbaseclasses(insertion_point)
getbaseclasses(document)
# #
# Indices of types declared in this module # Indices of types declared in this module
# #
_classdeclarations = { _classdeclarations = {
'cha ' : character, '1BRW' : single_class_browser,
'ctxt' : text, 'PRJD' : project_document,
'cwin' : window, 'SYMB' : symbol_browser,
'file' : file, 'EDIT' : editor_document,
'clin' : line, 'COMP' : file_compare_document,
'csel' : selection_2d_object, 'BROW' : class_browser,
'capp' : application, 'SBTG' : subtarget,
'cins' : insertion_point, 'MSSG' : message_document,
'docu' : document, 'INSP' : project_inspector,
'1BRW' : single_class_browser, 'TXTD' : text_document,
'PRJD' : project_document, 'CTLG' : catalog_document,
'SYMB' : symbol_browser, 'HIER' : class_hierarchy,
'EDIT' : editor_document, 'TRGT' : target,
'COMP' : file_compare_document, 'PRGS' : build_progress_document,
'BROW' : class_browser, 'SRCF' : target_file,
'SBTG' : subtarget, 'TOOL' : ToolServer_worksheet,
'MSSG' : message_document, '1HIR' : single_class_hierarchy,
'INSP' : project_inspector, 'FMap' : File_Mapping,
'TXTD' : text_document, 'Cata' : browser_catalog,
'CTLG' : catalog_document, 'BSTG' : Build_Settings,
'HIER' : class_hierarchy, 'SrcF' : ProjectFile,
'TRGT' : target, 'BRKW' : Browser_Coloring,
'PRGS' : build_progress_document, 'ErrM' : Error_Information,
'SRCF' : target_file, 'VCSs' : VCS_Setup,
'TOOL' : ToolServer_worksheet, 'EDTR' : Editor,
'1HIR' : single_class_hierarchy, 'SHFL' : Shielded_Folders,
'FMap' : File_Mapping, 'SFit' : Shielded_Folder,
'Cata' : browser_catalog, 'CUKW' : Custom_Keywords,
'BSTG' : Build_Settings, 'PInf' : Path_Information,
'SrcF' : ProjectFile, 'FLMP' : File_Mappings,
'BRKW' : Browser_Coloring, 'Seg ' : Segment,
'ErrM' : Error_Information, 'DbTG' : Debugger_Target,
'VCSs' : VCS_Setup, 'FDef' : Function_Information,
'EDTR' : Editor, 'PATH' : Access_Paths,
'SHFL' : Shielded_Folders, 'GXTR' : Extras,
'SFit' : Shielded_Folder, 'DbWN' : Debugger_Windowing,
'CUKW' : Custom_Keywords, 'GSTs' : Global_Source_Trees,
'PInf' : Path_Information, 'SNTX' : Syntax_Coloring,
'FLMP' : File_Mappings, 'BsCl' : base_class,
'Seg ' : Segment, 'RlPt' : Relative_Path,
'DbTG' : Debugger_Target, 'TARG' : Target_Settings,
'FDef' : Function_Information, 'EnvV' : Environment_Variable,
'PATH' : Access_Paths, 'SrcT' : Source_Tree,
'GXTR' : Extras, 'DbGL' : Debugger_Global,
'DbWN' : Debugger_Windowing, 'MbFn' : member_function,
'GSTs' : Global_Source_Trees, 'RSTG' : Runtime_Settings,
'SNTX' : Syntax_Coloring, 'PSTG' : Plugin_Settings,
'BsCl' : base_class, 'DtMb' : data_member,
'RlPt' : Relative_Path, 'LXTR' : Build_Extras,
'TARG' : Target_Settings, 'mFNT' : Font,
'EnvV' : Environment_Variable, 'TSTs' : Target_Source_Trees,
'SrcT' : Source_Tree, 'DbDS' : Debugger_Display,
'DbGL' : Debugger_Global, 'Clas' : class_,
'MbFn' : member_function, 'cha ' : character,
'RSTG' : Runtime_Settings, 'ctxt' : text,
'PSTG' : Plugin_Settings, 'cwin' : window,
'DtMb' : data_member, 'file' : file,
'LXTR' : Build_Extras, 'clin' : line,
'mFNT' : Font, 'csel' : selection_2d_object,
'TSTs' : Target_Source_Trees, 'capp' : application,
'DbDS' : Debugger_Display, 'cins' : insertion_point,
'Clas' : class_, 'docu' : document,
} }
class CodeWarrior(CodeWarrior_suite_Events, class CodeWarrior(CodeWarrior_suite_Events,
Standard_Suite_Events, Standard_Suite_Events,
Metrowerks_Shell_Suite_Events, Metrowerks_Shell_Suite_Events,
Required_Events, Required_Events,
aetools.TalkTo): aetools.TalkTo):
_signature = 'CWIE' _signature = 'CWIE'
_moduleName = 'CodeWarrior' _moduleName = 'CodeWarrior'
...@@ -12,72 +12,72 @@ _code = 'MSIE' ...@@ -12,72 +12,72 @@ _code = 'MSIE'
class Microsoft_Internet_Explorer_Events: class Microsoft_Internet_Explorer_Events:
def GetSource(self, _object=None, _attributes={}, **_arguments): def GetSource(self, _object=None, _attributes={}, **_arguments):
"""GetSource: Get the HTML source of a browser window """GetSource: Get the HTML source of a browser window
Required argument: Window Identifier of window from which to get the source. No value means get the source from the frontmost window. Required argument: Window Identifier of window from which to get the source. No value means get the source from the frontmost window.
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
Returns: undocumented, typecode 'TEXT' Returns: undocumented, typecode 'TEXT'
""" """
_code = 'MSIE' _code = 'MSIE'
_subcode = 'SORC' _subcode = 'SORC'
if _arguments: raise TypeError, 'No optional args expected' if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
def PrintBrowserWindow(self, _object=None, _attributes={}, **_arguments): def PrintBrowserWindow(self, _object=None, _attributes={}, **_arguments):
"""PrintBrowserWindow: Print contents of browser window (HTML) """PrintBrowserWindow: Print contents of browser window (HTML)
Required argument: Window Identifier of the window to print. No value means print the frontmost browser window. Required argument: Window Identifier of the window to print. No value means print the frontmost browser window.
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'misc' _code = 'misc'
_subcode = 'pWND' _subcode = 'pWND'
if _arguments: raise TypeError, 'No optional args expected' if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
_argmap_do_script = { _argmap_do_script = {
'window' : 'WIND', 'window' : 'WIND',
} }
def do_script(self, _object, _attributes={}, **_arguments): def do_script(self, _object, _attributes={}, **_arguments):
"""do script: Execute script commands """do script: Execute script commands
Required argument: JavaScript text to execute Required argument: JavaScript text to execute
Keyword argument window: optional Window Identifier (as supplied by the ListWindows event) specifying context in which to execute the script Keyword argument window: optional Window Identifier (as supplied by the ListWindows event) specifying context in which to execute the script
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Return value Returns: Return value
""" """
_code = 'misc' _code = 'misc'
_subcode = 'dosc' _subcode = 'dosc'
aetools.keysubst(_arguments, self._argmap_do_script) aetools.keysubst(_arguments, self._argmap_do_script)
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
# #
...@@ -85,3 +85,12 @@ class Microsoft_Internet_Explorer_Events: ...@@ -85,3 +85,12 @@ class Microsoft_Internet_Explorer_Events:
# #
_classdeclarations = { _classdeclarations = {
} }
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}
...@@ -12,25 +12,25 @@ _code = 'MOSS' ...@@ -12,25 +12,25 @@ _code = 'MOSS'
class Netscape_Suite_Events: class Netscape_Suite_Events:
def Open_bookmark(self, _object=None, _attributes={}, **_arguments): def Open_bookmark(self, _object=None, _attributes={}, **_arguments):
"""Open bookmark: Opens a bookmark file """Open bookmark: Opens a bookmark file
Required argument: If not available, reloads the current bookmark file Required argument: If not available, reloads the current bookmark file
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'MOSS' _code = 'MOSS'
_subcode = 'book' _subcode = 'book'
if _arguments: raise TypeError, 'No optional args expected' if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
# #
...@@ -38,3 +38,12 @@ class Netscape_Suite_Events: ...@@ -38,3 +38,12 @@ class Netscape_Suite_Events:
# #
_classdeclarations = { _classdeclarations = {
} }
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}
...@@ -13,83 +13,83 @@ _code = 'reqd' ...@@ -13,83 +13,83 @@ _code = 'reqd'
from StdSuites.Required_Suite import * from StdSuites.Required_Suite import *
class Required_Suite_Events(Required_Suite_Events): class Required_Suite_Events(Required_Suite_Events):
def open(self, _object, _attributes={}, **_arguments): def open(self, _object, _attributes={}, **_arguments):
"""open: Open documents """open: Open documents
Required argument: undocumented, typecode 'alis' Required argument: undocumented, typecode 'alis'
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'aevt' _code = 'aevt'
_subcode = 'odoc' _subcode = 'odoc'
if _arguments: raise TypeError, 'No optional args expected' if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
def print_(self, _object, _attributes={}, **_arguments): def print_(self, _object, _attributes={}, **_arguments):
"""print: Print documents """print: Print documents
Required argument: undocumented, typecode 'alis' Required argument: undocumented, typecode 'alis'
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'aevt' _code = 'aevt'
_subcode = 'pdoc' _subcode = 'pdoc'
if _arguments: raise TypeError, 'No optional args expected' if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
def quit(self, _no_object=None, _attributes={}, **_arguments): def quit(self, _no_object=None, _attributes={}, **_arguments):
"""quit: Quit application """quit: Quit application
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'aevt' _code = 'aevt'
_subcode = 'quit' _subcode = 'quit'
if _arguments: raise TypeError, 'No optional args expected' if _arguments: raise TypeError, 'No optional args expected'
if _no_object != None: raise TypeError, 'No direct arg expected' if _no_object != None: raise TypeError, 'No direct arg expected'
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
def run(self, _no_object=None, _attributes={}, **_arguments): def run(self, _no_object=None, _attributes={}, **_arguments):
"""run: """run:
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'aevt' _code = 'aevt'
_subcode = 'oapp' _subcode = 'oapp'
if _arguments: raise TypeError, 'No optional args expected' if _arguments: raise TypeError, 'No optional args expected'
if _no_object != None: raise TypeError, 'No direct arg expected' if _no_object != None: raise TypeError, 'No direct arg expected'
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
# #
...@@ -97,3 +97,12 @@ class Required_Suite_Events(Required_Suite_Events): ...@@ -97,3 +97,12 @@ class Required_Suite_Events(Required_Suite_Events):
# #
_classdeclarations = { _classdeclarations = {
} }
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}
...@@ -12,43 +12,43 @@ _code = '****' ...@@ -12,43 +12,43 @@ _code = '****'
class Standard_Suite_Events: class Standard_Suite_Events:
_argmap_get = { _argmap_get = {
'as' : 'rtyp', 'as' : 'rtyp',
} }
def get(self, _object, _attributes={}, **_arguments): def get(self, _object, _attributes={}, **_arguments):
"""get: """get:
Required argument: an AE object reference Required argument: an AE object reference
Keyword argument as: undocumented, typecode 'type' Keyword argument as: undocumented, typecode 'type'
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
Returns: anything Returns: anything
""" """
_code = 'core' _code = 'core'
_subcode = 'getd' _subcode = 'getd'
aetools.keysubst(_arguments, self._argmap_get) aetools.keysubst(_arguments, self._argmap_get)
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
class application(aetools.ComponentItem): class application(aetools.ComponentItem):
"""application - An application program """ """application - An application program """
want = 'capp' want = 'capp'
class _Prop_selected_text(aetools.NProperty): class _Prop_selected_text(aetools.NProperty):
"""selected text - the selected text """ """selected text - the selected text """
which = 'stxt' which = 'stxt'
want = 'TEXT' want = 'TEXT'
application._superclassnames = [] application._superclassnames = []
application._privpropdict = { application._privpropdict = {
'selected_text' : _Prop_selected_text, 'selected_text' : _Prop_selected_text,
} }
application._privelemdict = { application._privelemdict = {
} }
...@@ -57,5 +57,15 @@ application._privelemdict = { ...@@ -57,5 +57,15 @@ application._privelemdict = {
# Indices of types declared in this module # Indices of types declared in this module
# #
_classdeclarations = { _classdeclarations = {
'capp' : application, 'capp' : application,
}
_propdeclarations = {
'stxt' : _Prop_selected_text,
}
_compdeclarations = {
}
_enumdeclarations = {
} }
...@@ -12,30 +12,30 @@ _code = 'GURL' ...@@ -12,30 +12,30 @@ _code = 'GURL'
class URL_Suite_Events: class URL_Suite_Events:
_argmap_GetURL = { _argmap_GetURL = {
'to' : 'dest', 'to' : 'dest',
} }
def GetURL(self, _object, _attributes={}, **_arguments): def GetURL(self, _object, _attributes={}, **_arguments):
"""GetURL: Open the URL (and optionally save it to disk) """GetURL: Open the URL (and optionally save it to disk)
Required argument: URL to open Required argument: URL to open
Keyword argument to: File into which to save resource located at URL. Keyword argument to: File into which to save resource located at URL.
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'GURL' _code = 'GURL'
_subcode = 'GURL' _subcode = 'GURL'
aetools.keysubst(_arguments, self._argmap_GetURL) aetools.keysubst(_arguments, self._argmap_GetURL)
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
# #
...@@ -43,3 +43,12 @@ class URL_Suite_Events: ...@@ -43,3 +43,12 @@ class URL_Suite_Events:
# #
_classdeclarations = { _classdeclarations = {
} }
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}
...@@ -12,23 +12,23 @@ import Required_Suite ...@@ -12,23 +12,23 @@ import Required_Suite
_code_to_module = { _code_to_module = {
'****' : Standard_Suite, '****' : Standard_Suite,
'GURL' : URL_Suite, 'GURL' : URL_Suite,
'MOSS' : Netscape_Suite, 'MOSS' : Netscape_Suite,
'MSIE' : Microsoft_Internet_Explorer, 'MSIE' : Microsoft_Internet_Explorer,
'WWW!' : Web_Browser_Suite, 'WWW!' : Web_Browser_Suite,
'reqd' : Required_Suite, 'reqd' : Required_Suite,
} }
_code_to_fullname = { _code_to_fullname = {
'****' : ('Explorer.Standard_Suite', 'Standard_Suite'), '****' : ('Explorer.Standard_Suite', 'Standard_Suite'),
'GURL' : ('Explorer.URL_Suite', 'URL_Suite'), 'GURL' : ('Explorer.URL_Suite', 'URL_Suite'),
'MOSS' : ('Explorer.Netscape_Suite', 'Netscape_Suite'), 'MOSS' : ('Explorer.Netscape_Suite', 'Netscape_Suite'),
'MSIE' : ('Explorer.Microsoft_Internet_Explorer', 'Microsoft_Internet_Explorer'), 'MSIE' : ('Explorer.Microsoft_Internet_Explorer', 'Microsoft_Internet_Explorer'),
'WWW!' : ('Explorer.Web_Browser_Suite', 'Web_Browser_Suite'), 'WWW!' : ('Explorer.Web_Browser_Suite', 'Web_Browser_Suite'),
'reqd' : ('Explorer.Required_Suite', 'Required_Suite'), 'reqd' : ('Explorer.Required_Suite', 'Required_Suite'),
} }
from Standard_Suite import * from Standard_Suite import *
...@@ -39,16 +39,16 @@ from Web_Browser_Suite import * ...@@ -39,16 +39,16 @@ from Web_Browser_Suite import *
from Required_Suite import * from Required_Suite import *
def getbaseclasses(v): def getbaseclasses(v):
if not getattr(v, '_propdict', None): if not getattr(v, '_propdict', None):
v._propdict = {} v._propdict = {}
v._elemdict = {} v._elemdict = {}
for superclassname in getattr(v, '_superclassnames', []): for superclassname in getattr(v, '_superclassnames', []):
superclass = eval(superclassname) superclass = eval(superclassname)
getbaseclasses(superclass) getbaseclasses(superclass)
v._propdict.update(getattr(superclass, '_propdict', {})) v._propdict.update(getattr(superclass, '_propdict', {}))
v._elemdict.update(getattr(superclass, '_elemdict', {})) v._elemdict.update(getattr(superclass, '_elemdict', {}))
v._propdict.update(getattr(v, '_privpropdict', {})) v._propdict.update(getattr(v, '_privpropdict', {}))
v._elemdict.update(getattr(v, '_privelemdict', {})) v._elemdict.update(getattr(v, '_privelemdict', {}))
import StdSuites import StdSuites
...@@ -61,18 +61,18 @@ getbaseclasses(application) ...@@ -61,18 +61,18 @@ getbaseclasses(application)
# Indices of types declared in this module # Indices of types declared in this module
# #
_classdeclarations = { _classdeclarations = {
'capp' : application, 'capp' : application,
} }
class Explorer(Standard_Suite_Events, class Explorer(Standard_Suite_Events,
URL_Suite_Events, URL_Suite_Events,
Netscape_Suite_Events, Netscape_Suite_Events,
Microsoft_Internet_Explorer_Events, Microsoft_Internet_Explorer_Events,
Web_Browser_Suite_Events, Web_Browser_Suite_Events,
Required_Suite_Events, Required_Suite_Events,
aetools.TalkTo): aetools.TalkTo):
_signature = 'MSIE' _signature = 'MSIE'
_moduleName = 'Explorer' _moduleName = 'Explorer'
...@@ -13,109 +13,109 @@ _code = 'tpnm' ...@@ -13,109 +13,109 @@ _code = 'tpnm'
from StdSuites.Type_Names_Suite import * from StdSuites.Type_Names_Suite import *
class Enumerations_Events(Type_Names_Suite_Events): class Enumerations_Events(Type_Names_Suite_Events):
pass pass
_Enum_earr = { _Enum_earr = {
'not_arranged' : 'narr', # 'not_arranged' : 'narr', #
'snap_to_grid' : 'grda', # 'snap_to_grid' : 'grda', #
'arranged_by_name' : 'nama', # 'arranged_by_name' : 'nama', #
'arranged_by_modification_date' : 'mdta', # 'arranged_by_modification_date' : 'mdta', #
'arranged_by_creation_date' : 'cdta', # 'arranged_by_creation_date' : 'cdta', #
'arranged_by_size' : 'siza', # 'arranged_by_size' : 'siza', #
'arranged_by_kind' : 'kina', # 'arranged_by_kind' : 'kina', #
'arranged_by_label' : 'laba', # 'arranged_by_label' : 'laba', #
} }
_Enum_ecvw = { _Enum_ecvw = {
'icon_view' : 'icnv', # 'icon_view' : 'icnv', #
'list_view' : 'lsvw', # 'list_view' : 'lsvw', #
'column_view' : 'clvw', # 'column_view' : 'clvw', #
} }
_Enum_edfm = { _Enum_edfm = {
'Mac_OS_format' : 'dfhf', # 'Mac_OS_format' : 'dfhf', #
'Mac_OS_Extended_format' : 'dfh+', # 'Mac_OS_Extended_format' : 'dfh+', #
'UFS_format' : 'dfuf', # 'UFS_format' : 'dfuf', #
'NFS_format' : 'dfnf', # 'NFS_format' : 'dfnf', #
'audio_format' : 'dfau', # 'audio_format' : 'dfau', #
'ProDOS_format' : 'dfpr', # 'ProDOS_format' : 'dfpr', #
'MS_2d_DOS_format' : 'dfms', # 'MS_2d_DOS_format' : 'dfms', #
'ISO_9660_format' : 'df96', # 'ISO_9660_format' : 'df96', #
'High_Sierra_format' : 'dfhs', # 'High_Sierra_format' : 'dfhs', #
'QuickTake_format' : 'dfqt', # 'QuickTake_format' : 'dfqt', #
'Apple_Photo_format' : 'dfph', # 'Apple_Photo_format' : 'dfph', #
'AppleShare_format' : 'dfas', # 'AppleShare_format' : 'dfas', #
'UDF_format' : 'dfud', # 'UDF_format' : 'dfud', #
'WebDAV_format' : 'dfwd', # 'WebDAV_format' : 'dfwd', #
'FTP_format' : 'dfft', # 'FTP_format' : 'dfft', #
'Packet_2d_written_UDF_format' : 'dfpu', # 'Packet_2d_written_UDF_format' : 'dfpu', #
'unknown_format' : 'df??', # 'unknown_format' : 'df??', #
} }
_Enum_elsv = { _Enum_elsv = {
'name_column' : 'elsn', # 'name_column' : 'elsn', #
'modification_date_column' : 'elsm', # 'modification_date_column' : 'elsm', #
'creation_date_column' : 'elsc', # 'creation_date_column' : 'elsc', #
'size_column' : 'elss', # 'size_column' : 'elss', #
'kind_column' : 'elsk', # 'kind_column' : 'elsk', #
'label_column' : 'elsl', # 'label_column' : 'elsl', #
'version_column' : 'elsv', # 'version_column' : 'elsv', #
'comment_column' : 'elsC', # 'comment_column' : 'elsC', #
} }
_Enum_ipnl = { _Enum_ipnl = {
'General_Information_panel' : 'gpnl', # 'General_Information_panel' : 'gpnl', #
'Sharing_panel' : 'spnl', # 'Sharing_panel' : 'spnl', #
'Memory_panel' : 'mpnl', # 'Memory_panel' : 'mpnl', #
'Preview_panel' : 'vpnl', # 'Preview_panel' : 'vpnl', #
'Application_panel' : 'apnl', # 'Application_panel' : 'apnl', #
'Languages_panel' : 'pklg', # 'Languages_panel' : 'pklg', #
'Plugins_panel' : 'pkpg', # 'Plugins_panel' : 'pkpg', #
'Name__26__Extension_panel' : 'npnl', # 'Name__26__Extension_panel' : 'npnl', #
'Comments_panel' : 'cpnl', # 'Comments_panel' : 'cpnl', #
'Content_Index_panel' : 'cinl', # 'Content_Index_panel' : 'cinl', #
} }
_Enum_isiz = { _Enum_isiz = {
'mini' : 'miic', # 'mini' : 'miic', #
'small' : 'smic', # 'small' : 'smic', #
'large' : 'lgic', # 'large' : 'lgic', #
} }
_Enum_lvic = { _Enum_lvic = {
'small_icon' : 'smic', # 'small_icon' : 'smic', #
'large_icon' : 'lgic', # 'large_icon' : 'lgic', #
} }
_Enum_priv = { _Enum_priv = {
'read_only' : 'read', # 'read_only' : 'read', #
'read_write' : 'rdwr', # 'read_write' : 'rdwr', #
'write_only' : 'writ', # 'write_only' : 'writ', #
'none' : 'none', # 'none' : 'none', #
} }
_Enum_sodr = { _Enum_sodr = {
'normal' : 'snrm', # 'normal' : 'snrm', #
'reversed' : 'srvs', # 'reversed' : 'srvs', #
} }
_Enum_vwby = { _Enum_vwby = {
'conflicts' : 'cflc', # 'conflicts' : 'cflc', #
'existing_items' : 'exsi', # 'existing_items' : 'exsi', #
'small_icon' : 'smic', # 'small_icon' : 'smic', #
'icon' : 'iimg', # 'icon' : 'iimg', #
'name' : 'pnam', # 'name' : 'pnam', #
'modification_date' : 'asmo', # 'modification_date' : 'asmo', #
'size' : 'ptsz', # 'size' : 'ptsz', #
'kind' : 'kind', # 'kind' : 'kind', #
'comment' : 'comt', # 'comment' : 'comt', #
'label' : 'labi', # 'label' : 'labi', #
'version' : 'vers', # 'version' : 'vers', #
'creation_date' : 'ascd', # 'creation_date' : 'ascd', #
'small_button' : 'smbu', # 'small_button' : 'smbu', #
'large_button' : 'lgbu', # 'large_button' : 'lgbu', #
'grid' : 'grid', # 'grid' : 'grid', #
'all' : 'kyal', # 'all' : 'kyal', #
} }
...@@ -124,3 +124,22 @@ _Enum_vwby = { ...@@ -124,3 +124,22 @@ _Enum_vwby = {
# #
_classdeclarations = { _classdeclarations = {
} }
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
'earr' : _Enum_earr,
'ecvw' : _Enum_ecvw,
'edfm' : _Enum_edfm,
'elsv' : _Enum_elsv,
'ipnl' : _Enum_ipnl,
'isiz' : _Enum_isiz,
'lvic' : _Enum_lvic,
'priv' : _Enum_priv,
'sodr' : _Enum_sodr,
'vwby' : _Enum_vwby,
}
...@@ -12,164 +12,164 @@ _code = 'fndr' ...@@ -12,164 +12,164 @@ _code = 'fndr'
class Files_Events: class Files_Events:
pass pass
class alias_file(aetools.ComponentItem): class alias_file(aetools.ComponentItem):
"""alias file - An alias file (created with \xd2Make Alias\xd3) """ """alias file - An alias file (created with \xd2Make Alias\xd3) """
want = 'alia' want = 'alia'
class _Prop__3c_Inheritance_3e_(aetools.NProperty): class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - inherits some of its properties from the file class """ """<Inheritance> - inherits some of its properties from the file class """
which = 'c@#^' which = 'c@#^'
want = 'file' want = 'file'
class _Prop_original_item(aetools.NProperty): class _Prop_original_item(aetools.NProperty):
"""original item - the original item pointed to by the alias """ """original item - the original item pointed to by the alias """
which = 'orig' which = 'orig'
want = 'obj ' want = 'obj '
alias_files = alias_file alias_files = alias_file
class application_file(aetools.ComponentItem): class application_file(aetools.ComponentItem):
"""application file - An application's file on disk """ """application file - An application's file on disk """
want = 'appf' want = 'appf'
class _Prop_accepts_high_level_events(aetools.NProperty): class _Prop_accepts_high_level_events(aetools.NProperty):
"""accepts high level events - Is the application high-level event aware? (OBSOLETE: always returns true) """ """accepts high level events - Is the application high-level event aware? (OBSOLETE: always returns true) """
which = 'isab' which = 'isab'
want = 'bool' want = 'bool'
class _Prop_has_scripting_terminology(aetools.NProperty): class _Prop_has_scripting_terminology(aetools.NProperty):
"""has scripting terminology - Does the process have a scripting terminology, i.e., can it be scripted? """ """has scripting terminology - Does the process have a scripting terminology, i.e., can it be scripted? """
which = 'hscr' which = 'hscr'
want = 'bool' want = 'bool'
class _Prop_minimum_size(aetools.NProperty): class _Prop_minimum_size(aetools.NProperty):
"""minimum size - the smallest memory size with which the application can be launched """ """minimum size - the smallest memory size with which the application can be launched """
which = 'mprt' which = 'mprt'
want = 'long' want = 'long'
class _Prop_opens_in_Classic(aetools.NProperty): class _Prop_opens_in_Classic(aetools.NProperty):
"""opens in Classic - Should the application launch in the Classic environment? """ """opens in Classic - Should the application launch in the Classic environment? """
which = 'Clsc' which = 'Clsc'
want = 'bool' want = 'bool'
class _Prop_preferred_size(aetools.NProperty): class _Prop_preferred_size(aetools.NProperty):
"""preferred size - the memory size with which the application will be launched """ """preferred size - the memory size with which the application will be launched """
which = 'appt' which = 'appt'
want = 'long' want = 'long'
class _Prop_suggested_size(aetools.NProperty): class _Prop_suggested_size(aetools.NProperty):
"""suggested size - the memory size with which the developer recommends the application be launched """ """suggested size - the memory size with which the developer recommends the application be launched """
which = 'sprt' which = 'sprt'
want = 'long' want = 'long'
application_files = application_file application_files = application_file
class clipping(aetools.ComponentItem): class clipping(aetools.ComponentItem):
"""clipping - A clipping """ """clipping - A clipping """
want = 'clpf' want = 'clpf'
class _Prop_clipping_window(aetools.NProperty): class _Prop_clipping_window(aetools.NProperty):
"""clipping window - (NOT AVAILABLE YET) the clipping window for this clipping """ """clipping window - (NOT AVAILABLE YET) the clipping window for this clipping """
which = 'lwnd' which = 'lwnd'
want = 'obj ' want = 'obj '
clippings = clipping clippings = clipping
class document_file(aetools.ComponentItem): class document_file(aetools.ComponentItem):
"""document file - A document file """ """document file - A document file """
want = 'docf' want = 'docf'
document_files = document_file document_files = document_file
class file(aetools.ComponentItem): class file(aetools.ComponentItem):
"""file - A file """ """file - A file """
want = 'file' want = 'file'
class _Prop_creator_type(aetools.NProperty): class _Prop_creator_type(aetools.NProperty):
"""creator type - the OSType identifying the application that created the item """ """creator type - the OSType identifying the application that created the item """
which = 'fcrt' which = 'fcrt'
want = 'type' want = 'type'
class _Prop_file_type(aetools.NProperty): class _Prop_file_type(aetools.NProperty):
"""file type - the OSType identifying the type of data contained in the item """ """file type - the OSType identifying the type of data contained in the item """
which = 'asty' which = 'asty'
want = 'type' want = 'type'
class _Prop_product_version(aetools.NProperty): class _Prop_product_version(aetools.NProperty):
"""product version - the version of the product (visible at the top of the \xd2Get Info\xd3 window) """ """product version - the version of the product (visible at the top of the \xd2Get Info\xd3 window) """
which = 'ver2' which = 'ver2'
want = 'utxt' want = 'utxt'
class _Prop_stationery(aetools.NProperty): class _Prop_stationery(aetools.NProperty):
"""stationery - Is the file a stationery pad? """ """stationery - Is the file a stationery pad? """
which = 'pspd' which = 'pspd'
want = 'bool' want = 'bool'
class _Prop_version(aetools.NProperty): class _Prop_version(aetools.NProperty):
"""version - the version of the file (visible at the bottom of the \xd2Get Info\xd3 window) """ """version - the version of the file (visible at the bottom of the \xd2Get Info\xd3 window) """
which = 'vers' which = 'vers'
want = 'utxt' want = 'utxt'
files = file files = file
class internet_location_file(aetools.ComponentItem): class internet_location_file(aetools.ComponentItem):
"""internet location file - An file containing an internet location """ """internet location file - An file containing an internet location """
want = 'inlf' want = 'inlf'
class _Prop_location(aetools.NProperty): class _Prop_location(aetools.NProperty):
"""location - the internet location """ """location - the internet location """
which = 'iloc' which = 'iloc'
want = 'utxt' want = 'utxt'
internet_location_files = internet_location_file internet_location_files = internet_location_file
class package(aetools.ComponentItem): class package(aetools.ComponentItem):
"""package - A package """ """package - A package """
want = 'pack' want = 'pack'
packages = package packages = package
alias_file._superclassnames = ['file'] alias_file._superclassnames = ['file']
alias_file._privpropdict = { alias_file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'original_item' : _Prop_original_item, 'original_item' : _Prop_original_item,
} }
alias_file._privelemdict = { alias_file._privelemdict = {
} }
application_file._superclassnames = ['file'] application_file._superclassnames = ['file']
application_file._privpropdict = { application_file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'accepts_high_level_events' : _Prop_accepts_high_level_events, 'accepts_high_level_events' : _Prop_accepts_high_level_events,
'has_scripting_terminology' : _Prop_has_scripting_terminology, 'has_scripting_terminology' : _Prop_has_scripting_terminology,
'minimum_size' : _Prop_minimum_size, 'minimum_size' : _Prop_minimum_size,
'opens_in_Classic' : _Prop_opens_in_Classic, 'opens_in_Classic' : _Prop_opens_in_Classic,
'preferred_size' : _Prop_preferred_size, 'preferred_size' : _Prop_preferred_size,
'suggested_size' : _Prop_suggested_size, 'suggested_size' : _Prop_suggested_size,
} }
application_file._privelemdict = { application_file._privelemdict = {
} }
clipping._superclassnames = ['file'] clipping._superclassnames = ['file']
clipping._privpropdict = { clipping._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'clipping_window' : _Prop_clipping_window, 'clipping_window' : _Prop_clipping_window,
} }
clipping._privelemdict = { clipping._privelemdict = {
} }
document_file._superclassnames = ['file'] document_file._superclassnames = ['file']
document_file._privpropdict = { document_file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
} }
document_file._privelemdict = { document_file._privelemdict = {
} }
import Finder_items import Finder_items
file._superclassnames = ['item'] file._superclassnames = ['item']
file._privpropdict = { file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'creator_type' : _Prop_creator_type, 'creator_type' : _Prop_creator_type,
'file_type' : _Prop_file_type, 'file_type' : _Prop_file_type,
'product_version' : _Prop_product_version, 'product_version' : _Prop_product_version,
'stationery' : _Prop_stationery, 'stationery' : _Prop_stationery,
'version' : _Prop_version, 'version' : _Prop_version,
} }
file._privelemdict = { file._privelemdict = {
} }
internet_location_file._superclassnames = ['file'] internet_location_file._superclassnames = ['file']
internet_location_file._privpropdict = { internet_location_file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'location' : _Prop_location, 'location' : _Prop_location,
} }
internet_location_file._privelemdict = { internet_location_file._privelemdict = {
} }
package._superclassnames = ['item'] package._superclassnames = ['item']
package._privpropdict = { package._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
} }
package._privelemdict = { package._privelemdict = {
} }
...@@ -178,11 +178,35 @@ package._privelemdict = { ...@@ -178,11 +178,35 @@ package._privelemdict = {
# Indices of types declared in this module # Indices of types declared in this module
# #
_classdeclarations = { _classdeclarations = {
'alia' : alias_file, 'alia' : alias_file,
'appf' : application_file, 'appf' : application_file,
'clpf' : clipping, 'clpf' : clipping,
'docf' : document_file, 'docf' : document_file,
'file' : file, 'file' : file,
'inlf' : internet_location_file, 'inlf' : internet_location_file,
'pack' : package, 'pack' : package,
}
_propdeclarations = {
'Clsc' : _Prop_opens_in_Classic,
'appt' : _Prop_preferred_size,
'asty' : _Prop_file_type,
'c@#^' : _Prop__3c_Inheritance_3e_,
'fcrt' : _Prop_creator_type,
'hscr' : _Prop_has_scripting_terminology,
'iloc' : _Prop_location,
'isab' : _Prop_accepts_high_level_events,
'lwnd' : _Prop_clipping_window,
'mprt' : _Prop_minimum_size,
'orig' : _Prop_original_item,
'pspd' : _Prop_stationery,
'sprt' : _Prop_suggested_size,
'ver2' : _Prop_product_version,
'vers' : _Prop_version,
}
_compdeclarations = {
}
_enumdeclarations = {
} }
...@@ -12,107 +12,107 @@ _code = 'fndr' ...@@ -12,107 +12,107 @@ _code = 'fndr'
class Finder_Basics_Events: class Finder_Basics_Events:
def copy(self, _no_object=None, _attributes={}, **_arguments): def copy(self, _no_object=None, _attributes={}, **_arguments):
"""copy: (NOT AVAILABLE YET) Copy the selected items to the clipboard (the Finder must be the front application) """copy: (NOT AVAILABLE YET) Copy the selected items to the clipboard (the Finder must be the front application)
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'misc' _code = 'misc'
_subcode = 'copy' _subcode = 'copy'
if _arguments: raise TypeError, 'No optional args expected' if _arguments: raise TypeError, 'No optional args expected'
if _no_object != None: raise TypeError, 'No direct arg expected' if _no_object != None: raise TypeError, 'No direct arg expected'
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
_argmap_sort = { _argmap_sort = {
'by' : 'by ', 'by' : 'by ',
} }
def sort(self, _object, _attributes={}, **_arguments): def sort(self, _object, _attributes={}, **_arguments):
"""sort: (NOT AVAILABLE YET) Return the specified object(s) in a sorted list """sort: (NOT AVAILABLE YET) Return the specified object(s) in a sorted list
Required argument: a list of finder objects to sort Required argument: a list of finder objects to sort
Keyword argument by: the property to sort the items by (name, index, date, etc.) Keyword argument by: the property to sort the items by (name, index, date, etc.)
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the sorted items in their new order Returns: the sorted items in their new order
""" """
_code = 'DATA' _code = 'DATA'
_subcode = 'SORT' _subcode = 'SORT'
aetools.keysubst(_arguments, self._argmap_sort) aetools.keysubst(_arguments, self._argmap_sort)
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
class application(aetools.ComponentItem): class application(aetools.ComponentItem):
"""application - The Finder """ """application - The Finder """
want = 'capp' want = 'capp'
class _Prop_Finder_preferences(aetools.NProperty): class _Prop_Finder_preferences(aetools.NProperty):
"""Finder preferences - (NOT AVAILABLE YET) Various preferences that apply to the Finder as a whole """ """Finder preferences - (NOT AVAILABLE YET) Various preferences that apply to the Finder as a whole """
which = 'pfrp' which = 'pfrp'
want = 'cprf' want = 'cprf'
class _Prop_clipboard(aetools.NProperty): class _Prop_clipboard(aetools.NProperty):
"""clipboard - (NOT AVAILABLE YET) the Finder\xd5s clipboard window """ """clipboard - (NOT AVAILABLE YET) the Finder\xd5s clipboard window """
which = 'pcli' which = 'pcli'
want = 'obj ' want = 'obj '
class _Prop_desktop(aetools.NProperty): class _Prop_desktop(aetools.NProperty):
"""desktop - the desktop """ """desktop - the desktop """
which = 'desk' which = 'desk'
want = 'cdsk' want = 'cdsk'
class _Prop_frontmost(aetools.NProperty): class _Prop_frontmost(aetools.NProperty):
"""frontmost - Is the Finder the frontmost process? """ """frontmost - Is the Finder the frontmost process? """
which = 'pisf' which = 'pisf'
want = 'bool' want = 'bool'
class _Prop_home(aetools.NProperty): class _Prop_home(aetools.NProperty):
"""home - the home directory """ """home - the home directory """
which = 'home' which = 'home'
want = 'cfol' want = 'cfol'
class _Prop_insertion_location(aetools.NProperty): class _Prop_insertion_location(aetools.NProperty):
"""insertion location - the container in which a new folder would appear if \xd2New Folder\xd3 was selected """ """insertion location - the container in which a new folder would appear if \xd2New Folder\xd3 was selected """
which = 'pins' which = 'pins'
want = 'obj ' want = 'obj '
class _Prop_name(aetools.NProperty): class _Prop_name(aetools.NProperty):
"""name - the Finder\xd5s name """ """name - the Finder\xd5s name """
which = 'pnam' which = 'pnam'
want = 'itxt' want = 'itxt'
class _Prop_product_version(aetools.NProperty): class _Prop_product_version(aetools.NProperty):
"""product version - the version of the System software running on this computer """ """product version - the version of the System software running on this computer """
which = 'ver2' which = 'ver2'
want = 'utxt' want = 'utxt'
class _Prop_selection(aetools.NProperty): class _Prop_selection(aetools.NProperty):
"""selection - the selection in the frontmost Finder window """ """selection - the selection in the frontmost Finder window """
which = 'sele' which = 'sele'
want = 'obj ' want = 'obj '
class _Prop_startup_disk(aetools.NProperty): class _Prop_startup_disk(aetools.NProperty):
"""startup disk - the startup disk """ """startup disk - the startup disk """
which = 'sdsk' which = 'sdsk'
want = 'cdis' want = 'cdis'
class _Prop_trash(aetools.NProperty): class _Prop_trash(aetools.NProperty):
"""trash - the trash """ """trash - the trash """
which = 'trsh' which = 'trsh'
want = 'ctrs' want = 'ctrs'
class _Prop_version(aetools.NProperty): class _Prop_version(aetools.NProperty):
"""version - the version of the Finder """ """version - the version of the Finder """
which = 'vers' which = 'vers'
want = 'utxt' want = 'utxt'
class _Prop_visible(aetools.NProperty): class _Prop_visible(aetools.NProperty):
"""visible - Is the Finder\xd5s layer visible? """ """visible - Is the Finder\xd5s layer visible? """
which = 'pvis' which = 'pvis'
want = 'bool' want = 'bool'
# element 'alia' as ['indx', 'name'] # element 'alia' as ['indx', 'name']
# element 'appf' as ['indx', 'name', 'ID '] # element 'appf' as ['indx', 'name', 'ID ']
# element 'brow' as ['indx', 'ID '] # element 'brow' as ['indx', 'ID ']
...@@ -133,40 +133,62 @@ import Window_classes ...@@ -133,40 +133,62 @@ import Window_classes
import Containers_and_folders import Containers_and_folders
import Finder_items import Finder_items
application._privpropdict = { application._privpropdict = {
'Finder_preferences' : _Prop_Finder_preferences, 'Finder_preferences' : _Prop_Finder_preferences,
'clipboard' : _Prop_clipboard, 'clipboard' : _Prop_clipboard,
'desktop' : _Prop_desktop, 'desktop' : _Prop_desktop,
'frontmost' : _Prop_frontmost, 'frontmost' : _Prop_frontmost,
'home' : _Prop_home, 'home' : _Prop_home,
'insertion_location' : _Prop_insertion_location, 'insertion_location' : _Prop_insertion_location,
'name' : _Prop_name, 'name' : _Prop_name,
'product_version' : _Prop_product_version, 'product_version' : _Prop_product_version,
'selection' : _Prop_selection, 'selection' : _Prop_selection,
'startup_disk' : _Prop_startup_disk, 'startup_disk' : _Prop_startup_disk,
'trash' : _Prop_trash, 'trash' : _Prop_trash,
'version' : _Prop_version, 'version' : _Prop_version,
'visible' : _Prop_visible, 'visible' : _Prop_visible,
} }
application._privelemdict = { application._privelemdict = {
'Finder_window' : Window_classes.Finder_window, 'Finder_window' : Window_classes.Finder_window,
'alias_file' : Files.alias_file, 'alias_file' : Files.alias_file,
'application_file' : Files.application_file, 'application_file' : Files.application_file,
'clipping' : Files.clipping, 'clipping' : Files.clipping,
'clipping_window' : Window_classes.clipping_window, 'clipping_window' : Window_classes.clipping_window,
'container' : Containers_and_folders.container, 'container' : Containers_and_folders.container,
'disk' : Containers_and_folders.disk, 'disk' : Containers_and_folders.disk,
'document_file' : Files.document_file, 'document_file' : Files.document_file,
'file' : Files.file, 'file' : Files.file,
'folder' : Containers_and_folders.folder, 'folder' : Containers_and_folders.folder,
'internet_location_file' : Files.internet_location_file, 'internet_location_file' : Files.internet_location_file,
'item' : Finder_items.item, 'item' : Finder_items.item,
'package' : Files.package, 'package' : Files.package,
'window' : Window_classes.window, 'window' : Window_classes.window,
} }
# #
# Indices of types declared in this module # Indices of types declared in this module
# #
_classdeclarations = { _classdeclarations = {
'capp' : application, 'capp' : application,
}
_propdeclarations = {
'desk' : _Prop_desktop,
'home' : _Prop_home,
'pcli' : _Prop_clipboard,
'pfrp' : _Prop_Finder_preferences,
'pins' : _Prop_insertion_location,
'pisf' : _Prop_frontmost,
'pnam' : _Prop_name,
'pvis' : _Prop_visible,
'sdsk' : _Prop_startup_disk,
'sele' : _Prop_selection,
'trsh' : _Prop_trash,
'ver2' : _Prop_product_version,
'vers' : _Prop_version,
}
_compdeclarations = {
}
_enumdeclarations = {
} }
...@@ -12,60 +12,60 @@ _code = 'ppnt' ...@@ -12,60 +12,60 @@ _code = 'ppnt'
class PowerPlant_Events: class PowerPlant_Events:
_argmap_SwitchTellTarget = { _argmap_SwitchTellTarget = {
'to' : 'data', 'to' : 'data',
} }
def SwitchTellTarget(self, _no_object=None, _attributes={}, **_arguments): def SwitchTellTarget(self, _no_object=None, _attributes={}, **_arguments):
"""SwitchTellTarget: Makes an object the \xd2focus\xd3 of AppleEvents """SwitchTellTarget: Makes an object the \xd2focus\xd3 of AppleEvents
Keyword argument to: reference to new focus of AppleEvents Keyword argument to: reference to new focus of AppleEvents
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'ppnt' _code = 'ppnt'
_subcode = 'sttg' _subcode = 'sttg'
aetools.keysubst(_arguments, self._argmap_SwitchTellTarget) aetools.keysubst(_arguments, self._argmap_SwitchTellTarget)
if _no_object != None: raise TypeError, 'No direct arg expected' if _no_object != None: raise TypeError, 'No direct arg expected'
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
_argmap_select = { _argmap_select = {
'data' : 'data', 'data' : 'data',
} }
def select(self, _object, _attributes={}, **_arguments): def select(self, _object, _attributes={}, **_arguments):
"""select: Sets the present selection """select: Sets the present selection
Required argument: object to select or container of sub-objects to select Required argument: object to select or container of sub-objects to select
Keyword argument data: sub-object(s) to select Keyword argument data: sub-object(s) to select
Keyword argument _attributes: AppleEvent attribute dictionary Keyword argument _attributes: AppleEvent attribute dictionary
""" """
_code = 'misc' _code = 'misc'
_subcode = 'slct' _subcode = 'slct'
aetools.keysubst(_arguments, self._argmap_select) aetools.keysubst(_arguments, self._argmap_select)
_arguments['----'] = _object _arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode, _reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes) _arguments, _attributes)
if _arguments.get('errn', 0): if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments) raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result # XXXX Optionally decode result
if _arguments.has_key('----'): if _arguments.has_key('----'):
return _arguments['----'] return _arguments['----']
_Enum_dbac = { _Enum_dbac = {
'DoNothing' : '\x00\x00\x00\x00', # No debugging action is taken. 'DoNothing' : '\x00\x00\x00\x00', # No debugging action is taken.
'PostAlert' : '\x00\x00\x00\x01', # Post an alert. 'PostAlert' : '\x00\x00\x00\x01', # Post an alert.
'LowLevelDebugger' : '\x00\x00\x00\x02', # Break into the low level debugger (MacsBug). 'LowLevelDebugger' : '\x00\x00\x00\x02', # Break into the low level debugger (MacsBug).
'SourceDebugger' : '\x00\x00\x00\x03', # Break into the source level debugger (if source debugger is executing). 'SourceDebugger' : '\x00\x00\x00\x03', # Break into the source level debugger (if source debugger is executing).
} }
...@@ -74,3 +74,13 @@ _Enum_dbac = { ...@@ -74,3 +74,13 @@ _Enum_dbac = {
# #
_classdeclarations = { _classdeclarations = {
} }
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
'dbac' : _Enum_dbac,
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment