mirror of https://github.com/python/cpython.git
Package with suites for talking to netscape.
This commit is contained in:
parent
ff792c2688
commit
47ff247e4b
|
@ -0,0 +1,269 @@
|
||||||
|
"""Suite Mozilla suite: Experimental Mozilla suite
|
||||||
|
Level 1, version 1
|
||||||
|
|
||||||
|
Generated from Macintosh HD:Internet:Internet-programma's:Netscape Communicator<6F>-map:Netscape Communicator<6F>
|
||||||
|
AETE/AEUT resource version 1/0, language 0, script 0
|
||||||
|
"""
|
||||||
|
|
||||||
|
import aetools
|
||||||
|
import MacOS
|
||||||
|
|
||||||
|
_code = 'MOSS'
|
||||||
|
|
||||||
|
class Mozilla_suite_Events:
|
||||||
|
|
||||||
|
_argmap_Read_help_file = {
|
||||||
|
'with_index' : 'idid',
|
||||||
|
'search_text' : 'sear',
|
||||||
|
}
|
||||||
|
|
||||||
|
def Read_help_file(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""Read help file: Reads in the help file (file should be in the help file format)
|
||||||
|
Required argument: undocumented, typecode 'alis'
|
||||||
|
Keyword argument with_index: Index to the help file. Defaults to ŒDEFAULT¹)
|
||||||
|
Keyword argument search_text: Optional text to search for
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'MOSS'
|
||||||
|
_subcode = 'help'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_Read_help_file)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def Open_bookmark(self, _object=None, _attributes={}, **_arguments):
|
||||||
|
"""Open bookmark: Reads in 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
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_Go = {
|
||||||
|
'direction' : 'dire',
|
||||||
|
}
|
||||||
|
|
||||||
|
def Go(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""Go: navigate a window: back, forward, again(reload), home)
|
||||||
|
Required argument: window
|
||||||
|
Keyword argument direction: undocumented, typecode 'dire'
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'MOSS'
|
||||||
|
_subcode = 'gogo'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_Go)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
aetools.enumsubst(_arguments, 'dire', _Enum_dire)
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def Get_workingURL(self, _no_object=None, _attributes={}, **_arguments):
|
||||||
|
"""Get workingURL: Get the path to the running application in URL format. This will allow a script to construct a relative URL
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: Will return text of the from ³FILE://foo/applicationname²
|
||||||
|
"""
|
||||||
|
_code = 'MOSS'
|
||||||
|
_subcode = 'wurl'
|
||||||
|
|
||||||
|
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.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def Open_Profile_Manager(self, _no_object=None, _attributes={}, **_arguments):
|
||||||
|
"""Open Profile Manager: Open the user profile manager (obsolete)
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'MOSS'
|
||||||
|
_subcode = 'prfl'
|
||||||
|
|
||||||
|
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.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def Get_Import_Data(self, _no_object=None, _attributes={}, **_arguments):
|
||||||
|
"""Get Import Data: Returns a structure containing information that is of use to an external module in importing data from an external mail application into Communicator.
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: vRefNum and dirID of profile folder (2+4 bytes), vRefNum and DirID of the local mail folder (2+4 bytes), window type of front window (0 if none, ŒBrwz¹ browser, ŒAddr¹ addressbook, ŒMesg¹ messenger, etc., 4 bytes)
|
||||||
|
"""
|
||||||
|
_code = 'MOSS'
|
||||||
|
_subcode = 'Impt'
|
||||||
|
|
||||||
|
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.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def Get_Profile_Name(self, _no_object=None, _attributes={}, **_arguments):
|
||||||
|
"""Get Profile Name: Get the current User Profile
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: Name of the current profile, like ³Joe Bloggs². This is the name of the profile folder in the Netscape Users folder.
|
||||||
|
"""
|
||||||
|
_code = 'MOSS'
|
||||||
|
_subcode = 'upro'
|
||||||
|
|
||||||
|
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.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def Open_Address_Book(self, _no_object=None, _attributes={}, **_arguments):
|
||||||
|
"""Open Address Book: Opens the address book
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'MOSS'
|
||||||
|
_subcode = 'addr'
|
||||||
|
|
||||||
|
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.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def Open_Component(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""Open Component: Open a Communicator component
|
||||||
|
Required argument: The component to open
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'MOSS'
|
||||||
|
_subcode = 'cpnt'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def Handle_command(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""Handle command: Handle a command
|
||||||
|
Required argument: The command to handle
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'MOSS'
|
||||||
|
_subcode = 'hcmd'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_Enum_dire = {
|
||||||
|
'again' : 'agai', # Again (reload)
|
||||||
|
'home' : 'home', # Home
|
||||||
|
'backward' : 'prev', # Previous page
|
||||||
|
'forward' : 'next', # Next page
|
||||||
|
}
|
||||||
|
|
||||||
|
_Enum_comp = {
|
||||||
|
'Navigator' : 'navg', # The Navigator component
|
||||||
|
'InBox' : 'inbx', # The InBox component
|
||||||
|
'Newsgroups' : 'colb', # The Newsgroups component
|
||||||
|
'Composer' : 'cpsr', # The Page Composer component
|
||||||
|
'Conference' : 'conf', # The Conference Component
|
||||||
|
'Calendar' : 'cald', # The Calendar Component
|
||||||
|
}
|
||||||
|
|
||||||
|
_Enum_ncmd = {
|
||||||
|
'Get_new_mail' : '\000\000\004W', #
|
||||||
|
'Send_queued_messages' : '\000\000\004X', #
|
||||||
|
'Read_newsgroups' : '\000\000\004\004', #
|
||||||
|
'Show_Inbox' : '\000\000\004\005', #
|
||||||
|
'Show_Bookmarks_window' : '\000\000\004\006', #
|
||||||
|
'Show_History_window' : '\000\000\004\007', #
|
||||||
|
'Show_Address_Book_window' : '\000\000\004\011', #
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Indices of types declared in this module
|
||||||
|
#
|
||||||
|
_classdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_propdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_compdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_enumdeclarations = {
|
||||||
|
'dire' : _Enum_dire,
|
||||||
|
'comp' : _Enum_comp,
|
||||||
|
'ncmd' : _Enum_ncmd,
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
"""Suite PowerPlant:
|
||||||
|
Level 0, version 0
|
||||||
|
|
||||||
|
Generated from Macintosh HD:Internet:Internet-programma's:Netscape Communicator<6F>-map:Netscape Communicator<6F>
|
||||||
|
AETE/AEUT resource version 1/0, language 0, script 0
|
||||||
|
"""
|
||||||
|
|
||||||
|
import aetools
|
||||||
|
import MacOS
|
||||||
|
|
||||||
|
_code = 'ppnt'
|
||||||
|
|
||||||
|
class PowerPlant_Events:
|
||||||
|
|
||||||
|
_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.has_key('errn'):
|
||||||
|
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 ³focus² 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.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_Enum_dbac = {
|
||||||
|
'DoNothing' : '\000\000\000\000', # No debugging action is taken.
|
||||||
|
'PostAlert' : '\000\000\000\001', # Post an alert.
|
||||||
|
'LowLevelDebugger' : '\000\000\000\002', # Break into the low level debugger (MacsBug).
|
||||||
|
'SourceDebugger' : '\000\000\000\003', # Break into the source level debugger (if source debugger is executing).
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Indices of types declared in this module
|
||||||
|
#
|
||||||
|
_classdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_propdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_compdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_enumdeclarations = {
|
||||||
|
'dbac' : _Enum_dbac,
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
"""Suite Required suite:
|
||||||
|
Level 0, version 0
|
||||||
|
|
||||||
|
Generated from Macintosh HD:Internet:Internet-programma's:Netscape Communicator<6F>-map:Netscape Communicator<6F>
|
||||||
|
AETE/AEUT resource version 1/0, language 0, script 0
|
||||||
|
"""
|
||||||
|
|
||||||
|
import aetools
|
||||||
|
import MacOS
|
||||||
|
|
||||||
|
_code = 'reqd'
|
||||||
|
|
||||||
|
from StdSuites.Required_Suite import *
|
||||||
|
class Required_suite_Events:
|
||||||
|
|
||||||
|
def open(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""open: Open the specified object(s)
|
||||||
|
Required argument: list of objects to open
|
||||||
|
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.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def _print(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""print: Print the specified object(s)
|
||||||
|
Required argument: list of objects to print
|
||||||
|
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.has_key('errn'):
|
||||||
|
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 Navigator
|
||||||
|
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.has_key('errn'):
|
||||||
|
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: Sent to an application when it is double-clicked
|
||||||
|
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.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Indices of types declared in this module
|
||||||
|
#
|
||||||
|
_classdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_propdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_compdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_enumdeclarations = {
|
||||||
|
}
|
|
@ -0,0 +1,238 @@
|
||||||
|
"""Suite Standard Suite: Common terms for most applications
|
||||||
|
Level 1, version 1
|
||||||
|
|
||||||
|
Generated from Macintosh HD:Internet:Internet-programma's:Netscape Communicator<6F>-map:Netscape Communicator<6F>
|
||||||
|
AETE/AEUT resource version 1/0, language 0, script 0
|
||||||
|
"""
|
||||||
|
|
||||||
|
import aetools
|
||||||
|
import MacOS
|
||||||
|
|
||||||
|
_code = 'CoRe'
|
||||||
|
|
||||||
|
class Standard_Suite_Events:
|
||||||
|
|
||||||
|
def close(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""close: Close an object
|
||||||
|
Required argument: the objects to close
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'core'
|
||||||
|
_subcode = 'clos'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def data_size(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""data size: Return the size in bytes of an object
|
||||||
|
Required argument: the object whose data size is to be returned
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: the size of the object in bytes
|
||||||
|
"""
|
||||||
|
_code = 'core'
|
||||||
|
_subcode = 'dsiz'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def get(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""get: Get the data for an object
|
||||||
|
Required argument: the object whose data is to be returned
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: The data from the object
|
||||||
|
"""
|
||||||
|
_code = 'core'
|
||||||
|
_subcode = 'getd'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_set = {
|
||||||
|
'to' : 'data',
|
||||||
|
}
|
||||||
|
|
||||||
|
def set(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""set: Set an object¹s data
|
||||||
|
Required argument: the object to change
|
||||||
|
Keyword argument to: the new value
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'core'
|
||||||
|
_subcode = 'setd'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_set)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
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'
|
||||||
|
class alert_application(aetools.NProperty):
|
||||||
|
"""alert application - Most of the alerts will be sent to this application using yet unspecified AE interface. We need a few alert boxes: alert, confirm and notify. Any ideas on how to design this event? mailto:atotic@netscape.com. I¹d like to conform to the standard. """
|
||||||
|
which = 'ALAP'
|
||||||
|
want = 'type'
|
||||||
|
class kiosk_mode(aetools.NProperty):
|
||||||
|
"""kiosk mode - Kiosk mode leaves very few menus enabled """
|
||||||
|
which = 'KOSK'
|
||||||
|
want = 'long'
|
||||||
|
# element 'cwin' as ['indx', 'name', 'ID ']
|
||||||
|
|
||||||
|
class window(aetools.ComponentItem):
|
||||||
|
"""window - A Window """
|
||||||
|
want = 'cwin'
|
||||||
|
class bounds(aetools.NProperty):
|
||||||
|
"""bounds - the boundary rectangle for the window """
|
||||||
|
which = 'pbnd'
|
||||||
|
want = 'qdrt'
|
||||||
|
class closeable(aetools.NProperty):
|
||||||
|
"""closeable - Does the window have a close box? """
|
||||||
|
which = 'hclb'
|
||||||
|
want = 'bool'
|
||||||
|
class titled(aetools.NProperty):
|
||||||
|
"""titled - Does the window have a title bar? """
|
||||||
|
which = 'ptit'
|
||||||
|
want = 'bool'
|
||||||
|
class index(aetools.NProperty):
|
||||||
|
"""index - the number of the window """
|
||||||
|
which = 'pidx'
|
||||||
|
want = 'long'
|
||||||
|
class floating(aetools.NProperty):
|
||||||
|
"""floating - Does the window float? """
|
||||||
|
which = 'isfl'
|
||||||
|
want = 'bool'
|
||||||
|
class modal(aetools.NProperty):
|
||||||
|
"""modal - Is the window modal? """
|
||||||
|
which = 'pmod'
|
||||||
|
want = 'bool'
|
||||||
|
class resizable(aetools.NProperty):
|
||||||
|
"""resizable - Is the window resizable? """
|
||||||
|
which = 'prsz'
|
||||||
|
want = 'bool'
|
||||||
|
class zoomable(aetools.NProperty):
|
||||||
|
"""zoomable - Is the window zoomable? """
|
||||||
|
which = 'iszm'
|
||||||
|
want = 'bool'
|
||||||
|
class zoomed(aetools.NProperty):
|
||||||
|
"""zoomed - Is the window zoomed? """
|
||||||
|
which = 'pzum'
|
||||||
|
want = 'bool'
|
||||||
|
class name(aetools.NProperty):
|
||||||
|
"""name - the title of the window """
|
||||||
|
which = 'pnam'
|
||||||
|
want = 'itxt'
|
||||||
|
class visible(aetools.NProperty):
|
||||||
|
"""visible - is the window visible? """
|
||||||
|
which = 'pvis'
|
||||||
|
want = 'bool'
|
||||||
|
class position(aetools.NProperty):
|
||||||
|
"""position - upper left coordinates of window """
|
||||||
|
which = 'ppos'
|
||||||
|
want = 'QDpt'
|
||||||
|
class URL(aetools.NProperty):
|
||||||
|
"""URL - Current URL """
|
||||||
|
which = 'curl'
|
||||||
|
want = 'TEXT'
|
||||||
|
class unique_ID(aetools.NProperty):
|
||||||
|
"""unique ID - Window¹s unique ID (a bridge between WWW! suite window id¹s and standard AE windows) """
|
||||||
|
which = 'wiid'
|
||||||
|
want = 'long'
|
||||||
|
class busy(aetools.NProperty):
|
||||||
|
"""busy - Is window loading something right now. 2, window is busy and will reject load requests. 1, window is busy, but will interrupt outstanding loads """
|
||||||
|
which = 'busy'
|
||||||
|
want = 'long'
|
||||||
|
application._propdict = {
|
||||||
|
'alert_application' : alert_application,
|
||||||
|
'kiosk_mode' : kiosk_mode,
|
||||||
|
}
|
||||||
|
application._elemdict = {
|
||||||
|
'window' : window,
|
||||||
|
}
|
||||||
|
window._propdict = {
|
||||||
|
'bounds' : bounds,
|
||||||
|
'closeable' : closeable,
|
||||||
|
'titled' : titled,
|
||||||
|
'index' : index,
|
||||||
|
'floating' : floating,
|
||||||
|
'modal' : modal,
|
||||||
|
'resizable' : resizable,
|
||||||
|
'zoomable' : zoomable,
|
||||||
|
'zoomed' : zoomed,
|
||||||
|
'name' : name,
|
||||||
|
'visible' : visible,
|
||||||
|
'position' : position,
|
||||||
|
'URL' : URL,
|
||||||
|
'unique_ID' : unique_ID,
|
||||||
|
'busy' : busy,
|
||||||
|
}
|
||||||
|
window._elemdict = {
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Indices of types declared in this module
|
||||||
|
#
|
||||||
|
_classdeclarations = {
|
||||||
|
'cwin' : window,
|
||||||
|
'capp' : application,
|
||||||
|
}
|
||||||
|
|
||||||
|
_propdeclarations = {
|
||||||
|
'ptit' : titled,
|
||||||
|
'pidx' : index,
|
||||||
|
'ppos' : position,
|
||||||
|
'curl' : URL,
|
||||||
|
'pnam' : name,
|
||||||
|
'pbnd' : bounds,
|
||||||
|
'isfl' : floating,
|
||||||
|
'hclb' : closeable,
|
||||||
|
'ALAP' : alert_application,
|
||||||
|
'iszm' : zoomable,
|
||||||
|
'pmod' : modal,
|
||||||
|
'pzum' : zoomed,
|
||||||
|
'pvis' : visible,
|
||||||
|
'KOSK' : kiosk_mode,
|
||||||
|
'busy' : busy,
|
||||||
|
'prsz' : resizable,
|
||||||
|
'wiid' : unique_ID,
|
||||||
|
}
|
||||||
|
|
||||||
|
_compdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_enumdeclarations = {
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
"""Suite Standard URL suite: Mac URL standard, supported by many apps
|
||||||
|
|
||||||
|
|
||||||
|
Level 1, version 1
|
||||||
|
|
||||||
|
Generated from Macintosh HD:Internet:Internet-programma's:Netscape Communicator<6F>-map:Netscape Communicator<6F>
|
||||||
|
AETE/AEUT resource version 1/0, language 0, script 0
|
||||||
|
"""
|
||||||
|
|
||||||
|
import aetools
|
||||||
|
import MacOS
|
||||||
|
|
||||||
|
_code = 'GURL'
|
||||||
|
|
||||||
|
class Standard_URL_suite_Events:
|
||||||
|
|
||||||
|
_argmap_GetURL = {
|
||||||
|
'to' : 'dest',
|
||||||
|
'inside' : 'HWIN',
|
||||||
|
'_from' : 'refe',
|
||||||
|
}
|
||||||
|
|
||||||
|
def GetURL(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""GetURL: Loads the URL (optionally to disk)
|
||||||
|
Required argument: The url
|
||||||
|
Keyword argument to: file the URL should be loaded into
|
||||||
|
Keyword argument inside: Window the URL should be loaded to
|
||||||
|
Keyword argument _from: Referrer, to be sent with the HTTP request
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'GURL'
|
||||||
|
_subcode = 'GURL'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_GetURL)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Indices of types declared in this module
|
||||||
|
#
|
||||||
|
_classdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_propdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_compdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_enumdeclarations = {
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
"""Suite Text:
|
||||||
|
Level 0, version 0
|
||||||
|
|
||||||
|
Generated from Macintosh HD:Internet:Internet-programma's:Netscape Communicator<6F>-map:Netscape Communicator<6F>
|
||||||
|
AETE/AEUT resource version 1/0, language 0, script 0
|
||||||
|
"""
|
||||||
|
|
||||||
|
import aetools
|
||||||
|
import MacOS
|
||||||
|
|
||||||
|
_code = 'TEXT'
|
||||||
|
|
||||||
|
from StdSuites.Text_Suite import *
|
||||||
|
class Text_Events:
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class text(aetools.ComponentItem):
|
||||||
|
"""text - independent text view objects """
|
||||||
|
want = 'ctxt'
|
||||||
|
class updateLevel(aetools.NProperty):
|
||||||
|
"""updateLevel - updating level. Can only be incremented or decremented. Do so only in a try block -- if the level is greater than zero, visual text updating will cease. """
|
||||||
|
which = 'pUpL'
|
||||||
|
want = 'long'
|
||||||
|
class beginning(aetools.NProperty):
|
||||||
|
"""beginning - Beginning of element """
|
||||||
|
which = 'bgng'
|
||||||
|
want = 'obj '
|
||||||
|
class end(aetools.NProperty):
|
||||||
|
"""end - Ending of element """
|
||||||
|
which = 'end '
|
||||||
|
want = 'obj '
|
||||||
|
class infront(aetools.NProperty):
|
||||||
|
"""infront - Immediately before element """
|
||||||
|
which = 'pBef'
|
||||||
|
want = 'obj '
|
||||||
|
class justbehind(aetools.NProperty):
|
||||||
|
"""justbehind - Immediately after element """
|
||||||
|
which = 'pAft'
|
||||||
|
want = 'obj '
|
||||||
|
# element 'stys' as ['indx', 'name']
|
||||||
|
|
||||||
|
class styleset(aetools.ComponentItem):
|
||||||
|
"""styleset - A style ³set² that may be used repeatedly in text objects. """
|
||||||
|
want = 'stys'
|
||||||
|
class name(aetools.NProperty):
|
||||||
|
"""name - style name """
|
||||||
|
which = 'pnam'
|
||||||
|
want = 'TEXT'
|
||||||
|
class color(aetools.NProperty):
|
||||||
|
"""color - the color """
|
||||||
|
which = 'colr'
|
||||||
|
want = 'RGB '
|
||||||
|
class font(aetools.NProperty):
|
||||||
|
"""font - font name """
|
||||||
|
which = 'font'
|
||||||
|
want = 'TEXT'
|
||||||
|
class size(aetools.NProperty):
|
||||||
|
"""size - the size in points """
|
||||||
|
which = 'ptsz'
|
||||||
|
want = 'long'
|
||||||
|
class writing_code(aetools.NProperty):
|
||||||
|
"""writing code - the script system and language """
|
||||||
|
which = 'psct'
|
||||||
|
want = 'tsty'
|
||||||
|
class style(aetools.NProperty):
|
||||||
|
"""style - the text styles or face attributes """
|
||||||
|
which = 'txst'
|
||||||
|
want = 'tsty'
|
||||||
|
|
||||||
|
stylesets = styleset
|
||||||
|
text._propdict = {
|
||||||
|
'updateLevel' : updateLevel,
|
||||||
|
'beginning' : beginning,
|
||||||
|
'end' : end,
|
||||||
|
'infront' : infront,
|
||||||
|
'justbehind' : justbehind,
|
||||||
|
}
|
||||||
|
text._elemdict = {
|
||||||
|
'styleset' : styleset,
|
||||||
|
}
|
||||||
|
styleset._propdict = {
|
||||||
|
'name' : name,
|
||||||
|
'color' : color,
|
||||||
|
'font' : font,
|
||||||
|
'size' : size,
|
||||||
|
'writing_code' : writing_code,
|
||||||
|
'style' : style,
|
||||||
|
}
|
||||||
|
styleset._elemdict = {
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Indices of types declared in this module
|
||||||
|
#
|
||||||
|
_classdeclarations = {
|
||||||
|
'stys' : styleset,
|
||||||
|
'ctxt' : text,
|
||||||
|
}
|
||||||
|
|
||||||
|
_propdeclarations = {
|
||||||
|
'pAft' : justbehind,
|
||||||
|
'psct' : writing_code,
|
||||||
|
'txst' : style,
|
||||||
|
'colr' : color,
|
||||||
|
'pBef' : infront,
|
||||||
|
'pnam' : name,
|
||||||
|
'ptsz' : size,
|
||||||
|
'pUpL' : updateLevel,
|
||||||
|
'bgng' : beginning,
|
||||||
|
'font' : font,
|
||||||
|
'end ' : end,
|
||||||
|
}
|
||||||
|
|
||||||
|
_compdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_enumdeclarations = {
|
||||||
|
}
|
|
@ -0,0 +1,426 @@
|
||||||
|
"""Suite WorldWideWeb suite, as defined in Spyglass spec.:
|
||||||
|
Level 1, version 1
|
||||||
|
|
||||||
|
Generated from Macintosh HD:Internet:Internet-programma's:Netscape Communicator<6F>-map:Netscape Communicator<6F>
|
||||||
|
AETE/AEUT resource version 1/0, language 0, script 0
|
||||||
|
"""
|
||||||
|
|
||||||
|
import aetools
|
||||||
|
import MacOS
|
||||||
|
|
||||||
|
_code = 'WWW!'
|
||||||
|
|
||||||
|
class WorldWideWeb_suite_Events:
|
||||||
|
|
||||||
|
_argmap_OpenURL = {
|
||||||
|
'to' : 'INTO',
|
||||||
|
'toWindow' : 'WIND',
|
||||||
|
'flags' : 'FLGS',
|
||||||
|
'post_data' : 'POST',
|
||||||
|
'post_type' : 'MIME',
|
||||||
|
'progressApp' : 'PROG',
|
||||||
|
}
|
||||||
|
|
||||||
|
def OpenURL(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""OpenURL: Opens a URL. Allows for more options than GetURL event
|
||||||
|
Required argument: URL
|
||||||
|
Keyword argument to: file destination
|
||||||
|
Keyword argument toWindow: window iD
|
||||||
|
Keyword argument flags: Binary: any combination of 1, 2 and 4 is allowed: 1 and 2 mean force reload the document. 4 is ignored
|
||||||
|
Keyword argument post_data: Form posting data
|
||||||
|
Keyword argument post_type: MIME type of the posting data. Defaults to application/x-www-form-urlencoded
|
||||||
|
Keyword argument progressApp: Application that will display progress
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: ID of the loading window
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'OURL'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_OpenURL)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_ShowFile = {
|
||||||
|
'MIME_type' : 'MIME',
|
||||||
|
'Window_ID' : 'WIND',
|
||||||
|
'URL' : 'URL ',
|
||||||
|
}
|
||||||
|
|
||||||
|
def ShowFile(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""ShowFile: Similar to OpenDocuments, except that it specifies the parent URL, and MIME type of the file
|
||||||
|
Required argument: File to open
|
||||||
|
Keyword argument MIME_type: MIME type
|
||||||
|
Keyword argument Window_ID: Window to open the file in
|
||||||
|
Keyword argument URL: Use this as a base URL
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: Window ID of the loaded window. 0 means ShowFile failed, FFFFFFF means that data was not appropriate type to display in the browser.
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'SHWF'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_ShowFile)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_parse_anchor = {
|
||||||
|
'relative_to' : 'RELA',
|
||||||
|
}
|
||||||
|
|
||||||
|
def parse_anchor(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""parse anchor: Resolves the relative URL
|
||||||
|
Required argument: Main URL
|
||||||
|
Keyword argument relative_to: Relative URL
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: Parsed URL
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'PRSA'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_parse_anchor)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_cancel_progress = {
|
||||||
|
'in_window' : 'WIND',
|
||||||
|
}
|
||||||
|
|
||||||
|
def cancel_progress(self, _object=None, _attributes={}, **_arguments):
|
||||||
|
"""cancel progress: Interrupts the download of the document in the given window
|
||||||
|
Required argument: progress ID, obtained from the progress app
|
||||||
|
Keyword argument in_window: window ID of the progress to cancel
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'CNCL'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_cancel_progress)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def find_URL(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""find URL: If the file was downloaded by Netscape, you can call FindURL to find out the URL used to download the file.
|
||||||
|
Required argument: File spec
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: The URL
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'FURL'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def webActivate(self, _object=None, _attributes={}, **_arguments):
|
||||||
|
"""webActivate: Makes Netscape the frontmost application, and selects a given window. This event is here for suite completeness/ cross-platform compatibility only, you should use standard AppleEvents instead.
|
||||||
|
Required argument: window to bring to front
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'ACTV'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def list_windows(self, _no_object=None, _attributes={}, **_arguments):
|
||||||
|
"""list windows: Lists the IDs of all the hypertext windows
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: List of unique IDs of all the hypertext windows
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'LSTW'
|
||||||
|
|
||||||
|
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.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def get_window_info(self, _object=None, _attributes={}, **_arguments):
|
||||||
|
"""get window info: Returns the information about the window as a list. Currently the list contains the window title and the URL. You can get the same information using standard Apple Event GetProperty.
|
||||||
|
Required argument: window ID
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: undocumented, typecode 'list'
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'WNFO'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def register_URL_echo(self, _object=None, _attributes={}, **_arguments):
|
||||||
|
"""register URL echo: Registers the ³echo² application. Each download from now on will be echoed to this application.
|
||||||
|
Required argument: Application signature
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'RGUE'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
def unregister_URL_echo(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""unregister URL echo: cancels URL echo
|
||||||
|
Required argument: application signature
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'UNRU'
|
||||||
|
|
||||||
|
if _arguments: raise TypeError, 'No optional args expected'
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_register_viewer = {
|
||||||
|
'MIME_type' : 'MIME',
|
||||||
|
'with_file_type' : 'FTYP',
|
||||||
|
}
|
||||||
|
|
||||||
|
def register_viewer(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""register viewer: Registers an application as a Œspecial¹ viewer for this MIME type. The application will be launched with ViewDoc events
|
||||||
|
Required argument: Application sig
|
||||||
|
Keyword argument MIME_type: MIME type viewer is registering for
|
||||||
|
Keyword argument with_file_type: Mac file type for the downloaded files
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: TRUE if registration has been successful
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'RGVW'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_register_viewer)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_unregister_viewer = {
|
||||||
|
'MIME_type' : 'MIME',
|
||||||
|
}
|
||||||
|
|
||||||
|
def unregister_viewer(self, _object, _attributes={}, **_arguments):
|
||||||
|
"""unregister viewer: Revert to the old way of handling this MIME type
|
||||||
|
Required argument: Application sig
|
||||||
|
Keyword argument MIME_type: MIME type to be unregistered
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: TRUE if the event was successful
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'UNRV'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_unregister_viewer)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_register_protocol = {
|
||||||
|
'for_protocol' : 'PROT',
|
||||||
|
}
|
||||||
|
|
||||||
|
def register_protocol(self, _object=None, _attributes={}, **_arguments):
|
||||||
|
"""register protocol: Registers application as a ³handler² for this protocol with a given prefix. The handler will receive ³OpenURL², or if that fails, ³GetURL² event.
|
||||||
|
Required argument: Application sig
|
||||||
|
Keyword argument for_protocol: protocol prefix: ³finger:², ³file²,
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: TRUE if registration has been successful
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'RGPR'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_register_protocol)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_unregister_protocol = {
|
||||||
|
'for_protocol' : 'PROT',
|
||||||
|
}
|
||||||
|
|
||||||
|
def unregister_protocol(self, _object=None, _attributes={}, **_arguments):
|
||||||
|
"""unregister protocol: reverses the effects of ³register protocol²
|
||||||
|
Required argument: Application sig.
|
||||||
|
Keyword argument for_protocol: protocol prefix. If none, unregister for all protocols
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: TRUE if successful
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'UNRP'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_unregister_protocol)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_register_window_close = {
|
||||||
|
'for_window' : 'WIND',
|
||||||
|
}
|
||||||
|
|
||||||
|
def register_window_close(self, _object=None, _attributes={}, **_arguments):
|
||||||
|
"""register window close: Netscape will notify registered application when this window closes
|
||||||
|
Required argument: Application signature
|
||||||
|
Keyword argument for_window: window ID
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: true if successful
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'RGWC'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_register_window_close)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
_argmap_unregister_window_close = {
|
||||||
|
'for_window' : 'WIND',
|
||||||
|
}
|
||||||
|
|
||||||
|
def unregister_window_close(self, _object=None, _attributes={}, **_arguments):
|
||||||
|
"""unregister window close: Undo for register window close
|
||||||
|
Required argument: Application signature
|
||||||
|
Keyword argument for_window: window ID
|
||||||
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
||||||
|
Returns: true if successful
|
||||||
|
"""
|
||||||
|
_code = 'WWW!'
|
||||||
|
_subcode = 'UNRC'
|
||||||
|
|
||||||
|
aetools.keysubst(_arguments, self._argmap_unregister_window_close)
|
||||||
|
_arguments['----'] = _object
|
||||||
|
|
||||||
|
|
||||||
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
||||||
|
_arguments, _attributes)
|
||||||
|
if _arguments.has_key('errn'):
|
||||||
|
raise aetools.Error, aetools.decodeerror(_arguments)
|
||||||
|
# XXXX Optionally decode result
|
||||||
|
if _arguments.has_key('----'):
|
||||||
|
return _arguments['----']
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Indices of types declared in this module
|
||||||
|
#
|
||||||
|
_classdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_propdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_compdeclarations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
_enumdeclarations = {
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
"""
|
||||||
|
Package generated from Macintosh HD:Internet:Internet-programma's:Netscape Communicator<6F>-map:Netscape Communicator<6F>
|
||||||
|
Resource aete resid 0
|
||||||
|
"""
|
||||||
|
import aetools
|
||||||
|
import Required_suite
|
||||||
|
import Standard_Suite
|
||||||
|
import Standard_URL_suite
|
||||||
|
import WorldWideWeb_suite
|
||||||
|
import Mozilla_suite
|
||||||
|
import PowerPlant
|
||||||
|
import Text
|
||||||
|
|
||||||
|
|
||||||
|
_code_to_module = {
|
||||||
|
'reqd' : Required_suite,
|
||||||
|
'CoRe' : Standard_Suite,
|
||||||
|
'GURL' : Standard_URL_suite,
|
||||||
|
'WWW!' : WorldWideWeb_suite,
|
||||||
|
'MOSS' : Mozilla_suite,
|
||||||
|
'ppnt' : PowerPlant,
|
||||||
|
'TEXT' : Text,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
_code_to_fullname = {
|
||||||
|
'reqd' : 'Netscape.Required_suite',
|
||||||
|
'CoRe' : 'Netscape.Standard_Suite',
|
||||||
|
'GURL' : 'Netscape.Standard_URL_suite',
|
||||||
|
'WWW!' : 'Netscape.WorldWideWeb_suite',
|
||||||
|
'MOSS' : 'Netscape.Mozilla_suite',
|
||||||
|
'ppnt' : 'Netscape.PowerPlant',
|
||||||
|
'TEXT' : 'Netscape.Text',
|
||||||
|
}
|
||||||
|
|
||||||
|
from Required_suite import *
|
||||||
|
from Standard_Suite import *
|
||||||
|
from Standard_URL_suite import *
|
||||||
|
from WorldWideWeb_suite import *
|
||||||
|
from Mozilla_suite import *
|
||||||
|
from PowerPlant import *
|
||||||
|
from Text import *
|
||||||
|
|
||||||
|
|
||||||
|
class Netscape(Required_suite_Events,
|
||||||
|
Standard_Suite_Events,
|
||||||
|
Standard_URL_suite_Events,
|
||||||
|
WorldWideWeb_suite_Events,
|
||||||
|
Mozilla_suite_Events,
|
||||||
|
PowerPlant_Events,
|
||||||
|
Text_Events,
|
||||||
|
aetools.TalkTo):
|
||||||
|
_signature = 'MOSS'
|
||||||
|
|
Loading…
Reference in New Issue