/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py

http://unladen-swallow.googlecode.com/ · Python · 86 lines · 47 code · 19 blank · 20 comment · 5 complexity · 20b7db8bdff85822bd4d870e398d5dae MD5 · raw file

  1. """Suite PowerPlant:
  2. Level 0, version 0
  3. Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
  4. AETE/AEUT resource version 1/0, language 0, script 0
  5. """
  6. import aetools
  7. import MacOS
  8. _code = 'ppnt'
  9. class PowerPlant_Events:
  10. _argmap_SwitchTellTarget = {
  11. 'to' : 'data',
  12. }
  13. def SwitchTellTarget(self, _no_object=None, _attributes={}, **_arguments):
  14. """SwitchTellTarget: Makes an object the \xd2focus\xd3 of AppleEvents
  15. Keyword argument to: reference to new focus of AppleEvents
  16. Keyword argument _attributes: AppleEvent attribute dictionary
  17. """
  18. _code = 'ppnt'
  19. _subcode = 'sttg'
  20. aetools.keysubst(_arguments, self._argmap_SwitchTellTarget)
  21. if _no_object is not None: raise TypeError, 'No direct arg expected'
  22. _reply, _arguments, _attributes = self.send(_code, _subcode,
  23. _arguments, _attributes)
  24. if _arguments.get('errn', 0):
  25. raise aetools.Error, aetools.decodeerror(_arguments)
  26. # XXXX Optionally decode result
  27. if _arguments.has_key('----'):
  28. return _arguments['----']
  29. _argmap_select = {
  30. 'data' : 'data',
  31. }
  32. def select(self, _object, _attributes={}, **_arguments):
  33. """select: Sets the present selection
  34. Required argument: object to select or container of sub-objects to select
  35. Keyword argument data: sub-object(s) to select
  36. Keyword argument _attributes: AppleEvent attribute dictionary
  37. """
  38. _code = 'misc'
  39. _subcode = 'slct'
  40. aetools.keysubst(_arguments, self._argmap_select)
  41. _arguments['----'] = _object
  42. _reply, _arguments, _attributes = self.send(_code, _subcode,
  43. _arguments, _attributes)
  44. if _arguments.get('errn', 0):
  45. raise aetools.Error, aetools.decodeerror(_arguments)
  46. # XXXX Optionally decode result
  47. if _arguments.has_key('----'):
  48. return _arguments['----']
  49. _Enum_dbac = {
  50. 'DoNothing' : '\x00\x00\x00\x00', # No debugging action is taken.
  51. 'PostAlert' : '\x00\x00\x00\x01', # Post an alert.
  52. 'LowLevelDebugger' : '\x00\x00\x00\x02', # Break into the low level debugger (MacsBug).
  53. 'SourceDebugger' : '\x00\x00\x00\x03', # Break into the source level debugger (if source debugger is executing).
  54. }
  55. #
  56. # Indices of types declared in this module
  57. #
  58. _classdeclarations = {
  59. }
  60. _propdeclarations = {
  61. }
  62. _compdeclarations = {
  63. }
  64. _enumdeclarations = {
  65. 'dbac' : _Enum_dbac,
  66. }