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