]> granicus.if.org Git - python/commitdiff
Remove the Mac modules
authorBenjamin Peterson <benjamin@python.org>
Mon, 12 May 2008 22:25:16 +0000 (22:25 +0000)
committerBenjamin Peterson <benjamin@python.org>
Mon, 12 May 2008 22:25:16 +0000 (22:25 +0000)
288 files changed:
Doc/library/aepack.rst [deleted file]
Doc/library/aetools.rst [deleted file]
Doc/library/aetypes.rst [deleted file]
Doc/library/autogil.rst [deleted file]
Doc/library/binhex.rst
Doc/library/carbon.rst [deleted file]
Doc/library/colorpicker.rst [deleted file]
Doc/library/easydialogs.rst [deleted file]
Doc/library/framework.rst [deleted file]
Doc/library/ic.rst [deleted file]
Doc/library/index.rst
Doc/library/mac.rst [deleted file]
Doc/library/macos.rst [deleted file]
Doc/library/macosa.rst [deleted file]
Doc/library/macostools.rst [deleted file]
Doc/library/plistlib.rst
Doc/library/undoc.rst
Doc/using/mac.rst
Lib/binhex.py
Lib/plat-mac/Audio_mac.py [deleted file]
Lib/plat-mac/Carbon/AE.py [deleted file]
Lib/plat-mac/Carbon/AH.py [deleted file]
Lib/plat-mac/Carbon/Alias.py [deleted file]
Lib/plat-mac/Carbon/Aliases.py [deleted file]
Lib/plat-mac/Carbon/App.py [deleted file]
Lib/plat-mac/Carbon/Appearance.py [deleted file]
Lib/plat-mac/Carbon/AppleEvents.py [deleted file]
Lib/plat-mac/Carbon/AppleHelp.py [deleted file]
Lib/plat-mac/Carbon/CF.py [deleted file]
Lib/plat-mac/Carbon/CG.py [deleted file]
Lib/plat-mac/Carbon/CarbonEvents.py [deleted file]
Lib/plat-mac/Carbon/CarbonEvt.py [deleted file]
Lib/plat-mac/Carbon/Cm.py [deleted file]
Lib/plat-mac/Carbon/Components.py [deleted file]
Lib/plat-mac/Carbon/ControlAccessor.py [deleted file]
Lib/plat-mac/Carbon/Controls.py [deleted file]
Lib/plat-mac/Carbon/CoreFoundation.py [deleted file]
Lib/plat-mac/Carbon/CoreGraphics.py [deleted file]
Lib/plat-mac/Carbon/Ctl.py [deleted file]
Lib/plat-mac/Carbon/Dialogs.py [deleted file]
Lib/plat-mac/Carbon/Dlg.py [deleted file]
Lib/plat-mac/Carbon/Drag.py [deleted file]
Lib/plat-mac/Carbon/Dragconst.py [deleted file]
Lib/plat-mac/Carbon/Events.py [deleted file]
Lib/plat-mac/Carbon/Evt.py [deleted file]
Lib/plat-mac/Carbon/File.py [deleted file]
Lib/plat-mac/Carbon/Files.py [deleted file]
Lib/plat-mac/Carbon/Fm.py [deleted file]
Lib/plat-mac/Carbon/Folder.py [deleted file]
Lib/plat-mac/Carbon/Folders.py [deleted file]
Lib/plat-mac/Carbon/Fonts.py [deleted file]
Lib/plat-mac/Carbon/Help.py [deleted file]
Lib/plat-mac/Carbon/IBCarbon.py [deleted file]
Lib/plat-mac/Carbon/IBCarbonRuntime.py [deleted file]
Lib/plat-mac/Carbon/Icn.py [deleted file]
Lib/plat-mac/Carbon/Icons.py [deleted file]
Lib/plat-mac/Carbon/Launch.py [deleted file]
Lib/plat-mac/Carbon/LaunchServices.py [deleted file]
Lib/plat-mac/Carbon/List.py [deleted file]
Lib/plat-mac/Carbon/Lists.py [deleted file]
Lib/plat-mac/Carbon/MacHelp.py [deleted file]
Lib/plat-mac/Carbon/MacTextEditor.py [deleted file]
Lib/plat-mac/Carbon/MediaDescr.py [deleted file]
Lib/plat-mac/Carbon/Menu.py [deleted file]
Lib/plat-mac/Carbon/Menus.py [deleted file]
Lib/plat-mac/Carbon/Mlte.py [deleted file]
Lib/plat-mac/Carbon/OSA.py [deleted file]
Lib/plat-mac/Carbon/OSAconst.py [deleted file]
Lib/plat-mac/Carbon/QDOffscreen.py [deleted file]
Lib/plat-mac/Carbon/Qd.py [deleted file]
Lib/plat-mac/Carbon/Qdoffs.py [deleted file]
Lib/plat-mac/Carbon/Qt.py [deleted file]
Lib/plat-mac/Carbon/QuickDraw.py [deleted file]
Lib/plat-mac/Carbon/QuickTime.py [deleted file]
Lib/plat-mac/Carbon/Res.py [deleted file]
Lib/plat-mac/Carbon/Resources.py [deleted file]
Lib/plat-mac/Carbon/Scrap.py [deleted file]
Lib/plat-mac/Carbon/Snd.py [deleted file]
Lib/plat-mac/Carbon/Sndihooks.py [deleted file]
Lib/plat-mac/Carbon/Sound.py [deleted file]
Lib/plat-mac/Carbon/TE.py [deleted file]
Lib/plat-mac/Carbon/TextEdit.py [deleted file]
Lib/plat-mac/Carbon/Win.py [deleted file]
Lib/plat-mac/Carbon/Windows.py [deleted file]
Lib/plat-mac/Carbon/__init__.py [deleted file]
Lib/plat-mac/EasyDialogs.py [deleted file]
Lib/plat-mac/FrameWork.py [deleted file]
Lib/plat-mac/MiniAEFrame.py [deleted file]
Lib/plat-mac/PixMapWrapper.py [deleted file]
Lib/plat-mac/aepack.py [deleted file]
Lib/plat-mac/aetools.py [deleted file]
Lib/plat-mac/aetypes.py [deleted file]
Lib/plat-mac/applesingle.py [deleted file]
Lib/plat-mac/appletrawmain.py [deleted file]
Lib/plat-mac/appletrunner.py [deleted file]
Lib/plat-mac/argvemulator.py [deleted file]
Lib/plat-mac/bgenlocations.py [deleted file]
Lib/plat-mac/buildtools.py [deleted file]
Lib/plat-mac/bundlebuilder.py [deleted file]
Lib/plat-mac/dialogs.rsrc [deleted file]
Lib/plat-mac/errors.rsrc [deleted file]
Lib/plat-mac/findertools.py [deleted file]
Lib/plat-mac/gensuitemodule.py [deleted file]
Lib/plat-mac/ic.py [deleted file]
Lib/plat-mac/icopen.py [deleted file]
Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/CodeWarrior/Metrowerks_Shell_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py [deleted file]
Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Explorer/Netscape_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Explorer/Required_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Explorer/URL_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Explorer/__init__.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/Containers_and_folders.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/Enumerations.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/Files.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/Type_Definitions.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/Window_classes.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Finder/__init__.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Netscape/Required_suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Netscape/Text.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/Macintosh_Connectivity_Clas.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suppleme.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/Required_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/Table_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/Text_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/Type_Names_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/Folder_Actions_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/Hidden_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/Login_Items_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/Power_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/Processes_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/Standard_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/Text_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/SystemEvents/__init__.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Terminal/Text_Suite.py [deleted file]
Lib/plat-mac/lib-scriptpackages/Terminal/__init__.py [deleted file]
Lib/plat-mac/lib-scriptpackages/_builtinSuites/__init__.py [deleted file]
Lib/plat-mac/lib-scriptpackages/_builtinSuites/builtin_Suite.py [deleted file]
Lib/plat-mac/macerrors.py [deleted file]
Lib/plat-mac/macostools.py [deleted file]
Lib/plat-mac/macresource.py [deleted file]
Lib/plat-mac/pimp.py [deleted file]
Lib/plat-mac/terminalcommand.py [deleted file]
Lib/plat-mac/videoreader.py [deleted file]
Lib/plistlib.py
Lib/test/test_aepack.py [deleted file]
Lib/test/test_applesingle.py [deleted file]
Lib/test/test_macostools.py [deleted file]
Lib/test/test_scriptpackages.py [deleted file]
Mac/Modules/ColorPickermodule.c [deleted file]
Mac/Modules/MacOS.c [deleted file]
Mac/Modules/Nav.c [deleted file]
Mac/Modules/OSATerminology.c [deleted file]
Mac/Modules/ae/README [deleted file]
Mac/Modules/ae/_AEmodule.c [deleted file]
Mac/Modules/ae/aescan.py [deleted file]
Mac/Modules/ae/aesupport.py [deleted file]
Mac/Modules/ah/_AHmodule.c [deleted file]
Mac/Modules/ah/ahscan.py [deleted file]
Mac/Modules/ah/ahsupport.py [deleted file]
Mac/Modules/app/_Appmodule.c [deleted file]
Mac/Modules/app/appscan.py [deleted file]
Mac/Modules/app/appsupport.py [deleted file]
Mac/Modules/autoGIL.c [deleted file]
Mac/Modules/carbonevt/CarbonEvtscan.py [deleted file]
Mac/Modules/carbonevt/CarbonEvtsupport.py [deleted file]
Mac/Modules/carbonevt/_CarbonEvtmodule.c [deleted file]
Mac/Modules/cf/_CFmodule.c [deleted file]
Mac/Modules/cf/cfscan.py [deleted file]
Mac/Modules/cf/cfsupport.py [deleted file]
Mac/Modules/cf/pycfbridge.c [deleted file]
Mac/Modules/cf/pycfbridge.h [deleted file]
Mac/Modules/cg/CFMLateImport.c [deleted file]
Mac/Modules/cg/CFMLateImport.h [deleted file]
Mac/Modules/cg/CGStubLib [deleted file]
Mac/Modules/cg/CGStubLib.exp [deleted file]
Mac/Modules/cg/CGStubLib.readme [deleted file]
Mac/Modules/cg/_CGmodule.c [deleted file]
Mac/Modules/cg/cgscan.py [deleted file]
Mac/Modules/cg/cgsupport.py [deleted file]
Mac/Modules/cm/_Cmmodule.c [deleted file]
Mac/Modules/cm/cmscan.py [deleted file]
Mac/Modules/cm/cmsupport.py [deleted file]
Mac/Modules/ctl/_Ctlmodule.c [deleted file]
Mac/Modules/ctl/ctledit.py [deleted file]
Mac/Modules/ctl/ctlscan.py [deleted file]
Mac/Modules/ctl/ctlsupport.py [deleted file]
Mac/Modules/dlg/_Dlgmodule.c [deleted file]
Mac/Modules/dlg/dlgscan.py [deleted file]
Mac/Modules/dlg/dlgsupport.py [deleted file]
Mac/Modules/drag/_Dragmodule.c [deleted file]
Mac/Modules/drag/dragscan.py [deleted file]
Mac/Modules/drag/dragsupport.py [deleted file]
Mac/Modules/evt/_Evtmodule.c [deleted file]
Mac/Modules/evt/evtedit.py [deleted file]
Mac/Modules/evt/evtscan.py [deleted file]
Mac/Modules/evt/evtsupport.py [deleted file]
Mac/Modules/file/_Filemodule.c [deleted file]
Mac/Modules/file/filescan.py [deleted file]
Mac/Modules/file/filesupport.py [deleted file]
Mac/Modules/fm/_Fmmodule.c [deleted file]
Mac/Modules/fm/fmscan.py [deleted file]
Mac/Modules/fm/fmsupport.py [deleted file]
Mac/Modules/folder/_Foldermodule.c [deleted file]
Mac/Modules/folder/folderscan.py [deleted file]
Mac/Modules/folder/foldersupport.py [deleted file]
Mac/Modules/gestaltmodule.c [deleted file]
Mac/Modules/help/_Helpmodule.c [deleted file]
Mac/Modules/help/helpscan.py [deleted file]
Mac/Modules/help/helpsupport.py [deleted file]
Mac/Modules/ibcarbon/IBCarbonscan.py [deleted file]
Mac/Modules/ibcarbon/IBCarbonsupport.py [deleted file]
Mac/Modules/ibcarbon/_IBCarbon.c [deleted file]
Mac/Modules/icgluemodule.c [deleted file]
Mac/Modules/icn/_Icnmodule.c [deleted file]
Mac/Modules/icn/icnscan.py [deleted file]
Mac/Modules/icn/icnsupport.py [deleted file]
Mac/Modules/launch/_Launchmodule.c [deleted file]
Mac/Modules/launch/launchscan.py [deleted file]
Mac/Modules/launch/launchsupport.py [deleted file]
Mac/Modules/launch/setup.py [deleted file]
Mac/Modules/list/_Listmodule.c [deleted file]
Mac/Modules/list/listscan.py [deleted file]
Mac/Modules/list/listsupport.py [deleted file]
Mac/Modules/menu/_Menumodule.c [deleted file]
Mac/Modules/menu/menuedit.py [deleted file]
Mac/Modules/menu/menuscan.py [deleted file]
Mac/Modules/menu/menusupport.py [deleted file]
Mac/Modules/mlte/_Mltemodule.c [deleted file]
Mac/Modules/mlte/mltescan.py [deleted file]
Mac/Modules/mlte/mltesupport.py [deleted file]
Mac/Modules/osa/_OSAmodule.c [deleted file]
Mac/Modules/osa/osascan.py [deleted file]
Mac/Modules/osa/osasupport.py [deleted file]
Mac/Modules/osa/setup.py [deleted file]
Mac/Modules/qd/_Qdmodule.c [deleted file]
Mac/Modules/qd/qdedit.py [deleted file]
Mac/Modules/qd/qdscan.py [deleted file]
Mac/Modules/qd/qdsupport.py [deleted file]
Mac/Modules/qdoffs/_Qdoffsmodule.c [deleted file]
Mac/Modules/qdoffs/qdoffsscan.py [deleted file]
Mac/Modules/qdoffs/qdoffssupport.py [deleted file]
Mac/Modules/qt/_Qtmodule.c [deleted file]
Mac/Modules/qt/qtscan.py [deleted file]
Mac/Modules/qt/qtsupport.py [deleted file]
Mac/Modules/qt/setup.py [deleted file]
Mac/Modules/res/_Resmodule.c [deleted file]
Mac/Modules/res/resedit.py [deleted file]
Mac/Modules/res/resscan.py [deleted file]
Mac/Modules/res/ressupport.py [deleted file]
Mac/Modules/scrap/_Scrapmodule.c [deleted file]
Mac/Modules/scrap/scrapscan.py [deleted file]
Mac/Modules/scrap/scrapsupport.py [deleted file]
Mac/Modules/snd/_Sndihooks.c [deleted file]
Mac/Modules/snd/_Sndmodule.c [deleted file]
Mac/Modules/snd/sndscan.py [deleted file]
Mac/Modules/snd/sndsupport.py [deleted file]
Mac/Modules/te/_TEmodule.c [deleted file]
Mac/Modules/te/tescan.py [deleted file]
Mac/Modules/te/tesupport.py [deleted file]
Mac/Modules/win/_Winmodule.c [deleted file]
Mac/Modules/win/winedit.py [deleted file]
Mac/Modules/win/winscan.py [deleted file]
Mac/Modules/win/winsupport.py [deleted file]
setup.py

diff --git a/Doc/library/aepack.rst b/Doc/library/aepack.rst
deleted file mode 100644 (file)
index d8aef6b..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-
-:mod:`aepack` --- Conversion between Python variables and AppleEvent data containers
-====================================================================================
-
-.. module:: aepack
-   :platform: Mac
-   :synopsis: Conversion between Python variables and AppleEvent data containers.
-.. sectionauthor:: Vincent Marchetti <vincem@en.com>
-.. moduleauthor:: Jack Jansen
-
-The :mod:`aepack` module defines functions for converting (packing) Python
-variables to AppleEvent descriptors and back (unpacking). Within Python the
-AppleEvent descriptor is handled by Python objects of built-in type
-:class:`AEDesc`, defined in module :mod:`Carbon.AE`.
-
-The :mod:`aepack` module defines the following functions:
-
-
-.. function:: pack(x[, forcetype])
-
-   Returns an :class:`AEDesc` object  containing a conversion of Python value x. If
-   *forcetype* is provided it specifies the descriptor type of the result.
-   Otherwise, a default mapping of Python types to Apple Event descriptor types is
-   used, as follows:
-
-   +-----------------+-----------------------------------+
-   | Python type     | descriptor type                   |
-   +=================+===================================+
-   | :class:`FSSpec` | typeFSS                           |
-   +-----------------+-----------------------------------+
-   | :class:`FSRef`  | typeFSRef                         |
-   +-----------------+-----------------------------------+
-   | :class:`Alias`  | typeAlias                         |
-   +-----------------+-----------------------------------+
-   | integer         | typeLong (32 bit integer)         |
-   +-----------------+-----------------------------------+
-   | float           | typeFloat (64 bit floating point) |
-   +-----------------+-----------------------------------+
-   | string          | typeText                          |
-   +-----------------+-----------------------------------+
-   | unicode         | typeUnicodeText                   |
-   +-----------------+-----------------------------------+
-   | list            | typeAEList                        |
-   +-----------------+-----------------------------------+
-   | dictionary      | typeAERecord                      |
-   +-----------------+-----------------------------------+
-   | instance        | *see below*                       |
-   +-----------------+-----------------------------------+
-
-   If *x* is a Python instance then this function attempts to call an
-   :meth:`__aepack__` method.  This method should return an :class:`AEDesc` object.
-
-   If the conversion *x* is not defined above, this function returns the Python
-   string representation of a value (the repr() function) encoded as a text
-   descriptor.
-
-
-.. function:: unpack(x[, formodulename])
-
-   *x* must be an object of type :class:`AEDesc`. This function returns a Python
-   object representation of the data in the Apple Event descriptor *x*. Simple
-   AppleEvent data types (integer, text, float) are returned as their obvious
-   Python counterparts. Apple Event lists are returned as Python lists, and the
-   list elements are recursively unpacked.  Object references (ex. ``line 3 of
-   document 1``) are returned as instances of :class:`aetypes.ObjectSpecifier`,
-   unless ``formodulename`` is specified.  AppleEvent descriptors with descriptor
-   type typeFSS are returned as :class:`FSSpec` objects.  AppleEvent record
-   descriptors are returned as Python dictionaries, with 4-character string keys
-   and elements recursively unpacked.
-
-   The optional ``formodulename`` argument is used by the stub packages generated
-   by :mod:`gensuitemodule`, and ensures that the OSA classes for object specifiers
-   are looked up in the correct module. This ensures that if, say, the Finder
-   returns an object specifier for a window you get an instance of
-   ``Finder.Window`` and not a generic ``aetypes.Window``. The former knows about
-   all the properties and elements a window has in the Finder, while the latter
-   knows no such things.
-
-
-.. seealso::
-
-   Module :mod:`Carbon.AE`
-      Built-in access to Apple Event Manager routines.
-
-   Module :mod:`aetypes`
-      Python definitions of codes for Apple Event descriptor types.
diff --git a/Doc/library/aetools.rst b/Doc/library/aetools.rst
deleted file mode 100644 (file)
index da427eb..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-
-:mod:`aetools` --- OSA client support
-=====================================
-
-.. module:: aetools
-   :platform: Mac
-   :synopsis: Basic support for sending Apple Events
-.. sectionauthor:: Jack Jansen <Jack.Jansen@cwi.nl>
-.. moduleauthor:: Jack Jansen
-
-The :mod:`aetools` module contains the basic functionality on which Python
-AppleScript client support is built. It also imports and re-exports the core
-functionality of the :mod:`aetypes` and :mod:`aepack` modules. The stub packages
-generated by :mod:`gensuitemodule` import the relevant portions of
-:mod:`aetools`, so usually you do not need to import it yourself. The exception
-to this is when you cannot use a generated suite package and need lower-level
-access to scripting.
-
-The :mod:`aetools` module itself uses the AppleEvent support provided by the
-:mod:`Carbon.AE` module. This has one drawback: you need access to the window
-manager, see section :ref:`osx-gui-scripts` for details. This restriction may be
-lifted in future releases.
-
-The :mod:`aetools` module defines the following functions:
-
-
-.. function:: packevent(ae, parameters, attributes)
-
-   Stores parameters and attributes in a pre-created ``Carbon.AE.AEDesc`` object.
-   ``parameters`` and ``attributes`` are  dictionaries mapping 4-character OSA
-   parameter keys to Python objects. The objects are packed using
-   ``aepack.pack()``.
-
-
-.. function:: unpackevent(ae[, formodulename])
-
-   Recursively unpacks a ``Carbon.AE.AEDesc`` event to Python objects. The function
-   returns the parameter dictionary and the attribute dictionary. The
-   ``formodulename`` argument is used by generated stub packages to control where
-   AppleScript classes are looked up.
-
-
-.. function:: keysubst(arguments, keydict)
-
-   Converts a Python keyword argument dictionary ``arguments`` to the format
-   required by ``packevent`` by replacing the keys, which are Python identifiers,
-   by the four-character OSA keys according to the mapping specified in
-   ``keydict``. Used by the generated suite packages.
-
-
-.. function:: enumsubst(arguments, key, edict)
-
-   If the ``arguments`` dictionary contains an entry for ``key`` convert the value
-   for that entry according to dictionary ``edict``. This converts human-readable
-   Python enumeration names to the OSA 4-character codes. Used by the generated
-   suite packages.
-
-The :mod:`aetools` module defines the following class:
-
-
-.. class:: TalkTo([signature=None, start=0, timeout=0])
-
-   Base class for the proxy used to talk to an application. ``signature`` overrides
-   the class attribute ``_signature`` (which is usually set by subclasses) and is
-   the 4-char creator code defining the application to talk to. ``start`` can be
-   set to true to enable running the application on class instantiation.
-   ``timeout`` can be specified to change the default timeout used while waiting
-   for an AppleEvent reply.
-
-
-.. method:: TalkTo._start()
-
-   Test whether the application is running, and attempt to start it if not.
-
-
-.. method:: TalkTo.send(code, subcode[, parameters, attributes])
-
-   Create the AppleEvent ``Carbon.AE.AEDesc`` for the verb with the OSA designation
-   ``code, subcode`` (which are the usual 4-character strings), pack the
-   ``parameters`` and ``attributes`` into it, send it to the target application,
-   wait for the reply, unpack the reply with ``unpackevent`` and return the reply
-   appleevent, the unpacked return values as a dictionary and the return
-   attributes.
-
diff --git a/Doc/library/aetypes.rst b/Doc/library/aetypes.rst
deleted file mode 100644 (file)
index c8c5d80..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-
-:mod:`aetypes` --- AppleEvent objects
-=====================================
-
-.. module:: aetypes
-   :platform: Mac
-   :synopsis: Python representation of the Apple Event Object Model.
-.. sectionauthor:: Vincent Marchetti <vincem@en.com>
-.. moduleauthor:: Jack Jansen
-
-The :mod:`aetypes` defines classes used to represent Apple Event data
-descriptors and Apple Event object specifiers.
-
-Apple Event data is contained in descriptors, and these descriptors are typed.
-For many descriptors the Python representation is simply the corresponding
-Python type: ``typeText`` in OSA is a Python string, ``typeFloat`` is a float,
-etc. For OSA types that have no direct Python counterpart this module declares
-classes. Packing and unpacking instances of these classes is handled
-automatically by :mod:`aepack`.
-
-An object specifier is essentially an address of an object implemented in a
-Apple Event server. An Apple Event specifier is used as the direct object for an
-Apple Event or as the argument of an optional parameter. The :mod:`aetypes`
-module contains the base classes for OSA classes and properties, which are used
-by the packages generated by :mod:`gensuitemodule` to populate the classes and
-properties in a given suite.
-
-For reasons of backward compatibility, and for cases where you need to script an
-application for which you have not generated the stub package this module also
-contains object specifiers for a number of common OSA classes such as
-``Document``, ``Window``, ``Character``, etc.
-
-The :mod:`AEObjects` module defines the following classes to represent Apple
-Event descriptor data:
-
-
-.. class:: Unknown(type, data)
-
-   The representation of OSA descriptor data for which the :mod:`aepack` and
-   :mod:`aetypes` modules have no support, i.e. anything that is not represented by
-   the other classes here and that is not equivalent to a simple Python value.
-
-
-.. class:: Enum(enum)
-
-   An enumeration value with the given 4-character string value.
-
-
-.. class:: InsertionLoc(of, pos)
-
-   Position ``pos`` in object ``of``.
-
-
-.. class:: Boolean(bool)
-
-   A boolean.
-
-
-.. class:: StyledText(style, text)
-
-   Text with style information (font, face, etc) included.
-
-
-.. class:: AEText(script, style, text)
-
-   Text with script system and style information included.
-
-
-.. class:: IntlText(script, language, text)
-
-   Text with script system and language information included.
-
-
-.. class:: IntlWritingCode(script, language)
-
-   Script system and language information.
-
-
-.. class:: QDPoint(v, h)
-
-   A quickdraw point.
-
-
-.. class:: QDRectangle(v0, h0, v1, h1)
-
-   A quickdraw rectangle.
-
-
-.. class:: RGBColor(r, g, b)
-
-   A color.
-
-
-.. class:: Type(type)
-
-   An OSA type value with the given 4-character name.
-
-
-.. class:: Keyword(name)
-
-   An OSA keyword with the given 4-character name.
-
-
-.. class:: Range(start, stop)
-
-   A range.
-
-
-.. class:: Ordinal(abso)
-
-   Non-numeric absolute positions, such as ``"firs"``, first, or ``"midd"``,
-   middle.
-
-
-.. class:: Logical(logc, term)
-
-   The logical expression of applying operator ``logc`` to ``term``.
-
-
-.. class:: Comparison(obj1, relo, obj2)
-
-   The comparison ``relo`` of ``obj1`` to ``obj2``.
-
-The following classes are used as base classes by the generated stub packages to
-represent AppleScript classes and properties in Python:
-
-
-.. class:: ComponentItem(which[, fr])
-
-   Abstract baseclass for an OSA class. The subclass should set the class attribute
-   ``want`` to the 4-character OSA class code. Instances of subclasses of this
-   class are equivalent to AppleScript Object Specifiers. Upon instantiation you
-   should pass a selector in ``which``, and optionally a parent object in ``fr``.
-
-
-.. class:: NProperty(fr)
-
-   Abstract baseclass for an OSA property. The subclass should set the class
-   attributes ``want`` and ``which`` to designate which property we are talking
-   about. Instances of subclasses of this class are Object Specifiers.
-
-
-.. class:: ObjectSpecifier(want, form, seld[, fr])
-
-   Base class of ``ComponentItem`` and ``NProperty``, a general OSA Object
-   Specifier. See the Apple Open Scripting Architecture documentation for the
-   parameters. Note that this class is not abstract.
-
diff --git a/Doc/library/autogil.rst b/Doc/library/autogil.rst
deleted file mode 100644 (file)
index 7625be6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-
-:mod:`autoGIL` --- Global Interpreter Lock handling in event loops
-==================================================================
-
-.. module:: autoGIL
-   :platform: Mac
-   :synopsis: Global Interpreter Lock handling in event loops.
-.. moduleauthor:: Just van Rossum <just@letterror.com>
-
-
-The :mod:`autoGIL` module provides a function :func:`installAutoGIL` that
-automatically locks and unlocks Python's :term:`Global Interpreter Lock` when
-running an event loop.
-
-
-.. exception:: AutoGILError
-
-   Raised if the observer callback cannot be installed, for example because the
-   current thread does not have a run loop.
-
-
-.. function:: installAutoGIL()
-
-   Install an observer callback in the event loop (CFRunLoop) for the current
-   thread, that will lock and unlock the Global Interpreter Lock (GIL) at
-   appropriate times, allowing other Python threads to run while the event loop is
-   idle.
-
-   Availability: OSX 10.1 or later.
-
index 3b0485c1758e67bc1a9dadaa03abbab123cbde20..9e5a8f324447de0b0df65d1bcc756bac67b47dfb 100644 (file)
@@ -7,9 +7,7 @@
 
 
 This module encodes and decodes files in binhex4 format, a format allowing
-representation of Macintosh files in ASCII.  On the Macintosh, both forks of a
-file and the finder information are encoded (or decoded), on other platforms
-only the data fork is handled.
+representation of Macintosh files in ASCII. Only the data fork is handled.
 
 The :mod:`binhex` module defines the following functions:
 
diff --git a/Doc/library/carbon.rst b/Doc/library/carbon.rst
deleted file mode 100644 (file)
index 886fa82..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-
-.. _toolbox:
-
-*********************
-MacOS Toolbox Modules
-*********************
-
-There are a set of modules that provide interfaces to various MacOS toolboxes.
-If applicable the module will define a number of Python objects for the various
-structures declared by the toolbox, and operations will be implemented as
-methods of the object.  Other operations will be implemented as functions in the
-module.  Not all operations possible in C will also be possible in Python
-(callbacks are often a problem), and parameters will occasionally be different
-in Python (input and output buffers, especially).  All methods and functions
-have a :attr:`__doc__` string describing their arguments and return values, and
-for additional description you are referred to `Inside Macintosh
-<http://developer.apple.com/documentation/macos8/mac8.html>`_ or similar works.
-
-These modules all live in a package called :mod:`Carbon`. Despite that name they
-are not all part of the Carbon framework: CF is really in the CoreFoundation
-framework and Qt is in the QuickTime framework. The normal use pattern is ::
-
-   from Carbon import AE
-
-**Warning!**  These modules are not yet documented.  If you wish to contribute
-documentation of any of these modules, please get in touch with docs@python.org.
-
-
-:mod:`Carbon.AE` --- Apple Events
-=================================
-
-.. module:: Carbon.AE
-   :platform: Mac
-   :synopsis: Interface to the Apple Events toolbox.
-
-
-
-:mod:`Carbon.AH` --- Apple Help
-===============================
-
-.. module:: Carbon.AH
-   :platform: Mac
-   :synopsis: Interface to the Apple Help manager.
-
-
-
-:mod:`Carbon.App` --- Appearance Manager
-========================================
-
-.. module:: Carbon.App
-   :platform: Mac
-   :synopsis: Interface to the Appearance Manager.
-
-
-
-:mod:`Carbon.CF` --- Core Foundation
-====================================
-
-.. module:: Carbon.CF
-   :platform: Mac
-   :synopsis: Interface to the Core Foundation.
-
-
-The ``CFBase``, ``CFArray``, ``CFData``, ``CFDictionary``, ``CFString`` and
-``CFURL`` objects are supported, some only partially.
-
-
-:mod:`Carbon.CG` --- Core Graphics
-==================================
-
-.. module:: Carbon.CG
-   :platform: Mac
-   :synopsis: Interface to Core Graphics.
-
-
-
-:mod:`Carbon.CarbonEvt` --- Carbon Event Manager
-================================================
-
-.. module:: Carbon.CarbonEvt
-   :platform: Mac
-   :synopsis: Interface to the Carbon Event Manager.
-
-
-
-:mod:`Carbon.Cm` --- Component Manager
-======================================
-
-.. module:: Carbon.Cm
-   :platform: Mac
-   :synopsis: Interface to the Component Manager.
-
-
-
-:mod:`Carbon.Ctl` --- Control Manager
-=====================================
-
-.. module:: Carbon.Ctl
-   :platform: Mac
-   :synopsis: Interface to the Control Manager.
-
-
-
-:mod:`Carbon.Dlg` --- Dialog Manager
-====================================
-
-.. module:: Carbon.Dlg
-   :platform: Mac
-   :synopsis: Interface to the Dialog Manager.
-
-
-
-:mod:`Carbon.Evt` --- Event Manager
-===================================
-
-.. module:: Carbon.Evt
-   :platform: Mac
-   :synopsis: Interface to the classic Event Manager.
-
-
-
-:mod:`Carbon.Fm` --- Font Manager
-=================================
-
-.. module:: Carbon.Fm
-   :platform: Mac
-   :synopsis: Interface to the Font Manager.
-
-
-
-:mod:`Carbon.Folder` --- Folder Manager
-=======================================
-
-.. module:: Carbon.Folder
-   :platform: Mac
-   :synopsis: Interface to the Folder Manager.
-
-
-
-:mod:`Carbon.Help` --- Help Manager
-===================================
-
-.. module:: Carbon.Help
-   :platform: Mac
-   :synopsis: Interface to the Carbon Help Manager.
-
-
-
-:mod:`Carbon.List` --- List Manager
-===================================
-
-.. module:: Carbon.List
-   :platform: Mac
-   :synopsis: Interface to the List Manager.
-
-
-
-:mod:`Carbon.Menu` --- Menu Manager
-===================================
-
-.. module:: Carbon.Menu
-   :platform: Mac
-   :synopsis: Interface to the Menu Manager.
-
-
-
-:mod:`Carbon.Mlte` --- MultiLingual Text Editor
-===============================================
-
-.. module:: Carbon.Mlte
-   :platform: Mac
-   :synopsis: Interface to the MultiLingual Text Editor.
-
-
-
-:mod:`Carbon.Qd` --- QuickDraw
-==============================
-
-.. module:: Carbon.Qd
-   :platform: Mac
-   :synopsis: Interface to the QuickDraw toolbox.
-
-
-
-:mod:`Carbon.Qdoffs` --- QuickDraw Offscreen
-============================================
-
-.. module:: Carbon.Qdoffs
-   :platform: Mac
-   :synopsis: Interface to the QuickDraw Offscreen APIs.
-
-
-
-:mod:`Carbon.Qt` --- QuickTime
-==============================
-
-.. module:: Carbon.Qt
-   :platform: Mac
-   :synopsis: Interface to the QuickTime toolbox.
-
-
-
-:mod:`Carbon.Res` --- Resource Manager and Handles
-==================================================
-
-.. module:: Carbon.Res
-   :platform: Mac
-   :synopsis: Interface to the Resource Manager and Handles.
-
-
-
-:mod:`Carbon.Scrap` --- Scrap Manager
-=====================================
-
-.. module:: Carbon.Scrap
-   :platform: Mac
-   :synopsis: The Scrap Manager provides basic services for implementing cut & paste and
-              clipboard operations.
-
-
-This module is only fully available on MacOS9 and earlier under classic PPC
-MacPython.  Very limited functionality is available under Carbon MacPython.
-
-.. index:: single: Scrap Manager
-
-The Scrap Manager supports the simplest form of cut & paste operations on the
-Macintosh.  It can be use for both inter- and intra-application clipboard
-operations.
-
-The :mod:`Scrap` module provides low-level access to the functions of the Scrap
-Manager.  It contains the following functions:
-
-
-.. function:: InfoScrap()
-
-   Return current information about the scrap.  The information is encoded as a
-   tuple containing the fields ``(size, handle, count, state, path)``.
-
-   +----------+---------------------------------------------+
-   | Field    | Meaning                                     |
-   +==========+=============================================+
-   | *size*   | Size of the scrap in bytes.                 |
-   +----------+---------------------------------------------+
-   | *handle* | Resource object representing the scrap.     |
-   +----------+---------------------------------------------+
-   | *count*  | Serial number of the scrap contents.        |
-   +----------+---------------------------------------------+
-   | *state*  | Integer; positive if in memory, ``0`` if on |
-   |          | disk, negative if uninitialized.            |
-   +----------+---------------------------------------------+
-   | *path*   | Filename of the scrap when stored on disk.  |
-   +----------+---------------------------------------------+
-
-
-.. seealso::
-
-   `Scrap Manager <http://developer.apple.com/documentation/mac/MoreToolbox/MoreToolbox-109.html>`_
-      Apple's documentation for the Scrap Manager gives a lot of useful information
-      about using the Scrap Manager in applications.
-
-
-
-:mod:`Carbon.Snd` --- Sound Manager
-===================================
-
-.. module:: Carbon.Snd
-   :platform: Mac
-   :synopsis: Interface to the Sound Manager.
-
-
-
-:mod:`Carbon.TE` --- TextEdit
-=============================
-
-.. module:: Carbon.TE
-   :platform: Mac
-   :synopsis: Interface to TextEdit.
-
-
-
-:mod:`Carbon.Win` --- Window Manager
-====================================
-
-.. module:: Carbon.Win
-   :platform: Mac
-   :synopsis: Interface to the Window Manager.
-
-
diff --git a/Doc/library/colorpicker.rst b/Doc/library/colorpicker.rst
deleted file mode 100644 (file)
index 4244104..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-:mod:`ColorPicker` --- Color selection dialog
-=============================================
-
-.. module:: ColorPicker
-   :platform: Mac
-   :synopsis: Interface to the standard color selection dialog.
-.. moduleauthor:: Just van Rossum <just@letterror.com>
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
-
-The :mod:`ColorPicker` module provides access to the standard color picker
-dialog.
-
-
-.. function:: GetColor(prompt, rgb)
-
-   Show a standard color selection dialog and allow the user to select a color.
-   The user is given instruction by the *prompt* string, and the default color is
-   set to *rgb*.  *rgb* must be a tuple giving the red, green, and blue components
-   of the color. :func:`GetColor` returns a tuple giving the user's selected color
-   and a flag indicating whether they accepted the selection of cancelled.
-
diff --git a/Doc/library/easydialogs.rst b/Doc/library/easydialogs.rst
deleted file mode 100644 (file)
index 5aa5e5b..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-
-:mod:`EasyDialogs` --- Basic Macintosh dialogs
-==============================================
-
-.. module:: EasyDialogs
-   :platform: Mac
-   :synopsis: Basic Macintosh dialogs.
-
-
-The :mod:`EasyDialogs` module contains some simple dialogs for the Macintosh.
-All routines take an optional resource ID parameter *id* with which one can
-override the :const:`DLOG` resource used for the dialog, provided that the
-dialog items correspond (both type and item number) to those in the default
-:const:`DLOG` resource. See source code for details.
-
-The :mod:`EasyDialogs` module defines the following functions:
-
-
-.. function:: Message(str[, id[, ok]])
-
-   Displays a modal dialog with the message text *str*, which should be at most 255
-   characters long. The button text defaults to "OK", but is set to the string
-   argument *ok* if the latter is supplied. Control is returned when the user
-   clicks the "OK" button.
-
-
-.. function:: AskString(prompt[, default[, id[, ok[, cancel]]]])
-
-   Asks the user to input a string value via a modal dialog. *prompt* is the prompt
-   message, and the optional *default* supplies the initial value for the string
-   (otherwise ``""`` is used). The text of the "OK" and "Cancel" buttons can be
-   changed with the *ok* and *cancel* arguments. All strings can be at most 255
-   bytes long. :func:`AskString` returns the string entered or :const:`None` in
-   case the user cancelled.
-
-
-.. function:: AskPassword(prompt[, default[, id[, ok[, cancel]]]])
-
-   Asks the user to input a string value via a modal dialog. Like
-   :func:`AskString`, but with the text shown as bullets. The arguments have the
-   same meaning as for :func:`AskString`.
-
-
-.. function:: AskYesNoCancel(question[, default[, yes[, no[, cancel[, id]]]]])
-
-   Presents a dialog with prompt *question* and three buttons labelled "Yes", "No",
-   and "Cancel". Returns ``1`` for "Yes", ``0`` for "No" and ``-1`` for "Cancel".
-   The value of *default* (or ``0`` if *default* is not supplied) is returned when
-   the :kbd:`RETURN` key is pressed. The text of the buttons can be changed with
-   the *yes*, *no*, and *cancel* arguments; to prevent a button from appearing,
-   supply ``""`` for the corresponding argument.
-
-
-.. function:: ProgressBar([title[, maxval[, label[, id]]]])
-
-   Displays a modeless progress-bar dialog. This is the constructor for the
-   :class:`ProgressBar` class described below. *title* is the text string displayed
-   (default "Working..."), *maxval* is the value at which progress is complete
-   (default ``0``, indicating that an indeterminate amount of work remains to be
-   done), and *label* is the text that is displayed above the progress bar itself.
-
-
-.. function:: GetArgv([optionlist[ commandlist[, addoldfile[, addnewfile[, addfolder[, id]]]]]])
-
-   Displays a dialog which aids the user in constructing a command-line argument
-   list.  Returns the list in ``sys.argv`` format, suitable for passing as an
-   argument to :func:`getopt.getopt`.  *addoldfile*, *addnewfile*, and *addfolder*
-   are boolean arguments.  When nonzero, they enable the user to insert into the
-   command line paths to an existing file, a (possibly) not-yet-existent file, and
-   a folder, respectively.  (Note: Option arguments must appear in the command line
-   before file and folder arguments in order to be recognized by
-   :func:`getopt.getopt`.)  Arguments containing spaces can be specified by
-   enclosing them within single or double quotes.  A :exc:`SystemExit` exception is
-   raised if the user presses the "Cancel" button.
-
-   *optionlist* is a list that determines a popup menu from which the allowed
-   options are selected.  Its items can take one of two forms: *optstr* or
-   ``(optstr, descr)``.  When present, *descr* is a short descriptive string that
-   is displayed in the dialog while this option is selected in the popup menu.  The
-   correspondence between *optstr*\s and command-line arguments is:
-
-   +----------------------+------------------------------------------+
-   | *optstr* format      | Command-line format                      |
-   +======================+==========================================+
-   | ``x``                | :option:`-x` (short option)              |
-   +----------------------+------------------------------------------+
-   | ``x:`` or ``x=``     | :option:`-x` (short option with value)   |
-   +----------------------+------------------------------------------+
-   | ``xyz``              | :option:`--xyz` (long option)            |
-   +----------------------+------------------------------------------+
-   | ``xyz:`` or ``xyz=`` | :option:`--xyz` (long option with value) |
-   +----------------------+------------------------------------------+
-
-   *commandlist* is a list of items of the form *cmdstr* or ``(cmdstr, descr)``,
-   where *descr* is as above.  The *cmdstr*s will appear in a popup menu.  When
-   chosen, the text of *cmdstr* will be appended to the command line as is, except
-   that a trailing ``':'`` or ``'='`` (if present) will be trimmed off.
-
-
-.. function:: AskFileForOpen( [message] [, typeList] [, defaultLocation] [, defaultOptionFlags] [, location] [, clientName] [, windowTitle] [, actionButtonLabel] [, cancelButtonLabel] [, preferenceKey] [, popupExtension] [, eventProc] [, previewProc] [, filterProc] [, wanted] )
-
-   Post a dialog asking the user for a file to open, and return the file selected
-   or :const:`None` if the user cancelled. *message* is a text message to display,
-   *typeList* is a list of 4-char filetypes allowable, *defaultLocation* is the
-   pathname, :class:`FSSpec` or :class:`FSRef` of the folder to show initially,
-   *location* is the ``(x, y)`` position on the screen where the dialog is shown,
-   *actionButtonLabel* is a string to show instead of "Open" in the OK button,
-   *cancelButtonLabel* is a string to show instead of "Cancel" in the cancel
-   button, *wanted* is the type of value wanted as a return: :class:`str`,
-   :class:`FSSpec`, :class:`FSRef` and subtypes thereof are
-   acceptable.
-
-   .. index:: single: Navigation Services
-
-   For a description of the other arguments please see the Apple Navigation
-   Services documentation and the :mod:`EasyDialogs` source code.
-
-
-.. function:: AskFileForSave( [message] [, savedFileName] [, defaultLocation] [, defaultOptionFlags] [, location] [, clientName] [, windowTitle] [, actionButtonLabel] [, cancelButtonLabel] [, preferenceKey] [, popupExtension] [, fileType] [, fileCreator] [, eventProc] [, wanted] )
-
-   Post a dialog asking the user for a file to save to, and return the file
-   selected or :const:`None` if the user cancelled. *savedFileName* is the default
-   for the file name to save to (the return value). See :func:`AskFileForOpen` for
-   a description of the other arguments.
-
-
-.. function:: AskFolder( [message] [, defaultLocation] [, defaultOptionFlags] [, location] [, clientName] [, windowTitle] [, actionButtonLabel] [, cancelButtonLabel] [, preferenceKey] [, popupExtension] [, eventProc] [, filterProc] [, wanted] )
-
-   Post a dialog asking the user to select a folder, and return the folder selected
-   or :const:`None` if the user cancelled. See :func:`AskFileForOpen` for a
-   description of the arguments.
-
-
-.. seealso::
-
-   `Navigation Services Reference <http://developer.apple.com/documentation/Carbon/Reference/Navigation_Services_Ref/>`_
-      Programmer's reference documentation for the Navigation Services, a part of the
-      Carbon framework.
-
-
-.. _progressbar-objects:
-
-ProgressBar Objects
--------------------
-
-:class:`ProgressBar` objects provide support for modeless progress-bar dialogs.
-Both determinate (thermometer style) and indeterminate (barber-pole style)
-progress bars are supported.  The bar will be determinate if its maximum value
-is greater than zero; otherwise it will be indeterminate.
-
-The dialog is displayed immediately after creation. If the dialog's "Cancel"
-button is pressed, or if :kbd:`Cmd-.` or :kbd:`ESC` is typed, the dialog window
-is hidden and :exc:`KeyboardInterrupt` is raised (but note that this response
-does not occur until the progress bar is next updated, typically via a call to
-:meth:`inc` or :meth:`set`).  Otherwise, the bar remains visible until the
-:class:`ProgressBar` object is discarded.
-
-:class:`ProgressBar` objects possess the following attributes and methods:
-
-
-.. attribute:: ProgressBar.curval
-
-   The current value (of type integer) of the progress bar.  The
-   normal access methods coerce :attr:`curval` between ``0`` and :attr:`maxval`.
-   This attribute should not be altered directly.
-
-
-.. attribute:: ProgressBar.maxval
-
-   The maximum value (of type integer) of the progress bar; the
-   progress bar (thermometer style) is full when :attr:`curval` equals
-   :attr:`maxval`.  If :attr:`maxval` is ``0``, the bar will be indeterminate
-   (barber-pole).  This attribute should not be altered directly.
-
-
-.. method:: ProgressBar.title([newstr])
-
-   Sets the text in the title bar of the progress dialog to *newstr*.
-
-
-.. method:: ProgressBar.label([newstr])
-
-   Sets the text in the progress box of the progress dialog to *newstr*.
-
-
-.. method:: ProgressBar.set(value[, max])
-
-   Sets the progress bar's :attr:`curval` to *value*, and also :attr:`maxval` to
-   *max* if the latter is provided.  *value* is first coerced between 0 and
-   :attr:`maxval`.  The thermometer bar is updated to reflect the changes,
-   including a change from indeterminate to determinate or vice versa.
-
-
-.. method:: ProgressBar.inc([n])
-
-   Increments the progress bar's :attr:`curval` by *n*, or by ``1`` if *n* is not
-   provided.  (Note that *n* may be negative, in which case the effect is a
-   decrement.)  The progress bar is updated to reflect the change.  If the bar is
-   indeterminate, this causes one "spin" of the barber pole.  The resulting
-   :attr:`curval` is coerced between 0 and :attr:`maxval` if incrementing causes it
-   to fall outside this range.
-
diff --git a/Doc/library/framework.rst b/Doc/library/framework.rst
deleted file mode 100644 (file)
index c665fb7..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-
-:mod:`FrameWork` --- Interactive application framework
-======================================================
-
-.. module:: FrameWork
-   :platform: Mac
-   :synopsis: Interactive application framework.
-
-
-The :mod:`FrameWork` module contains classes that together provide a framework
-for an interactive Macintosh application. The programmer builds an application
-by creating subclasses that override various methods of the bases classes,
-thereby implementing the functionality wanted. Overriding functionality can
-often be done on various different levels, i.e. to handle clicks in a single
-dialog window in a non-standard way it is not necessary to override the complete
-event handling.
-
-Work on the :mod:`FrameWork` has pretty much stopped, now that :mod:`PyObjC` is
-available for full Cocoa access from Python, and the documentation describes
-only the most important functionality, and not in the most logical manner at
-that. Examine the source or the examples for more details.  The following are
-some comments posted on the MacPython newsgroup about the strengths and
-limitations of :mod:`FrameWork`:
-
-
-.. epigraph::
-
-   The strong point of :mod:`FrameWork` is that it allows you to break into the
-   control-flow at many different places. :mod:`W`, for instance, uses a different
-   way to enable/disable menus and that plugs right in leaving the rest intact.
-   The weak points of :mod:`FrameWork` are that it has no abstract command
-   interface (but that shouldn't be difficult), that its dialog support is minimal
-   and that its control/toolbar support is non-existent.
-
-The :mod:`FrameWork` module defines the following functions:
-
-
-.. function:: Application()
-
-   An object representing the complete application. See below for a description of
-   the methods. The default :meth:`__init__` routine creates an empty window
-   dictionary and a menu bar with an apple menu.
-
-
-.. function:: MenuBar()
-
-   An object representing the menubar. This object is usually not created by the
-   user.
-
-
-.. function:: Menu(bar, title[, after])
-
-   An object representing a menu. Upon creation you pass the ``MenuBar`` the menu
-   appears in, the *title* string and a position (1-based) *after* where the menu
-   should appear (default: at the end).
-
-
-.. function:: MenuItem(menu, title[, shortcut, callback])
-
-   Create a menu item object. The arguments are the menu to create, the item title
-   string and optionally the keyboard shortcut and a callback routine. The callback
-   is called with the arguments menu-id, item number within menu (1-based), current
-   front window and the event record.
-
-   Instead of a callable object the callback can also be a string. In this case
-   menu selection causes the lookup of a method in the topmost window and the
-   application. The method name is the callback string with ``'domenu_'``
-   prepended.
-
-   Calling the ``MenuBar`` :meth:`fixmenudimstate` method sets the correct dimming
-   for all menu items based on the current front window.
-
-
-.. function:: Separator(menu)
-
-   Add a separator to the end of a menu.
-
-
-.. function:: SubMenu(menu, label)
-
-   Create a submenu named *label* under menu *menu*. The menu object is returned.
-
-
-.. function:: Window(parent)
-
-   Creates a (modeless) window. *Parent* is the application object to which the
-   window belongs. The window is not displayed until later.
-
-
-.. function:: DialogWindow(parent)
-
-   Creates a modeless dialog window.
-
-
-.. function:: windowbounds(width, height)
-
-   Return a ``(left, top, right, bottom)`` tuple suitable for creation of a window
-   of given width and height. The window will be staggered with respect to previous
-   windows, and an attempt is made to keep the whole window on-screen. However, the
-   window will however always be the exact size given, so parts may be offscreen.
-
-
-.. function:: setwatchcursor()
-
-   Set the mouse cursor to a watch.
-
-
-.. function:: setarrowcursor()
-
-   Set the mouse cursor to an arrow.
-
-
-.. _application-objects:
-
-Application Objects
--------------------
-
-Application objects have the following methods, among others:
-
-
-.. method:: Application.makeusermenus()
-
-   Override this method if you need menus in your application. Append the menus to
-   the attribute :attr:`menubar`.
-
-
-.. method:: Application.getabouttext()
-
-   Override this method to return a text string describing your application.
-   Alternatively, override the :meth:`do_about` method for more elaborate "about"
-   messages.
-
-
-.. method:: Application.mainloop([mask[, wait]])
-
-   This routine is the main event loop, call it to set your application rolling.
-   *Mask* is the mask of events you want to handle, *wait* is the number of ticks
-   you want to leave to other concurrent application (default 0, which is probably
-   not a good idea). While raising *self* to exit the mainloop is still supported
-   it is not recommended: call ``self._quit()`` instead.
-
-   The event loop is split into many small parts, each of which can be overridden.
-   The default methods take care of dispatching events to windows and dialogs,
-   handling drags and resizes, Apple Events, events for non-FrameWork windows, etc.
-
-   In general, all event handlers should return ``1`` if the event is fully handled
-   and ``0`` otherwise (because the front window was not a FrameWork window, for
-   instance). This is needed so that update events and such can be passed on to
-   other windows like the Sioux console window. Calling :func:`MacOS.HandleEvent`
-   is not allowed within *our_dispatch* or its callees, since this may result in an
-   infinite loop if the code is called through the Python inner-loop event handler.
-
-
-.. method:: Application.asyncevents(onoff)
-
-   Call this method with a nonzero parameter to enable asynchronous event handling.
-   This will tell the inner interpreter loop to call the application event handler
-   *async_dispatch* whenever events are available. This will cause FrameWork window
-   updates and the user interface to remain working during long computations, but
-   will slow the interpreter down and may cause surprising results in non-reentrant
-   code (such as FrameWork itself). By default *async_dispatch* will immediately
-   call *our_dispatch* but you may override this to handle only certain events
-   asynchronously. Events you do not handle will be passed to Sioux and such.
-
-   The old on/off value is returned.
-
-
-.. method:: Application._quit()
-
-   Terminate the running :meth:`mainloop` call at the next convenient moment.
-
-
-.. method:: Application.do_char(c, event)
-
-   The user typed character *c*. The complete details of the event can be found in
-   the *event* structure. This method can also be provided in a ``Window`` object,
-   which overrides the application-wide handler if the window is frontmost.
-
-
-.. method:: Application.do_dialogevent(event)
-
-   Called early in the event loop to handle modeless dialog events. The default
-   method simply dispatches the event to the relevant dialog (not through the
-   ``DialogWindow`` object involved). Override if you need special handling of
-   dialog events (keyboard shortcuts, etc).
-
-
-.. method:: Application.idle(event)
-
-   Called by the main event loop when no events are available. The null-event is
-   passed (so you can look at mouse position, etc).
-
-
-.. _window-objects:
-
-Window Objects
---------------
-
-Window objects have the following methods, among others:
-
-
-.. method:: Window.open()
-
-   Override this method to open a window. Store the MacOS window-id in
-   :attr:`self.wid` and call the :meth:`do_postopen` method to register the window
-   with the parent application.
-
-
-.. method:: Window.close()
-
-   Override this method to do any special processing on window close. Call the
-   :meth:`do_postclose` method to cleanup the parent state.
-
-
-.. method:: Window.do_postresize(width, height, macoswindowid)
-
-   Called after the window is resized. Override if more needs to be done than
-   calling ``InvalRect``.
-
-
-.. method:: Window.do_contentclick(local, modifiers, event)
-
-   The user clicked in the content part of a window. The arguments are the
-   coordinates (window-relative), the key modifiers and the raw event.
-
-
-.. method:: Window.do_update(macoswindowid, event)
-
-   An update event for the window was received. Redraw the window.
-
-
-.. method:: Window.do_activate(activate, event)
-
-   The window was activated (``activate == 1``) or deactivated (``activate == 0``).
-   Handle things like focus highlighting, etc.
-
-
-.. _controlswindow-object:
-
-ControlsWindow Object
----------------------
-
-ControlsWindow objects have the following methods besides those of ``Window``
-objects:
-
-
-.. method:: ControlsWindow.do_controlhit(window, control, pcode, event)
-
-   Part *pcode* of control *control* was hit by the user. Tracking and such has
-   already been taken care of.
-
-
-.. _scrolledwindow-object:
-
-ScrolledWindow Object
----------------------
-
-ScrolledWindow objects are ControlsWindow objects with the following extra
-methods:
-
-
-.. method:: ScrolledWindow.scrollbars([wantx[, wanty]])
-
-   Create (or destroy) horizontal and vertical scrollbars. The arguments specify
-   which you want (default: both). The scrollbars always have minimum ``0`` and
-   maximum ``32767``.
-
-
-.. method:: ScrolledWindow.getscrollbarvalues()
-
-   You must supply this method. It should return a tuple ``(x, y)`` giving the
-   current position of the scrollbars (between ``0`` and ``32767``). You can return
-   ``None`` for either to indicate the whole document is visible in that direction.
-
-
-.. method:: ScrolledWindow.updatescrollbars()
-
-   Call this method when the document has changed. It will call
-   :meth:`getscrollbarvalues` and update the scrollbars.
-
-
-.. method:: ScrolledWindow.scrollbar_callback(which, what, value)
-
-   Supplied by you and called after user interaction. *which* will be ``'x'`` or
-   ``'y'``, *what* will be ``'-'``, ``'--'``, ``'set'``, ``'++'`` or ``'+'``. For
-   ``'set'``, *value* will contain the new scrollbar position.
-
-
-.. method:: ScrolledWindow.scalebarvalues(absmin, absmax, curmin, curmax)
-
-   Auxiliary method to help you calculate values to return from
-   :meth:`getscrollbarvalues`. You pass document minimum and maximum value and
-   topmost (leftmost) and bottommost (rightmost) visible values and it returns the
-   correct number or ``None``.
-
-
-.. method:: ScrolledWindow.do_activate(onoff, event)
-
-   Takes care of dimming/highlighting scrollbars when a window becomes frontmost.
-   If you override this method, call this one at the end of your method.
-
-
-.. method:: ScrolledWindow.do_postresize(width, height, window)
-
-   Moves scrollbars to the correct position. Call this method initially if you
-   override it.
-
-
-.. method:: ScrolledWindow.do_controlhit(window, control, pcode, event)
-
-   Handles scrollbar interaction. If you override it call this method first, a
-   nonzero return value indicates the hit was in the scrollbars and has been
-   handled.
-
-
-.. _dialogwindow-objects:
-
-DialogWindow Objects
---------------------
-
-DialogWindow objects have the following methods besides those of ``Window``
-objects:
-
-
-.. method:: DialogWindow.open(resid)
-
-   Create the dialog window, from the DLOG resource with id *resid*. The dialog
-   object is stored in :attr:`self.wid`.
-
-
-.. method:: DialogWindow.do_itemhit(item, event)
-
-   Item number *item* was hit. You are responsible for redrawing toggle buttons,
-   etc.
-
diff --git a/Doc/library/ic.rst b/Doc/library/ic.rst
deleted file mode 100644 (file)
index d5e03bd..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-
-:mod:`ic` --- Access to the Mac OS X Internet Config
-====================================================
-
-.. module:: ic
-   :platform: Mac
-   :synopsis: Access to the Mac OS X Internet Config.
-
-
-This module provides access to various internet-related preferences set through
-:program:`System Preferences` or the :program:`Finder`.
-
-.. index:: module: icglue
-
-There is a low-level companion module :mod:`icglue` which provides the basic
-Internet Config access functionality.  This low-level module is not documented,
-but the docstrings of the routines document the parameters and the routine names
-are the same as for the Pascal or C API to Internet Config, so the standard IC
-programmers' documentation can be used if this module is needed.
-
-The :mod:`ic` module defines the :exc:`error` exception and symbolic names for
-all error codes Internet Config can produce; see the source for details.
-
-
-.. exception:: error
-
-   Exception raised on errors in the :mod:`ic` module.
-
-The :mod:`ic` module defines the following class and function:
-
-
-.. class:: IC([signature[, ic]])
-
-   Create an Internet Config object. The signature is a 4-character creator code of
-   the current application (default ``'Pyth'``) which may influence some of ICs
-   settings. The optional *ic* argument is a low-level ``icglue.icinstance``
-   created beforehand, this may be useful if you want to get preferences from a
-   different config file, etc.
-
-
-.. function:: launchurl(url[, hint])
-              parseurl(data[, start[, end[, hint]]])
-              mapfile(file)
-              maptypecreator(type, creator[, filename])
-              settypecreator(file)
-
-   These functions are "shortcuts" to the methods of the same name, described
-   below.
-
-
-IC Objects
-----------
-
-:class:`IC` objects have a mapping interface, hence to obtain the mail address
-you simply get ``ic['MailAddress']``. Assignment also works, and changes the
-option in the configuration file.
-
-The module knows about various datatypes, and converts the internal IC
-representation to a "logical" Python data structure. Running the :mod:`ic`
-module standalone will run a test program that lists all keys and values in your
-IC database, this will have to serve as documentation.
-
-If the module does not know how to represent the data it returns an instance of
-the ``ICOpaqueData`` type, with the raw data in its :attr:`data` attribute.
-Objects of this type are also acceptable values for assignment.
-
-Besides the dictionary interface, :class:`IC` objects have the following
-methods:
-
-
-.. method:: IC.launchurl(url[, hint])
-
-   Parse the given URL, launch the correct application and pass it the URL. The
-   optional *hint* can be a scheme name such as ``'mailto:'``, in which case
-   incomplete URLs are completed with this scheme.  If *hint* is not provided,
-   incomplete URLs are invalid.
-
-
-.. method:: IC.parseurl(data[, start[, end[, hint]]])
-
-   Find an URL somewhere in *data* and return start position, end position and the
-   URL. The optional *start* and *end* can be used to limit the search, so for
-   instance if a user clicks in a long text field you can pass the whole text field
-   and the click-position in *start* and this routine will return the whole URL in
-   which the user clicked.  As above, *hint* is an optional scheme used to complete
-   incomplete URLs.
-
-
-.. method:: IC.mapfile(file)
-
-   Return the mapping entry for the given *file*, which can be passed as either a
-   filename or an :func:`FSSpec` result, and which need not exist.
-
-   The mapping entry is returned as a tuple ``(version, type, creator, postcreator,
-   flags, extension, appname, postappname, mimetype, entryname)``, where *version*
-   is the entry version number, *type* is the 4-character filetype, *creator* is
-   the 4-character creator type, *postcreator* is the 4-character creator code of
-   an optional application to post-process the file after downloading, *flags* are
-   various bits specifying whether to transfer in binary or ascii and such,
-   *extension* is the filename extension for this file type, *appname* is the
-   printable name of the application to which this file belongs, *postappname* is
-   the name of the postprocessing application, *mimetype* is the MIME type of this
-   file and *entryname* is the name of this entry.
-
-
-.. method:: IC.maptypecreator(type, creator[, filename])
-
-   Return the mapping entry for files with given 4-character *type* and *creator*
-   codes. The optional *filename* may be specified to further help finding the
-   correct entry (if the creator code is ``'????'``, for instance).
-
-   The mapping entry is returned in the same format as for *mapfile*.
-
-
-.. method:: IC.settypecreator(file)
-
-   Given an existing *file*, specified either as a filename or as an :func:`FSSpec`
-   result, set its creator and type correctly based on its extension.  The finder
-   is told about the change, so the finder icon will be updated quickly.
index a4332143522bf818de3c361a8d20561d2d0d32ec..3a1d14df8e98d12bb716e41dd7cb02ee99062f47 100644 (file)
@@ -73,6 +73,4 @@ the `Python Package Index <http://pypi.python.org/pypi>`_.
    misc.rst
    windows.rst
    unix.rst
-   mac.rst
-   macosa.rst
    undoc.rst
diff --git a/Doc/library/mac.rst b/Doc/library/mac.rst
deleted file mode 100644 (file)
index 791eb81..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-.. _mac-specific-services:
-
-*************************
-MacOS X specific services
-*************************
-
-This chapter describes modules that are only available on the Mac OS X platform.
-
-See the chapters :ref:`mac-scripting` and :ref:`undoc-mac-modules` for more
-modules, and the HOWTO :ref:`using-on-mac` for a general introduction to
-Mac-specific Python programming.
-
-
-.. toctree::
-
-   ic.rst
-   macos.rst
-   macostools.rst
-   easydialogs.rst
-   framework.rst
-   autogil.rst
-   carbon.rst
-   colorpicker.rst
diff --git a/Doc/library/macos.rst b/Doc/library/macos.rst
deleted file mode 100644 (file)
index 0eb7225..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-
-:mod:`MacOS` --- Access to Mac OS interpreter features
-======================================================
-
-.. module:: MacOS
-   :platform: Mac
-   :synopsis: Access to Mac OS-specific interpreter features.
-
-
-This module provides access to MacOS specific functionality in the Python
-interpreter, such as how the interpreter eventloop functions and the like. Use
-with care.
-
-Note the capitalization of the module name; this is a historical artifact.
-
-
-.. data:: runtimemodel
-
-   Always ``'macho'``.
-
-
-.. data:: linkmodel
-
-   The way the interpreter has been linked. As extension modules may be
-   incompatible between linking models, packages could use this information to give
-   more decent error messages. The value is one of ``'static'`` for a statically
-   linked Python, ``'framework'`` for Python in a Mac OS X framework, ``'shared'``
-   for Python in a standard Unix shared library. Older Pythons could also have the
-   value ``'cfm'`` for Mac OS 9-compatible Python.
-
-
-.. exception:: Error
-
-   .. index:: module: macerrors
-
-   This exception is raised on MacOS generated errors, either from functions in
-   this module or from other mac-specific modules like the toolbox interfaces. The
-   arguments are the integer error code (the :cdata:`OSErr` value) and a textual
-   description of the error code. Symbolic names for all known error codes are
-   defined in the standard module :mod:`macerrors`.
-
-
-.. function:: GetErrorString(errno)
-
-   Return the textual description of MacOS error code *errno*.
-
-
-.. function:: DebugStr(message [, object])
-
-   On Mac OS X the string is simply printed to stderr (on older Mac OS systems more
-   elaborate functionality was available), but it provides a convenient location to
-   attach a breakpoint in a low-level debugger like :program:`gdb`.
-
-
-.. function:: SysBeep()
-
-   Ring the bell.
-
-
-.. function:: GetTicks()
-
-   Get the number of clock ticks (1/60th of a second) since system boot.
-
-
-.. function:: GetCreatorAndType(file)
-
-   Return the file creator and file type as two four-character strings. The *file*
-   parameter can be a pathname or an ``FSSpec`` or  ``FSRef`` object.
-
-
-.. function:: SetCreatorAndType(file, creator, type)
-
-   Set the file creator and file type. The *file* parameter can be a pathname or an
-   ``FSSpec`` or  ``FSRef`` object. *creator* and *type* must be four character
-   strings.
-
-
-.. function:: openrf(name [, mode])
-
-   Open the resource fork of a file. Arguments are the same as for the built-in
-   function :func:`open`. The object returned has file-like semantics, but it is
-   not a Python file object, so there may be subtle differences.
-
-
-.. function:: WMAvailable()
-
-   Checks whether the current process has access to the window manager. The method
-   will return ``False`` if the window manager is not available, for instance when
-   running on Mac OS X Server or when logged in via ssh, or when the current
-   interpreter is not running from a fullblown application bundle. A script runs
-   from an application bundle either when it has been started with
-   :program:`pythonw` instead of :program:`python` or when running  as an applet.
-
diff --git a/Doc/library/macosa.rst b/Doc/library/macosa.rst
deleted file mode 100644 (file)
index 4e0b3aa..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-
-.. _mac-scripting:
-
-*********************
-MacPython OSA Modules
-*********************
-
-This chapter describes the current implementation of the Open Scripting
-Architecure (OSA, also commonly referred to as AppleScript) for Python, allowing
-you to control scriptable applications from your Python program, and with a
-fairly pythonic interface. Development on this set of modules has stopped, and a
-replacement is expected for Python 2.5.
-
-For a description of the various components of AppleScript and OSA, and to get
-an understanding of the architecture and terminology, you should read Apple's
-documentation. The "Applescript Language Guide" explains the conceptual model
-and the terminology, and documents the standard suite. The "Open Scripting
-Architecture" document explains how to use OSA from an application programmers
-point of view. In the Apple Help Viewer these books are located in the Developer
-Documentation, Core Technologies section.
-
-As an example of scripting an application, the following piece of AppleScript
-will get the name of the frontmost :program:`Finder` window and print it::
-
-   tell application "Finder"
-       get name of window 1
-   end tell
-
-In Python, the following code fragment will do the same::
-
-   import Finder
-
-   f = Finder.Finder()
-   print(f.get(f.window(1).name))
-
-As distributed the Python library includes packages that implement the standard
-suites, plus packages that interface to a small number of common applications.
-
-To send AppleEvents to an application you must first create the Python package
-interfacing to the terminology of the application (what :program:`Script Editor`
-calls the "Dictionary"). This can be done from within the :program:`PythonIDE`
-or by running the :file:`gensuitemodule.py` module as a standalone program from
-the command line.
-
-The generated output is a package with a number of modules, one for every suite
-used in the program plus an :mod:`__init__` module to glue it all together. The
-Python inheritance graph follows the AppleScript inheritance graph, so if a
-program's dictionary specifies that it includes support for the Standard Suite,
-but extends one or two verbs with extra arguments then the output suite will
-contain a module :mod:`Standard_Suite` that imports and re-exports everything
-from :mod:`StdSuites.Standard_Suite` but overrides the methods that have extra
-functionality. The output of :mod:`gensuitemodule` is pretty readable, and
-contains the documentation that was in the original AppleScript dictionary in
-Python docstrings, so reading it is a good source of documentation.
-
-The output package implements a main class with the same name as the package
-which contains all the AppleScript verbs as methods, with the direct object as
-the first argument and all optional parameters as keyword arguments. AppleScript
-classes are also implemented as Python classes, as are comparisons and all the
-other thingies.
-
-The main Python class implementing the verbs also allows access to the
-properties and elements declared in the AppleScript class "application". In the
-current release that is as far as the object orientation goes, so in the example
-above we need to use ``f.get(f.window(1).name)`` instead of the more Pythonic
-``f.window(1).name.get()``.
-
-If an AppleScript identifier is not a Python identifier the name is mangled
-according to a small number of rules:
-
-* spaces are replaced with underscores
-
-* other non-alphanumeric characters are replaced with ``_xx_`` where ``xx`` is
-  the hexadecimal character value
-
-* any Python reserved word gets an underscore appended
-
-Python also has support for creating scriptable applications in Python, but The
-following modules are relevant to MacPython AppleScript support:
-
-.. toctree::
-
-   gensuitemodule.rst
-   aetools.rst
-   aepack.rst
-   aetypes.rst
-   miniaeframe.rst
-
-
-In addition, support modules have been pre-generated for :mod:`Finder`,
-:mod:`Terminal`, :mod:`Explorer`, :mod:`Netscape`, :mod:`CodeWarrior`,
-:mod:`SystemEvents` and :mod:`StdSuites`.
diff --git a/Doc/library/macostools.rst b/Doc/library/macostools.rst
deleted file mode 100644 (file)
index 275100e..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-
-:mod:`macostools` --- Convenience routines for file manipulation
-================================================================
-
-.. module:: macostools
-   :platform: Mac
-   :synopsis: Convenience routines for file manipulation.
-
-
-This module contains some convenience routines for file-manipulation on the
-Macintosh. All file parameters can be specified as pathnames, :class:`FSRef` or
-:class:`FSSpec` objects.  This module expects a filesystem which supports forked
-files, so it should not be used on UFS partitions.
-
-The :mod:`macostools` module defines the following functions:
-
-
-.. function:: copy(src, dst[, createpath[, copytimes]])
-
-   Copy file *src* to *dst*.  If *createpath* is non-zero the folders leading to
-   *dst* are created if necessary. The method copies data and resource fork and
-   some finder information (creator, type, flags) and optionally the creation,
-   modification and backup times (default is to copy them). Custom icons, comments
-   and icon position are not copied.
-
-
-.. function:: copytree(src, dst)
-
-   Recursively copy a file tree from *src* to *dst*, creating folders as needed.
-   *src* and *dst* should be specified as pathnames.
-
-
-.. function:: mkalias(src, dst)
-
-   Create a finder alias *dst* pointing to *src*.
-
-
-.. function:: touched(dst)
-
-   Tell the finder that some bits of finder-information such as creator or type for
-   file *dst* has changed. The file can be specified by pathname or fsspec. This
-   call should tell the finder to redraw the files icon.
-
-   .. deprecated:: 2.6
-      The function is a no-op on OS X.
-
-
-.. data:: BUFSIZ
-
-   The buffer size for ``copy``, default 1 megabyte.
-
-Note that the process of creating finder aliases is not specified in the Apple
-documentation. Hence, aliases created with :func:`mkalias` could conceivably
-have incompatible behaviour in some cases.
-
-
-:mod:`findertools` --- The :program:`finder`'s Apple Events interface
-=====================================================================
-
-.. module:: findertools
-   :platform: Mac
-   :synopsis: Wrappers around the finder's Apple Events interface.
-
-
-.. index:: single: AppleEvents
-
-This module contains routines that give Python programs access to some
-functionality provided by the finder. They are implemented as wrappers around
-the AppleEvent interface to the finder.
-
-All file and folder parameters can be specified either as full pathnames, or as
-:class:`FSRef` or :class:`FSSpec` objects.
-
-The :mod:`findertools` module defines the following functions:
-
-
-.. function:: launch(file)
-
-   Tell the finder to launch *file*. What launching means depends on the file:
-   applications are started, folders are opened and documents are opened in the
-   correct application.
-
-
-.. function:: Print(file)
-
-   Tell the finder to print a file. The behaviour is identical to selecting the
-   file and using the print command in the finder's file menu.
-
-
-.. function:: copy(file, destdir)
-
-   Tell the finder to copy a file or folder *file* to folder *destdir*. The
-   function returns an :class:`Alias` object pointing to the new file.
-
-
-.. function:: move(file, destdir)
-
-   Tell the finder to move a file or folder *file* to folder *destdir*. The
-   function returns an :class:`Alias` object pointing to the new file.
-
-
-.. function:: sleep()
-
-   Tell the finder to put the Macintosh to sleep, if your machine supports it.
-
-
-.. function:: restart()
-
-   Tell the finder to perform an orderly restart of the machine.
-
-
-.. function:: shutdown()
-
-   Tell the finder to perform an orderly shutdown of the machine.
-
index f449d7fefe23889b4bf96e84422b5c95f4a6c7ca..81b10bce0eab74fe50b883a2694176364330c41e 100644 (file)
@@ -65,19 +65,6 @@ This module defines the following functions:
    Return *rootObject* as a plist-formatted string.
 
 
-
-.. function:: readPlistFromResource(path[, restype='plst'[, resid=0]])
-
-    Read a plist from the resource with type *restype* from the resource fork of
-    *path*.  Availability: MacOS X.
-
-
-.. function:: writePlistToResource(rootObject, path[, restype='plst'[, resid=0]])
-
-    Write *rootObject* as a resource with type *restype* to the resource fork of
-    *path*.  Availability: MacOS X.
-
-
 The following class is available:
 
 .. class:: Data(data)
index b3145301d7385735463449f60d0a4f217e86c968..8cdf442845914521cc57d6f134e4cc105ac3cd6d 100644 (file)
@@ -37,104 +37,6 @@ Multimedia
 :mod:`sunaudio`
    --- Interpret Sun audio headers (may become obsolete or a tool/demo).
 
-
-.. _undoc-mac-modules:
-
-Undocumented Mac OS modules
-===========================
-
-
-:mod:`applesingle` --- AppleSingle decoder
-------------------------------------------
-
-.. module:: applesingle
-   :platform: Mac
-   :synopsis: Rudimentary decoder for AppleSingle format files.
-
-
-:mod:`icopen` --- Internet Config replacement for :meth:`open`
---------------------------------------------------------------
-
-.. module:: icopen
-   :platform: Mac
-   :synopsis: Internet Config replacement for open().
-
-
-Importing :mod:`icopen` will replace the builtin :meth:`open` with a version
-that uses Internet Config to set file type and creator for new files.
-
-
-:mod:`macerrors` --- Mac OS Errors
-----------------------------------
-
-.. module:: macerrors
-   :platform: Mac
-   :synopsis: Constant definitions for many Mac OS error codes.
-
-
-:mod:`macerrors` contains constant definitions for many Mac OS error codes.
-
-
-:mod:`macresource` --- Locate script resources
-----------------------------------------------
-
-.. module:: macresource
-   :platform: Mac
-   :synopsis: Locate script resources.
-
-
-:mod:`macresource` helps scripts finding their resources, such as dialogs and
-menus, without requiring special case code for when the script is run under
-MacPython, as a MacPython applet or under OSX Python.
-
-
-:mod:`Nav` --- NavServices calls
---------------------------------
-
-.. module:: Nav
-   :platform: Mac
-   :synopsis: Interface to Navigation Services.
-
-
-A low-level interface to Navigation Services.
-
-
-:mod:`PixMapWrapper` --- Wrapper for PixMap objects
----------------------------------------------------
-
-.. module:: PixMapWrapper
-   :platform: Mac
-   :synopsis: Wrapper for PixMap objects.
-
-
-:mod:`PixMapWrapper` wraps a PixMap object with a Python object that allows
-access to the fields by name. It also has methods to convert to and from
-:mod:`PIL` images.
-
-
-:mod:`videoreader` --- Read QuickTime movies
---------------------------------------------
-
-.. module:: videoreader
-   :platform: Mac
-   :synopsis: Read QuickTime movies frame by frame for further processing.
-
-
-:mod:`videoreader` reads and decodes QuickTime movies and passes a stream of
-images to your program. It also provides some support for audio tracks.
-
-
-:mod:`W` --- Widgets built on :mod:`FrameWork`
-----------------------------------------------
-
-.. module:: W
-   :platform: Mac
-   :synopsis: Widgets for the Mac, built on top of FrameWork.
-
-
-The :mod:`W` widgets are used extensively in the :program:`IDE`.
-
-
 .. _obsolete-modules:
 
 Obsolete
index 8953e0b395c11ba00375fc3c9eef6ebf8c6e3f49..7da291450c0f050c5695cae32816325c2ab01a1f 100644 (file)
@@ -12,9 +12,6 @@ Python on a Macintosh running Mac OS X is in principle very similar to Python on
 any other Unix platform, but there are a number of additional features such as
 the IDE and the Package Manager that are worth pointing out.
 
-The Mac-specific modules are documented in :ref:`mac-specific-services`.
-
-
 .. _getting-osx:
 
 Getting and Installing MacPython
index 61dda82fd1ca8dd08b3c357b53646741cdc62f01..1c3f3429032667dca3939a237e76121898898372 100644 (file)
@@ -43,68 +43,39 @@ RUNCHAR = b"\x90"
 #
 # This code is no longer byte-order dependent
 
-#
-# Workarounds for non-mac machines.
-try:
-    from Carbon.File import FSSpec, FInfo
-    from MacOS import openrf
-
-    def getfileinfo(name):
-        finfo = FSSpec(name).FSpGetFInfo()
-        dir, file = os.path.split(name)
-        # XXX Get resource/data sizes
-        fp = io.open(name, 'rb')
-        fp.seek(0, 2)
-        dlen = fp.tell()
-        fp = openrf(name, '*rb')
-        fp.seek(0, 2)
-        rlen = fp.tell()
-        return file, finfo, dlen, rlen
-
-    def openrsrc(name, *mode):
-        if not mode:
-            mode = '*rb'
-        else:
-            mode = '*' + mode[0]
-        return openrf(name, mode)
-
-except ImportError:
-    #
-    # Glue code for non-macintosh usage
-    #
-
-    class FInfo:
-        def __init__(self):
-            self.Type = '????'
-            self.Creator = '????'
-            self.Flags = 0
-
-    def getfileinfo(name):
-        finfo = FInfo()
-        fp = io.open(name, 'rb')
-        # Quick check for textfile
-        data = fp.read(512)
-        if 0 not in data:
-            finfo.Type = 'TEXT'
-        fp.seek(0, 2)
-        dsize = fp.tell()
-        fp.close()
-        dir, file = os.path.split(name)
-        file = file.replace(':', '-', 1)
-        return file, finfo, dsize, 0
-
-    class openrsrc:
-        def __init__(self, *args):
-            pass
-
-        def read(self, *args):
-            return b''
-
-        def write(self, *args):
-            pass
-
-        def close(self):
-            pass
+
+class FInfo:
+    def __init__(self):
+        self.Type = '????'
+        self.Creator = '????'
+        self.Flags = 0
+
+def getfileinfo(name):
+    finfo = FInfo()
+    fp = io.open(name, 'rb')
+    # Quick check for textfile
+    data = fp.read(512)
+    if 0 not in data:
+        finfo.Type = 'TEXT'
+    fp.seek(0, 2)
+    dsize = fp.tell()
+    fp.close()
+    dir, file = os.path.split(name)
+    file = file.replace(':', '-', 1)
+    return file, finfo, dsize, 0
+
+class openrsrc:
+    def __init__(self, *args):
+        pass
+
+    def read(self, *args):
+        return b''
+
+    def write(self, *args):
+        pass
+
+    def close(self):
+        pass
 
 class _Hqxcoderengine:
     """Write data to the coder in 3-byte chunks"""
diff --git a/Lib/plat-mac/Audio_mac.py b/Lib/plat-mac/Audio_mac.py
deleted file mode 100644 (file)
index 0989967..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-QSIZE = 100000
-error='Audio_mac.error'
-
-class Play_Audio_mac:
-
-    def __init__(self, qsize=QSIZE):
-        self._chan = None
-        self._qsize = qsize
-        self._outrate = 22254
-        self._sampwidth = 1
-        self._nchannels = 1
-        self._gc = []
-        self._usercallback = None
-
-    def __del__(self):
-        self.stop()
-        self._usercallback = None
-
-    def wait(self):
-        import time
-        while self.getfilled():
-            time.sleep(0.1)
-        self._chan = None
-        self._gc = []
-
-    def stop(self, quietNow = 1):
-        ##chan = self._chan
-        self._chan = None
-        ##chan.SndDisposeChannel(1)
-        self._gc = []
-
-    def setoutrate(self, outrate):
-        self._outrate = outrate
-
-    def setsampwidth(self, sampwidth):
-        self._sampwidth = sampwidth
-
-    def setnchannels(self, nchannels):
-        self._nchannels = nchannels
-
-    def writeframes(self, data):
-        import time
-        from Carbon.Sound import bufferCmd, callBackCmd, extSH
-        import struct
-        import MacOS
-        if not self._chan:
-            from Carbon import Snd
-            self._chan = Snd.SndNewChannel(5, 0, self._callback)
-        nframes = len(data) / self._nchannels / self._sampwidth
-        if len(data) != nframes * self._nchannels * self._sampwidth:
-            raise error('data is not a whole number of frames')
-        while self._gc and \
-              self.getfilled() + nframes > \
-                self._qsize / self._nchannels / self._sampwidth:
-            time.sleep(0.1)
-        if self._sampwidth == 1:
-            import audioop
-            data = audioop.add(data, '\x80'*len(data), 1)
-        h1 = struct.pack('llHhllbbl',
-            id(data)+MacOS.string_id_to_buffer,
-            self._nchannels,
-            self._outrate, 0,
-            0,
-            0,
-            extSH,
-            60,
-            nframes)
-        h2 = 22*'\0'
-        h3 = struct.pack('hhlll',
-            self._sampwidth*8,
-            0,
-            0,
-            0,
-            0)
-        header = h1+h2+h3
-        self._gc.append((header, data))
-        self._chan.SndDoCommand((bufferCmd, 0, header), 0)
-        self._chan.SndDoCommand((callBackCmd, 0, 0), 0)
-
-    def _callback(self, *args):
-        del self._gc[0]
-        if self._usercallback:
-            self._usercallback()
-
-    def setcallback(self, callback):
-        self._usercallback = callback
-
-    def getfilled(self):
-        filled = 0
-        for header, data in self._gc:
-            filled = filled + len(data)
-        return filled / self._nchannels / self._sampwidth
-
-    def getfillable(self):
-        return (self._qsize / self._nchannels / self._sampwidth) - self.getfilled()
-
-    def ulaw2lin(self, data):
-        import audioop
-        return audioop.ulaw2lin(data, 2)
-
-def test():
-    import aifc
-    import EasyDialogs
-    fn = EasyDialogs.AskFileForOpen(message="Select an AIFF soundfile", typeList=("AIFF",))
-    if not fn: return
-    af = aifc.open(fn, 'r')
-    print(af.getparams())
-    p = Play_Audio_mac()
-    p.setoutrate(af.getframerate())
-    p.setsampwidth(af.getsampwidth())
-    p.setnchannels(af.getnchannels())
-    BUFSIZ = 10000
-    while 1:
-        data = af.readframes(BUFSIZ)
-        if not data: break
-        p.writeframes(data)
-        print('wrote', len(data), 'space', p.getfillable())
-    p.wait()
-
-if __name__ == '__main__':
-    test()
diff --git a/Lib/plat-mac/Carbon/AE.py b/Lib/plat-mac/Carbon/AE.py
deleted file mode 100644 (file)
index 0f46017..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _AE import *
diff --git a/Lib/plat-mac/Carbon/AH.py b/Lib/plat-mac/Carbon/AH.py
deleted file mode 100644 (file)
index 0701e7b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _AH import *
diff --git a/Lib/plat-mac/Carbon/Alias.py b/Lib/plat-mac/Carbon/Alias.py
deleted file mode 100644 (file)
index cb612a6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Alias import *
diff --git a/Lib/plat-mac/Carbon/Aliases.py b/Lib/plat-mac/Carbon/Aliases.py
deleted file mode 100644 (file)
index 55e1a1f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated from 'Aliases.h'
-
-def FOUR_CHAR_CODE(x): return x
-true = True
-false = False
-rAliasType = FOUR_CHAR_CODE('alis')
-kARMMountVol = 0x00000001
-kARMNoUI = 0x00000002
-kARMMultVols = 0x00000008
-kARMSearch = 0x00000100
-kARMSearchMore = 0x00000200
-kARMSearchRelFirst = 0x00000400
-asiZoneName = -3
-asiServerName = -2
-asiVolumeName = -1
-asiAliasName = 0
-asiParentName = 1
-kResolveAliasFileNoUI = 0x00000001
diff --git a/Lib/plat-mac/Carbon/App.py b/Lib/plat-mac/Carbon/App.py
deleted file mode 100644 (file)
index cc0d46d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _App import *
diff --git a/Lib/plat-mac/Carbon/Appearance.py b/Lib/plat-mac/Carbon/Appearance.py
deleted file mode 100644 (file)
index d99c6dc..0000000
+++ /dev/null
@@ -1,648 +0,0 @@
-# Generated from 'Appearance.h'
-
-def FOUR_CHAR_CODE(x): return x
-kAppearanceEventClass = FOUR_CHAR_CODE('appr')
-kAEAppearanceChanged = FOUR_CHAR_CODE('thme')
-kAESystemFontChanged = FOUR_CHAR_CODE('sysf')
-kAESmallSystemFontChanged = FOUR_CHAR_CODE('ssfn')
-kAEViewsFontChanged = FOUR_CHAR_CODE('vfnt')
-kThemeDataFileType = FOUR_CHAR_CODE('thme')
-kThemePlatinumFileType = FOUR_CHAR_CODE('pltn')
-kThemeCustomThemesFileType = FOUR_CHAR_CODE('scen')
-kThemeSoundTrackFileType = FOUR_CHAR_CODE('tsnd')
-kThemeBrushDialogBackgroundActive = 1
-kThemeBrushDialogBackgroundInactive = 2
-kThemeBrushAlertBackgroundActive = 3
-kThemeBrushAlertBackgroundInactive = 4
-kThemeBrushModelessDialogBackgroundActive = 5
-kThemeBrushModelessDialogBackgroundInactive = 6
-kThemeBrushUtilityWindowBackgroundActive = 7
-kThemeBrushUtilityWindowBackgroundInactive = 8
-kThemeBrushListViewSortColumnBackground = 9
-kThemeBrushListViewBackground = 10
-kThemeBrushIconLabelBackground = 11
-kThemeBrushListViewSeparator = 12
-kThemeBrushChasingArrows = 13
-kThemeBrushDragHilite = 14
-kThemeBrushDocumentWindowBackground = 15
-kThemeBrushFinderWindowBackground = 16
-kThemeBrushScrollBarDelimiterActive = 17
-kThemeBrushScrollBarDelimiterInactive = 18
-kThemeBrushFocusHighlight = 19
-kThemeBrushPopupArrowActive = 20
-kThemeBrushPopupArrowPressed = 21
-kThemeBrushPopupArrowInactive = 22
-kThemeBrushAppleGuideCoachmark = 23
-kThemeBrushIconLabelBackgroundSelected = 24
-kThemeBrushStaticAreaFill = 25
-kThemeBrushActiveAreaFill = 26
-kThemeBrushButtonFrameActive = 27
-kThemeBrushButtonFrameInactive = 28
-kThemeBrushButtonFaceActive = 29
-kThemeBrushButtonFaceInactive = 30
-kThemeBrushButtonFacePressed = 31
-kThemeBrushButtonActiveDarkShadow = 32
-kThemeBrushButtonActiveDarkHighlight = 33
-kThemeBrushButtonActiveLightShadow = 34
-kThemeBrushButtonActiveLightHighlight = 35
-kThemeBrushButtonInactiveDarkShadow = 36
-kThemeBrushButtonInactiveDarkHighlight = 37
-kThemeBrushButtonInactiveLightShadow = 38
-kThemeBrushButtonInactiveLightHighlight = 39
-kThemeBrushButtonPressedDarkShadow = 40
-kThemeBrushButtonPressedDarkHighlight = 41
-kThemeBrushButtonPressedLightShadow = 42
-kThemeBrushButtonPressedLightHighlight = 43
-kThemeBrushBevelActiveLight = 44
-kThemeBrushBevelActiveDark = 45
-kThemeBrushBevelInactiveLight = 46
-kThemeBrushBevelInactiveDark = 47
-kThemeBrushNotificationWindowBackground = 48
-kThemeBrushMovableModalBackground = 49
-kThemeBrushSheetBackgroundOpaque = 50
-kThemeBrushDrawerBackground = 51
-kThemeBrushToolbarBackground = 52
-kThemeBrushSheetBackgroundTransparent = 53
-kThemeBrushMenuBackground = 54
-kThemeBrushMenuBackgroundSelected = 55
-kThemeBrushSheetBackground = kThemeBrushSheetBackgroundOpaque
-kThemeBrushBlack = -1
-kThemeBrushWhite = -2
-kThemeBrushPrimaryHighlightColor = -3
-kThemeBrushSecondaryHighlightColor = -4
-kThemeTextColorDialogActive = 1
-kThemeTextColorDialogInactive = 2
-kThemeTextColorAlertActive = 3
-kThemeTextColorAlertInactive = 4
-kThemeTextColorModelessDialogActive = 5
-kThemeTextColorModelessDialogInactive = 6
-kThemeTextColorWindowHeaderActive = 7
-kThemeTextColorWindowHeaderInactive = 8
-kThemeTextColorPlacardActive = 9
-kThemeTextColorPlacardInactive = 10
-kThemeTextColorPlacardPressed = 11
-kThemeTextColorPushButtonActive = 12
-kThemeTextColorPushButtonInactive = 13
-kThemeTextColorPushButtonPressed = 14
-kThemeTextColorBevelButtonActive = 15
-kThemeTextColorBevelButtonInactive = 16
-kThemeTextColorBevelButtonPressed = 17
-kThemeTextColorPopupButtonActive = 18
-kThemeTextColorPopupButtonInactive = 19
-kThemeTextColorPopupButtonPressed = 20
-kThemeTextColorIconLabel = 21
-kThemeTextColorListView = 22
-kThemeTextColorDocumentWindowTitleActive = 23
-kThemeTextColorDocumentWindowTitleInactive = 24
-kThemeTextColorMovableModalWindowTitleActive = 25
-kThemeTextColorMovableModalWindowTitleInactive = 26
-kThemeTextColorUtilityWindowTitleActive = 27
-kThemeTextColorUtilityWindowTitleInactive = 28
-kThemeTextColorPopupWindowTitleActive = 29
-kThemeTextColorPopupWindowTitleInactive = 30
-kThemeTextColorRootMenuActive = 31
-kThemeTextColorRootMenuSelected = 32
-kThemeTextColorRootMenuDisabled = 33
-kThemeTextColorMenuItemActive = 34
-kThemeTextColorMenuItemSelected = 35
-kThemeTextColorMenuItemDisabled = 36
-kThemeTextColorPopupLabelActive = 37
-kThemeTextColorPopupLabelInactive = 38
-kThemeTextColorTabFrontActive = 39
-kThemeTextColorTabNonFrontActive = 40
-kThemeTextColorTabNonFrontPressed = 41
-kThemeTextColorTabFrontInactive = 42
-kThemeTextColorTabNonFrontInactive = 43
-kThemeTextColorIconLabelSelected = 44
-kThemeTextColorBevelButtonStickyActive = 45
-kThemeTextColorBevelButtonStickyInactive = 46
-kThemeTextColorNotification = 47
-kThemeTextColorBlack = -1
-kThemeTextColorWhite = -2
-kThemeStateInactive = 0
-kThemeStateActive = 1
-kThemeStatePressed = 2
-kThemeStateRollover = 6
-kThemeStateUnavailable = 7
-kThemeStateUnavailableInactive = 8
-kThemeStateDisabled = 0
-kThemeStatePressedUp = 2
-kThemeStatePressedDown = 3
-kThemeArrowCursor = 0
-kThemeCopyArrowCursor = 1
-kThemeAliasArrowCursor = 2
-kThemeContextualMenuArrowCursor = 3
-kThemeIBeamCursor = 4
-kThemeCrossCursor = 5
-kThemePlusCursor = 6
-kThemeWatchCursor = 7
-kThemeClosedHandCursor = 8
-kThemeOpenHandCursor = 9
-kThemePointingHandCursor = 10
-kThemeCountingUpHandCursor = 11
-kThemeCountingDownHandCursor = 12
-kThemeCountingUpAndDownHandCursor = 13
-kThemeSpinningCursor = 14
-kThemeResizeLeftCursor = 15
-kThemeResizeRightCursor = 16
-kThemeResizeLeftRightCursor = 17
-kThemeMenuBarNormal = 0
-kThemeMenuBarSelected = 1
-kThemeMenuSquareMenuBar = (1 << 0)
-kThemeMenuActive = 0
-kThemeMenuSelected = 1
-kThemeMenuDisabled = 3
-kThemeMenuTypePullDown = 0
-kThemeMenuTypePopUp = 1
-kThemeMenuTypeHierarchical = 2
-kThemeMenuTypeInactive = 0x0100
-kThemeMenuItemPlain = 0
-kThemeMenuItemHierarchical = 1
-kThemeMenuItemScrollUpArrow = 2
-kThemeMenuItemScrollDownArrow = 3
-kThemeMenuItemAtTop = 0x0100
-kThemeMenuItemAtBottom = 0x0200
-kThemeMenuItemHierBackground = 0x0400
-kThemeMenuItemPopUpBackground = 0x0800
-kThemeMenuItemHasIcon = 0x8000
-kThemeMenuItemNoBackground = 0x4000
-kThemeBackgroundTabPane = 1
-kThemeBackgroundPlacard = 2
-kThemeBackgroundWindowHeader = 3
-kThemeBackgroundListViewWindowHeader = 4
-kThemeBackgroundSecondaryGroupBox = 5
-kThemeNameTag = FOUR_CHAR_CODE('name')
-kThemeVariantNameTag = FOUR_CHAR_CODE('varn')
-kThemeVariantBaseTintTag = FOUR_CHAR_CODE('tint')
-kThemeHighlightColorTag = FOUR_CHAR_CODE('hcol')
-kThemeScrollBarArrowStyleTag = FOUR_CHAR_CODE('sbar')
-kThemeScrollBarThumbStyleTag = FOUR_CHAR_CODE('sbth')
-kThemeSoundsEnabledTag = FOUR_CHAR_CODE('snds')
-kThemeDblClickCollapseTag = FOUR_CHAR_CODE('coll')
-kThemeAppearanceFileNameTag = FOUR_CHAR_CODE('thme')
-kThemeSystemFontTag = FOUR_CHAR_CODE('lgsf')
-kThemeSmallSystemFontTag = FOUR_CHAR_CODE('smsf')
-kThemeViewsFontTag = FOUR_CHAR_CODE('vfnt')
-kThemeViewsFontSizeTag = FOUR_CHAR_CODE('vfsz')
-kThemeDesktopPatternNameTag = FOUR_CHAR_CODE('patn')
-kThemeDesktopPatternTag = FOUR_CHAR_CODE('patt')
-kThemeDesktopPictureNameTag = FOUR_CHAR_CODE('dpnm')
-kThemeDesktopPictureAliasTag = FOUR_CHAR_CODE('dpal')
-kThemeDesktopPictureAlignmentTag = FOUR_CHAR_CODE('dpan')
-kThemeHighlightColorNameTag = FOUR_CHAR_CODE('hcnm')
-kThemeExamplePictureIDTag = FOUR_CHAR_CODE('epic')
-kThemeSoundTrackNameTag = FOUR_CHAR_CODE('sndt')
-kThemeSoundMaskTag = FOUR_CHAR_CODE('smsk')
-kThemeUserDefinedTag = FOUR_CHAR_CODE('user')
-kThemeSmoothFontEnabledTag = FOUR_CHAR_CODE('smoo')
-kThemeSmoothFontMinSizeTag = FOUR_CHAR_CODE('smos')
-kTiledOnScreen = 1
-kCenterOnScreen = 2
-kFitToScreen = 3
-kFillScreen = 4
-kUseBestGuess = 5
-kThemeCheckBoxClassicX = 0
-kThemeCheckBoxCheckMark = 1
-kThemeScrollBarArrowsSingle = 0
-kThemeScrollBarArrowsLowerRight = 1
-kThemeScrollBarThumbNormal = 0
-kThemeScrollBarThumbProportional = 1
-kThemeSystemFont = 0
-kThemeSmallSystemFont = 1
-kThemeSmallEmphasizedSystemFont = 2
-kThemeViewsFont = 3
-kThemeEmphasizedSystemFont = 4
-kThemeApplicationFont = 5
-kThemeLabelFont = 6
-kThemeMenuTitleFont = 100
-kThemeMenuItemFont = 101
-kThemeMenuItemMarkFont = 102
-kThemeMenuItemCmdKeyFont = 103
-kThemeWindowTitleFont = 104
-kThemePushButtonFont = 105
-kThemeUtilityWindowTitleFont = 106
-kThemeAlertHeaderFont = 107
-kThemeCurrentPortFont = 200
-kThemeTabNonFront = 0
-kThemeTabNonFrontPressed = 1
-kThemeTabNonFrontInactive = 2
-kThemeTabFront = 3
-kThemeTabFrontInactive = 4
-kThemeTabNonFrontUnavailable = 5
-kThemeTabFrontUnavailable = 6
-kThemeTabNorth = 0
-kThemeTabSouth = 1
-kThemeTabEast = 2
-kThemeTabWest = 3
-kThemeSmallTabHeight = 16
-kThemeLargeTabHeight = 21
-kThemeTabPaneOverlap = 3
-kThemeSmallTabHeightMax = 19
-kThemeLargeTabHeightMax = 24
-kThemeMediumScrollBar = 0
-kThemeSmallScrollBar = 1
-kThemeMediumSlider = 2
-kThemeMediumProgressBar = 3
-kThemeMediumIndeterminateBar = 4
-kThemeRelevanceBar = 5
-kThemeSmallSlider = 6
-kThemeLargeProgressBar = 7
-kThemeLargeIndeterminateBar = 8
-kThemeTrackActive = 0
-kThemeTrackDisabled = 1
-kThemeTrackNothingToScroll = 2
-kThemeTrackInactive = 3
-kThemeLeftOutsideArrowPressed = 0x01
-kThemeLeftInsideArrowPressed = 0x02
-kThemeLeftTrackPressed = 0x04
-kThemeThumbPressed = 0x08
-kThemeRightTrackPressed = 0x10
-kThemeRightInsideArrowPressed = 0x20
-kThemeRightOutsideArrowPressed = 0x40
-kThemeTopOutsideArrowPressed = kThemeLeftOutsideArrowPressed
-kThemeTopInsideArrowPressed = kThemeLeftInsideArrowPressed
-kThemeTopTrackPressed = kThemeLeftTrackPressed
-kThemeBottomTrackPressed = kThemeRightTrackPressed
-kThemeBottomInsideArrowPressed = kThemeRightInsideArrowPressed
-kThemeBottomOutsideArrowPressed = kThemeRightOutsideArrowPressed
-kThemeThumbPlain = 0
-kThemeThumbUpward = 1
-kThemeThumbDownward = 2
-kThemeTrackHorizontal = (1 << 0)
-kThemeTrackRightToLeft = (1 << 1)
-kThemeTrackShowThumb = (1 << 2)
-kThemeTrackThumbRgnIsNotGhost = (1 << 3)
-kThemeTrackNoScrollBarArrows = (1 << 4)
-kThemeWindowHasGrow = (1 << 0)
-kThemeWindowHasHorizontalZoom = (1 << 3)
-kThemeWindowHasVerticalZoom = (1 << 4)
-kThemeWindowHasFullZoom = kThemeWindowHasHorizontalZoom + kThemeWindowHasVerticalZoom
-kThemeWindowHasCloseBox = (1 << 5)
-kThemeWindowHasCollapseBox = (1 << 6)
-kThemeWindowHasTitleText = (1 << 7)
-kThemeWindowIsCollapsed = (1 << 8)
-kThemeWindowHasDirty = (1 << 9)
-kThemeDocumentWindow = 0
-kThemeDialogWindow = 1
-kThemeMovableDialogWindow = 2
-kThemeAlertWindow = 3
-kThemeMovableAlertWindow = 4
-kThemePlainDialogWindow = 5
-kThemeShadowDialogWindow = 6
-kThemePopupWindow = 7
-kThemeUtilityWindow = 8
-kThemeUtilitySideWindow = 9
-kThemeSheetWindow = 10
-kThemeDrawerWindow = 11
-kThemeWidgetCloseBox = 0
-kThemeWidgetZoomBox = 1
-kThemeWidgetCollapseBox = 2
-kThemeWidgetDirtyCloseBox = 6
-kThemeArrowLeft = 0
-kThemeArrowDown = 1
-kThemeArrowRight = 2
-kThemeArrowUp = 3
-kThemeArrow3pt = 0
-kThemeArrow5pt = 1
-kThemeArrow7pt = 2
-kThemeArrow9pt = 3
-kThemeGrowLeft = (1 << 0)
-kThemeGrowRight = (1 << 1)
-kThemeGrowUp = (1 << 2)
-kThemeGrowDown = (1 << 3)
-kThemePushButton = 0
-kThemeCheckBox = 1
-kThemeRadioButton = 2
-kThemeBevelButton = 3
-kThemeArrowButton = 4
-kThemePopupButton = 5
-kThemeDisclosureButton = 6
-kThemeIncDecButton = 7
-kThemeSmallBevelButton = 8
-kThemeMediumBevelButton = 3
-kThemeLargeBevelButton = 9
-kThemeListHeaderButton = 10
-kThemeRoundButton = 11
-kThemeLargeRoundButton = 12
-kThemeSmallCheckBox = 13
-kThemeSmallRadioButton = 14
-kThemeRoundedBevelButton = 15
-kThemeNormalCheckBox = kThemeCheckBox
-kThemeNormalRadioButton = kThemeRadioButton
-kThemeButtonOff = 0
-kThemeButtonOn = 1
-kThemeButtonMixed = 2
-kThemeDisclosureRight = 0
-kThemeDisclosureDown = 1
-kThemeDisclosureLeft = 2
-kThemeAdornmentNone = 0
-kThemeAdornmentDefault = (1 << 0)
-kThemeAdornmentFocus = (1 << 2)
-kThemeAdornmentRightToLeft = (1 << 4)
-kThemeAdornmentDrawIndicatorOnly = (1 << 5)
-kThemeAdornmentHeaderButtonLeftNeighborSelected = (1 << 6)
-kThemeAdornmentHeaderButtonRightNeighborSelected = (1 << 7)
-kThemeAdornmentHeaderButtonSortUp = (1 << 8)
-kThemeAdornmentHeaderMenuButton = (1 << 9)
-kThemeAdornmentHeaderButtonNoShadow = (1 << 10)
-kThemeAdornmentHeaderButtonShadowOnly = (1 << 11)
-kThemeAdornmentNoShadow = kThemeAdornmentHeaderButtonNoShadow
-kThemeAdornmentShadowOnly = kThemeAdornmentHeaderButtonShadowOnly
-kThemeAdornmentArrowLeftArrow = (1 << 6)
-kThemeAdornmentArrowDownArrow = (1 << 7)
-kThemeAdornmentArrowDoubleArrow = (1 << 8)
-kThemeAdornmentArrowUpArrow = (1 << 9)
-kThemeNoSounds = 0
-kThemeWindowSoundsMask = (1 << 0)
-kThemeMenuSoundsMask = (1 << 1)
-kThemeControlSoundsMask = (1 << 2)
-kThemeFinderSoundsMask = (1 << 3)
-kThemeDragSoundNone = 0
-kThemeDragSoundMoveWindow = FOUR_CHAR_CODE('wmov')
-kThemeDragSoundGrowWindow = FOUR_CHAR_CODE('wgro')
-kThemeDragSoundMoveUtilWindow = FOUR_CHAR_CODE('umov')
-kThemeDragSoundGrowUtilWindow = FOUR_CHAR_CODE('ugro')
-kThemeDragSoundMoveDialog = FOUR_CHAR_CODE('dmov')
-kThemeDragSoundMoveAlert = FOUR_CHAR_CODE('amov')
-kThemeDragSoundMoveIcon = FOUR_CHAR_CODE('imov')
-kThemeDragSoundSliderThumb = FOUR_CHAR_CODE('slth')
-kThemeDragSoundSliderGhost = FOUR_CHAR_CODE('slgh')
-kThemeDragSoundScrollBarThumb = FOUR_CHAR_CODE('sbth')
-kThemeDragSoundScrollBarGhost = FOUR_CHAR_CODE('sbgh')
-kThemeDragSoundScrollBarArrowDecreasing = FOUR_CHAR_CODE('sbad')
-kThemeDragSoundScrollBarArrowIncreasing = FOUR_CHAR_CODE('sbai')
-kThemeDragSoundDragging = FOUR_CHAR_CODE('drag')
-kThemeSoundNone = 0
-kThemeSoundMenuOpen = FOUR_CHAR_CODE('mnuo')
-kThemeSoundMenuClose = FOUR_CHAR_CODE('mnuc')
-kThemeSoundMenuItemHilite = FOUR_CHAR_CODE('mnui')
-kThemeSoundMenuItemRelease = FOUR_CHAR_CODE('mnus')
-kThemeSoundWindowClosePress = FOUR_CHAR_CODE('wclp')
-kThemeSoundWindowCloseEnter = FOUR_CHAR_CODE('wcle')
-kThemeSoundWindowCloseExit = FOUR_CHAR_CODE('wclx')
-kThemeSoundWindowCloseRelease = FOUR_CHAR_CODE('wclr')
-kThemeSoundWindowZoomPress = FOUR_CHAR_CODE('wzmp')
-kThemeSoundWindowZoomEnter = FOUR_CHAR_CODE('wzme')
-kThemeSoundWindowZoomExit = FOUR_CHAR_CODE('wzmx')
-kThemeSoundWindowZoomRelease = FOUR_CHAR_CODE('wzmr')
-kThemeSoundWindowCollapsePress = FOUR_CHAR_CODE('wcop')
-kThemeSoundWindowCollapseEnter = FOUR_CHAR_CODE('wcoe')
-kThemeSoundWindowCollapseExit = FOUR_CHAR_CODE('wcox')
-kThemeSoundWindowCollapseRelease = FOUR_CHAR_CODE('wcor')
-kThemeSoundWindowDragBoundary = FOUR_CHAR_CODE('wdbd')
-kThemeSoundUtilWinClosePress = FOUR_CHAR_CODE('uclp')
-kThemeSoundUtilWinCloseEnter = FOUR_CHAR_CODE('ucle')
-kThemeSoundUtilWinCloseExit = FOUR_CHAR_CODE('uclx')
-kThemeSoundUtilWinCloseRelease = FOUR_CHAR_CODE('uclr')
-kThemeSoundUtilWinZoomPress = FOUR_CHAR_CODE('uzmp')
-kThemeSoundUtilWinZoomEnter = FOUR_CHAR_CODE('uzme')
-kThemeSoundUtilWinZoomExit = FOUR_CHAR_CODE('uzmx')
-kThemeSoundUtilWinZoomRelease = FOUR_CHAR_CODE('uzmr')
-kThemeSoundUtilWinCollapsePress = FOUR_CHAR_CODE('ucop')
-kThemeSoundUtilWinCollapseEnter = FOUR_CHAR_CODE('ucoe')
-kThemeSoundUtilWinCollapseExit = FOUR_CHAR_CODE('ucox')
-kThemeSoundUtilWinCollapseRelease = FOUR_CHAR_CODE('ucor')
-kThemeSoundUtilWinDragBoundary = FOUR_CHAR_CODE('udbd')
-kThemeSoundWindowOpen = FOUR_CHAR_CODE('wopn')
-kThemeSoundWindowClose = FOUR_CHAR_CODE('wcls')
-kThemeSoundWindowZoomIn = FOUR_CHAR_CODE('wzmi')
-kThemeSoundWindowZoomOut = FOUR_CHAR_CODE('wzmo')
-kThemeSoundWindowCollapseUp = FOUR_CHAR_CODE('wcol')
-kThemeSoundWindowCollapseDown = FOUR_CHAR_CODE('wexp')
-kThemeSoundWindowActivate = FOUR_CHAR_CODE('wact')
-kThemeSoundUtilWindowOpen = FOUR_CHAR_CODE('uopn')
-kThemeSoundUtilWindowClose = FOUR_CHAR_CODE('ucls')
-kThemeSoundUtilWindowZoomIn = FOUR_CHAR_CODE('uzmi')
-kThemeSoundUtilWindowZoomOut = FOUR_CHAR_CODE('uzmo')
-kThemeSoundUtilWindowCollapseUp = FOUR_CHAR_CODE('ucol')
-kThemeSoundUtilWindowCollapseDown = FOUR_CHAR_CODE('uexp')
-kThemeSoundUtilWindowActivate = FOUR_CHAR_CODE('uact')
-kThemeSoundDialogOpen = FOUR_CHAR_CODE('dopn')
-kThemeSoundDialogClose = FOUR_CHAR_CODE('dlgc')
-kThemeSoundAlertOpen = FOUR_CHAR_CODE('aopn')
-kThemeSoundAlertClose = FOUR_CHAR_CODE('altc')
-kThemeSoundPopupWindowOpen = FOUR_CHAR_CODE('pwop')
-kThemeSoundPopupWindowClose = FOUR_CHAR_CODE('pwcl')
-kThemeSoundButtonPress = FOUR_CHAR_CODE('btnp')
-kThemeSoundButtonEnter = FOUR_CHAR_CODE('btne')
-kThemeSoundButtonExit = FOUR_CHAR_CODE('btnx')
-kThemeSoundButtonRelease = FOUR_CHAR_CODE('btnr')
-kThemeSoundDefaultButtonPress = FOUR_CHAR_CODE('dbtp')
-kThemeSoundDefaultButtonEnter = FOUR_CHAR_CODE('dbte')
-kThemeSoundDefaultButtonExit = FOUR_CHAR_CODE('dbtx')
-kThemeSoundDefaultButtonRelease = FOUR_CHAR_CODE('dbtr')
-kThemeSoundCancelButtonPress = FOUR_CHAR_CODE('cbtp')
-kThemeSoundCancelButtonEnter = FOUR_CHAR_CODE('cbte')
-kThemeSoundCancelButtonExit = FOUR_CHAR_CODE('cbtx')
-kThemeSoundCancelButtonRelease = FOUR_CHAR_CODE('cbtr')
-kThemeSoundCheckboxPress = FOUR_CHAR_CODE('chkp')
-kThemeSoundCheckboxEnter = FOUR_CHAR_CODE('chke')
-kThemeSoundCheckboxExit = FOUR_CHAR_CODE('chkx')
-kThemeSoundCheckboxRelease = FOUR_CHAR_CODE('chkr')
-kThemeSoundRadioPress = FOUR_CHAR_CODE('radp')
-kThemeSoundRadioEnter = FOUR_CHAR_CODE('rade')
-kThemeSoundRadioExit = FOUR_CHAR_CODE('radx')
-kThemeSoundRadioRelease = FOUR_CHAR_CODE('radr')
-kThemeSoundScrollArrowPress = FOUR_CHAR_CODE('sbap')
-kThemeSoundScrollArrowEnter = FOUR_CHAR_CODE('sbae')
-kThemeSoundScrollArrowExit = FOUR_CHAR_CODE('sbax')
-kThemeSoundScrollArrowRelease = FOUR_CHAR_CODE('sbar')
-kThemeSoundScrollEndOfTrack = FOUR_CHAR_CODE('sbte')
-kThemeSoundScrollTrackPress = FOUR_CHAR_CODE('sbtp')
-kThemeSoundSliderEndOfTrack = FOUR_CHAR_CODE('slte')
-kThemeSoundSliderTrackPress = FOUR_CHAR_CODE('sltp')
-kThemeSoundBalloonOpen = FOUR_CHAR_CODE('blno')
-kThemeSoundBalloonClose = FOUR_CHAR_CODE('blnc')
-kThemeSoundBevelPress = FOUR_CHAR_CODE('bevp')
-kThemeSoundBevelEnter = FOUR_CHAR_CODE('beve')
-kThemeSoundBevelExit = FOUR_CHAR_CODE('bevx')
-kThemeSoundBevelRelease = FOUR_CHAR_CODE('bevr')
-kThemeSoundLittleArrowUpPress = FOUR_CHAR_CODE('laup')
-kThemeSoundLittleArrowDnPress = FOUR_CHAR_CODE('ladp')
-kThemeSoundLittleArrowEnter = FOUR_CHAR_CODE('lare')
-kThemeSoundLittleArrowExit = FOUR_CHAR_CODE('larx')
-kThemeSoundLittleArrowUpRelease = FOUR_CHAR_CODE('laur')
-kThemeSoundLittleArrowDnRelease = FOUR_CHAR_CODE('ladr')
-kThemeSoundPopupPress = FOUR_CHAR_CODE('popp')
-kThemeSoundPopupEnter = FOUR_CHAR_CODE('pope')
-kThemeSoundPopupExit = FOUR_CHAR_CODE('popx')
-kThemeSoundPopupRelease = FOUR_CHAR_CODE('popr')
-kThemeSoundDisclosurePress = FOUR_CHAR_CODE('dscp')
-kThemeSoundDisclosureEnter = FOUR_CHAR_CODE('dsce')
-kThemeSoundDisclosureExit = FOUR_CHAR_CODE('dscx')
-kThemeSoundDisclosureRelease = FOUR_CHAR_CODE('dscr')
-kThemeSoundTabPressed = FOUR_CHAR_CODE('tabp')
-kThemeSoundTabEnter = FOUR_CHAR_CODE('tabe')
-kThemeSoundTabExit = FOUR_CHAR_CODE('tabx')
-kThemeSoundTabRelease = FOUR_CHAR_CODE('tabr')
-kThemeSoundDragTargetHilite = FOUR_CHAR_CODE('dthi')
-kThemeSoundDragTargetUnhilite = FOUR_CHAR_CODE('dtuh')
-kThemeSoundDragTargetDrop = FOUR_CHAR_CODE('dtdr')
-kThemeSoundEmptyTrash = FOUR_CHAR_CODE('ftrs')
-kThemeSoundSelectItem = FOUR_CHAR_CODE('fsel')
-kThemeSoundNewItem = FOUR_CHAR_CODE('fnew')
-kThemeSoundReceiveDrop = FOUR_CHAR_CODE('fdrp')
-kThemeSoundCopyDone = FOUR_CHAR_CODE('fcpd')
-kThemeSoundResolveAlias = FOUR_CHAR_CODE('fral')
-kThemeSoundLaunchApp = FOUR_CHAR_CODE('flap')
-kThemeSoundDiskInsert = FOUR_CHAR_CODE('dski')
-kThemeSoundDiskEject = FOUR_CHAR_CODE('dske')
-kThemeSoundFinderDragOnIcon = FOUR_CHAR_CODE('fdon')
-kThemeSoundFinderDragOffIcon = FOUR_CHAR_CODE('fdof')
-kThemePopupTabNormalPosition = 0
-kThemePopupTabCenterOnWindow = 1
-kThemePopupTabCenterOnOffset = 2
-kThemeMetricScrollBarWidth = 0
-kThemeMetricSmallScrollBarWidth = 1
-kThemeMetricCheckBoxHeight = 2
-kThemeMetricRadioButtonHeight = 3
-kThemeMetricEditTextWhitespace = 4
-kThemeMetricEditTextFrameOutset = 5
-kThemeMetricListBoxFrameOutset = 6
-kThemeMetricFocusRectOutset = 7
-kThemeMetricImageWellThickness = 8
-kThemeMetricScrollBarOverlap = 9
-kThemeMetricLargeTabHeight = 10
-kThemeMetricLargeTabCapsWidth = 11
-kThemeMetricTabFrameOverlap = 12
-kThemeMetricTabIndentOrStyle = 13
-kThemeMetricTabOverlap = 14
-kThemeMetricSmallTabHeight = 15
-kThemeMetricSmallTabCapsWidth = 16
-kThemeMetricDisclosureButtonHeight = 17
-kThemeMetricRoundButtonSize = 18
-kThemeMetricPushButtonHeight = 19
-kThemeMetricListHeaderHeight = 20
-kThemeMetricSmallCheckBoxHeight = 21
-kThemeMetricDisclosureButtonWidth = 22
-kThemeMetricSmallDisclosureButtonHeight = 23
-kThemeMetricSmallDisclosureButtonWidth = 24
-kThemeMetricDisclosureTriangleHeight = 25
-kThemeMetricDisclosureTriangleWidth = 26
-kThemeMetricLittleArrowsHeight = 27
-kThemeMetricLittleArrowsWidth = 28
-kThemeMetricPaneSplitterHeight = 29
-kThemeMetricPopupButtonHeight = 30
-kThemeMetricSmallPopupButtonHeight = 31
-kThemeMetricLargeProgressBarThickness = 32
-kThemeMetricPullDownHeight = 33
-kThemeMetricSmallPullDownHeight = 34
-kThemeMetricSmallPushButtonHeight = 35
-kThemeMetricSmallRadioButtonHeight = 36
-kThemeMetricRelevanceIndicatorHeight = 37
-kThemeMetricResizeControlHeight = 38
-kThemeMetricSmallResizeControlHeight = 39
-kThemeMetricLargeRoundButtonSize = 40
-kThemeMetricHSliderHeight = 41
-kThemeMetricHSliderTickHeight = 42
-kThemeMetricSmallHSliderHeight = 43
-kThemeMetricSmallHSliderTickHeight = 44
-kThemeMetricVSliderWidth = 45
-kThemeMetricVSliderTickWidth = 46
-kThemeMetricSmallVSliderWidth = 47
-kThemeMetricSmallVSliderTickWidth = 48
-kThemeMetricTitleBarControlsHeight = 49
-kThemeMetricCheckBoxWidth = 50
-kThemeMetricSmallCheckBoxWidth = 51
-kThemeMetricRadioButtonWidth = 52
-kThemeMetricSmallRadioButtonWidth = 53
-kThemeMetricSmallHSliderMinThumbWidth = 54
-kThemeMetricSmallVSliderMinThumbHeight = 55
-kThemeMetricSmallHSliderTickOffset = 56
-kThemeMetricSmallVSliderTickOffset = 57
-kThemeMetricNormalProgressBarThickness = 58
-kThemeMetricProgressBarShadowOutset = 59
-kThemeMetricSmallProgressBarShadowOutset = 60
-kThemeMetricPrimaryGroupBoxContentInset = 61
-kThemeMetricSecondaryGroupBoxContentInset = 62
-kThemeMetricMenuMarkColumnWidth = 63
-kThemeMetricMenuExcludedMarkColumnWidth = 64
-kThemeMetricMenuMarkIndent = 65
-kThemeMetricMenuTextLeadingEdgeMargin = 66
-kThemeMetricMenuTextTrailingEdgeMargin = 67
-kThemeMetricMenuIndentWidth = 68
-kThemeMetricMenuIconTrailingEdgeMargin = 69
-# appearanceBadBrushIndexErr = themeInvalidBrushErr
-# appearanceProcessRegisteredErr = themeProcessRegisteredErr
-# appearanceProcessNotRegisteredErr = themeProcessNotRegisteredErr
-# appearanceBadTextColorIndexErr = themeBadTextColorErr
-# appearanceThemeHasNoAccents = themeHasNoAccentsErr
-# appearanceBadCursorIndexErr = themeBadCursorIndexErr
-kThemeActiveDialogBackgroundBrush = kThemeBrushDialogBackgroundActive
-kThemeInactiveDialogBackgroundBrush = kThemeBrushDialogBackgroundInactive
-kThemeActiveAlertBackgroundBrush = kThemeBrushAlertBackgroundActive
-kThemeInactiveAlertBackgroundBrush = kThemeBrushAlertBackgroundInactive
-kThemeActiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundActive
-kThemeInactiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundInactive
-kThemeActiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundActive
-kThemeInactiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundInactive
-kThemeListViewSortColumnBackgroundBrush = kThemeBrushListViewSortColumnBackground
-kThemeListViewBackgroundBrush = kThemeBrushListViewBackground
-kThemeIconLabelBackgroundBrush = kThemeBrushIconLabelBackground
-kThemeListViewSeparatorBrush = kThemeBrushListViewSeparator
-kThemeChasingArrowsBrush = kThemeBrushChasingArrows
-kThemeDragHiliteBrush = kThemeBrushDragHilite
-kThemeDocumentWindowBackgroundBrush = kThemeBrushDocumentWindowBackground
-kThemeFinderWindowBackgroundBrush = kThemeBrushFinderWindowBackground
-kThemeActiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterActive
-kThemeInactiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterInactive
-kThemeFocusHighlightBrush = kThemeBrushFocusHighlight
-kThemeActivePopupArrowBrush = kThemeBrushPopupArrowActive
-kThemePressedPopupArrowBrush = kThemeBrushPopupArrowPressed
-kThemeInactivePopupArrowBrush = kThemeBrushPopupArrowInactive
-kThemeAppleGuideCoachmarkBrush = kThemeBrushAppleGuideCoachmark
-kThemeActiveDialogTextColor = kThemeTextColorDialogActive
-kThemeInactiveDialogTextColor = kThemeTextColorDialogInactive
-kThemeActiveAlertTextColor = kThemeTextColorAlertActive
-kThemeInactiveAlertTextColor = kThemeTextColorAlertInactive
-kThemeActiveModelessDialogTextColor = kThemeTextColorModelessDialogActive
-kThemeInactiveModelessDialogTextColor = kThemeTextColorModelessDialogInactive
-kThemeActiveWindowHeaderTextColor = kThemeTextColorWindowHeaderActive
-kThemeInactiveWindowHeaderTextColor = kThemeTextColorWindowHeaderInactive
-kThemeActivePlacardTextColor = kThemeTextColorPlacardActive
-kThemeInactivePlacardTextColor = kThemeTextColorPlacardInactive
-kThemePressedPlacardTextColor = kThemeTextColorPlacardPressed
-kThemeActivePushButtonTextColor = kThemeTextColorPushButtonActive
-kThemeInactivePushButtonTextColor = kThemeTextColorPushButtonInactive
-kThemePressedPushButtonTextColor = kThemeTextColorPushButtonPressed
-kThemeActiveBevelButtonTextColor = kThemeTextColorBevelButtonActive
-kThemeInactiveBevelButtonTextColor = kThemeTextColorBevelButtonInactive
-kThemePressedBevelButtonTextColor = kThemeTextColorBevelButtonPressed
-kThemeActivePopupButtonTextColor = kThemeTextColorPopupButtonActive
-kThemeInactivePopupButtonTextColor = kThemeTextColorPopupButtonInactive
-kThemePressedPopupButtonTextColor = kThemeTextColorPopupButtonPressed
-kThemeIconLabelTextColor = kThemeTextColorIconLabel
-kThemeListViewTextColor = kThemeTextColorListView
-kThemeActiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleActive
-kThemeInactiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleInactive
-kThemeActiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleActive
-kThemeInactiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleInactive
-kThemeActiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleActive
-kThemeInactiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleInactive
-kThemeActivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleActive
-kThemeInactivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleInactive
-kThemeActiveRootMenuTextColor = kThemeTextColorRootMenuActive
-kThemeSelectedRootMenuTextColor = kThemeTextColorRootMenuSelected
-kThemeDisabledRootMenuTextColor = kThemeTextColorRootMenuDisabled
-kThemeActiveMenuItemTextColor = kThemeTextColorMenuItemActive
-kThemeSelectedMenuItemTextColor = kThemeTextColorMenuItemSelected
-kThemeDisabledMenuItemTextColor = kThemeTextColorMenuItemDisabled
-kThemeActivePopupLabelTextColor = kThemeTextColorPopupLabelActive
-kThemeInactivePopupLabelTextColor = kThemeTextColorPopupLabelInactive
-kAEThemeSwitch = kAEAppearanceChanged
-kThemeNoAdornment = kThemeAdornmentNone
-kThemeDefaultAdornment = kThemeAdornmentDefault
-kThemeFocusAdornment = kThemeAdornmentFocus
-kThemeRightToLeftAdornment = kThemeAdornmentRightToLeft
-kThemeDrawIndicatorOnly = kThemeAdornmentDrawIndicatorOnly
-kThemeBrushPassiveAreaFill = kThemeBrushStaticAreaFill
-kThemeMetricCheckBoxGlyphHeight = kThemeMetricCheckBoxHeight
-kThemeMetricRadioButtonGlyphHeight = kThemeMetricRadioButtonHeight
-kThemeMetricDisclosureButtonSize = kThemeMetricDisclosureButtonHeight
-kThemeMetricBestListHeaderHeight = kThemeMetricListHeaderHeight
-kThemeMetricSmallProgressBarThickness = kThemeMetricNormalProgressBarThickness
-kThemeMetricProgressBarThickness = kThemeMetricLargeProgressBarThickness
-kThemeScrollBar = kThemeMediumScrollBar
-kThemeSlider = kThemeMediumSlider
-kThemeProgressBar = kThemeMediumProgressBar
-kThemeIndeterminateBar = kThemeMediumIndeterminateBar
diff --git a/Lib/plat-mac/Carbon/AppleEvents.py b/Lib/plat-mac/Carbon/AppleEvents.py
deleted file mode 100644 (file)
index 4a2083e..0000000
+++ /dev/null
@@ -1,961 +0,0 @@
-# Generated from 'AEDataModel.h'
-
-def FOUR_CHAR_CODE(x): return x.encode("latin-1")
-typeApplicationBundleID = FOUR_CHAR_CODE('bund')
-typeBoolean = FOUR_CHAR_CODE('bool')
-typeChar = FOUR_CHAR_CODE('TEXT')
-typeSInt16 = FOUR_CHAR_CODE('shor')
-typeSInt32 = FOUR_CHAR_CODE('long')
-typeUInt32 = FOUR_CHAR_CODE('magn')
-typeSInt64 = FOUR_CHAR_CODE('comp')
-typeIEEE32BitFloatingPoint = FOUR_CHAR_CODE('sing')
-typeIEEE64BitFloatingPoint = FOUR_CHAR_CODE('doub')
-type128BitFloatingPoint = FOUR_CHAR_CODE('ldbl')
-typeDecimalStruct = FOUR_CHAR_CODE('decm')
-typeSMInt = typeSInt16
-typeShortInteger = typeSInt16
-typeInteger = typeSInt32
-typeLongInteger = typeSInt32
-typeMagnitude = typeUInt32
-typeComp = typeSInt64
-typeSMFloat = typeIEEE32BitFloatingPoint
-typeShortFloat = typeIEEE32BitFloatingPoint
-typeFloat = typeIEEE64BitFloatingPoint
-typeLongFloat = typeIEEE64BitFloatingPoint
-typeExtended = FOUR_CHAR_CODE('exte')
-typeAEList = FOUR_CHAR_CODE('list')
-typeAERecord = FOUR_CHAR_CODE('reco')
-typeAppleEvent = FOUR_CHAR_CODE('aevt')
-typeEventRecord = FOUR_CHAR_CODE('evrc')
-typeTrue = FOUR_CHAR_CODE('true')
-typeFalse = FOUR_CHAR_CODE('fals')
-typeAlias = FOUR_CHAR_CODE('alis')
-typeEnumerated = FOUR_CHAR_CODE('enum')
-typeType = FOUR_CHAR_CODE('type')
-typeAppParameters = FOUR_CHAR_CODE('appa')
-typeProperty = FOUR_CHAR_CODE('prop')
-typeFSS = FOUR_CHAR_CODE('fss ')
-typeFSRef = FOUR_CHAR_CODE('fsrf')
-typeFileURL = FOUR_CHAR_CODE('furl')
-typeKeyword = FOUR_CHAR_CODE('keyw')
-typeSectionH = FOUR_CHAR_CODE('sect')
-typeWildCard = FOUR_CHAR_CODE('****')
-typeApplSignature = FOUR_CHAR_CODE('sign')
-typeQDRectangle = FOUR_CHAR_CODE('qdrt')
-typeFixed = FOUR_CHAR_CODE('fixd')
-typeProcessSerialNumber = FOUR_CHAR_CODE('psn ')
-typeApplicationURL = FOUR_CHAR_CODE('aprl')
-typeNull = FOUR_CHAR_CODE('null')
-typeSessionID = FOUR_CHAR_CODE('ssid')
-typeTargetID = FOUR_CHAR_CODE('targ')
-typeDispatcherID = FOUR_CHAR_CODE('dspt')
-keyTransactionIDAttr = FOUR_CHAR_CODE('tran')
-keyReturnIDAttr = FOUR_CHAR_CODE('rtid')
-keyEventClassAttr = FOUR_CHAR_CODE('evcl')
-keyEventIDAttr = FOUR_CHAR_CODE('evid')
-keyAddressAttr = FOUR_CHAR_CODE('addr')
-keyOptionalKeywordAttr = FOUR_CHAR_CODE('optk')
-keyTimeoutAttr = FOUR_CHAR_CODE('timo')
-keyInteractLevelAttr = FOUR_CHAR_CODE('inte')
-keyEventSourceAttr = FOUR_CHAR_CODE('esrc')
-keyMissedKeywordAttr = FOUR_CHAR_CODE('miss')
-keyOriginalAddressAttr = FOUR_CHAR_CODE('from')
-keyAcceptTimeoutAttr = FOUR_CHAR_CODE('actm')
-kAEDescListFactorNone = 0
-kAEDescListFactorType = 4
-kAEDescListFactorTypeAndSize = 8
-kAutoGenerateReturnID = -1
-kAnyTransactionID = 0
-kAEDataArray = 0
-kAEPackedArray = 1
-kAEDescArray = 3
-kAEKeyDescArray = 4
-kAEHandleArray = 2
-kAENormalPriority = 0x00000000
-kAEHighPriority = 0x00000001
-kAENoReply = 0x00000001
-kAEQueueReply = 0x00000002
-kAEWaitReply = 0x00000003
-kAEDontReconnect = 0x00000080
-kAEWantReceipt = 0x00000200
-kAENeverInteract = 0x00000010
-kAECanInteract = 0x00000020
-kAEAlwaysInteract = 0x00000030
-kAECanSwitchLayer = 0x00000040
-kAEDontRecord = 0x00001000
-kAEDontExecute = 0x00002000
-kAEProcessNonReplyEvents = 0x00008000
-kAEDefaultTimeout = -1
-kNoTimeOut = -2
-kAEInteractWithSelf = 0
-kAEInteractWithLocal = 1
-kAEInteractWithAll = 2
-kAEDoNotIgnoreHandler = 0x00000000
-kAEIgnoreAppPhacHandler = 0x00000001
-kAEIgnoreAppEventHandler = 0x00000002
-kAEIgnoreSysPhacHandler = 0x00000004
-kAEIgnoreSysEventHandler = 0x00000008
-kAEIngoreBuiltInEventHandler = 0x00000010
-# kAEDontDisposeOnResume = (long)0x80000000
-kAENoDispatch = 0
-# kAEUseStandardDispatch = (long)0xFFFFFFFF
-keyDirectObject = FOUR_CHAR_CODE('----')
-keyErrorNumber = FOUR_CHAR_CODE('errn')
-keyErrorString = FOUR_CHAR_CODE('errs')
-keyProcessSerialNumber = FOUR_CHAR_CODE('psn ')
-keyPreDispatch = FOUR_CHAR_CODE('phac')
-keySelectProc = FOUR_CHAR_CODE('selh')
-keyAERecorderCount = FOUR_CHAR_CODE('recr')
-keyAEVersion = FOUR_CHAR_CODE('vers')
-kCoreEventClass = FOUR_CHAR_CODE('aevt')
-kAEOpenApplication = FOUR_CHAR_CODE('oapp')
-kAEOpenDocuments = FOUR_CHAR_CODE('odoc')
-kAEPrintDocuments = FOUR_CHAR_CODE('pdoc')
-kAEQuitApplication = FOUR_CHAR_CODE('quit')
-kAEAnswer = FOUR_CHAR_CODE('ansr')
-kAEApplicationDied = FOUR_CHAR_CODE('obit')
-kAEShowPreferences = FOUR_CHAR_CODE('pref')
-kAEStartRecording = FOUR_CHAR_CODE('reca')
-kAEStopRecording = FOUR_CHAR_CODE('recc')
-kAENotifyStartRecording = FOUR_CHAR_CODE('rec1')
-kAENotifyStopRecording = FOUR_CHAR_CODE('rec0')
-kAENotifyRecording = FOUR_CHAR_CODE('recr')
-kAEUnknownSource = 0
-kAEDirectCall = 1
-kAESameProcess = 2
-kAELocalProcess = 3
-kAERemoteProcess = 4
-cAEList = FOUR_CHAR_CODE('list')
-cApplication = FOUR_CHAR_CODE('capp')
-cArc = FOUR_CHAR_CODE('carc')
-cBoolean = FOUR_CHAR_CODE('bool')
-cCell = FOUR_CHAR_CODE('ccel')
-cChar = FOUR_CHAR_CODE('cha ')
-cColorTable = FOUR_CHAR_CODE('clrt')
-cColumn = FOUR_CHAR_CODE('ccol')
-cDocument = FOUR_CHAR_CODE('docu')
-cDrawingArea = FOUR_CHAR_CODE('cdrw')
-cEnumeration = FOUR_CHAR_CODE('enum')
-cFile = FOUR_CHAR_CODE('file')
-cFixed = FOUR_CHAR_CODE('fixd')
-cFixedPoint = FOUR_CHAR_CODE('fpnt')
-cFixedRectangle = FOUR_CHAR_CODE('frct')
-cGraphicLine = FOUR_CHAR_CODE('glin')
-cGraphicObject = FOUR_CHAR_CODE('cgob')
-cGraphicShape = FOUR_CHAR_CODE('cgsh')
-cGraphicText = FOUR_CHAR_CODE('cgtx')
-cGroupedGraphic = FOUR_CHAR_CODE('cpic')
-cInsertionLoc = FOUR_CHAR_CODE('insl')
-cInsertionPoint = FOUR_CHAR_CODE('cins')
-cIntlText = FOUR_CHAR_CODE('itxt')
-cIntlWritingCode = FOUR_CHAR_CODE('intl')
-cItem = FOUR_CHAR_CODE('citm')
-cLine = FOUR_CHAR_CODE('clin')
-cLongDateTime = FOUR_CHAR_CODE('ldt ')
-cLongFixed = FOUR_CHAR_CODE('lfxd')
-cLongFixedPoint = FOUR_CHAR_CODE('lfpt')
-cLongFixedRectangle = FOUR_CHAR_CODE('lfrc')
-cLongInteger = FOUR_CHAR_CODE('long')
-cLongPoint = FOUR_CHAR_CODE('lpnt')
-cLongRectangle = FOUR_CHAR_CODE('lrct')
-cMachineLoc = FOUR_CHAR_CODE('mLoc')
-cMenu = FOUR_CHAR_CODE('cmnu')
-cMenuItem = FOUR_CHAR_CODE('cmen')
-cObject = FOUR_CHAR_CODE('cobj')
-cObjectSpecifier = FOUR_CHAR_CODE('obj ')
-cOpenableObject = FOUR_CHAR_CODE('coob')
-cOval = FOUR_CHAR_CODE('covl')
-cParagraph = FOUR_CHAR_CODE('cpar')
-cPICT = FOUR_CHAR_CODE('PICT')
-cPixel = FOUR_CHAR_CODE('cpxl')
-cPixelMap = FOUR_CHAR_CODE('cpix')
-cPolygon = FOUR_CHAR_CODE('cpgn')
-cProperty = FOUR_CHAR_CODE('prop')
-cQDPoint = FOUR_CHAR_CODE('QDpt')
-cQDRectangle = FOUR_CHAR_CODE('qdrt')
-cRectangle = FOUR_CHAR_CODE('crec')
-cRGBColor = FOUR_CHAR_CODE('cRGB')
-cRotation = FOUR_CHAR_CODE('trot')
-cRoundedRectangle = FOUR_CHAR_CODE('crrc')
-cRow = FOUR_CHAR_CODE('crow')
-cSelection = FOUR_CHAR_CODE('csel')
-cShortInteger = FOUR_CHAR_CODE('shor')
-cTable = FOUR_CHAR_CODE('ctbl')
-cText = FOUR_CHAR_CODE('ctxt')
-cTextFlow = FOUR_CHAR_CODE('cflo')
-cTextStyles = FOUR_CHAR_CODE('tsty')
-cType = FOUR_CHAR_CODE('type')
-cVersion = FOUR_CHAR_CODE('vers')
-cWindow = FOUR_CHAR_CODE('cwin')
-cWord = FOUR_CHAR_CODE('cwor')
-enumArrows = FOUR_CHAR_CODE('arro')
-enumJustification = FOUR_CHAR_CODE('just')
-enumKeyForm = FOUR_CHAR_CODE('kfrm')
-enumPosition = FOUR_CHAR_CODE('posi')
-enumProtection = FOUR_CHAR_CODE('prtn')
-enumQuality = FOUR_CHAR_CODE('qual')
-enumSaveOptions = FOUR_CHAR_CODE('savo')
-enumStyle = FOUR_CHAR_CODE('styl')
-enumTransferMode = FOUR_CHAR_CODE('tran')
-formUniqueID = FOUR_CHAR_CODE('ID  ')
-kAEAbout = FOUR_CHAR_CODE('abou')
-kAEAfter = FOUR_CHAR_CODE('afte')
-kAEAliasSelection = FOUR_CHAR_CODE('sali')
-kAEAllCaps = FOUR_CHAR_CODE('alcp')
-kAEArrowAtEnd = FOUR_CHAR_CODE('aren')
-kAEArrowAtStart = FOUR_CHAR_CODE('arst')
-kAEArrowBothEnds = FOUR_CHAR_CODE('arbo')
-kAEAsk = FOUR_CHAR_CODE('ask ')
-kAEBefore = FOUR_CHAR_CODE('befo')
-kAEBeginning = FOUR_CHAR_CODE('bgng')
-kAEBeginsWith = FOUR_CHAR_CODE('bgwt')
-kAEBeginTransaction = FOUR_CHAR_CODE('begi')
-kAEBold = FOUR_CHAR_CODE('bold')
-kAECaseSensEquals = FOUR_CHAR_CODE('cseq')
-kAECentered = FOUR_CHAR_CODE('cent')
-kAEChangeView = FOUR_CHAR_CODE('view')
-kAEClone = FOUR_CHAR_CODE('clon')
-kAEClose = FOUR_CHAR_CODE('clos')
-kAECondensed = FOUR_CHAR_CODE('cond')
-kAEContains = FOUR_CHAR_CODE('cont')
-kAECopy = FOUR_CHAR_CODE('copy')
-kAECoreSuite = FOUR_CHAR_CODE('core')
-kAECountElements = FOUR_CHAR_CODE('cnte')
-kAECreateElement = FOUR_CHAR_CODE('crel')
-kAECreatePublisher = FOUR_CHAR_CODE('cpub')
-kAECut = FOUR_CHAR_CODE('cut ')
-kAEDelete = FOUR_CHAR_CODE('delo')
-kAEDoObjectsExist = FOUR_CHAR_CODE('doex')
-kAEDoScript = FOUR_CHAR_CODE('dosc')
-kAEDrag = FOUR_CHAR_CODE('drag')
-kAEDuplicateSelection = FOUR_CHAR_CODE('sdup')
-kAEEditGraphic = FOUR_CHAR_CODE('edit')
-kAEEmptyTrash = FOUR_CHAR_CODE('empt')
-kAEEnd = FOUR_CHAR_CODE('end ')
-kAEEndsWith = FOUR_CHAR_CODE('ends')
-kAEEndTransaction = FOUR_CHAR_CODE('endt')
-kAEEquals = FOUR_CHAR_CODE('=   ')
-kAEExpanded = FOUR_CHAR_CODE('pexp')
-kAEFast = FOUR_CHAR_CODE('fast')
-kAEFinderEvents = FOUR_CHAR_CODE('FNDR')
-kAEFormulaProtect = FOUR_CHAR_CODE('fpro')
-kAEFullyJustified = FOUR_CHAR_CODE('full')
-kAEGetClassInfo = FOUR_CHAR_CODE('qobj')
-kAEGetData = FOUR_CHAR_CODE('getd')
-kAEGetDataSize = FOUR_CHAR_CODE('dsiz')
-kAEGetEventInfo = FOUR_CHAR_CODE('gtei')
-kAEGetInfoSelection = FOUR_CHAR_CODE('sinf')
-kAEGetPrivilegeSelection = FOUR_CHAR_CODE('sprv')
-kAEGetSuiteInfo = FOUR_CHAR_CODE('gtsi')
-kAEGreaterThan = FOUR_CHAR_CODE('>   ')
-kAEGreaterThanEquals = FOUR_CHAR_CODE('>=  ')
-kAEGrow = FOUR_CHAR_CODE('grow')
-kAEHidden = FOUR_CHAR_CODE('hidn')
-kAEHiQuality = FOUR_CHAR_CODE('hiqu')
-kAEImageGraphic = FOUR_CHAR_CODE('imgr')
-kAEIsUniform = FOUR_CHAR_CODE('isun')
-kAEItalic = FOUR_CHAR_CODE('ital')
-kAELeftJustified = FOUR_CHAR_CODE('left')
-kAELessThan = FOUR_CHAR_CODE('<   ')
-kAELessThanEquals = FOUR_CHAR_CODE('<=  ')
-kAELowercase = FOUR_CHAR_CODE('lowc')
-kAEMakeObjectsVisible = FOUR_CHAR_CODE('mvis')
-kAEMiscStandards = FOUR_CHAR_CODE('misc')
-kAEModifiable = FOUR_CHAR_CODE('modf')
-kAEMove = FOUR_CHAR_CODE('move')
-kAENo = FOUR_CHAR_CODE('no  ')
-kAENoArrow = FOUR_CHAR_CODE('arno')
-kAENonmodifiable = FOUR_CHAR_CODE('nmod')
-kAEOpen = FOUR_CHAR_CODE('odoc')
-kAEOpenSelection = FOUR_CHAR_CODE('sope')
-kAEOutline = FOUR_CHAR_CODE('outl')
-kAEPageSetup = FOUR_CHAR_CODE('pgsu')
-kAEPaste = FOUR_CHAR_CODE('past')
-kAEPlain = FOUR_CHAR_CODE('plan')
-kAEPrint = FOUR_CHAR_CODE('pdoc')
-kAEPrintSelection = FOUR_CHAR_CODE('spri')
-kAEPrintWindow = FOUR_CHAR_CODE('pwin')
-kAEPutAwaySelection = FOUR_CHAR_CODE('sput')
-kAEQDAddOver = FOUR_CHAR_CODE('addo')
-kAEQDAddPin = FOUR_CHAR_CODE('addp')
-kAEQDAdMax = FOUR_CHAR_CODE('admx')
-kAEQDAdMin = FOUR_CHAR_CODE('admn')
-kAEQDBic = FOUR_CHAR_CODE('bic ')
-kAEQDBlend = FOUR_CHAR_CODE('blnd')
-kAEQDCopy = FOUR_CHAR_CODE('cpy ')
-kAEQDNotBic = FOUR_CHAR_CODE('nbic')
-kAEQDNotCopy = FOUR_CHAR_CODE('ncpy')
-kAEQDNotOr = FOUR_CHAR_CODE('ntor')
-kAEQDNotXor = FOUR_CHAR_CODE('nxor')
-kAEQDOr = FOUR_CHAR_CODE('or  ')
-kAEQDSubOver = FOUR_CHAR_CODE('subo')
-kAEQDSubPin = FOUR_CHAR_CODE('subp')
-kAEQDSupplementalSuite = FOUR_CHAR_CODE('qdsp')
-kAEQDXor = FOUR_CHAR_CODE('xor ')
-kAEQuickdrawSuite = FOUR_CHAR_CODE('qdrw')
-kAEQuitAll = FOUR_CHAR_CODE('quia')
-kAERedo = FOUR_CHAR_CODE('redo')
-kAERegular = FOUR_CHAR_CODE('regl')
-kAEReopenApplication = FOUR_CHAR_CODE('rapp')
-kAEReplace = FOUR_CHAR_CODE('rplc')
-kAERequiredSuite = FOUR_CHAR_CODE('reqd')
-kAERestart = FOUR_CHAR_CODE('rest')
-kAERevealSelection = FOUR_CHAR_CODE('srev')
-kAERevert = FOUR_CHAR_CODE('rvrt')
-kAERightJustified = FOUR_CHAR_CODE('rght')
-kAESave = FOUR_CHAR_CODE('save')
-kAESelect = FOUR_CHAR_CODE('slct')
-kAESetData = FOUR_CHAR_CODE('setd')
-kAESetPosition = FOUR_CHAR_CODE('posn')
-kAEShadow = FOUR_CHAR_CODE('shad')
-kAEShowClipboard = FOUR_CHAR_CODE('shcl')
-kAEShutDown = FOUR_CHAR_CODE('shut')
-kAESleep = FOUR_CHAR_CODE('slep')
-kAESmallCaps = FOUR_CHAR_CODE('smcp')
-kAESpecialClassProperties = FOUR_CHAR_CODE('c@#!')
-kAEStrikethrough = FOUR_CHAR_CODE('strk')
-kAESubscript = FOUR_CHAR_CODE('sbsc')
-kAESuperscript = FOUR_CHAR_CODE('spsc')
-kAETableSuite = FOUR_CHAR_CODE('tbls')
-kAETextSuite = FOUR_CHAR_CODE('TEXT')
-kAETransactionTerminated = FOUR_CHAR_CODE('ttrm')
-kAEUnderline = FOUR_CHAR_CODE('undl')
-kAEUndo = FOUR_CHAR_CODE('undo')
-kAEWholeWordEquals = FOUR_CHAR_CODE('wweq')
-kAEYes = FOUR_CHAR_CODE('yes ')
-kAEZoom = FOUR_CHAR_CODE('zoom')
-kAEMouseClass = FOUR_CHAR_CODE('mous')
-kAEDown = FOUR_CHAR_CODE('down')
-kAEUp = FOUR_CHAR_CODE('up  ')
-kAEMoved = FOUR_CHAR_CODE('move')
-kAEStoppedMoving = FOUR_CHAR_CODE('stop')
-kAEWindowClass = FOUR_CHAR_CODE('wind')
-kAEUpdate = FOUR_CHAR_CODE('updt')
-kAEActivate = FOUR_CHAR_CODE('actv')
-kAEDeactivate = FOUR_CHAR_CODE('dact')
-kAECommandClass = FOUR_CHAR_CODE('cmnd')
-kAEKeyClass = FOUR_CHAR_CODE('keyc')
-kAERawKey = FOUR_CHAR_CODE('rkey')
-kAEVirtualKey = FOUR_CHAR_CODE('keyc')
-kAENavigationKey = FOUR_CHAR_CODE('nave')
-kAEAutoDown = FOUR_CHAR_CODE('auto')
-kAEApplicationClass = FOUR_CHAR_CODE('appl')
-kAESuspend = FOUR_CHAR_CODE('susp')
-kAEResume = FOUR_CHAR_CODE('rsme')
-kAEDiskEvent = FOUR_CHAR_CODE('disk')
-kAENullEvent = FOUR_CHAR_CODE('null')
-kAEWakeUpEvent = FOUR_CHAR_CODE('wake')
-kAEScrapEvent = FOUR_CHAR_CODE('scrp')
-kAEHighLevel = FOUR_CHAR_CODE('high')
-keyAEAngle = FOUR_CHAR_CODE('kang')
-keyAEArcAngle = FOUR_CHAR_CODE('parc')
-keyAEBaseAddr = FOUR_CHAR_CODE('badd')
-keyAEBestType = FOUR_CHAR_CODE('pbst')
-keyAEBgndColor = FOUR_CHAR_CODE('kbcl')
-keyAEBgndPattern = FOUR_CHAR_CODE('kbpt')
-keyAEBounds = FOUR_CHAR_CODE('pbnd')
-keyAECellList = FOUR_CHAR_CODE('kclt')
-keyAEClassID = FOUR_CHAR_CODE('clID')
-keyAEColor = FOUR_CHAR_CODE('colr')
-keyAEColorTable = FOUR_CHAR_CODE('cltb')
-keyAECurveHeight = FOUR_CHAR_CODE('kchd')
-keyAECurveWidth = FOUR_CHAR_CODE('kcwd')
-keyAEDashStyle = FOUR_CHAR_CODE('pdst')
-keyAEData = FOUR_CHAR_CODE('data')
-keyAEDefaultType = FOUR_CHAR_CODE('deft')
-keyAEDefinitionRect = FOUR_CHAR_CODE('pdrt')
-keyAEDescType = FOUR_CHAR_CODE('dstp')
-keyAEDestination = FOUR_CHAR_CODE('dest')
-keyAEDoAntiAlias = FOUR_CHAR_CODE('anta')
-keyAEDoDithered = FOUR_CHAR_CODE('gdit')
-keyAEDoRotate = FOUR_CHAR_CODE('kdrt')
-keyAEDoScale = FOUR_CHAR_CODE('ksca')
-keyAEDoTranslate = FOUR_CHAR_CODE('ktra')
-keyAEEditionFileLoc = FOUR_CHAR_CODE('eloc')
-keyAEElements = FOUR_CHAR_CODE('elms')
-keyAEEndPoint = FOUR_CHAR_CODE('pend')
-keyAEEventClass = FOUR_CHAR_CODE('evcl')
-keyAEEventID = FOUR_CHAR_CODE('evti')
-keyAEFile = FOUR_CHAR_CODE('kfil')
-keyAEFileType = FOUR_CHAR_CODE('fltp')
-keyAEFillColor = FOUR_CHAR_CODE('flcl')
-keyAEFillPattern = FOUR_CHAR_CODE('flpt')
-keyAEFlipHorizontal = FOUR_CHAR_CODE('kfho')
-keyAEFlipVertical = FOUR_CHAR_CODE('kfvt')
-keyAEFont = FOUR_CHAR_CODE('font')
-keyAEFormula = FOUR_CHAR_CODE('pfor')
-keyAEGraphicObjects = FOUR_CHAR_CODE('gobs')
-keyAEID = FOUR_CHAR_CODE('ID  ')
-keyAEImageQuality = FOUR_CHAR_CODE('gqua')
-keyAEInsertHere = FOUR_CHAR_CODE('insh')
-keyAEKeyForms = FOUR_CHAR_CODE('keyf')
-keyAEKeyword = FOUR_CHAR_CODE('kywd')
-keyAELevel = FOUR_CHAR_CODE('levl')
-keyAELineArrow = FOUR_CHAR_CODE('arro')
-keyAEName = FOUR_CHAR_CODE('pnam')
-keyAENewElementLoc = FOUR_CHAR_CODE('pnel')
-keyAEObject = FOUR_CHAR_CODE('kobj')
-keyAEObjectClass = FOUR_CHAR_CODE('kocl')
-keyAEOffStyles = FOUR_CHAR_CODE('ofst')
-keyAEOnStyles = FOUR_CHAR_CODE('onst')
-keyAEParameters = FOUR_CHAR_CODE('prms')
-keyAEParamFlags = FOUR_CHAR_CODE('pmfg')
-keyAEPenColor = FOUR_CHAR_CODE('ppcl')
-keyAEPenPattern = FOUR_CHAR_CODE('pppa')
-keyAEPenWidth = FOUR_CHAR_CODE('ppwd')
-keyAEPixelDepth = FOUR_CHAR_CODE('pdpt')
-keyAEPixMapMinus = FOUR_CHAR_CODE('kpmm')
-keyAEPMTable = FOUR_CHAR_CODE('kpmt')
-keyAEPointList = FOUR_CHAR_CODE('ptlt')
-keyAEPointSize = FOUR_CHAR_CODE('ptsz')
-keyAEPosition = FOUR_CHAR_CODE('kpos')
-keyAEPropData = FOUR_CHAR_CODE('prdt')
-keyAEProperties = FOUR_CHAR_CODE('qpro')
-keyAEProperty = FOUR_CHAR_CODE('kprp')
-keyAEPropFlags = FOUR_CHAR_CODE('prfg')
-keyAEPropID = FOUR_CHAR_CODE('prop')
-keyAEProtection = FOUR_CHAR_CODE('ppro')
-keyAERenderAs = FOUR_CHAR_CODE('kren')
-keyAERequestedType = FOUR_CHAR_CODE('rtyp')
-keyAEResult = FOUR_CHAR_CODE('----')
-keyAEResultInfo = FOUR_CHAR_CODE('rsin')
-keyAERotation = FOUR_CHAR_CODE('prot')
-keyAERotPoint = FOUR_CHAR_CODE('krtp')
-keyAERowList = FOUR_CHAR_CODE('krls')
-keyAESaveOptions = FOUR_CHAR_CODE('savo')
-keyAEScale = FOUR_CHAR_CODE('pscl')
-keyAEScriptTag = FOUR_CHAR_CODE('psct')
-keyAEShowWhere = FOUR_CHAR_CODE('show')
-keyAEStartAngle = FOUR_CHAR_CODE('pang')
-keyAEStartPoint = FOUR_CHAR_CODE('pstp')
-keyAEStyles = FOUR_CHAR_CODE('ksty')
-keyAESuiteID = FOUR_CHAR_CODE('suit')
-keyAEText = FOUR_CHAR_CODE('ktxt')
-keyAETextColor = FOUR_CHAR_CODE('ptxc')
-keyAETextFont = FOUR_CHAR_CODE('ptxf')
-keyAETextPointSize = FOUR_CHAR_CODE('ptps')
-keyAETextStyles = FOUR_CHAR_CODE('txst')
-keyAETextLineHeight = FOUR_CHAR_CODE('ktlh')
-keyAETextLineAscent = FOUR_CHAR_CODE('ktas')
-keyAETheText = FOUR_CHAR_CODE('thtx')
-keyAETransferMode = FOUR_CHAR_CODE('pptm')
-keyAETranslation = FOUR_CHAR_CODE('ptrs')
-keyAETryAsStructGraf = FOUR_CHAR_CODE('toog')
-keyAEUniformStyles = FOUR_CHAR_CODE('ustl')
-keyAEUpdateOn = FOUR_CHAR_CODE('pupd')
-keyAEUserTerm = FOUR_CHAR_CODE('utrm')
-keyAEWindow = FOUR_CHAR_CODE('wndw')
-keyAEWritingCode = FOUR_CHAR_CODE('wrcd')
-keyMiscellaneous = FOUR_CHAR_CODE('fmsc')
-keySelection = FOUR_CHAR_CODE('fsel')
-keyWindow = FOUR_CHAR_CODE('kwnd')
-keyWhen = FOUR_CHAR_CODE('when')
-keyWhere = FOUR_CHAR_CODE('wher')
-keyModifiers = FOUR_CHAR_CODE('mods')
-keyKey = FOUR_CHAR_CODE('key ')
-keyKeyCode = FOUR_CHAR_CODE('code')
-keyKeyboard = FOUR_CHAR_CODE('keyb')
-keyDriveNumber = FOUR_CHAR_CODE('drv#')
-keyErrorCode = FOUR_CHAR_CODE('err#')
-keyHighLevelClass = FOUR_CHAR_CODE('hcls')
-keyHighLevelID = FOUR_CHAR_CODE('hid ')
-pArcAngle = FOUR_CHAR_CODE('parc')
-pBackgroundColor = FOUR_CHAR_CODE('pbcl')
-pBackgroundPattern = FOUR_CHAR_CODE('pbpt')
-pBestType = FOUR_CHAR_CODE('pbst')
-pBounds = FOUR_CHAR_CODE('pbnd')
-pClass = FOUR_CHAR_CODE('pcls')
-pClipboard = FOUR_CHAR_CODE('pcli')
-pColor = FOUR_CHAR_CODE('colr')
-pColorTable = FOUR_CHAR_CODE('cltb')
-pContents = FOUR_CHAR_CODE('pcnt')
-pCornerCurveHeight = FOUR_CHAR_CODE('pchd')
-pCornerCurveWidth = FOUR_CHAR_CODE('pcwd')
-pDashStyle = FOUR_CHAR_CODE('pdst')
-pDefaultType = FOUR_CHAR_CODE('deft')
-pDefinitionRect = FOUR_CHAR_CODE('pdrt')
-pEnabled = FOUR_CHAR_CODE('enbl')
-pEndPoint = FOUR_CHAR_CODE('pend')
-pFillColor = FOUR_CHAR_CODE('flcl')
-pFillPattern = FOUR_CHAR_CODE('flpt')
-pFont = FOUR_CHAR_CODE('font')
-pFormula = FOUR_CHAR_CODE('pfor')
-pGraphicObjects = FOUR_CHAR_CODE('gobs')
-pHasCloseBox = FOUR_CHAR_CODE('hclb')
-pHasTitleBar = FOUR_CHAR_CODE('ptit')
-pID = FOUR_CHAR_CODE('ID  ')
-pIndex = FOUR_CHAR_CODE('pidx')
-pInsertionLoc = FOUR_CHAR_CODE('pins')
-pIsFloating = FOUR_CHAR_CODE('isfl')
-pIsFrontProcess = FOUR_CHAR_CODE('pisf')
-pIsModal = FOUR_CHAR_CODE('pmod')
-pIsModified = FOUR_CHAR_CODE('imod')
-pIsResizable = FOUR_CHAR_CODE('prsz')
-pIsStationeryPad = FOUR_CHAR_CODE('pspd')
-pIsZoomable = FOUR_CHAR_CODE('iszm')
-pIsZoomed = FOUR_CHAR_CODE('pzum')
-pItemNumber = FOUR_CHAR_CODE('itmn')
-pJustification = FOUR_CHAR_CODE('pjst')
-pLineArrow = FOUR_CHAR_CODE('arro')
-pMenuID = FOUR_CHAR_CODE('mnid')
-pName = FOUR_CHAR_CODE('pnam')
-pNewElementLoc = FOUR_CHAR_CODE('pnel')
-pPenColor = FOUR_CHAR_CODE('ppcl')
-pPenPattern = FOUR_CHAR_CODE('pppa')
-pPenWidth = FOUR_CHAR_CODE('ppwd')
-pPixelDepth = FOUR_CHAR_CODE('pdpt')
-pPointList = FOUR_CHAR_CODE('ptlt')
-pPointSize = FOUR_CHAR_CODE('ptsz')
-pProtection = FOUR_CHAR_CODE('ppro')
-pRotation = FOUR_CHAR_CODE('prot')
-pScale = FOUR_CHAR_CODE('pscl')
-pScript = FOUR_CHAR_CODE('scpt')
-pScriptTag = FOUR_CHAR_CODE('psct')
-pSelected = FOUR_CHAR_CODE('selc')
-pSelection = FOUR_CHAR_CODE('sele')
-pStartAngle = FOUR_CHAR_CODE('pang')
-pStartPoint = FOUR_CHAR_CODE('pstp')
-pTextColor = FOUR_CHAR_CODE('ptxc')
-pTextFont = FOUR_CHAR_CODE('ptxf')
-pTextItemDelimiters = FOUR_CHAR_CODE('txdl')
-pTextPointSize = FOUR_CHAR_CODE('ptps')
-pTextStyles = FOUR_CHAR_CODE('txst')
-pTransferMode = FOUR_CHAR_CODE('pptm')
-pTranslation = FOUR_CHAR_CODE('ptrs')
-pUniformStyles = FOUR_CHAR_CODE('ustl')
-pUpdateOn = FOUR_CHAR_CODE('pupd')
-pUserSelection = FOUR_CHAR_CODE('pusl')
-pVersion = FOUR_CHAR_CODE('vers')
-pVisible = FOUR_CHAR_CODE('pvis')
-typeAEText = FOUR_CHAR_CODE('tTXT')
-typeArc = FOUR_CHAR_CODE('carc')
-typeBest = FOUR_CHAR_CODE('best')
-typeCell = FOUR_CHAR_CODE('ccel')
-typeClassInfo = FOUR_CHAR_CODE('gcli')
-typeColorTable = FOUR_CHAR_CODE('clrt')
-typeColumn = FOUR_CHAR_CODE('ccol')
-typeDashStyle = FOUR_CHAR_CODE('tdas')
-typeData = FOUR_CHAR_CODE('tdta')
-typeDrawingArea = FOUR_CHAR_CODE('cdrw')
-typeElemInfo = FOUR_CHAR_CODE('elin')
-typeEnumeration = FOUR_CHAR_CODE('enum')
-typeEPS = FOUR_CHAR_CODE('EPS ')
-typeEventInfo = FOUR_CHAR_CODE('evin')
-typeFinderWindow = FOUR_CHAR_CODE('fwin')
-typeFixedPoint = FOUR_CHAR_CODE('fpnt')
-typeFixedRectangle = FOUR_CHAR_CODE('frct')
-typeGraphicLine = FOUR_CHAR_CODE('glin')
-typeGraphicText = FOUR_CHAR_CODE('cgtx')
-typeGroupedGraphic = FOUR_CHAR_CODE('cpic')
-typeInsertionLoc = FOUR_CHAR_CODE('insl')
-typeIntlText = FOUR_CHAR_CODE('itxt')
-typeIntlWritingCode = FOUR_CHAR_CODE('intl')
-typeLongDateTime = FOUR_CHAR_CODE('ldt ')
-typeLongFixed = FOUR_CHAR_CODE('lfxd')
-typeLongFixedPoint = FOUR_CHAR_CODE('lfpt')
-typeLongFixedRectangle = FOUR_CHAR_CODE('lfrc')
-typeLongPoint = FOUR_CHAR_CODE('lpnt')
-typeLongRectangle = FOUR_CHAR_CODE('lrct')
-typeMachineLoc = FOUR_CHAR_CODE('mLoc')
-typeOval = FOUR_CHAR_CODE('covl')
-typeParamInfo = FOUR_CHAR_CODE('pmin')
-typePict = FOUR_CHAR_CODE('PICT')
-typePixelMap = FOUR_CHAR_CODE('cpix')
-typePixMapMinus = FOUR_CHAR_CODE('tpmm')
-typePolygon = FOUR_CHAR_CODE('cpgn')
-typePropInfo = FOUR_CHAR_CODE('pinf')
-typePtr = FOUR_CHAR_CODE('ptr ')
-typeQDPoint = FOUR_CHAR_CODE('QDpt')
-typeQDRegion = FOUR_CHAR_CODE('Qrgn')
-typeRectangle = FOUR_CHAR_CODE('crec')
-typeRGB16 = FOUR_CHAR_CODE('tr16')
-typeRGB96 = FOUR_CHAR_CODE('tr96')
-typeRGBColor = FOUR_CHAR_CODE('cRGB')
-typeRotation = FOUR_CHAR_CODE('trot')
-typeRoundedRectangle = FOUR_CHAR_CODE('crrc')
-typeRow = FOUR_CHAR_CODE('crow')
-typeScrapStyles = FOUR_CHAR_CODE('styl')
-typeScript = FOUR_CHAR_CODE('scpt')
-typeStyledText = FOUR_CHAR_CODE('STXT')
-typeSuiteInfo = FOUR_CHAR_CODE('suin')
-typeTable = FOUR_CHAR_CODE('ctbl')
-typeTextStyles = FOUR_CHAR_CODE('tsty')
-typeTIFF = FOUR_CHAR_CODE('TIFF')
-typeVersion = FOUR_CHAR_CODE('vers')
-kAEMenuClass = FOUR_CHAR_CODE('menu')
-kAEMenuSelect = FOUR_CHAR_CODE('mhit')
-kAEMouseDown = FOUR_CHAR_CODE('mdwn')
-kAEMouseDownInBack = FOUR_CHAR_CODE('mdbk')
-kAEKeyDown = FOUR_CHAR_CODE('kdwn')
-kAEResized = FOUR_CHAR_CODE('rsiz')
-kAEPromise = FOUR_CHAR_CODE('prom')
-keyMenuID = FOUR_CHAR_CODE('mid ')
-keyMenuItem = FOUR_CHAR_CODE('mitm')
-keyCloseAllWindows = FOUR_CHAR_CODE('caw ')
-keyOriginalBounds = FOUR_CHAR_CODE('obnd')
-keyNewBounds = FOUR_CHAR_CODE('nbnd')
-keyLocalWhere = FOUR_CHAR_CODE('lwhr')
-typeHIMenu = FOUR_CHAR_CODE('mobj')
-typeHIWindow = FOUR_CHAR_CODE('wobj')
-kBySmallIcon = 0
-kByIconView = 1
-kByNameView = 2
-kByDateView = 3
-kBySizeView = 4
-kByKindView = 5
-kByCommentView = 6
-kByLabelView = 7
-kByVersionView = 8
-kAEInfo = 11
-kAEMain = 0
-kAESharing = 13
-kAEZoomIn = 7
-kAEZoomOut = 8
-kTextServiceClass = FOUR_CHAR_CODE('tsvc')
-kUpdateActiveInputArea = FOUR_CHAR_CODE('updt')
-kShowHideInputWindow = FOUR_CHAR_CODE('shiw')
-kPos2Offset = FOUR_CHAR_CODE('p2st')
-kOffset2Pos = FOUR_CHAR_CODE('st2p')
-kUnicodeNotFromInputMethod = FOUR_CHAR_CODE('unim')
-kGetSelectedText = FOUR_CHAR_CODE('gtxt')
-keyAETSMDocumentRefcon = FOUR_CHAR_CODE('refc')
-keyAEServerInstance = FOUR_CHAR_CODE('srvi')
-keyAETheData = FOUR_CHAR_CODE('kdat')
-keyAEFixLength = FOUR_CHAR_CODE('fixl')
-keyAEUpdateRange = FOUR_CHAR_CODE('udng')
-keyAECurrentPoint = FOUR_CHAR_CODE('cpos')
-keyAEBufferSize = FOUR_CHAR_CODE('buff')
-keyAEMoveView = FOUR_CHAR_CODE('mvvw')
-keyAENextBody = FOUR_CHAR_CODE('nxbd')
-keyAETSMScriptTag = FOUR_CHAR_CODE('sclg')
-keyAETSMTextFont = FOUR_CHAR_CODE('ktxf')
-keyAETSMTextFMFont = FOUR_CHAR_CODE('ktxm')
-keyAETSMTextPointSize = FOUR_CHAR_CODE('ktps')
-keyAETSMEventRecord = FOUR_CHAR_CODE('tevt')
-keyAETSMEventRef = FOUR_CHAR_CODE('tevr')
-keyAETextServiceEncoding = FOUR_CHAR_CODE('tsen')
-keyAETextServiceMacEncoding = FOUR_CHAR_CODE('tmen')
-typeTextRange = FOUR_CHAR_CODE('txrn')
-typeComponentInstance = FOUR_CHAR_CODE('cmpi')
-typeOffsetArray = FOUR_CHAR_CODE('ofay')
-typeTextRangeArray = FOUR_CHAR_CODE('tray')
-typeLowLevelEventRecord = FOUR_CHAR_CODE('evtr')
-typeEventRef = FOUR_CHAR_CODE('evrf')
-typeText = typeChar
-kTSMOutsideOfBody = 1
-kTSMInsideOfBody = 2
-kTSMInsideOfActiveInputArea = 3
-kNextBody = 1
-kPreviousBody = 2
-kCaretPosition = 1
-kRawText = 2
-kSelectedRawText = 3
-kConvertedText = 4
-kSelectedConvertedText = 5
-kBlockFillText = 6
-kOutlineText = 7
-kSelectedText = 8
-keyAEHiliteRange = FOUR_CHAR_CODE('hrng')
-keyAEPinRange = FOUR_CHAR_CODE('pnrg')
-keyAEClauseOffsets = FOUR_CHAR_CODE('clau')
-keyAEOffset = FOUR_CHAR_CODE('ofst')
-keyAEPoint = FOUR_CHAR_CODE('gpos')
-keyAELeftSide = FOUR_CHAR_CODE('klef')
-keyAERegionClass = FOUR_CHAR_CODE('rgnc')
-keyAEDragging = FOUR_CHAR_CODE('bool')
-keyAELeadingEdge = keyAELeftSide
-typeUnicodeText = FOUR_CHAR_CODE('utxt')
-typeStyledUnicodeText = FOUR_CHAR_CODE('sutx')
-typeEncodedString = FOUR_CHAR_CODE('encs')
-typeCString = FOUR_CHAR_CODE('cstr')
-typePString = FOUR_CHAR_CODE('pstr')
-typeMeters = FOUR_CHAR_CODE('metr')
-typeInches = FOUR_CHAR_CODE('inch')
-typeFeet = FOUR_CHAR_CODE('feet')
-typeYards = FOUR_CHAR_CODE('yard')
-typeMiles = FOUR_CHAR_CODE('mile')
-typeKilometers = FOUR_CHAR_CODE('kmtr')
-typeCentimeters = FOUR_CHAR_CODE('cmtr')
-typeSquareMeters = FOUR_CHAR_CODE('sqrm')
-typeSquareFeet = FOUR_CHAR_CODE('sqft')
-typeSquareYards = FOUR_CHAR_CODE('sqyd')
-typeSquareMiles = FOUR_CHAR_CODE('sqmi')
-typeSquareKilometers = FOUR_CHAR_CODE('sqkm')
-typeLiters = FOUR_CHAR_CODE('litr')
-typeQuarts = FOUR_CHAR_CODE('qrts')
-typeGallons = FOUR_CHAR_CODE('galn')
-typeCubicMeters = FOUR_CHAR_CODE('cmet')
-typeCubicFeet = FOUR_CHAR_CODE('cfet')
-typeCubicInches = FOUR_CHAR_CODE('cuin')
-typeCubicCentimeter = FOUR_CHAR_CODE('ccmt')
-typeCubicYards = FOUR_CHAR_CODE('cyrd')
-typeKilograms = FOUR_CHAR_CODE('kgrm')
-typeGrams = FOUR_CHAR_CODE('gram')
-typeOunces = FOUR_CHAR_CODE('ozs ')
-typePounds = FOUR_CHAR_CODE('lbs ')
-typeDegreesC = FOUR_CHAR_CODE('degc')
-typeDegreesF = FOUR_CHAR_CODE('degf')
-typeDegreesK = FOUR_CHAR_CODE('degk')
-kFAServerApp = FOUR_CHAR_CODE('ssrv')
-kDoFolderActionEvent = FOUR_CHAR_CODE('fola')
-kFolderActionCode = FOUR_CHAR_CODE('actn')
-kFolderOpenedEvent = FOUR_CHAR_CODE('fopn')
-kFolderClosedEvent = FOUR_CHAR_CODE('fclo')
-kFolderWindowMovedEvent = FOUR_CHAR_CODE('fsiz')
-kFolderItemsAddedEvent = FOUR_CHAR_CODE('fget')
-kFolderItemsRemovedEvent = FOUR_CHAR_CODE('flos')
-kItemList = FOUR_CHAR_CODE('flst')
-kNewSizeParameter = FOUR_CHAR_CODE('fnsz')
-kFASuiteCode = FOUR_CHAR_CODE('faco')
-kFAAttachCommand = FOUR_CHAR_CODE('atfa')
-kFARemoveCommand = FOUR_CHAR_CODE('rmfa')
-kFAEditCommand = FOUR_CHAR_CODE('edfa')
-kFAFileParam = FOUR_CHAR_CODE('faal')
-kFAIndexParam = FOUR_CHAR_CODE('indx')
-kAEInternetSuite = FOUR_CHAR_CODE('gurl')
-kAEISWebStarSuite = FOUR_CHAR_CODE('WWW\xbd')
-kAEISGetURL = FOUR_CHAR_CODE('gurl')
-KAEISHandleCGI = FOUR_CHAR_CODE('sdoc')
-cURL = FOUR_CHAR_CODE('url ')
-cInternetAddress = FOUR_CHAR_CODE('IPAD')
-cHTML = FOUR_CHAR_CODE('html')
-cFTPItem = FOUR_CHAR_CODE('ftp ')
-kAEISHTTPSearchArgs = FOUR_CHAR_CODE('kfor')
-kAEISPostArgs = FOUR_CHAR_CODE('post')
-kAEISMethod = FOUR_CHAR_CODE('meth')
-kAEISClientAddress = FOUR_CHAR_CODE('addr')
-kAEISUserName = FOUR_CHAR_CODE('user')
-kAEISPassword = FOUR_CHAR_CODE('pass')
-kAEISFromUser = FOUR_CHAR_CODE('frmu')
-kAEISServerName = FOUR_CHAR_CODE('svnm')
-kAEISServerPort = FOUR_CHAR_CODE('svpt')
-kAEISScriptName = FOUR_CHAR_CODE('scnm')
-kAEISContentType = FOUR_CHAR_CODE('ctyp')
-kAEISReferrer = FOUR_CHAR_CODE('refr')
-kAEISUserAgent = FOUR_CHAR_CODE('Agnt')
-kAEISAction = FOUR_CHAR_CODE('Kact')
-kAEISActionPath = FOUR_CHAR_CODE('Kapt')
-kAEISClientIP = FOUR_CHAR_CODE('Kcip')
-kAEISFullRequest = FOUR_CHAR_CODE('Kfrq')
-pScheme = FOUR_CHAR_CODE('pusc')
-pHost = FOUR_CHAR_CODE('HOST')
-pPath = FOUR_CHAR_CODE('FTPc')
-pUserName = FOUR_CHAR_CODE('RAun')
-pUserPassword = FOUR_CHAR_CODE('RApw')
-pDNSForm = FOUR_CHAR_CODE('pDNS')
-pURL = FOUR_CHAR_CODE('pURL')
-pTextEncoding = FOUR_CHAR_CODE('ptxe')
-pFTPKind = FOUR_CHAR_CODE('kind')
-eScheme = FOUR_CHAR_CODE('esch')
-eurlHTTP = FOUR_CHAR_CODE('http')
-eurlHTTPS = FOUR_CHAR_CODE('htps')
-eurlFTP = FOUR_CHAR_CODE('ftp ')
-eurlMail = FOUR_CHAR_CODE('mail')
-eurlFile = FOUR_CHAR_CODE('file')
-eurlGopher = FOUR_CHAR_CODE('gphr')
-eurlTelnet = FOUR_CHAR_CODE('tlnt')
-eurlNews = FOUR_CHAR_CODE('news')
-eurlSNews = FOUR_CHAR_CODE('snws')
-eurlNNTP = FOUR_CHAR_CODE('nntp')
-eurlMessage = FOUR_CHAR_CODE('mess')
-eurlMailbox = FOUR_CHAR_CODE('mbox')
-eurlMulti = FOUR_CHAR_CODE('mult')
-eurlLaunch = FOUR_CHAR_CODE('laun')
-eurlAFP = FOUR_CHAR_CODE('afp ')
-eurlAT = FOUR_CHAR_CODE('at  ')
-eurlEPPC = FOUR_CHAR_CODE('eppc')
-eurlRTSP = FOUR_CHAR_CODE('rtsp')
-eurlIMAP = FOUR_CHAR_CODE('imap')
-eurlNFS = FOUR_CHAR_CODE('unfs')
-eurlPOP = FOUR_CHAR_CODE('upop')
-eurlLDAP = FOUR_CHAR_CODE('uldp')
-eurlUnknown = FOUR_CHAR_CODE('url?')
-kConnSuite = FOUR_CHAR_CODE('macc')
-cDevSpec = FOUR_CHAR_CODE('cdev')
-cAddressSpec = FOUR_CHAR_CODE('cadr')
-cADBAddress = FOUR_CHAR_CODE('cadb')
-cAppleTalkAddress = FOUR_CHAR_CODE('cat ')
-cBusAddress = FOUR_CHAR_CODE('cbus')
-cEthernetAddress = FOUR_CHAR_CODE('cen ')
-cFireWireAddress = FOUR_CHAR_CODE('cfw ')
-cIPAddress = FOUR_CHAR_CODE('cip ')
-cLocalTalkAddress = FOUR_CHAR_CODE('clt ')
-cSCSIAddress = FOUR_CHAR_CODE('cscs')
-cTokenRingAddress = FOUR_CHAR_CODE('ctok')
-cUSBAddress = FOUR_CHAR_CODE('cusb')
-pDeviceType = FOUR_CHAR_CODE('pdvt')
-pDeviceAddress = FOUR_CHAR_CODE('pdva')
-pConduit = FOUR_CHAR_CODE('pcon')
-pProtocol = FOUR_CHAR_CODE('pprt')
-pATMachine = FOUR_CHAR_CODE('patm')
-pATZone = FOUR_CHAR_CODE('patz')
-pATType = FOUR_CHAR_CODE('patt')
-pDottedDecimal = FOUR_CHAR_CODE('pipd')
-pDNS = FOUR_CHAR_CODE('pdns')
-pPort = FOUR_CHAR_CODE('ppor')
-pNetwork = FOUR_CHAR_CODE('pnet')
-pNode = FOUR_CHAR_CODE('pnod')
-pSocket = FOUR_CHAR_CODE('psoc')
-pSCSIBus = FOUR_CHAR_CODE('pscb')
-pSCSILUN = FOUR_CHAR_CODE('pslu')
-eDeviceType = FOUR_CHAR_CODE('edvt')
-eAddressSpec = FOUR_CHAR_CODE('eads')
-eConduit = FOUR_CHAR_CODE('econ')
-eProtocol = FOUR_CHAR_CODE('epro')
-eADB = FOUR_CHAR_CODE('eadb')
-eAnalogAudio = FOUR_CHAR_CODE('epau')
-eAppleTalk = FOUR_CHAR_CODE('epat')
-eAudioLineIn = FOUR_CHAR_CODE('ecai')
-eAudioLineOut = FOUR_CHAR_CODE('ecal')
-eAudioOut = FOUR_CHAR_CODE('ecao')
-eBus = FOUR_CHAR_CODE('ebus')
-eCDROM = FOUR_CHAR_CODE('ecd ')
-eCommSlot = FOUR_CHAR_CODE('eccm')
-eDigitalAudio = FOUR_CHAR_CODE('epda')
-eDisplay = FOUR_CHAR_CODE('edds')
-eDVD = FOUR_CHAR_CODE('edvd')
-eEthernet = FOUR_CHAR_CODE('ecen')
-eFireWire = FOUR_CHAR_CODE('ecfw')
-eFloppy = FOUR_CHAR_CODE('efd ')
-eHD = FOUR_CHAR_CODE('ehd ')
-eInfrared = FOUR_CHAR_CODE('ecir')
-eIP = FOUR_CHAR_CODE('epip')
-eIrDA = FOUR_CHAR_CODE('epir')
-eIRTalk = FOUR_CHAR_CODE('epit')
-eKeyboard = FOUR_CHAR_CODE('ekbd')
-eLCD = FOUR_CHAR_CODE('edlc')
-eLocalTalk = FOUR_CHAR_CODE('eclt')
-eMacIP = FOUR_CHAR_CODE('epmi')
-eMacVideo = FOUR_CHAR_CODE('epmv')
-eMicrophone = FOUR_CHAR_CODE('ecmi')
-eModemPort = FOUR_CHAR_CODE('ecmp')
-eModemPrinterPort = FOUR_CHAR_CODE('empp')
-eModem = FOUR_CHAR_CODE('edmm')
-eMonitorOut = FOUR_CHAR_CODE('ecmn')
-eMouse = FOUR_CHAR_CODE('emou')
-eNuBusCard = FOUR_CHAR_CODE('ednb')
-eNuBus = FOUR_CHAR_CODE('enub')
-ePCcard = FOUR_CHAR_CODE('ecpc')
-ePCIbus = FOUR_CHAR_CODE('ecpi')
-ePCIcard = FOUR_CHAR_CODE('edpi')
-ePDSslot = FOUR_CHAR_CODE('ecpd')
-ePDScard = FOUR_CHAR_CODE('epds')
-ePointingDevice = FOUR_CHAR_CODE('edpd')
-ePostScript = FOUR_CHAR_CODE('epps')
-ePPP = FOUR_CHAR_CODE('eppp')
-ePrinterPort = FOUR_CHAR_CODE('ecpp')
-ePrinter = FOUR_CHAR_CODE('edpr')
-eSvideo = FOUR_CHAR_CODE('epsv')
-eSCSI = FOUR_CHAR_CODE('ecsc')
-eSerial = FOUR_CHAR_CODE('epsr')
-eSpeakers = FOUR_CHAR_CODE('edsp')
-eStorageDevice = FOUR_CHAR_CODE('edst')
-eSVGA = FOUR_CHAR_CODE('epsg')
-eTokenRing = FOUR_CHAR_CODE('etok')
-eTrackball = FOUR_CHAR_CODE('etrk')
-eTrackpad = FOUR_CHAR_CODE('edtp')
-eUSB = FOUR_CHAR_CODE('ecus')
-eVideoIn = FOUR_CHAR_CODE('ecvi')
-eVideoMonitor = FOUR_CHAR_CODE('edvm')
-eVideoOut = FOUR_CHAR_CODE('ecvo')
-cKeystroke = FOUR_CHAR_CODE('kprs')
-pKeystrokeKey = FOUR_CHAR_CODE('kMsg')
-pModifiers = FOUR_CHAR_CODE('kMod')
-pKeyKind = FOUR_CHAR_CODE('kknd')
-eModifiers = FOUR_CHAR_CODE('eMds')
-eOptionDown = FOUR_CHAR_CODE('Kopt')
-eCommandDown = FOUR_CHAR_CODE('Kcmd')
-eControlDown = FOUR_CHAR_CODE('Kctl')
-eShiftDown = FOUR_CHAR_CODE('Ksft')
-eCapsLockDown = FOUR_CHAR_CODE('Kclk')
-eKeyKind = FOUR_CHAR_CODE('ekst')
-eEscapeKey = 0x6B733500
-eDeleteKey = 0x6B733300
-eTabKey = 0x6B733000
-eReturnKey = 0x6B732400
-eClearKey = 0x6B734700
-eEnterKey = 0x6B734C00
-eUpArrowKey = 0x6B737E00
-eDownArrowKey = 0x6B737D00
-eLeftArrowKey = 0x6B737B00
-eRightArrowKey = 0x6B737C00
-eHelpKey = 0x6B737200
-eHomeKey = 0x6B737300
-ePageUpKey = 0x6B737400
-ePageDownKey = 0x6B737900
-eForwardDelKey = 0x6B737500
-eEndKey = 0x6B737700
-eF1Key = 0x6B737A00
-eF2Key = 0x6B737800
-eF3Key = 0x6B736300
-eF4Key = 0x6B737600
-eF5Key = 0x6B736000
-eF6Key = 0x6B736100
-eF7Key = 0x6B736200
-eF8Key = 0x6B736400
-eF9Key = 0x6B736500
-eF10Key = 0x6B736D00
-eF11Key = 0x6B736700
-eF12Key = 0x6B736F00
-eF13Key = 0x6B736900
-eF14Key = 0x6B736B00
-eF15Key = 0x6B737100
-kAEAND = FOUR_CHAR_CODE('AND ')
-kAEOR = FOUR_CHAR_CODE('OR  ')
-kAENOT = FOUR_CHAR_CODE('NOT ')
-kAEFirst = FOUR_CHAR_CODE('firs')
-kAELast = FOUR_CHAR_CODE('last')
-kAEMiddle = FOUR_CHAR_CODE('midd')
-kAEAny = FOUR_CHAR_CODE('any ')
-kAEAll = FOUR_CHAR_CODE('all ')
-kAENext = FOUR_CHAR_CODE('next')
-kAEPrevious = FOUR_CHAR_CODE('prev')
-keyAECompOperator = FOUR_CHAR_CODE('relo')
-keyAELogicalTerms = FOUR_CHAR_CODE('term')
-keyAELogicalOperator = FOUR_CHAR_CODE('logc')
-keyAEObject1 = FOUR_CHAR_CODE('obj1')
-keyAEObject2 = FOUR_CHAR_CODE('obj2')
-keyAEDesiredClass = FOUR_CHAR_CODE('want')
-keyAEContainer = FOUR_CHAR_CODE('from')
-keyAEKeyForm = FOUR_CHAR_CODE('form')
-keyAEKeyData = FOUR_CHAR_CODE('seld')
-keyAERangeStart = FOUR_CHAR_CODE('star')
-keyAERangeStop = FOUR_CHAR_CODE('stop')
-keyDisposeTokenProc = FOUR_CHAR_CODE('xtok')
-keyAECompareProc = FOUR_CHAR_CODE('cmpr')
-keyAECountProc = FOUR_CHAR_CODE('cont')
-keyAEMarkTokenProc = FOUR_CHAR_CODE('mkid')
-keyAEMarkProc = FOUR_CHAR_CODE('mark')
-keyAEAdjustMarksProc = FOUR_CHAR_CODE('adjm')
-keyAEGetErrDescProc = FOUR_CHAR_CODE('indc')
-formAbsolutePosition = FOUR_CHAR_CODE('indx')
-formRelativePosition = FOUR_CHAR_CODE('rele')
-formTest = FOUR_CHAR_CODE('test')
-formRange = FOUR_CHAR_CODE('rang')
-formPropertyID = FOUR_CHAR_CODE('prop')
-formName = FOUR_CHAR_CODE('name')
-typeObjectSpecifier = FOUR_CHAR_CODE('obj ')
-typeObjectBeingExamined = FOUR_CHAR_CODE('exmn')
-typeCurrentContainer = FOUR_CHAR_CODE('ccnt')
-typeToken = FOUR_CHAR_CODE('toke')
-typeRelativeDescriptor = FOUR_CHAR_CODE('rel ')
-typeAbsoluteOrdinal = FOUR_CHAR_CODE('abso')
-typeIndexDescriptor = FOUR_CHAR_CODE('inde')
-typeRangeDescriptor = FOUR_CHAR_CODE('rang')
-typeLogicalDescriptor = FOUR_CHAR_CODE('logi')
-typeCompDescriptor = FOUR_CHAR_CODE('cmpd')
-typeOSLTokenList = FOUR_CHAR_CODE('ostl')
-kAEIDoMinimum = 0x0000
-kAEIDoWhose = 0x0001
-kAEIDoMarking = 0x0004
-kAEPassSubDescs = 0x0008
-kAEResolveNestedLists = 0x0010
-kAEHandleSimpleRanges = 0x0020
-kAEUseRelativeIterators = 0x0040
-typeWhoseDescriptor = FOUR_CHAR_CODE('whos')
-formWhose = FOUR_CHAR_CODE('whos')
-typeWhoseRange = FOUR_CHAR_CODE('wrng')
-keyAEWhoseRangeStart = FOUR_CHAR_CODE('wstr')
-keyAEWhoseRangeStop = FOUR_CHAR_CODE('wstp')
-keyAEIndex = FOUR_CHAR_CODE('kidx')
-keyAETest = FOUR_CHAR_CODE('ktst')
diff --git a/Lib/plat-mac/Carbon/AppleHelp.py b/Lib/plat-mac/Carbon/AppleHelp.py
deleted file mode 100644 (file)
index 3496d59..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# Generated from 'AppleHelp.h'
-
-kAHInternalErr = -10790
-kAHInternetConfigPrefErr = -10791
-kAHTOCTypeUser = 0
-kAHTOCTypeDeveloper = 1
diff --git a/Lib/plat-mac/Carbon/CF.py b/Lib/plat-mac/Carbon/CF.py
deleted file mode 100644 (file)
index 4a784c0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _CF import *
diff --git a/Lib/plat-mac/Carbon/CG.py b/Lib/plat-mac/Carbon/CG.py
deleted file mode 100755 (executable)
index 96f5772..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _CG import *
diff --git a/Lib/plat-mac/Carbon/CarbonEvents.py b/Lib/plat-mac/Carbon/CarbonEvents.py
deleted file mode 100755 (executable)
index aa44069..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-# Generated from 'CarbonEvents.h'
-
-def FOUR_CHAR_CODE(x): return x
-def FOUR_CHAR_CODE(x): return x
-false = 0
-true = 1
-keyAEEventClass = FOUR_CHAR_CODE('evcl')
-keyAEEventID = FOUR_CHAR_CODE('evti')
-eventAlreadyPostedErr = -9860
-eventTargetBusyErr = -9861
-eventClassInvalidErr = -9862
-eventClassIncorrectErr = -9864
-eventHandlerAlreadyInstalledErr = -9866
-eventInternalErr = -9868
-eventKindIncorrectErr = -9869
-eventParameterNotFoundErr = -9870
-eventNotHandledErr = -9874
-eventLoopTimedOutErr = -9875
-eventLoopQuitErr = -9876
-eventNotInQueueErr = -9877
-eventHotKeyExistsErr = -9878
-eventHotKeyInvalidErr = -9879
-kEventPriorityLow = 0
-kEventPriorityStandard = 1
-kEventPriorityHigh = 2
-kEventLeaveInQueue = false
-kEventRemoveFromQueue = true
-kTrackMouseLocationOptionDontConsumeMouseUp = (1 << 0)
-kMouseTrackingMouseDown = 1
-kMouseTrackingMouseUp = 2
-kMouseTrackingMouseExited = 3
-kMouseTrackingMouseEntered = 4
-kMouseTrackingMouseDragged = 5
-kMouseTrackingKeyModifiersChanged = 6
-kMouseTrackingUserCancelled = 7
-kMouseTrackingTimedOut = 8
-kMouseTrackingMouseMoved = 9
-kEventAttributeNone = 0
-kEventAttributeUserEvent = (1 << 0)
-kEventClassMouse = FOUR_CHAR_CODE('mous')
-kEventClassKeyboard = FOUR_CHAR_CODE('keyb')
-kEventClassTextInput = FOUR_CHAR_CODE('text')
-kEventClassApplication = FOUR_CHAR_CODE('appl')
-kEventClassAppleEvent = FOUR_CHAR_CODE('eppc')
-kEventClassMenu = FOUR_CHAR_CODE('menu')
-kEventClassWindow = FOUR_CHAR_CODE('wind')
-kEventClassControl = FOUR_CHAR_CODE('cntl')
-kEventClassCommand = FOUR_CHAR_CODE('cmds')
-kEventClassTablet = FOUR_CHAR_CODE('tblt')
-kEventClassVolume = FOUR_CHAR_CODE('vol ')
-kEventClassAppearance = FOUR_CHAR_CODE('appm')
-kEventClassService = FOUR_CHAR_CODE('serv')
-kEventMouseDown = 1
-kEventMouseUp = 2
-kEventMouseMoved = 5
-kEventMouseDragged = 6
-kEventMouseWheelMoved = 10
-kEventMouseButtonPrimary = 1
-kEventMouseButtonSecondary = 2
-kEventMouseButtonTertiary = 3
-kEventMouseWheelAxisX = 0
-kEventMouseWheelAxisY = 1
-kEventTextInputUpdateActiveInputArea = 1
-kEventTextInputUnicodeForKeyEvent = 2
-kEventTextInputOffsetToPos = 3
-kEventTextInputPosToOffset = 4
-kEventTextInputShowHideBottomWindow = 5
-kEventTextInputGetSelectedText = 6
-kEventRawKeyDown = 1
-kEventRawKeyRepeat = 2
-kEventRawKeyUp = 3
-kEventRawKeyModifiersChanged = 4
-kEventHotKeyPressed = 5
-kEventHotKeyReleased = 6
-kEventKeyModifierNumLockBit = 16
-kEventKeyModifierFnBit = 17
-kEventKeyModifierNumLockMask = 1 << kEventKeyModifierNumLockBit
-kEventKeyModifierFnMask = 1 << kEventKeyModifierFnBit
-kEventAppActivated = 1
-kEventAppDeactivated = 2
-kEventAppQuit = 3
-kEventAppLaunchNotification = 4
-kEventAppLaunched = 5
-kEventAppTerminated = 6
-kEventAppFrontSwitched = 7
-kEventAppGetDockTileMenu = 20
-kEventAppleEvent = 1
-kEventWindowUpdate = 1
-kEventWindowDrawContent = 2
-kEventWindowActivated = 5
-kEventWindowDeactivated = 6
-kEventWindowGetClickActivation = 7
-kEventWindowShowing = 22
-kEventWindowHiding = 23
-kEventWindowShown = 24
-kEventWindowHidden = 25
-kEventWindowCollapsing = 86
-kEventWindowCollapsed = 67
-kEventWindowExpanding = 87
-kEventWindowExpanded = 70
-kEventWindowZoomed = 76
-kEventWindowBoundsChanging = 26
-kEventWindowBoundsChanged = 27
-kEventWindowResizeStarted = 28
-kEventWindowResizeCompleted = 29
-kEventWindowDragStarted = 30
-kEventWindowDragCompleted = 31
-kEventWindowClosed = 73
-kWindowBoundsChangeUserDrag = (1 << 0)
-kWindowBoundsChangeUserResize = (1 << 1)
-kWindowBoundsChangeSizeChanged = (1 << 2)
-kWindowBoundsChangeOriginChanged = (1 << 3)
-kWindowBoundsChangeZoom = (1 << 4)
-kEventWindowClickDragRgn = 32
-kEventWindowClickResizeRgn = 33
-kEventWindowClickCollapseRgn = 34
-kEventWindowClickCloseRgn = 35
-kEventWindowClickZoomRgn = 36
-kEventWindowClickContentRgn = 37
-kEventWindowClickProxyIconRgn = 38
-kEventWindowClickToolbarButtonRgn = 41
-kEventWindowClickStructureRgn = 42
-kEventWindowCursorChange = 40
-kEventWindowCollapse = 66
-kEventWindowCollapseAll = 68
-kEventWindowExpand = 69
-kEventWindowExpandAll = 71
-kEventWindowClose = 72
-kEventWindowCloseAll = 74
-kEventWindowZoom = 75
-kEventWindowZoomAll = 77
-kEventWindowContextualMenuSelect = 78
-kEventWindowPathSelect = 79
-kEventWindowGetIdealSize = 80
-kEventWindowGetMinimumSize = 81
-kEventWindowGetMaximumSize = 82
-kEventWindowConstrain = 83
-kEventWindowHandleContentClick = 85
-kEventWindowProxyBeginDrag = 128
-kEventWindowProxyEndDrag = 129
-kEventWindowToolbarSwitchMode = 150
-kDockChangedUser = 1
-kDockChangedOrientation = 2
-kDockChangedAutohide = 3
-kDockChangedDisplay = 4
-kDockChangedItems = 5
-kDockChangedUnknown = 6
-kEventWindowFocusAcquired = 200
-kEventWindowFocusRelinquish = 201
-kEventWindowDrawFrame = 1000
-kEventWindowDrawPart = 1001
-kEventWindowGetRegion = 1002
-kEventWindowHitTest = 1003
-kEventWindowInit = 1004
-kEventWindowDispose = 1005
-kEventWindowDragHilite = 1006
-kEventWindowModified = 1007
-kEventWindowSetupProxyDragImage = 1008
-kEventWindowStateChanged = 1009
-kEventWindowMeasureTitle = 1010
-kEventWindowDrawGrowBox = 1011
-kEventWindowGetGrowImageRegion = 1012
-kEventWindowPaint = 1013
-kEventMenuBeginTracking = 1
-kEventMenuEndTracking = 2
-kEventMenuChangeTrackingMode = 3
-kEventMenuOpening = 4
-kEventMenuClosed = 5
-kEventMenuTargetItem = 6
-kEventMenuMatchKey = 7
-kEventMenuEnableItems = 8
-kEventMenuPopulate = 9
-kEventMenuMeasureItemWidth = 100
-kEventMenuMeasureItemHeight = 101
-kEventMenuDrawItem = 102
-kEventMenuDrawItemContent = 103
-kEventMenuDispose = 1001
-kMenuContextMenuBar = 1 << 0
-kMenuContextPullDown = 1 << 8
-kMenuContextPopUp = 1 << 9
-kMenuContextSubmenu = 1 << 10
-kMenuContextMenuBarTracking = 1 << 16
-kMenuContextPopUpTracking = 1 << 17
-kMenuContextKeyMatching = 1 << 18
-kMenuContextMenuEnabling = 1 << 19
-kMenuContextCommandIDSearch = 1 << 20
-kEventProcessCommand = 1
-kEventCommandProcess = 1
-kEventCommandUpdateStatus = 2
-kHICommandOK = FOUR_CHAR_CODE('ok  ')
-kHICommandCancel = FOUR_CHAR_CODE('not!')
-kHICommandQuit = FOUR_CHAR_CODE('quit')
-kHICommandUndo = FOUR_CHAR_CODE('undo')
-kHICommandRedo = FOUR_CHAR_CODE('redo')
-kHICommandCut = FOUR_CHAR_CODE('cut ')
-kHICommandCopy = FOUR_CHAR_CODE('copy')
-kHICommandPaste = FOUR_CHAR_CODE('past')
-kHICommandClear = FOUR_CHAR_CODE('clea')
-kHICommandSelectAll = FOUR_CHAR_CODE('sall')
-kHICommandHide = FOUR_CHAR_CODE('hide')
-kHICommandHideOthers = FOUR_CHAR_CODE('hido')
-kHICommandShowAll = FOUR_CHAR_CODE('shal')
-kHICommandPreferences = FOUR_CHAR_CODE('pref')
-kHICommandZoomWindow = FOUR_CHAR_CODE('zoom')
-kHICommandMinimizeWindow = FOUR_CHAR_CODE('mini')
-kHICommandMinimizeAll = FOUR_CHAR_CODE('mina')
-kHICommandMaximizeWindow = FOUR_CHAR_CODE('maxi')
-kHICommandMaximizeAll = FOUR_CHAR_CODE('maxa')
-kHICommandArrangeInFront = FOUR_CHAR_CODE('frnt')
-kHICommandBringAllToFront = FOUR_CHAR_CODE('bfrt')
-kHICommandWindowListSeparator = FOUR_CHAR_CODE('wldv')
-kHICommandWindowListTerminator = FOUR_CHAR_CODE('wlst')
-kHICommandSelectWindow = FOUR_CHAR_CODE('swin')
-kHICommandAbout = FOUR_CHAR_CODE('abou')
-kHICommandNew = FOUR_CHAR_CODE('new ')
-kHICommandOpen = FOUR_CHAR_CODE('open')
-kHICommandClose = FOUR_CHAR_CODE('clos')
-kHICommandSave = FOUR_CHAR_CODE('save')
-kHICommandSaveAs = FOUR_CHAR_CODE('svas')
-kHICommandRevert = FOUR_CHAR_CODE('rvrt')
-kHICommandPrint = FOUR_CHAR_CODE('prnt')
-kHICommandPageSetup = FOUR_CHAR_CODE('page')
-kHICommandAppHelp = FOUR_CHAR_CODE('ahlp')
-kHICommandFromMenu = (1 << 0)
-kHICommandFromControl = (1 << 1)
-kHICommandFromWindow = (1 << 2)
-kEventControlInitialize = 1000
-kEventControlDispose = 1001
-kEventControlGetOptimalBounds = 1003
-kEventControlDefInitialize = kEventControlInitialize
-kEventControlDefDispose = kEventControlDispose
-kEventControlHit = 1
-kEventControlSimulateHit = 2
-kEventControlHitTest = 3
-kEventControlDraw = 4
-kEventControlApplyBackground = 5
-kEventControlApplyTextColor = 6
-kEventControlSetFocusPart = 7
-kEventControlGetFocusPart = 8
-kEventControlActivate = 9
-kEventControlDeactivate = 10
-kEventControlSetCursor = 11
-kEventControlContextualMenuClick = 12
-kEventControlClick = 13
-kEventControlTrack = 51
-kEventControlGetScrollToHereStartPoint = 52
-kEventControlGetIndicatorDragConstraint = 53
-kEventControlIndicatorMoved = 54
-kEventControlGhostingFinished = 55
-kEventControlGetActionProcPart = 56
-kEventControlGetPartRegion = 101
-kEventControlGetPartBounds = 102
-kEventControlSetData = 103
-kEventControlGetData = 104
-kEventControlValueFieldChanged = 151
-kEventControlAddedSubControl = 152
-kEventControlRemovingSubControl = 153
-kEventControlBoundsChanged = 154
-kEventControlOwningWindowChanged = 159
-kEventControlArbitraryMessage = 201
-kControlBoundsChangeSizeChanged = (1 << 2)
-kControlBoundsChangePositionChanged = (1 << 3)
-kEventTabletPoint = 1
-kEventTabletProximity = 2
-kEventTabletPointer = 1
-kEventVolumeMounted = 1
-kEventVolumeUnmounted = 2
-typeFSVolumeRefNum = FOUR_CHAR_CODE('voln')
-kEventAppearanceScrollBarVariantChanged = 1
-kEventServiceCopy = 1
-kEventServicePaste = 2
-kEventServiceGetTypes = 3
-kEventServicePerform = 4
-kEventParamDirectObject = FOUR_CHAR_CODE('----')
-kEventParamPostTarget = FOUR_CHAR_CODE('ptrg')
-typeEventTargetRef = FOUR_CHAR_CODE('etrg')
-kEventParamWindowRef = FOUR_CHAR_CODE('wind')
-kEventParamGrafPort = FOUR_CHAR_CODE('graf')
-kEventParamDragRef = FOUR_CHAR_CODE('drag')
-kEventParamMenuRef = FOUR_CHAR_CODE('menu')
-kEventParamEventRef = FOUR_CHAR_CODE('evnt')
-kEventParamControlRef = FOUR_CHAR_CODE('ctrl')
-kEventParamRgnHandle = FOUR_CHAR_CODE('rgnh')
-kEventParamEnabled = FOUR_CHAR_CODE('enab')
-kEventParamDimensions = FOUR_CHAR_CODE('dims')
-kEventParamAvailableBounds = FOUR_CHAR_CODE('avlb')
-kEventParamAEEventID = keyAEEventID
-kEventParamAEEventClass = keyAEEventClass
-kEventParamCGContextRef = FOUR_CHAR_CODE('cntx')
-kEventParamDeviceDepth = FOUR_CHAR_CODE('devd')
-kEventParamDeviceColor = FOUR_CHAR_CODE('devc')
-typeWindowRef = FOUR_CHAR_CODE('wind')
-typeGrafPtr = FOUR_CHAR_CODE('graf')
-typeGWorldPtr = FOUR_CHAR_CODE('gwld')
-typeDragRef = FOUR_CHAR_CODE('drag')
-typeMenuRef = FOUR_CHAR_CODE('menu')
-typeControlRef = FOUR_CHAR_CODE('ctrl')
-typeCollection = FOUR_CHAR_CODE('cltn')
-typeQDRgnHandle = FOUR_CHAR_CODE('rgnh')
-typeOSStatus = FOUR_CHAR_CODE('osst')
-typeCFStringRef = FOUR_CHAR_CODE('cfst')
-typeCFIndex = FOUR_CHAR_CODE('cfix')
-typeCFTypeRef = FOUR_CHAR_CODE('cfty')
-typeCGContextRef = FOUR_CHAR_CODE('cntx')
-typeHIPoint = FOUR_CHAR_CODE('hipt')
-typeHISize = FOUR_CHAR_CODE('hisz')
-typeHIRect = FOUR_CHAR_CODE('hirc')
-kEventParamMouseLocation = FOUR_CHAR_CODE('mloc')
-kEventParamMouseButton = FOUR_CHAR_CODE('mbtn')
-kEventParamClickCount = FOUR_CHAR_CODE('ccnt')
-kEventParamMouseWheelAxis = FOUR_CHAR_CODE('mwax')
-kEventParamMouseWheelDelta = FOUR_CHAR_CODE('mwdl')
-kEventParamMouseDelta = FOUR_CHAR_CODE('mdta')
-kEventParamMouseChord = FOUR_CHAR_CODE('chor')
-kEventParamTabletEventType = FOUR_CHAR_CODE('tblt')
-typeMouseButton = FOUR_CHAR_CODE('mbtn')
-typeMouseWheelAxis = FOUR_CHAR_CODE('mwax')
-kEventParamKeyCode = FOUR_CHAR_CODE('kcod')
-kEventParamKeyMacCharCodes = FOUR_CHAR_CODE('kchr')
-kEventParamKeyModifiers = FOUR_CHAR_CODE('kmod')
-kEventParamKeyUnicodes = FOUR_CHAR_CODE('kuni')
-kEventParamKeyboardType = FOUR_CHAR_CODE('kbdt')
-typeEventHotKeyID = FOUR_CHAR_CODE('hkid')
-kEventParamTextInputSendRefCon = FOUR_CHAR_CODE('tsrc')
-kEventParamTextInputSendComponentInstance = FOUR_CHAR_CODE('tsci')
-kEventParamTextInputSendSLRec = FOUR_CHAR_CODE('tssl')
-kEventParamTextInputReplySLRec = FOUR_CHAR_CODE('trsl')
-kEventParamTextInputSendText = FOUR_CHAR_CODE('tstx')
-kEventParamTextInputReplyText = FOUR_CHAR_CODE('trtx')
-kEventParamTextInputSendUpdateRng = FOUR_CHAR_CODE('tsup')
-kEventParamTextInputSendHiliteRng = FOUR_CHAR_CODE('tshi')
-kEventParamTextInputSendClauseRng = FOUR_CHAR_CODE('tscl')
-kEventParamTextInputSendPinRng = FOUR_CHAR_CODE('tspn')
-kEventParamTextInputSendFixLen = FOUR_CHAR_CODE('tsfx')
-kEventParamTextInputSendLeadingEdge = FOUR_CHAR_CODE('tsle')
-kEventParamTextInputReplyLeadingEdge = FOUR_CHAR_CODE('trle')
-kEventParamTextInputSendTextOffset = FOUR_CHAR_CODE('tsto')
-kEventParamTextInputReplyTextOffset = FOUR_CHAR_CODE('trto')
-kEventParamTextInputReplyRegionClass = FOUR_CHAR_CODE('trrg')
-kEventParamTextInputSendCurrentPoint = FOUR_CHAR_CODE('tscp')
-kEventParamTextInputSendDraggingMode = FOUR_CHAR_CODE('tsdm')
-kEventParamTextInputReplyPoint = FOUR_CHAR_CODE('trpt')
-kEventParamTextInputReplyFont = FOUR_CHAR_CODE('trft')
-kEventParamTextInputReplyFMFont = FOUR_CHAR_CODE('trfm')
-kEventParamTextInputReplyPointSize = FOUR_CHAR_CODE('trpz')
-kEventParamTextInputReplyLineHeight = FOUR_CHAR_CODE('trlh')
-kEventParamTextInputReplyLineAscent = FOUR_CHAR_CODE('trla')
-kEventParamTextInputReplyTextAngle = FOUR_CHAR_CODE('trta')
-kEventParamTextInputSendShowHide = FOUR_CHAR_CODE('tssh')
-kEventParamTextInputReplyShowHide = FOUR_CHAR_CODE('trsh')
-kEventParamTextInputSendKeyboardEvent = FOUR_CHAR_CODE('tske')
-kEventParamTextInputSendTextServiceEncoding = FOUR_CHAR_CODE('tsse')
-kEventParamTextInputSendTextServiceMacEncoding = FOUR_CHAR_CODE('tssm')
-kEventParamHICommand = FOUR_CHAR_CODE('hcmd')
-typeHICommand = FOUR_CHAR_CODE('hcmd')
-kEventParamWindowFeatures = FOUR_CHAR_CODE('wftr')
-kEventParamWindowDefPart = FOUR_CHAR_CODE('wdpc')
-kEventParamCurrentBounds = FOUR_CHAR_CODE('crct')
-kEventParamOriginalBounds = FOUR_CHAR_CODE('orct')
-kEventParamPreviousBounds = FOUR_CHAR_CODE('prct')
-kEventParamClickActivation = FOUR_CHAR_CODE('clac')
-kEventParamWindowRegionCode = FOUR_CHAR_CODE('wshp')
-kEventParamWindowDragHiliteFlag = FOUR_CHAR_CODE('wdhf')
-kEventParamWindowModifiedFlag = FOUR_CHAR_CODE('wmff')
-kEventParamWindowProxyGWorldPtr = FOUR_CHAR_CODE('wpgw')
-kEventParamWindowProxyImageRgn = FOUR_CHAR_CODE('wpir')
-kEventParamWindowProxyOutlineRgn = FOUR_CHAR_CODE('wpor')
-kEventParamWindowStateChangedFlags = FOUR_CHAR_CODE('wscf')
-kEventParamWindowTitleFullWidth = FOUR_CHAR_CODE('wtfw')
-kEventParamWindowTitleTextWidth = FOUR_CHAR_CODE('wttw')
-kEventParamWindowGrowRect = FOUR_CHAR_CODE('grct')
-kEventParamAttributes = FOUR_CHAR_CODE('attr')
-kEventParamDockChangedReason = FOUR_CHAR_CODE('dcrs')
-kEventParamPreviousDockRect = FOUR_CHAR_CODE('pdrc')
-kEventParamCurrentDockRect = FOUR_CHAR_CODE('cdrc')
-typeWindowRegionCode = FOUR_CHAR_CODE('wshp')
-typeWindowDefPartCode = FOUR_CHAR_CODE('wdpt')
-typeClickActivationResult = FOUR_CHAR_CODE('clac')
-kEventParamControlPart = FOUR_CHAR_CODE('cprt')
-kEventParamInitCollection = FOUR_CHAR_CODE('icol')
-kEventParamControlMessage = FOUR_CHAR_CODE('cmsg')
-kEventParamControlParam = FOUR_CHAR_CODE('cprm')
-kEventParamControlResult = FOUR_CHAR_CODE('crsl')
-kEventParamControlRegion = FOUR_CHAR_CODE('crgn')
-kEventParamControlAction = FOUR_CHAR_CODE('caup')
-kEventParamControlIndicatorDragConstraint = FOUR_CHAR_CODE('cidc')
-kEventParamControlIndicatorRegion = FOUR_CHAR_CODE('cirn')
-kEventParamControlIsGhosting = FOUR_CHAR_CODE('cgst')
-kEventParamControlIndicatorOffset = FOUR_CHAR_CODE('ciof')
-kEventParamControlClickActivationResult = FOUR_CHAR_CODE('ccar')
-kEventParamControlSubControl = FOUR_CHAR_CODE('csub')
-kEventParamControlOptimalBounds = FOUR_CHAR_CODE('cobn')
-kEventParamControlOptimalBaselineOffset = FOUR_CHAR_CODE('cobo')
-kEventParamControlDataTag = FOUR_CHAR_CODE('cdtg')
-kEventParamControlDataBuffer = FOUR_CHAR_CODE('cdbf')
-kEventParamControlDataBufferSize = FOUR_CHAR_CODE('cdbs')
-kEventParamControlDrawDepth = FOUR_CHAR_CODE('cddp')
-kEventParamControlDrawInColor = FOUR_CHAR_CODE('cdic')
-kEventParamControlFeatures = FOUR_CHAR_CODE('cftr')
-kEventParamControlPartBounds = FOUR_CHAR_CODE('cpbd')
-kEventParamControlOriginalOwningWindow = FOUR_CHAR_CODE('coow')
-kEventParamControlCurrentOwningWindow = FOUR_CHAR_CODE('ccow')
-typeControlActionUPP = FOUR_CHAR_CODE('caup')
-typeIndicatorDragConstraint = FOUR_CHAR_CODE('cidc')
-typeControlPartCode = FOUR_CHAR_CODE('cprt')
-kEventParamCurrentMenuTrackingMode = FOUR_CHAR_CODE('cmtm')
-kEventParamNewMenuTrackingMode = FOUR_CHAR_CODE('nmtm')
-kEventParamMenuFirstOpen = FOUR_CHAR_CODE('1sto')
-kEventParamMenuItemIndex = FOUR_CHAR_CODE('item')
-kEventParamMenuCommand = FOUR_CHAR_CODE('mcmd')
-kEventParamEnableMenuForKeyEvent = FOUR_CHAR_CODE('fork')
-kEventParamMenuEventOptions = FOUR_CHAR_CODE('meop')
-kEventParamMenuContext = FOUR_CHAR_CODE('mctx')
-kEventParamMenuItemBounds = FOUR_CHAR_CODE('mitb')
-kEventParamMenuMarkBounds = FOUR_CHAR_CODE('mmkb')
-kEventParamMenuIconBounds = FOUR_CHAR_CODE('micb')
-kEventParamMenuTextBounds = FOUR_CHAR_CODE('mtxb')
-kEventParamMenuTextBaseline = FOUR_CHAR_CODE('mtbl')
-kEventParamMenuCommandKeyBounds = FOUR_CHAR_CODE('mcmb')
-kEventParamMenuVirtualTop = FOUR_CHAR_CODE('mvrt')
-kEventParamMenuVirtualBottom = FOUR_CHAR_CODE('mvrb')
-kEventParamMenuDrawState = FOUR_CHAR_CODE('mdrs')
-kEventParamMenuItemType = FOUR_CHAR_CODE('mitp')
-kEventParamMenuItemWidth = FOUR_CHAR_CODE('mitw')
-kEventParamMenuItemHeight = FOUR_CHAR_CODE('mith')
-typeMenuItemIndex = FOUR_CHAR_CODE('midx')
-typeMenuCommand = FOUR_CHAR_CODE('mcmd')
-typeMenuTrackingMode = FOUR_CHAR_CODE('mtmd')
-typeMenuEventOptions = FOUR_CHAR_CODE('meop')
-typeThemeMenuState = FOUR_CHAR_CODE('tmns')
-typeThemeMenuItemType = FOUR_CHAR_CODE('tmit')
-kEventParamProcessID = FOUR_CHAR_CODE('psn ')
-kEventParamLaunchRefCon = FOUR_CHAR_CODE('lref')
-kEventParamLaunchErr = FOUR_CHAR_CODE('err ')
-kEventParamTabletPointRec = FOUR_CHAR_CODE('tbrc')
-kEventParamTabletProximityRec = FOUR_CHAR_CODE('tbpx')
-typeTabletPointRec = FOUR_CHAR_CODE('tbrc')
-typeTabletProximityRec = FOUR_CHAR_CODE('tbpx')
-kEventParamTabletPointerRec = FOUR_CHAR_CODE('tbrc')
-typeTabletPointerRec = FOUR_CHAR_CODE('tbrc')
-kEventParamNewScrollBarVariant = FOUR_CHAR_CODE('nsbv')
-kEventParamScrapRef = FOUR_CHAR_CODE('scrp')
-kEventParamServiceCopyTypes = FOUR_CHAR_CODE('svsd')
-kEventParamServicePasteTypes = FOUR_CHAR_CODE('svpt')
-kEventParamServiceMessageName = FOUR_CHAR_CODE('svmg')
-kEventParamServiceUserData = FOUR_CHAR_CODE('svud')
-typeScrapRef = FOUR_CHAR_CODE('scrp')
-typeCFMutableArrayRef = FOUR_CHAR_CODE('cfma')
-# sHandler = NewEventHandlerUPP( x )
-kMouseTrackingMousePressed = kMouseTrackingMouseDown
-kMouseTrackingMouseReleased = kMouseTrackingMouseUp
diff --git a/Lib/plat-mac/Carbon/CarbonEvt.py b/Lib/plat-mac/Carbon/CarbonEvt.py
deleted file mode 100755 (executable)
index 63a7792..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _CarbonEvt import *
diff --git a/Lib/plat-mac/Carbon/Cm.py b/Lib/plat-mac/Carbon/Cm.py
deleted file mode 100644 (file)
index 3c8bc33..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Cm import *
diff --git a/Lib/plat-mac/Carbon/Components.py b/Lib/plat-mac/Carbon/Components.py
deleted file mode 100644 (file)
index 6c0ec96..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# Generated from 'Components.h'
-
-def FOUR_CHAR_CODE(x): return x
-kAppleManufacturer = FOUR_CHAR_CODE('appl')
-kComponentResourceType = FOUR_CHAR_CODE('thng')
-kComponentAliasResourceType = FOUR_CHAR_CODE('thga')
-kAnyComponentType = 0
-kAnyComponentSubType = 0
-kAnyComponentManufacturer = 0
-kAnyComponentFlagsMask = 0
-cmpIsMissing = 1 << 29
-cmpWantsRegisterMessage = 1 << 31
-kComponentOpenSelect = -1
-kComponentCloseSelect = -2
-kComponentCanDoSelect = -3
-kComponentVersionSelect = -4
-kComponentRegisterSelect = -5
-kComponentTargetSelect = -6
-kComponentUnregisterSelect = -7
-kComponentGetMPWorkFunctionSelect = -8
-kComponentExecuteWiredActionSelect = -9
-kComponentGetPublicResourceSelect = -10
-componentDoAutoVersion = (1 << 0)
-componentWantsUnregister = (1 << 1)
-componentAutoVersionIncludeFlags = (1 << 2)
-componentHasMultiplePlatforms = (1 << 3)
-componentLoadResident = (1 << 4)
-defaultComponentIdentical = 0
-defaultComponentAnyFlags = 1
-defaultComponentAnyManufacturer = 2
-defaultComponentAnySubType = 4
-defaultComponentAnyFlagsAnyManufacturer = (defaultComponentAnyFlags + defaultComponentAnyManufacturer)
-defaultComponentAnyFlagsAnyManufacturerAnySubType = (defaultComponentAnyFlags + defaultComponentAnyManufacturer + defaultComponentAnySubType)
-registerComponentGlobal = 1
-registerComponentNoDuplicates = 2
-registerComponentAfterExisting = 4
-registerComponentAliasesOnly = 8
-platform68k = 1
-platformPowerPC = 2
-platformInterpreted = 3
-platformWin32 = 4
-platformPowerPCNativeEntryPoint = 5
-mpWorkFlagDoWork = (1 << 0)
-mpWorkFlagDoCompletion = (1 << 1)
-mpWorkFlagCopyWorkBlock = (1 << 2)
-mpWorkFlagDontBlock = (1 << 3)
-mpWorkFlagGetProcessorCount = (1 << 4)
-mpWorkFlagGetIsRunning = (1 << 6)
-cmpAliasNoFlags = 0
-cmpAliasOnlyThisFile = 1
-uppComponentFunctionImplementedProcInfo = 0x000002F0
-uppGetComponentVersionProcInfo = 0x000000F0
-uppComponentSetTargetProcInfo = 0x000003F0
-uppCallComponentOpenProcInfo = 0x000003F0
-uppCallComponentCloseProcInfo = 0x000003F0
-uppCallComponentCanDoProcInfo = 0x000002F0
-uppCallComponentVersionProcInfo = 0x000000F0
-uppCallComponentRegisterProcInfo = 0x000000F0
-uppCallComponentTargetProcInfo = 0x000003F0
-uppCallComponentUnregisterProcInfo = 0x000000F0
-uppCallComponentGetMPWorkFunctionProcInfo = 0x00000FF0
-uppCallComponentGetPublicResourceProcInfo = 0x00003BF0
diff --git a/Lib/plat-mac/Carbon/ControlAccessor.py b/Lib/plat-mac/Carbon/ControlAccessor.py
deleted file mode 100644 (file)
index fcf44af..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# Accessor functions for control properties
-
-from Carbon.Controls import *
-import struct
-
-# These needn't go through this module, but are here for completeness
-def SetControlData_Handle(control, part, selector, data):
-    control.SetControlData_Handle(part, selector, data)
-
-def GetControlData_Handle(control, part, selector):
-    return control.GetControlData_Handle(part, selector)
-
-_accessdict = {
-    kControlPopupButtonMenuHandleTag: (SetControlData_Handle, GetControlData_Handle),
-}
-
-_codingdict = {
-    kControlPushButtonDefaultTag : ("b", None, None),
-
-    kControlEditTextTextTag: (None, None, None),
-    kControlEditTextPasswordTag: (None, None, None),
-
-    kControlPopupButtonMenuIDTag: ("h", None, None),
-
-    kControlListBoxDoubleClickTag: ("b", None, None),
-}
-
-def SetControlData(control, part, selector, data):
-    if _accessdict.has_key(selector):
-        setfunc, getfunc = _accessdict[selector]
-        setfunc(control, part, selector, data)
-        return
-    if not _codingdict.has_key(selector):
-        raise KeyError('Unknown control selector', selector)
-    structfmt, coder, decoder = _codingdict[selector]
-    if coder:
-        data = coder(data)
-    if structfmt:
-        data = struct.pack(structfmt, data)
-    control.SetControlData(part, selector, data)
-
-def GetControlData(control, part, selector):
-    if _accessdict.has_key(selector):
-        setfunc, getfunc = _accessdict[selector]
-        return getfunc(control, part, selector, data)
-    if not _codingdict.has_key(selector):
-        raise KeyError('Unknown control selector', selector)
-    structfmt, coder, decoder = _codingdict[selector]
-    data = control.GetControlData(part, selector)
-    if structfmt:
-        data = struct.unpack(structfmt, data)
-    if decoder:
-        data = decoder(data)
-    if type(data) == type(()) and len(data) == 1:
-        data = data[0]
-    return data
diff --git a/Lib/plat-mac/Carbon/Controls.py b/Lib/plat-mac/Carbon/Controls.py
deleted file mode 100644 (file)
index d40a580..0000000
+++ /dev/null
@@ -1,668 +0,0 @@
-# Generated from 'Controls.h'
-
-def FOUR_CHAR_CODE(x): return x
-from Carbon.TextEdit import *
-from Carbon.QuickDraw import *
-from Carbon.Dragconst import *
-from Carbon.CarbonEvents import *
-from Carbon.Appearance import *
-kDataBrowserItemAnyState = -1
-kControlBevelButtonCenterPopupGlyphTag = -1
-kDataBrowserClientPropertyFlagsMask = 0xFF000000
-
-kControlDefProcType = FOUR_CHAR_CODE('CDEF')
-kControlTemplateResourceType = FOUR_CHAR_CODE('CNTL')
-kControlColorTableResourceType = FOUR_CHAR_CODE('cctb')
-kControlDefProcResourceType = FOUR_CHAR_CODE('CDEF')
-controlNotifyNothing = FOUR_CHAR_CODE('nada')
-controlNotifyClick = FOUR_CHAR_CODE('clik')
-controlNotifyFocus = FOUR_CHAR_CODE('focu')
-controlNotifyKey = FOUR_CHAR_CODE('key ')
-kControlCanAutoInvalidate = 1 << 0
-staticTextProc = 256
-editTextProc = 272
-iconProc = 288
-userItemProc = 304
-pictItemProc = 320
-cFrameColor = 0
-cBodyColor = 1
-cTextColor = 2
-cThumbColor = 3
-kNumberCtlCTabEntries = 4
-kControlNoVariant = 0
-kControlUsesOwningWindowsFontVariant = 1 << 3
-kControlNoPart = 0
-kControlIndicatorPart = 129
-kControlDisabledPart = 254
-kControlInactivePart = 255
-kControlEntireControl = 0
-kControlStructureMetaPart = -1
-kControlContentMetaPart = -2
-kControlFocusNoPart = 0
-kControlFocusNextPart = -1
-kControlFocusPrevPart = -2
-kControlCollectionTagBounds = FOUR_CHAR_CODE('boun')
-kControlCollectionTagValue = FOUR_CHAR_CODE('valu')
-kControlCollectionTagMinimum = FOUR_CHAR_CODE('min ')
-kControlCollectionTagMaximum = FOUR_CHAR_CODE('max ')
-kControlCollectionTagViewSize = FOUR_CHAR_CODE('view')
-kControlCollectionTagVisibility = FOUR_CHAR_CODE('visi')
-kControlCollectionTagRefCon = FOUR_CHAR_CODE('refc')
-kControlCollectionTagTitle = FOUR_CHAR_CODE('titl')
-kControlCollectionTagUnicodeTitle = FOUR_CHAR_CODE('uttl')
-kControlCollectionTagIDSignature = FOUR_CHAR_CODE('idsi')
-kControlCollectionTagIDID = FOUR_CHAR_CODE('idid')
-kControlCollectionTagCommand = FOUR_CHAR_CODE('cmd ')
-kControlCollectionTagVarCode = FOUR_CHAR_CODE('varc')
-kControlContentTextOnly = 0
-kControlNoContent = 0
-kControlContentIconSuiteRes = 1
-kControlContentCIconRes = 2
-kControlContentPictRes = 3
-kControlContentICONRes = 4
-kControlContentIconSuiteHandle = 129
-kControlContentCIconHandle = 130
-kControlContentPictHandle = 131
-kControlContentIconRef = 132
-kControlContentICON = 133
-kControlKeyScriptBehaviorAllowAnyScript = FOUR_CHAR_CODE('any ')
-kControlKeyScriptBehaviorPrefersRoman = FOUR_CHAR_CODE('prmn')
-kControlKeyScriptBehaviorRequiresRoman = FOUR_CHAR_CODE('rrmn')
-kControlFontBigSystemFont = -1
-kControlFontSmallSystemFont = -2
-kControlFontSmallBoldSystemFont = -3
-kControlFontViewSystemFont = -4
-kControlUseFontMask = 0x0001
-kControlUseFaceMask = 0x0002
-kControlUseSizeMask = 0x0004
-kControlUseForeColorMask = 0x0008
-kControlUseBackColorMask = 0x0010
-kControlUseModeMask = 0x0020
-kControlUseJustMask = 0x0040
-kControlUseAllMask = 0x00FF
-kControlAddFontSizeMask = 0x0100
-kControlAddToMetaFontMask = 0x0200
-kControlUseThemeFontIDMask = 0x0080
-kDoNotActivateAndIgnoreClick = 0
-kDoNotActivateAndHandleClick = 1
-kActivateAndIgnoreClick = 2
-kActivateAndHandleClick = 3
-kControlFontStyleTag = FOUR_CHAR_CODE('font')
-kControlKeyFilterTag = FOUR_CHAR_CODE('fltr')
-kControlKindTag = FOUR_CHAR_CODE('kind')
-kControlSizeTag = FOUR_CHAR_CODE('size')
-kControlSupportsGhosting = 1 << 0
-kControlSupportsEmbedding = 1 << 1
-kControlSupportsFocus = 1 << 2
-kControlWantsIdle = 1 << 3
-kControlWantsActivate = 1 << 4
-kControlHandlesTracking = 1 << 5
-kControlSupportsDataAccess = 1 << 6
-kControlHasSpecialBackground = 1 << 7
-kControlGetsFocusOnClick = 1 << 8
-kControlSupportsCalcBestRect = 1 << 9
-kControlSupportsLiveFeedback = 1 << 10
-kControlHasRadioBehavior = 1 << 11
-kControlSupportsDragAndDrop = 1 << 12
-kControlAutoToggles = 1 << 14
-kControlSupportsGetRegion = 1 << 17
-kControlSupportsFlattening = 1 << 19
-kControlSupportsSetCursor = 1 << 20
-kControlSupportsContextualMenus = 1 << 21
-kControlSupportsClickActivation = 1 << 22
-kControlIdlesWithTimer = 1 << 23
-drawCntl = 0
-testCntl = 1
-calcCRgns = 2
-initCntl = 3
-dispCntl = 4
-posCntl = 5
-thumbCntl = 6
-dragCntl = 7
-autoTrack = 8
-calcCntlRgn = 10
-calcThumbRgn = 11
-drawThumbOutline = 12
-kControlMsgDrawGhost = 13
-kControlMsgCalcBestRect = 14
-kControlMsgHandleTracking = 15
-kControlMsgFocus = 16
-kControlMsgKeyDown = 17
-kControlMsgIdle = 18
-kControlMsgGetFeatures = 19
-kControlMsgSetData = 20
-kControlMsgGetData = 21
-kControlMsgActivate = 22
-kControlMsgSetUpBackground = 23
-kControlMsgCalcValueFromPos = 26
-kControlMsgTestNewMsgSupport = 27
-kControlMsgSubValueChanged = 25
-kControlMsgSubControlAdded = 28
-kControlMsgSubControlRemoved = 29
-kControlMsgApplyTextColor = 30
-kControlMsgGetRegion = 31
-kControlMsgFlatten = 32
-kControlMsgSetCursor = 33
-kControlMsgDragEnter = 38
-kControlMsgDragLeave = 39
-kControlMsgDragWithin = 40
-kControlMsgDragReceive = 41
-kControlMsgDisplayDebugInfo = 46
-kControlMsgContextualMenuClick = 47
-kControlMsgGetClickActivation = 48
-kControlSizeNormal = 0
-kControlSizeSmall = 1
-kControlSizeLarge = 2
-kControlSizeAuto = 0xFFFF
-kDrawControlEntireControl = 0
-kDrawControlIndicatorOnly = 129
-kDragControlEntireControl = 0
-kDragControlIndicator = 1
-kControlSupportsNewMessages = FOUR_CHAR_CODE(' ok ')
-kControlKeyFilterBlockKey = 0
-kControlKeyFilterPassKey = 1
-noConstraint = kNoConstraint
-hAxisOnly = 1
-vAxisOnly = 2
-kControlDefProcPtr = 0
-kControlDefObjectClass = 1
-kControlKindSignatureApple = FOUR_CHAR_CODE('appl')
-kControlPropertyPersistent = 0x00000001
-kDragTrackingEnterControl = 2
-kDragTrackingInControl = 3
-kDragTrackingLeaveControl = 4
-useWFont = kControlUsesOwningWindowsFontVariant
-inThumb = kControlIndicatorPart
-kNoHiliteControlPart = kControlNoPart
-kInIndicatorControlPart = kControlIndicatorPart
-kReservedControlPart = kControlDisabledPart
-kControlInactiveControlPart = kControlInactivePart
-kControlTabListResType = FOUR_CHAR_CODE('tab#')
-kControlListDescResType = FOUR_CHAR_CODE('ldes')
-kControlCheckBoxUncheckedValue = 0
-kControlCheckBoxCheckedValue = 1
-kControlCheckBoxMixedValue = 2
-kControlRadioButtonUncheckedValue = 0
-kControlRadioButtonCheckedValue = 1
-kControlRadioButtonMixedValue = 2
-popupFixedWidth = 1 << 0
-popupVariableWidth = 1 << 1
-popupUseAddResMenu = 1 << 2
-popupUseWFont = 1 << 3
-popupTitleBold = 1 << 8
-popupTitleItalic = 1 << 9
-popupTitleUnderline = 1 << 10
-popupTitleOutline = 1 << 11
-popupTitleShadow = 1 << 12
-popupTitleCondense = 1 << 13
-popupTitleExtend = 1 << 14
-popupTitleNoStyle = 1 << 15
-popupTitleLeftJust = 0x00000000
-popupTitleCenterJust = 0x00000001
-popupTitleRightJust = 0x000000FF
-pushButProc = 0
-checkBoxProc = 1
-radioButProc = 2
-scrollBarProc = 16
-popupMenuProc = 1008
-kControlLabelPart = 1
-kControlMenuPart = 2
-kControlTrianglePart = 4
-kControlEditTextPart = 5
-kControlPicturePart = 6
-kControlIconPart = 7
-kControlClockPart = 8
-kControlListBoxPart = 24
-kControlListBoxDoubleClickPart = 25
-kControlImageWellPart = 26
-kControlRadioGroupPart = 27
-kControlButtonPart = 10
-kControlCheckBoxPart = 11
-kControlRadioButtonPart = 11
-kControlUpButtonPart = 20
-kControlDownButtonPart = 21
-kControlPageUpPart = 22
-kControlPageDownPart = 23
-kControlClockHourDayPart = 9
-kControlClockMinuteMonthPart = 10
-kControlClockSecondYearPart = 11
-kControlClockAMPMPart = 12
-kControlDataBrowserPart = 24
-kControlDataBrowserDraggedPart = 25
-kControlBevelButtonSmallBevelProc = 32
-kControlBevelButtonNormalBevelProc = 33
-kControlBevelButtonLargeBevelProc = 34
-kControlBevelButtonSmallBevelVariant = 0
-kControlBevelButtonNormalBevelVariant = (1 << 0)
-kControlBevelButtonLargeBevelVariant = (1 << 1)
-kControlBevelButtonMenuOnRightVariant = (1 << 2)
-kControlBevelButtonSmallBevel = 0
-kControlBevelButtonNormalBevel = 1
-kControlBevelButtonLargeBevel = 2
-kControlBehaviorPushbutton = 0
-kControlBehaviorToggles = 0x0100
-kControlBehaviorSticky = 0x0200
-kControlBehaviorSingleValueMenu = 0
-kControlBehaviorMultiValueMenu = 0x4000
-kControlBehaviorOffsetContents = 0x8000
-kControlBehaviorCommandMenu = 0x2000
-kControlBevelButtonMenuOnBottom = 0
-kControlBevelButtonMenuOnRight = (1 << 2)
-kControlKindBevelButton = FOUR_CHAR_CODE('bevl')
-kControlBevelButtonAlignSysDirection = -1
-kControlBevelButtonAlignCenter = 0
-kControlBevelButtonAlignLeft = 1
-kControlBevelButtonAlignRight = 2
-kControlBevelButtonAlignTop = 3
-kControlBevelButtonAlignBottom = 4
-kControlBevelButtonAlignTopLeft = 5
-kControlBevelButtonAlignBottomLeft = 6
-kControlBevelButtonAlignTopRight = 7
-kControlBevelButtonAlignBottomRight = 8
-kControlBevelButtonAlignTextSysDirection = teFlushDefault
-kControlBevelButtonAlignTextCenter = teCenter
-kControlBevelButtonAlignTextFlushRight = teFlushRight
-kControlBevelButtonAlignTextFlushLeft = teFlushLeft
-kControlBevelButtonPlaceSysDirection = -1
-kControlBevelButtonPlaceNormally = 0
-kControlBevelButtonPlaceToRightOfGraphic = 1
-kControlBevelButtonPlaceToLeftOfGraphic = 2
-kControlBevelButtonPlaceBelowGraphic = 3
-kControlBevelButtonPlaceAboveGraphic = 4
-kControlBevelButtonContentTag = FOUR_CHAR_CODE('cont')
-kControlBevelButtonTransformTag = FOUR_CHAR_CODE('tran')
-kControlBevelButtonTextAlignTag = FOUR_CHAR_CODE('tali')
-kControlBevelButtonTextOffsetTag = FOUR_CHAR_CODE('toff')
-kControlBevelButtonGraphicAlignTag = FOUR_CHAR_CODE('gali')
-kControlBevelButtonGraphicOffsetTag = FOUR_CHAR_CODE('goff')
-kControlBevelButtonTextPlaceTag = FOUR_CHAR_CODE('tplc')
-kControlBevelButtonMenuValueTag = FOUR_CHAR_CODE('mval')
-kControlBevelButtonMenuHandleTag = FOUR_CHAR_CODE('mhnd')
-kControlBevelButtonMenuRefTag = FOUR_CHAR_CODE('mhnd')
-# kControlBevelButtonCenterPopupGlyphTag = FOUR_CHAR_CODE('pglc')
-kControlBevelButtonLastMenuTag = FOUR_CHAR_CODE('lmnu')
-kControlBevelButtonMenuDelayTag = FOUR_CHAR_CODE('mdly')
-kControlBevelButtonScaleIconTag = FOUR_CHAR_CODE('scal')
-kControlBevelButtonOwnedMenuRefTag = FOUR_CHAR_CODE('omrf')
-kControlBevelButtonKindTag = FOUR_CHAR_CODE('bebk')
-kControlSliderProc = 48
-kControlSliderLiveFeedback = (1 << 0)
-kControlSliderHasTickMarks = (1 << 1)
-kControlSliderReverseDirection = (1 << 2)
-kControlSliderNonDirectional = (1 << 3)
-kControlSliderPointsDownOrRight = 0
-kControlSliderPointsUpOrLeft = 1
-kControlSliderDoesNotPoint = 2
-kControlKindSlider = FOUR_CHAR_CODE('sldr')
-kControlTriangleProc = 64
-kControlTriangleLeftFacingProc = 65
-kControlTriangleAutoToggleProc = 66
-kControlTriangleLeftFacingAutoToggleProc = 67
-kControlDisclosureTrianglePointDefault = 0
-kControlDisclosureTrianglePointRight = 1
-kControlDisclosureTrianglePointLeft = 2
-kControlKindDisclosureTriangle = FOUR_CHAR_CODE('dist')
-kControlTriangleLastValueTag = FOUR_CHAR_CODE('last')
-kControlProgressBarProc = 80
-kControlRelevanceBarProc = 81
-kControlKindProgressBar = FOUR_CHAR_CODE('prgb')
-kControlKindRelevanceBar = FOUR_CHAR_CODE('relb')
-kControlProgressBarIndeterminateTag = FOUR_CHAR_CODE('inde')
-kControlProgressBarAnimatingTag = FOUR_CHAR_CODE('anim')
-kControlLittleArrowsProc = 96
-kControlKindLittleArrows = FOUR_CHAR_CODE('larr')
-kControlChasingArrowsProc = 112
-kControlKindChasingArrows = FOUR_CHAR_CODE('carr')
-kControlChasingArrowsAnimatingTag = FOUR_CHAR_CODE('anim')
-kControlTabLargeProc = 128
-kControlTabSmallProc = 129
-kControlTabLargeNorthProc = 128
-kControlTabSmallNorthProc = 129
-kControlTabLargeSouthProc = 130
-kControlTabSmallSouthProc = 131
-kControlTabLargeEastProc = 132
-kControlTabSmallEastProc = 133
-kControlTabLargeWestProc = 134
-kControlTabSmallWestProc = 135
-kControlTabDirectionNorth = 0
-kControlTabDirectionSouth = 1
-kControlTabDirectionEast = 2
-kControlTabDirectionWest = 3
-kControlTabSizeLarge = kControlSizeNormal
-kControlTabSizeSmall = kControlSizeSmall
-kControlKindTabs = FOUR_CHAR_CODE('tabs')
-kControlTabContentRectTag = FOUR_CHAR_CODE('rect')
-kControlTabEnabledFlagTag = FOUR_CHAR_CODE('enab')
-kControlTabFontStyleTag = kControlFontStyleTag
-kControlTabInfoTag = FOUR_CHAR_CODE('tabi')
-kControlTabImageContentTag = FOUR_CHAR_CODE('cont')
-kControlTabInfoVersionZero = 0
-kControlTabInfoVersionOne = 1
-kControlSeparatorLineProc = 144
-kControlKindSeparator = FOUR_CHAR_CODE('sepa')
-kControlGroupBoxTextTitleProc = 160
-kControlGroupBoxCheckBoxProc = 161
-kControlGroupBoxPopupButtonProc = 162
-kControlGroupBoxSecondaryTextTitleProc = 164
-kControlGroupBoxSecondaryCheckBoxProc = 165
-kControlGroupBoxSecondaryPopupButtonProc = 166
-kControlKindGroupBox = FOUR_CHAR_CODE('grpb')
-kControlKindCheckGroupBox = FOUR_CHAR_CODE('cgrp')
-kControlKindPopupGroupBox = FOUR_CHAR_CODE('pgrp')
-kControlGroupBoxMenuHandleTag = FOUR_CHAR_CODE('mhan')
-kControlGroupBoxMenuRefTag = FOUR_CHAR_CODE('mhan')
-kControlGroupBoxFontStyleTag = kControlFontStyleTag
-kControlGroupBoxTitleRectTag = FOUR_CHAR_CODE('trec')
-kControlImageWellProc = 176
-kControlKindImageWell = FOUR_CHAR_CODE('well')
-kControlImageWellContentTag = FOUR_CHAR_CODE('cont')
-kControlImageWellTransformTag = FOUR_CHAR_CODE('tran')
-kControlImageWellIsDragDestinationTag = FOUR_CHAR_CODE('drag')
-kControlPopupArrowEastProc = 192
-kControlPopupArrowWestProc = 193
-kControlPopupArrowNorthProc = 194
-kControlPopupArrowSouthProc = 195
-kControlPopupArrowSmallEastProc = 196
-kControlPopupArrowSmallWestProc = 197
-kControlPopupArrowSmallNorthProc = 198
-kControlPopupArrowSmallSouthProc = 199
-kControlPopupArrowOrientationEast = 0
-kControlPopupArrowOrientationWest = 1
-kControlPopupArrowOrientationNorth = 2
-kControlPopupArrowOrientationSouth = 3
-kControlPopupArrowSizeNormal = 0
-kControlPopupArrowSizeSmall = 1
-kControlKindPopupArrow = FOUR_CHAR_CODE('parr')
-kControlPlacardProc = 224
-kControlKindPlacard = FOUR_CHAR_CODE('plac')
-kControlClockTimeProc = 240
-kControlClockTimeSecondsProc = 241
-kControlClockDateProc = 242
-kControlClockMonthYearProc = 243
-kControlClockTypeHourMinute = 0
-kControlClockTypeHourMinuteSecond = 1
-kControlClockTypeMonthDayYear = 2
-kControlClockTypeMonthYear = 3
-kControlClockFlagStandard = 0
-kControlClockNoFlags = 0
-kControlClockFlagDisplayOnly = 1
-kControlClockIsDisplayOnly = 1
-kControlClockFlagLive = 2
-kControlClockIsLive = 2
-kControlKindClock = FOUR_CHAR_CODE('clck')
-kControlClockLongDateTag = FOUR_CHAR_CODE('date')
-kControlClockFontStyleTag = kControlFontStyleTag
-kControlClockAnimatingTag = FOUR_CHAR_CODE('anim')
-kControlUserPaneProc = 256
-kControlKindUserPane = FOUR_CHAR_CODE('upan')
-kControlUserItemDrawProcTag = FOUR_CHAR_CODE('uidp')
-kControlUserPaneDrawProcTag = FOUR_CHAR_CODE('draw')
-kControlUserPaneHitTestProcTag = FOUR_CHAR_CODE('hitt')
-kControlUserPaneTrackingProcTag = FOUR_CHAR_CODE('trak')
-kControlUserPaneIdleProcTag = FOUR_CHAR_CODE('idle')
-kControlUserPaneKeyDownProcTag = FOUR_CHAR_CODE('keyd')
-kControlUserPaneActivateProcTag = FOUR_CHAR_CODE('acti')
-kControlUserPaneFocusProcTag = FOUR_CHAR_CODE('foci')
-kControlUserPaneBackgroundProcTag = FOUR_CHAR_CODE('back')
-kControlEditTextProc = 272
-kControlEditTextPasswordProc = 274
-kControlEditTextInlineInputProc = 276
-kControlKindEditText = FOUR_CHAR_CODE('etxt')
-kControlEditTextStyleTag = kControlFontStyleTag
-kControlEditTextTextTag = FOUR_CHAR_CODE('text')
-kControlEditTextTEHandleTag = FOUR_CHAR_CODE('than')
-kControlEditTextKeyFilterTag = kControlKeyFilterTag
-kControlEditTextSelectionTag = FOUR_CHAR_CODE('sele')
-kControlEditTextPasswordTag = FOUR_CHAR_CODE('pass')
-kControlEditTextKeyScriptBehaviorTag = FOUR_CHAR_CODE('kscr')
-kControlEditTextLockedTag = FOUR_CHAR_CODE('lock')
-kControlEditTextFixedTextTag = FOUR_CHAR_CODE('ftxt')
-kControlEditTextValidationProcTag = FOUR_CHAR_CODE('vali')
-kControlEditTextInlinePreUpdateProcTag = FOUR_CHAR_CODE('prup')
-kControlEditTextInlinePostUpdateProcTag = FOUR_CHAR_CODE('poup')
-kControlEditTextCFStringTag = FOUR_CHAR_CODE('cfst')
-kControlEditTextPasswordCFStringTag = FOUR_CHAR_CODE('pwcf')
-kControlStaticTextProc = 288
-kControlKindStaticText = FOUR_CHAR_CODE('stxt')
-kControlStaticTextStyleTag = kControlFontStyleTag
-kControlStaticTextTextTag = FOUR_CHAR_CODE('text')
-kControlStaticTextTextHeightTag = FOUR_CHAR_CODE('thei')
-kControlStaticTextTruncTag = FOUR_CHAR_CODE('trun')
-kControlStaticTextCFStringTag = FOUR_CHAR_CODE('cfst')
-kControlPictureProc = 304
-kControlPictureNoTrackProc = 305
-kControlKindPicture = FOUR_CHAR_CODE('pict')
-kControlPictureHandleTag = FOUR_CHAR_CODE('pich')
-kControlIconProc = 320
-kControlIconNoTrackProc = 321
-kControlIconSuiteProc = 322
-kControlIconSuiteNoTrackProc = 323
-kControlIconRefProc = 324
-kControlIconRefNoTrackProc = 325
-kControlKindIcon = FOUR_CHAR_CODE('icon')
-kControlIconTransformTag = FOUR_CHAR_CODE('trfm')
-kControlIconAlignmentTag = FOUR_CHAR_CODE('algn')
-kControlIconResourceIDTag = FOUR_CHAR_CODE('ires')
-kControlIconContentTag = FOUR_CHAR_CODE('cont')
-kControlWindowHeaderProc = 336
-kControlWindowListViewHeaderProc = 337
-kControlKindWindowHeader = FOUR_CHAR_CODE('whed')
-kControlListBoxProc = 352
-kControlListBoxAutoSizeProc = 353
-kControlKindListBox = FOUR_CHAR_CODE('lbox')
-kControlListBoxListHandleTag = FOUR_CHAR_CODE('lhan')
-kControlListBoxKeyFilterTag = kControlKeyFilterTag
-kControlListBoxFontStyleTag = kControlFontStyleTag
-kControlListBoxDoubleClickTag = FOUR_CHAR_CODE('dblc')
-kControlListBoxLDEFTag = FOUR_CHAR_CODE('ldef')
-kControlPushButtonProc = 368
-kControlCheckBoxProc = 369
-kControlRadioButtonProc = 370
-kControlPushButLeftIconProc = 374
-kControlPushButRightIconProc = 375
-kControlCheckBoxAutoToggleProc = 371
-kControlRadioButtonAutoToggleProc = 372
-kControlPushButtonIconOnLeft = 6
-kControlPushButtonIconOnRight = 7
-kControlKindPushButton = FOUR_CHAR_CODE('push')
-kControlKindPushIconButton = FOUR_CHAR_CODE('picn')
-kControlKindRadioButton = FOUR_CHAR_CODE('rdio')
-kControlKindCheckBox = FOUR_CHAR_CODE('cbox')
-kControlPushButtonDefaultTag = FOUR_CHAR_CODE('dflt')
-kControlPushButtonCancelTag = FOUR_CHAR_CODE('cncl')
-kControlScrollBarProc = 384
-kControlScrollBarLiveProc = 386
-kControlKindScrollBar = FOUR_CHAR_CODE('sbar')
-kControlScrollBarShowsArrowsTag = FOUR_CHAR_CODE('arro')
-kControlPopupButtonProc = 400
-kControlPopupFixedWidthVariant = 1 << 0
-kControlPopupVariableWidthVariant = 1 << 1
-kControlPopupUseAddResMenuVariant = 1 << 2
-kControlPopupUseWFontVariant = kControlUsesOwningWindowsFontVariant
-kControlKindPopupButton = FOUR_CHAR_CODE('popb')
-kControlPopupButtonMenuHandleTag = FOUR_CHAR_CODE('mhan')
-kControlPopupButtonMenuRefTag = FOUR_CHAR_CODE('mhan')
-kControlPopupButtonMenuIDTag = FOUR_CHAR_CODE('mnid')
-kControlPopupButtonExtraHeightTag = FOUR_CHAR_CODE('exht')
-kControlPopupButtonOwnedMenuRefTag = FOUR_CHAR_CODE('omrf')
-kControlPopupButtonCheckCurrentTag = FOUR_CHAR_CODE('chck')
-kControlRadioGroupProc = 416
-kControlKindRadioGroup = FOUR_CHAR_CODE('rgrp')
-kControlScrollTextBoxProc = 432
-kControlScrollTextBoxAutoScrollProc = 433
-kControlKindScrollingTextBox = FOUR_CHAR_CODE('stbx')
-kControlScrollTextBoxDelayBeforeAutoScrollTag = FOUR_CHAR_CODE('stdl')
-kControlScrollTextBoxDelayBetweenAutoScrollTag = FOUR_CHAR_CODE('scdl')
-kControlScrollTextBoxAutoScrollAmountTag = FOUR_CHAR_CODE('samt')
-kControlScrollTextBoxContentsTag = FOUR_CHAR_CODE('tres')
-kControlScrollTextBoxAnimatingTag = FOUR_CHAR_CODE('anim')
-kControlKindDisclosureButton = FOUR_CHAR_CODE('disb')
-kControlDisclosureButtonClosed = 0
-kControlDisclosureButtonDisclosed = 1
-kControlRoundButtonNormalSize = kControlSizeNormal
-kControlRoundButtonLargeSize = kControlSizeLarge
-kControlRoundButtonContentTag = FOUR_CHAR_CODE('cont')
-kControlRoundButtonSizeTag = kControlSizeTag
-kControlKindRoundButton = FOUR_CHAR_CODE('rndb')
-kControlKindDataBrowser = FOUR_CHAR_CODE('datb')
-errDataBrowserNotConfigured = -4970
-errDataBrowserItemNotFound = -4971
-errDataBrowserItemNotAdded = -4975
-errDataBrowserPropertyNotFound = -4972
-errDataBrowserInvalidPropertyPart = -4973
-errDataBrowserInvalidPropertyData = -4974
-errDataBrowserPropertyNotSupported = -4979
-kControlDataBrowserIncludesFrameAndFocusTag = FOUR_CHAR_CODE('brdr')
-kControlDataBrowserKeyFilterTag = kControlEditTextKeyFilterTag
-kControlDataBrowserEditTextKeyFilterTag = kControlDataBrowserKeyFilterTag
-kControlDataBrowserEditTextValidationProcTag = kControlEditTextValidationProcTag
-kDataBrowserNoView = 0x3F3F3F3F
-kDataBrowserListView = FOUR_CHAR_CODE('lstv')
-kDataBrowserColumnView = FOUR_CHAR_CODE('clmv')
-kDataBrowserDragSelect = 1 << 0
-kDataBrowserSelectOnlyOne = 1 << 1
-kDataBrowserResetSelection = 1 << 2
-kDataBrowserCmdTogglesSelection = 1 << 3
-kDataBrowserNoDisjointSelection = 1 << 4
-kDataBrowserAlwaysExtendSelection = 1 << 5
-kDataBrowserNeverEmptySelectionSet = 1 << 6
-kDataBrowserOrderUndefined = 0
-kDataBrowserOrderIncreasing = 1
-kDataBrowserOrderDecreasing = 2
-kDataBrowserNoItem = 0
-kDataBrowserItemNoState = 0
-# kDataBrowserItemAnyState = (unsigned long)(-1)
-kDataBrowserItemIsSelected = 1 << 0
-kDataBrowserContainerIsOpen = 1 << 1
-kDataBrowserItemIsDragTarget = 1 << 2
-kDataBrowserRevealOnly = 0
-kDataBrowserRevealAndCenterInView = 1 << 0
-kDataBrowserRevealWithoutSelecting = 1 << 1
-kDataBrowserItemsAdd = 0
-kDataBrowserItemsAssign = 1
-kDataBrowserItemsToggle = 2
-kDataBrowserItemsRemove = 3
-kDataBrowserSelectionAnchorUp = 0
-kDataBrowserSelectionAnchorDown = 1
-kDataBrowserSelectionAnchorLeft = 2
-kDataBrowserSelectionAnchorRight = 3
-kDataBrowserEditMsgUndo = kHICommandUndo
-kDataBrowserEditMsgRedo = kHICommandRedo
-kDataBrowserEditMsgCut = kHICommandCut
-kDataBrowserEditMsgCopy = kHICommandCopy
-kDataBrowserEditMsgPaste = kHICommandPaste
-kDataBrowserEditMsgClear = kHICommandClear
-kDataBrowserEditMsgSelectAll = kHICommandSelectAll
-kDataBrowserItemAdded = 1
-kDataBrowserItemRemoved = 2
-kDataBrowserEditStarted = 3
-kDataBrowserEditStopped = 4
-kDataBrowserItemSelected = 5
-kDataBrowserItemDeselected = 6
-kDataBrowserItemDoubleClicked = 7
-kDataBrowserContainerOpened = 8
-kDataBrowserContainerClosing = 9
-kDataBrowserContainerClosed = 10
-kDataBrowserContainerSorting = 11
-kDataBrowserContainerSorted = 12
-kDataBrowserUserToggledContainer = 16
-kDataBrowserTargetChanged = 15
-kDataBrowserUserStateChanged = 13
-kDataBrowserSelectionSetChanged = 14
-kDataBrowserItemNoProperty = 0
-kDataBrowserItemIsActiveProperty = 1
-kDataBrowserItemIsSelectableProperty = 2
-kDataBrowserItemIsEditableProperty = 3
-kDataBrowserItemIsContainerProperty = 4
-kDataBrowserContainerIsOpenableProperty = 5
-kDataBrowserContainerIsClosableProperty = 6
-kDataBrowserContainerIsSortableProperty = 7
-kDataBrowserItemSelfIdentityProperty = 8
-kDataBrowserContainerAliasIDProperty = 9
-kDataBrowserColumnViewPreviewProperty = 10
-kDataBrowserItemParentContainerProperty = 11
-kDataBrowserCustomType = 0x3F3F3F3F
-kDataBrowserIconType = FOUR_CHAR_CODE('icnr')
-kDataBrowserTextType = FOUR_CHAR_CODE('text')
-kDataBrowserDateTimeType = FOUR_CHAR_CODE('date')
-kDataBrowserSliderType = FOUR_CHAR_CODE('sldr')
-kDataBrowserCheckboxType = FOUR_CHAR_CODE('chbx')
-kDataBrowserProgressBarType = FOUR_CHAR_CODE('prog')
-kDataBrowserRelevanceRankType = FOUR_CHAR_CODE('rank')
-kDataBrowserPopupMenuType = FOUR_CHAR_CODE('menu')
-kDataBrowserIconAndTextType = FOUR_CHAR_CODE('ticn')
-kDataBrowserPropertyEnclosingPart = 0
-kDataBrowserPropertyContentPart = FOUR_CHAR_CODE('----')
-kDataBrowserPropertyDisclosurePart = FOUR_CHAR_CODE('disc')
-kDataBrowserPropertyTextPart = kDataBrowserTextType
-kDataBrowserPropertyIconPart = kDataBrowserIconType
-kDataBrowserPropertySliderPart = kDataBrowserSliderType
-kDataBrowserPropertyCheckboxPart = kDataBrowserCheckboxType
-kDataBrowserPropertyProgressBarPart = kDataBrowserProgressBarType
-kDataBrowserPropertyRelevanceRankPart = kDataBrowserRelevanceRankType
-kDataBrowserUniversalPropertyFlagsMask = 0xFF
-kDataBrowserPropertyIsMutable = 1 << 0
-kDataBrowserDefaultPropertyFlags = 0 << 0
-kDataBrowserUniversalPropertyFlags = kDataBrowserUniversalPropertyFlagsMask
-kDataBrowserPropertyIsEditable = kDataBrowserPropertyIsMutable
-kDataBrowserPropertyFlagsOffset = 8
-kDataBrowserPropertyFlagsMask = 0xFF << kDataBrowserPropertyFlagsOffset
-kDataBrowserCheckboxTriState = 1 << kDataBrowserPropertyFlagsOffset
-kDataBrowserDateTimeRelative = 1 << (kDataBrowserPropertyFlagsOffset)
-kDataBrowserDateTimeDateOnly = 1 << (kDataBrowserPropertyFlagsOffset + 1)
-kDataBrowserDateTimeTimeOnly = 1 << (kDataBrowserPropertyFlagsOffset + 2)
-kDataBrowserDateTimeSecondsToo = 1 << (kDataBrowserPropertyFlagsOffset + 3)
-kDataBrowserSliderPlainThumb = kThemeThumbPlain << kDataBrowserPropertyFlagsOffset
-kDataBrowserSliderUpwardThumb = kThemeThumbUpward << kDataBrowserPropertyFlagsOffset
-kDataBrowserSliderDownwardThumb = kThemeThumbDownward << kDataBrowserPropertyFlagsOffset
-kDataBrowserDoNotTruncateText = 3 << kDataBrowserPropertyFlagsOffset
-kDataBrowserTruncateTextAtEnd = 2 << kDataBrowserPropertyFlagsOffset
-kDataBrowserTruncateTextMiddle = 0 << kDataBrowserPropertyFlagsOffset
-kDataBrowserTruncateTextAtStart = 1 << kDataBrowserPropertyFlagsOffset
-kDataBrowserPropertyModificationFlags = kDataBrowserPropertyFlagsMask
-kDataBrowserRelativeDateTime = kDataBrowserDateTimeRelative
-kDataBrowserViewSpecificFlagsOffset = 16
-kDataBrowserViewSpecificFlagsMask = 0xFF << kDataBrowserViewSpecificFlagsOffset
-kDataBrowserViewSpecificPropertyFlags = kDataBrowserViewSpecificFlagsMask
-kDataBrowserClientPropertyFlagsOffset = 24
-# kDataBrowserClientPropertyFlagsMask = (unsigned long)(0xFF << kDataBrowserClientPropertyFlagsOffset)
-kDataBrowserLatestCallbacks = 0
-kDataBrowserContentHit = 1
-kDataBrowserNothingHit = 0
-kDataBrowserStopTracking = -1
-kDataBrowserLatestCustomCallbacks = 0
-kDataBrowserTableViewMinimalHilite = 0
-kDataBrowserTableViewFillHilite = 1
-kDataBrowserTableViewSelectionColumn = 1 << kDataBrowserViewSpecificFlagsOffset
-kDataBrowserTableViewLastColumn = -1
-kDataBrowserListViewMovableColumn = 1 << (kDataBrowserViewSpecificFlagsOffset + 1)
-kDataBrowserListViewSortableColumn = 1 << (kDataBrowserViewSpecificFlagsOffset + 2)
-kDataBrowserListViewSelectionColumn = kDataBrowserTableViewSelectionColumn
-kDataBrowserListViewDefaultColumnFlags = kDataBrowserListViewMovableColumn + kDataBrowserListViewSortableColumn
-kDataBrowserListViewLatestHeaderDesc = 0
-kDataBrowserListViewAppendColumn = kDataBrowserTableViewLastColumn
-kControlEditUnicodeTextPostUpdateProcTag = FOUR_CHAR_CODE('upup')
-kControlEditUnicodeTextProc = 912
-kControlEditUnicodeTextPasswordProc = 914
-kControlKindEditUnicodeText = FOUR_CHAR_CODE('eutx')
-kControlCheckboxUncheckedValue = kControlCheckBoxUncheckedValue
-kControlCheckboxCheckedValue = kControlCheckBoxCheckedValue
-kControlCheckboxMixedValue = kControlCheckBoxMixedValue
-inLabel = kControlLabelPart
-inMenu = kControlMenuPart
-inTriangle = kControlTrianglePart
-inButton = kControlButtonPart
-inCheckBox = kControlCheckBoxPart
-inUpButton = kControlUpButtonPart
-inDownButton = kControlDownButtonPart
-inPageUp = kControlPageUpPart
-inPageDown = kControlPageDownPart
-kInLabelControlPart = kControlLabelPart
-kInMenuControlPart = kControlMenuPart
-kInTriangleControlPart = kControlTrianglePart
-kInButtonControlPart = kControlButtonPart
-kInCheckBoxControlPart = kControlCheckBoxPart
-kInUpButtonControlPart = kControlUpButtonPart
-kInDownButtonControlPart = kControlDownButtonPart
-kInPageUpControlPart = kControlPageUpPart
-kInPageDownControlPart = kControlPageDownPart
diff --git a/Lib/plat-mac/Carbon/CoreFoundation.py b/Lib/plat-mac/Carbon/CoreFoundation.py
deleted file mode 100644 (file)
index 8d9c894..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# Generated from 'CFBase.h'
-
-def FOUR_CHAR_CODE(x): return x
-kCFCompareLessThan = -1
-kCFCompareEqualTo = 0
-kCFCompareGreaterThan = 1
-kCFNotFound = -1
-kCFPropertyListImmutable = 0
-kCFPropertyListMutableContainers = 1
-kCFPropertyListMutableContainersAndLeaves = 2
-# kCFStringEncodingInvalidId = (long)0xFFFFFFFF
-kCFStringEncodingMacRoman = 0
-kCFStringEncodingWindowsLatin1 = 0x0500
-kCFStringEncodingISOLatin1 = 0x0201
-kCFStringEncodingNextStepLatin = 0x0B01
-kCFStringEncodingASCII = 0x0600
-kCFStringEncodingUnicode = 0x0100
-kCFStringEncodingUTF8 = 0x08000100
-kCFStringEncodingNonLossyASCII = 0x0BFF
-kCFCompareCaseInsensitive = 1
-kCFCompareBackwards = 4
-kCFCompareAnchored = 8
-kCFCompareNonliteral = 16
-kCFCompareLocalized = 32
-kCFCompareNumerically = 64
-kCFURLPOSIXPathStyle = 0
-kCFURLHFSPathStyle = 1
-kCFURLWindowsPathStyle = 2
diff --git a/Lib/plat-mac/Carbon/CoreGraphics.py b/Lib/plat-mac/Carbon/CoreGraphics.py
deleted file mode 100755 (executable)
index f4cb0b9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# Generated from 'CGContext.h'
-
-def FOUR_CHAR_CODE(x): return x
-kCGLineJoinMiter = 0
-kCGLineJoinRound = 1
-kCGLineJoinBevel = 2
-kCGLineCapButt = 0
-kCGLineCapRound = 1
-kCGLineCapSquare = 2
-kCGPathFill = 0
-kCGPathEOFill = 1
-kCGPathStroke = 2
-kCGPathFillStroke = 3
-kCGPathEOFillStroke = 4
-kCGTextFill = 0
-kCGTextStroke = 1
-kCGTextFillStroke = 2
-kCGTextInvisible = 3
-kCGTextFillClip = 4
-kCGTextStrokeClip = 5
-kCGTextFillStrokeClip = 6
-kCGTextClip = 7
-kCGEncodingFontSpecific = 0
-kCGEncodingMacRoman = 1
-kCGInterpolationDefault = 0
-kCGInterpolationNone = 1
-kCGInterpolationLow = 2
-kCGInterpolationHigh = 3
diff --git a/Lib/plat-mac/Carbon/Ctl.py b/Lib/plat-mac/Carbon/Ctl.py
deleted file mode 100644 (file)
index b9dc3ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Ctl import *
diff --git a/Lib/plat-mac/Carbon/Dialogs.py b/Lib/plat-mac/Carbon/Dialogs.py
deleted file mode 100644 (file)
index f846d7c..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-# Generated from 'Dialogs.h'
-
-def FOUR_CHAR_CODE(x): return x
-kControlDialogItem = 4
-kButtonDialogItem = kControlDialogItem | 0
-kCheckBoxDialogItem = kControlDialogItem | 1
-kRadioButtonDialogItem = kControlDialogItem | 2
-kResourceControlDialogItem = kControlDialogItem | 3
-kStaticTextDialogItem = 8
-kEditTextDialogItem = 16
-kIconDialogItem = 32
-kPictureDialogItem = 64
-kUserDialogItem = 0
-kHelpDialogItem = 1
-kItemDisableBit = 128
-ctrlItem = 4
-btnCtrl = 0
-chkCtrl = 1
-radCtrl = 2
-resCtrl = 3
-statText = 8
-editText = 16
-iconItem = 32
-picItem = 64
-userItem = 0
-itemDisable = 128
-kStdOkItemIndex = 1
-kStdCancelItemIndex = 2
-ok = kStdOkItemIndex
-cancel = kStdCancelItemIndex
-kStopIcon = 0
-kNoteIcon = 1
-kCautionIcon = 2
-stopIcon = kStopIcon
-noteIcon = kNoteIcon
-cautionIcon = kCautionIcon
-kOkItemIndex = 1
-kCancelItemIndex = 2
-overlayDITL = 0
-appendDITLRight = 1
-appendDITLBottom = 2
-kAlertStopAlert = 0
-kAlertNoteAlert = 1
-kAlertCautionAlert = 2
-kAlertPlainAlert = 3
-kAlertDefaultOKText = -1
-kAlertDefaultCancelText = -1
-kAlertDefaultOtherText = -1
-kAlertStdAlertOKButton = 1
-kAlertStdAlertCancelButton = 2
-kAlertStdAlertOtherButton = 3
-kAlertStdAlertHelpButton = 4
-kDialogFlagsUseThemeBackground = (1 << 0)
-kDialogFlagsUseControlHierarchy = (1 << 1)
-kDialogFlagsHandleMovableModal = (1 << 2)
-kDialogFlagsUseThemeControls = (1 << 3)
-kAlertFlagsUseThemeBackground = (1 << 0)
-kAlertFlagsUseControlHierarchy = (1 << 1)
-kAlertFlagsAlertIsMovable = (1 << 2)
-kAlertFlagsUseThemeControls = (1 << 3)
-kDialogFontNoFontStyle = 0
-kDialogFontUseFontMask = 0x0001
-kDialogFontUseFaceMask = 0x0002
-kDialogFontUseSizeMask = 0x0004
-kDialogFontUseForeColorMask = 0x0008
-kDialogFontUseBackColorMask = 0x0010
-kDialogFontUseModeMask = 0x0020
-kDialogFontUseJustMask = 0x0040
-kDialogFontUseAllMask = 0x00FF
-kDialogFontAddFontSizeMask = 0x0100
-kDialogFontUseFontNameMask = 0x0200
-kDialogFontAddToMetaFontMask = 0x0400
-kDialogFontUseThemeFontIDMask = 0x0080
-kHICommandOther = FOUR_CHAR_CODE('othr')
-kStdCFStringAlertVersionOne = 1
-kStdAlertDoNotDisposeSheet = 1 << 0
-kStdAlertDoNotAnimateOnDefault = 1 << 1
-kStdAlertDoNotAnimateOnCancel = 1 << 2
-kStdAlertDoNotAnimateOnOther = 1 << 3
diff --git a/Lib/plat-mac/Carbon/Dlg.py b/Lib/plat-mac/Carbon/Dlg.py
deleted file mode 100644 (file)
index 7b22d84..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Dlg import *
diff --git a/Lib/plat-mac/Carbon/Drag.py b/Lib/plat-mac/Carbon/Drag.py
deleted file mode 100644 (file)
index a2349d7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Drag import *
diff --git a/Lib/plat-mac/Carbon/Dragconst.py b/Lib/plat-mac/Carbon/Dragconst.py
deleted file mode 100644 (file)
index 6392c2b..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-# Generated from 'Drag.h'
-
-def FOUR_CHAR_CODE(x): return x
-from Carbon.TextEdit import *
-from Carbon.QuickDraw import *
-fkDragActionAll = -1
-
-
-kDragHasLeftSenderWindow        = (1 << 0)
-kDragInsideSenderApplication = (1 << 1)
-kDragInsideSenderWindow         = (1 << 2)
-kDragRegionAndImage                     = (1 << 4)
-flavorSenderOnly                        = (1 << 0)
-flavorSenderTranslated          = (1 << 1)
-flavorNotSaved                          = (1 << 2)
-flavorSystemTranslated          = (1 << 8)
-kDragHasLeftSenderWindow = (1 << 0)
-kDragInsideSenderApplication = (1 << 1)
-kDragInsideSenderWindow = (1 << 2)
-kDragBehaviorNone = 0
-kDragBehaviorZoomBackAnimation = (1 << 0)
-kDragRegionAndImage = (1 << 4)
-kDragStandardTranslucency = 0
-kDragDarkTranslucency = 1
-kDragDarkerTranslucency = 2
-kDragOpaqueTranslucency = 3
-kDragRegionBegin = 1
-kDragRegionDraw = 2
-kDragRegionHide = 3
-kDragRegionIdle = 4
-kDragRegionEnd = 5
-kZoomNoAcceleration = 0
-kZoomAccelerate = 1
-kZoomDecelerate = 2
-flavorSenderOnly = (1 << 0)
-flavorSenderTranslated = (1 << 1)
-flavorNotSaved = (1 << 2)
-flavorSystemTranslated = (1 << 8)
-flavorDataPromised = (1 << 9)
-kDragFlavorTypeHFS = FOUR_CHAR_CODE('hfs ')
-kDragFlavorTypePromiseHFS = FOUR_CHAR_CODE('phfs')
-flavorTypeHFS = kDragFlavorTypeHFS
-flavorTypePromiseHFS = kDragFlavorTypePromiseHFS
-kDragPromisedFlavorFindFile = FOUR_CHAR_CODE('rWm1')
-kDragPromisedFlavor = FOUR_CHAR_CODE('fssP')
-kDragPseudoCreatorVolumeOrDirectory = FOUR_CHAR_CODE('MACS')
-kDragPseudoFileTypeVolume = FOUR_CHAR_CODE('disk')
-kDragPseudoFileTypeDirectory = FOUR_CHAR_CODE('fold')
-flavorTypeDirectory = FOUR_CHAR_CODE('diry')
-kFlavorTypeClippingName = FOUR_CHAR_CODE('clnm')
-kFlavorTypeClippingFilename = FOUR_CHAR_CODE('clfn')
-kFlavorTypeDragToTrashOnly = FOUR_CHAR_CODE('fdtt')
-kFlavorTypeFinderNoTrackingBehavior = FOUR_CHAR_CODE('fntb')
-kDragTrackingEnterHandler = 1
-kDragTrackingEnterWindow = 2
-kDragTrackingInWindow = 3
-kDragTrackingLeaveWindow = 4
-kDragTrackingLeaveHandler = 5
-kDragActionNothing = 0
-kDragActionCopy = 1
-kDragActionAlias = (1 << 1)
-kDragActionGeneric = (1 << 2)
-kDragActionPrivate = (1 << 3)
-kDragActionMove = (1 << 4)
-kDragActionDelete = (1 << 5)
-# kDragActionAll = (long)0xFFFFFFFF
-dragHasLeftSenderWindow = kDragHasLeftSenderWindow
-dragInsideSenderApplication = kDragInsideSenderApplication
-dragInsideSenderWindow = kDragInsideSenderWindow
-dragTrackingEnterHandler = kDragTrackingEnterHandler
-dragTrackingEnterWindow = kDragTrackingEnterWindow
-dragTrackingInWindow = kDragTrackingInWindow
-dragTrackingLeaveWindow = kDragTrackingLeaveWindow
-dragTrackingLeaveHandler = kDragTrackingLeaveHandler
-dragRegionBegin = kDragRegionBegin
-dragRegionDraw = kDragRegionDraw
-dragRegionHide = kDragRegionHide
-dragRegionIdle = kDragRegionIdle
-dragRegionEnd = kDragRegionEnd
-zoomNoAcceleration = kZoomNoAcceleration
-zoomAccelerate = kZoomAccelerate
-zoomDecelerate = kZoomDecelerate
-kDragStandardImage = kDragStandardTranslucency
-kDragDarkImage = kDragDarkTranslucency
-kDragDarkerImage = kDragDarkerTranslucency
-kDragOpaqueImage = kDragOpaqueTranslucency
diff --git a/Lib/plat-mac/Carbon/Events.py b/Lib/plat-mac/Carbon/Events.py
deleted file mode 100644 (file)
index 269f4f1..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-# Generated from 'Events.h'
-
-nullEvent = 0
-mouseDown = 1
-mouseUp = 2
-keyDown = 3
-keyUp = 4
-autoKey = 5
-updateEvt = 6
-diskEvt = 7
-activateEvt = 8
-osEvt = 15
-kHighLevelEvent = 23
-mDownMask = 1 << mouseDown
-mUpMask = 1 << mouseUp
-keyDownMask = 1 << keyDown
-keyUpMask = 1 << keyUp
-autoKeyMask = 1 << autoKey
-updateMask = 1 << updateEvt
-diskMask = 1 << diskEvt
-activMask = 1 << activateEvt
-highLevelEventMask = 0x0400
-osMask = 1 << osEvt
-everyEvent = 0xFFFF
-charCodeMask = 0x000000FF
-keyCodeMask = 0x0000FF00
-adbAddrMask = 0x00FF0000
-# osEvtMessageMask = (unsigned long)0xFF000000
-mouseMovedMessage = 0x00FA
-suspendResumeMessage = 0x0001
-resumeFlag = 1
-convertClipboardFlag = 2
-activeFlagBit = 0
-btnStateBit = 7
-cmdKeyBit = 8
-shiftKeyBit = 9
-alphaLockBit = 10
-optionKeyBit = 11
-controlKeyBit = 12
-rightShiftKeyBit = 13
-rightOptionKeyBit = 14
-rightControlKeyBit = 15
-activeFlag = 1 << activeFlagBit
-btnState = 1 << btnStateBit
-cmdKey = 1 << cmdKeyBit
-shiftKey = 1 << shiftKeyBit
-alphaLock = 1 << alphaLockBit
-optionKey = 1 << optionKeyBit
-controlKey = 1 << controlKeyBit
-rightShiftKey = 1 << rightShiftKeyBit
-rightOptionKey = 1 << rightOptionKeyBit
-rightControlKey = 1 << rightControlKeyBit
-kNullCharCode = 0
-kHomeCharCode = 1
-kEnterCharCode = 3
-kEndCharCode = 4
-kHelpCharCode = 5
-kBellCharCode = 7
-kBackspaceCharCode = 8
-kTabCharCode = 9
-kLineFeedCharCode = 10
-kVerticalTabCharCode = 11
-kPageUpCharCode = 11
-kFormFeedCharCode = 12
-kPageDownCharCode = 12
-kReturnCharCode = 13
-kFunctionKeyCharCode = 16
-kCommandCharCode = 17
-kCheckCharCode = 18
-kDiamondCharCode = 19
-kAppleLogoCharCode = 20
-kEscapeCharCode = 27
-kClearCharCode = 27
-kLeftArrowCharCode = 28
-kRightArrowCharCode = 29
-kUpArrowCharCode = 30
-kDownArrowCharCode = 31
-kSpaceCharCode = 32
-kDeleteCharCode = 127
-kBulletCharCode = 165
-kNonBreakingSpaceCharCode = 202
-kShiftUnicode = 0x21E7
-kControlUnicode = 0x2303
-kOptionUnicode = 0x2325
-kCommandUnicode = 0x2318
-kPencilUnicode = 0x270E
-kCheckUnicode = 0x2713
-kDiamondUnicode = 0x25C6
-kBulletUnicode = 0x2022
-kAppleLogoUnicode = 0xF8FF
-networkEvt = 10
-driverEvt = 11
-app1Evt = 12
-app2Evt = 13
-app3Evt = 14
-app4Evt = 15
-networkMask = 0x0400
-driverMask = 0x0800
-app1Mask = 0x1000
-app2Mask = 0x2000
-app3Mask = 0x4000
-app4Mask = 0x8000
diff --git a/Lib/plat-mac/Carbon/Evt.py b/Lib/plat-mac/Carbon/Evt.py
deleted file mode 100644 (file)
index 7a5ffa6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Evt import *
diff --git a/Lib/plat-mac/Carbon/File.py b/Lib/plat-mac/Carbon/File.py
deleted file mode 100644 (file)
index 58c2857..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _File import *
diff --git a/Lib/plat-mac/Carbon/Files.py b/Lib/plat-mac/Carbon/Files.py
deleted file mode 100644 (file)
index 678bbc7..0000000
+++ /dev/null
@@ -1,426 +0,0 @@
-# Generated from 'Files.h'
-
-def FOUR_CHAR_CODE(x): return x
-true = True
-false = False
-fsCurPerm = 0x00
-fsRdPerm = 0x01
-fsWrPerm = 0x02
-fsRdWrPerm = 0x03
-fsRdWrShPerm = 0x04
-fsRdDenyPerm = 0x10
-fsWrDenyPerm = 0x20
-fsRtParID = 1
-fsRtDirID = 2
-fsAtMark = 0
-fsFromStart = 1
-fsFromLEOF = 2
-fsFromMark = 3
-pleaseCacheBit = 4
-pleaseCacheMask = 0x0010
-noCacheBit = 5
-noCacheMask = 0x0020
-rdVerifyBit = 6
-rdVerifyMask = 0x0040
-rdVerify = 64
-forceReadBit = 6
-forceReadMask = 0x0040
-newLineBit = 7
-newLineMask = 0x0080
-newLineCharMask = 0xFF00
-fsSBPartialName = 1
-fsSBFullName = 2
-fsSBFlAttrib = 4
-fsSBFlFndrInfo = 8
-fsSBFlLgLen = 32
-fsSBFlPyLen = 64
-fsSBFlRLgLen = 128
-fsSBFlRPyLen = 256
-fsSBFlCrDat = 512
-fsSBFlMdDat = 1024
-fsSBFlBkDat = 2048
-fsSBFlXFndrInfo = 4096
-fsSBFlParID = 8192
-fsSBNegate = 16384
-fsSBDrUsrWds = 8
-fsSBDrNmFls = 16
-fsSBDrCrDat = 512
-fsSBDrMdDat = 1024
-fsSBDrBkDat = 2048
-fsSBDrFndrInfo = 4096
-fsSBDrParID = 8192
-fsSBPartialNameBit = 0
-fsSBFullNameBit = 1
-fsSBFlAttribBit = 2
-fsSBFlFndrInfoBit = 3
-fsSBFlLgLenBit = 5
-fsSBFlPyLenBit = 6
-fsSBFlRLgLenBit = 7
-fsSBFlRPyLenBit = 8
-fsSBFlCrDatBit = 9
-fsSBFlMdDatBit = 10
-fsSBFlBkDatBit = 11
-fsSBFlXFndrInfoBit = 12
-fsSBFlParIDBit = 13
-fsSBNegateBit = 14
-fsSBDrUsrWdsBit = 3
-fsSBDrNmFlsBit = 4
-fsSBDrCrDatBit = 9
-fsSBDrMdDatBit = 10
-fsSBDrBkDatBit = 11
-fsSBDrFndrInfoBit = 12
-fsSBDrParIDBit = 13
-bLimitFCBs = 31
-bLocalWList = 30
-bNoMiniFndr = 29
-bNoVNEdit = 28
-bNoLclSync = 27
-bTrshOffLine = 26
-bNoSwitchTo = 25
-bDontShareIt = 21
-bNoDeskItems = 20
-bNoBootBlks = 19
-bAccessCntl = 18
-bNoSysDir = 17
-bHasExtFSVol = 16
-bHasOpenDeny = 15
-bHasCopyFile = 14
-bHasMoveRename = 13
-bHasDesktopMgr = 12
-bHasShortName = 11
-bHasFolderLock = 10
-bHasPersonalAccessPrivileges = 9
-bHasUserGroupList = 8
-bHasCatSearch = 7
-bHasFileIDs = 6
-bHasBTreeMgr = 5
-bHasBlankAccessPrivileges = 4
-bSupportsAsyncRequests = 3
-bSupportsTrashVolumeCache = 2
-bIsEjectable = 0
-bSupportsHFSPlusAPIs = 1
-bSupportsFSCatalogSearch = 2
-bSupportsFSExchangeObjects = 3
-bSupports2TBFiles = 4
-bSupportsLongNames = 5
-bSupportsMultiScriptNames = 6
-bSupportsNamedForks = 7
-bSupportsSubtreeIterators = 8
-bL2PCanMapFileBlocks = 9
-bParentModDateChanges = 10
-bAncestorModDateChanges = 11
-bSupportsSymbolicLinks = 13
-bIsAutoMounted = 14
-bAllowCDiDataHandler = 17
-kLargeIcon = 1
-kLarge4BitIcon = 2
-kLarge8BitIcon = 3
-kSmallIcon = 4
-kSmall4BitIcon = 5
-kSmall8BitIcon = 6
-kicnsIconFamily = 239
-kLargeIconSize = 256
-kLarge4BitIconSize = 512
-kLarge8BitIconSize = 1024
-kSmallIconSize = 64
-kSmall4BitIconSize = 128
-kSmall8BitIconSize = 256
-kWidePosOffsetBit = 8
-kUseWidePositioning = (1 << kWidePosOffsetBit)
-kMaximumBlocksIn4GB = 0x007FFFFF
-fsUnixPriv = 1
-kNoUserAuthentication = 1
-kPassword = 2
-kEncryptPassword = 3
-kTwoWayEncryptPassword = 6
-kOwnerID2Name = 1
-kGroupID2Name = 2
-kOwnerName2ID = 3
-kGroupName2ID = 4
-kReturnNextUser = 1
-kReturnNextGroup = 2
-kReturnNextUG = 3
-kVCBFlagsIdleFlushBit = 3
-kVCBFlagsIdleFlushMask = 0x0008
-kVCBFlagsHFSPlusAPIsBit = 4
-kVCBFlagsHFSPlusAPIsMask = 0x0010
-kVCBFlagsHardwareGoneBit = 5
-kVCBFlagsHardwareGoneMask = 0x0020
-kVCBFlagsVolumeDirtyBit = 15
-kVCBFlagsVolumeDirtyMask = 0x8000
-kioVAtrbDefaultVolumeBit = 5
-kioVAtrbDefaultVolumeMask = 0x0020
-kioVAtrbFilesOpenBit = 6
-kioVAtrbFilesOpenMask = 0x0040
-kioVAtrbHardwareLockedBit = 7
-kioVAtrbHardwareLockedMask = 0x0080
-kioVAtrbSoftwareLockedBit = 15
-kioVAtrbSoftwareLockedMask = 0x8000
-kioFlAttribLockedBit = 0
-kioFlAttribLockedMask = 0x01
-kioFlAttribResOpenBit = 2
-kioFlAttribResOpenMask = 0x04
-kioFlAttribDataOpenBit = 3
-kioFlAttribDataOpenMask = 0x08
-kioFlAttribDirBit = 4
-kioFlAttribDirMask = 0x10
-ioDirFlg = 4
-ioDirMask = 0x10
-kioFlAttribCopyProtBit = 6
-kioFlAttribCopyProtMask = 0x40
-kioFlAttribFileOpenBit = 7
-kioFlAttribFileOpenMask = 0x80
-kioFlAttribInSharedBit = 2
-kioFlAttribInSharedMask = 0x04
-kioFlAttribMountedBit = 3
-kioFlAttribMountedMask = 0x08
-kioFlAttribSharePointBit = 5
-kioFlAttribSharePointMask = 0x20
-kioFCBWriteBit = 8
-kioFCBWriteMask = 0x0100
-kioFCBResourceBit = 9
-kioFCBResourceMask = 0x0200
-kioFCBWriteLockedBit = 10
-kioFCBWriteLockedMask = 0x0400
-kioFCBLargeFileBit = 11
-kioFCBLargeFileMask = 0x0800
-kioFCBSharedWriteBit = 12
-kioFCBSharedWriteMask = 0x1000
-kioFCBFileLockedBit = 13
-kioFCBFileLockedMask = 0x2000
-kioFCBOwnClumpBit = 14
-kioFCBOwnClumpMask = 0x4000
-kioFCBModifiedBit = 15
-kioFCBModifiedMask = 0x8000
-kioACUserNoSeeFolderBit = 0
-kioACUserNoSeeFolderMask = 0x01
-kioACUserNoSeeFilesBit = 1
-kioACUserNoSeeFilesMask = 0x02
-kioACUserNoMakeChangesBit = 2
-kioACUserNoMakeChangesMask = 0x04
-kioACUserNotOwnerBit = 7
-kioACUserNotOwnerMask = 0x80
-kioACAccessOwnerBit = 31
-# kioACAccessOwnerMask = (long)0x80000000
-kioACAccessBlankAccessBit = 28
-kioACAccessBlankAccessMask = 0x10000000
-kioACAccessUserWriteBit = 26
-kioACAccessUserWriteMask = 0x04000000
-kioACAccessUserReadBit = 25
-kioACAccessUserReadMask = 0x02000000
-kioACAccessUserSearchBit = 24
-kioACAccessUserSearchMask = 0x01000000
-kioACAccessEveryoneWriteBit = 18
-kioACAccessEveryoneWriteMask = 0x00040000
-kioACAccessEveryoneReadBit = 17
-kioACAccessEveryoneReadMask = 0x00020000
-kioACAccessEveryoneSearchBit = 16
-kioACAccessEveryoneSearchMask = 0x00010000
-kioACAccessGroupWriteBit = 10
-kioACAccessGroupWriteMask = 0x00000400
-kioACAccessGroupReadBit = 9
-kioACAccessGroupReadMask = 0x00000200
-kioACAccessGroupSearchBit = 8
-kioACAccessGroupSearchMask = 0x00000100
-kioACAccessOwnerWriteBit = 2
-kioACAccessOwnerWriteMask = 0x00000004
-kioACAccessOwnerReadBit = 1
-kioACAccessOwnerReadMask = 0x00000002
-kioACAccessOwnerSearchBit = 0
-kioACAccessOwnerSearchMask = 0x00000001
-kfullPrivileges = 0x00070007
-kownerPrivileges = 0x00000007
-knoUser = 0
-kadministratorUser = 1
-knoGroup = 0
-AppleShareMediaType = FOUR_CHAR_CODE('afpm')
-volMountNoLoginMsgFlagBit = 0
-volMountNoLoginMsgFlagMask = 0x0001
-volMountExtendedFlagsBit = 7
-volMountExtendedFlagsMask = 0x0080
-volMountInteractBit = 15
-volMountInteractMask = 0x8000
-volMountChangedBit = 14
-volMountChangedMask = 0x4000
-volMountFSReservedMask = 0x00FF
-volMountSysReservedMask = 0xFF00
-kAFPExtendedFlagsAlternateAddressMask = 1
-kAFPTagTypeIP = 0x01
-kAFPTagTypeIPPort = 0x02
-kAFPTagTypeDDP = 0x03
-kAFPTagTypeDNS = 0x04
-kAFPTagLengthIP = 0x06
-kAFPTagLengthIPPort = 0x08
-kAFPTagLengthDDP = 0x06
-kFSInvalidVolumeRefNum = 0
-kFSCatInfoNone = 0x00000000
-kFSCatInfoTextEncoding = 0x00000001
-kFSCatInfoNodeFlags = 0x00000002
-kFSCatInfoVolume = 0x00000004
-kFSCatInfoParentDirID = 0x00000008
-kFSCatInfoNodeID = 0x00000010
-kFSCatInfoCreateDate = 0x00000020
-kFSCatInfoContentMod = 0x00000040
-kFSCatInfoAttrMod = 0x00000080
-kFSCatInfoAccessDate = 0x00000100
-kFSCatInfoBackupDate = 0x00000200
-kFSCatInfoPermissions = 0x00000400
-kFSCatInfoFinderInfo = 0x00000800
-kFSCatInfoFinderXInfo = 0x00001000
-kFSCatInfoValence = 0x00002000
-kFSCatInfoDataSizes = 0x00004000
-kFSCatInfoRsrcSizes = 0x00008000
-kFSCatInfoSharingFlags = 0x00010000
-kFSCatInfoUserPrivs = 0x00020000
-kFSCatInfoUserAccess = 0x00080000
-kFSCatInfoAllDates = 0x000003E0
-kFSCatInfoGettableInfo = 0x0003FFFF
-kFSCatInfoSettableInfo = 0x00001FE3
-# kFSCatInfoReserved = (long)0xFFFC0000
-kFSNodeLockedBit = 0
-kFSNodeLockedMask = 0x0001
-kFSNodeResOpenBit = 2
-kFSNodeResOpenMask = 0x0004
-kFSNodeDataOpenBit = 3
-kFSNodeDataOpenMask = 0x0008
-kFSNodeIsDirectoryBit = 4
-kFSNodeIsDirectoryMask = 0x0010
-kFSNodeCopyProtectBit = 6
-kFSNodeCopyProtectMask = 0x0040
-kFSNodeForkOpenBit = 7
-kFSNodeForkOpenMask = 0x0080
-kFSNodeInSharedBit = 2
-kFSNodeInSharedMask = 0x0004
-kFSNodeIsMountedBit = 3
-kFSNodeIsMountedMask = 0x0008
-kFSNodeIsSharePointBit = 5
-kFSNodeIsSharePointMask = 0x0020
-kFSIterateFlat = 0
-kFSIterateSubtree = 1
-kFSIterateDelete = 2
-# kFSIterateReserved = (long)0xFFFFFFFC
-fsSBNodeID = 0x00008000
-fsSBAttributeModDate = 0x00010000
-fsSBAccessDate = 0x00020000
-fsSBPermissions = 0x00040000
-fsSBNodeIDBit = 15
-fsSBAttributeModDateBit = 16
-fsSBAccessDateBit = 17
-fsSBPermissionsBit = 18
-kFSAllocDefaultFlags = 0x0000
-kFSAllocAllOrNothingMask = 0x0001
-kFSAllocContiguousMask = 0x0002
-kFSAllocNoRoundUpMask = 0x0004
-kFSAllocReservedMask = 0xFFF8
-kFSVolInfoNone = 0x0000
-kFSVolInfoCreateDate = 0x0001
-kFSVolInfoModDate = 0x0002
-kFSVolInfoBackupDate = 0x0004
-kFSVolInfoCheckedDate = 0x0008
-kFSVolInfoFileCount = 0x0010
-kFSVolInfoDirCount = 0x0020
-kFSVolInfoSizes = 0x0040
-kFSVolInfoBlocks = 0x0080
-kFSVolInfoNextAlloc = 0x0100
-kFSVolInfoRsrcClump = 0x0200
-kFSVolInfoDataClump = 0x0400
-kFSVolInfoNextID = 0x0800
-kFSVolInfoFinderInfo = 0x1000
-kFSVolInfoFlags = 0x2000
-kFSVolInfoFSInfo = 0x4000
-kFSVolInfoDriveInfo = 0x8000
-kFSVolInfoGettableInfo = 0xFFFF
-kFSVolInfoSettableInfo = 0x3004
-kFSVolFlagDefaultVolumeBit = 5
-kFSVolFlagDefaultVolumeMask = 0x0020
-kFSVolFlagFilesOpenBit = 6
-kFSVolFlagFilesOpenMask = 0x0040
-kFSVolFlagHardwareLockedBit = 7
-kFSVolFlagHardwareLockedMask = 0x0080
-kFSVolFlagSoftwareLockedBit = 15
-kFSVolFlagSoftwareLockedMask = 0x8000
-kFNDirectoryModifiedMessage = 1
-kFNNoImplicitAllSubscription = (1 << 0)
-rAliasType = FOUR_CHAR_CODE('alis')
-kARMMountVol = 0x00000001
-kARMNoUI = 0x00000002
-kARMMultVols = 0x00000008
-kARMSearch = 0x00000100
-kARMSearchMore = 0x00000200
-kARMSearchRelFirst = 0x00000400
-asiZoneName = -3
-asiServerName = -2
-asiVolumeName = -1
-asiAliasName = 0
-asiParentName = 1
-kResolveAliasFileNoUI = 0x00000001
-kClippingCreator = FOUR_CHAR_CODE('drag')
-kClippingPictureType = FOUR_CHAR_CODE('clpp')
-kClippingTextType = FOUR_CHAR_CODE('clpt')
-kClippingSoundType = FOUR_CHAR_CODE('clps')
-kClippingUnknownType = FOUR_CHAR_CODE('clpu')
-kInternetLocationCreator = FOUR_CHAR_CODE('drag')
-kInternetLocationHTTP = FOUR_CHAR_CODE('ilht')
-kInternetLocationFTP = FOUR_CHAR_CODE('ilft')
-kInternetLocationFile = FOUR_CHAR_CODE('ilfi')
-kInternetLocationMail = FOUR_CHAR_CODE('ilma')
-kInternetLocationNNTP = FOUR_CHAR_CODE('ilnw')
-kInternetLocationAFP = FOUR_CHAR_CODE('ilaf')
-kInternetLocationAppleTalk = FOUR_CHAR_CODE('ilat')
-kInternetLocationNSL = FOUR_CHAR_CODE('ilns')
-kInternetLocationGeneric = FOUR_CHAR_CODE('ilge')
-kCustomIconResource = -16455
-kCustomBadgeResourceType = FOUR_CHAR_CODE('badg')
-kCustomBadgeResourceID = kCustomIconResource
-kCustomBadgeResourceVersion = 0
-# kSystemFolderType = 'macs'.
-kRoutingResourceType = FOUR_CHAR_CODE('rout')
-kRoutingResourceID = 0
-kContainerFolderAliasType = FOUR_CHAR_CODE('fdrp')
-kContainerTrashAliasType = FOUR_CHAR_CODE('trsh')
-kContainerHardDiskAliasType = FOUR_CHAR_CODE('hdsk')
-kContainerFloppyAliasType = FOUR_CHAR_CODE('flpy')
-kContainerServerAliasType = FOUR_CHAR_CODE('srvr')
-kApplicationAliasType = FOUR_CHAR_CODE('adrp')
-kContainerAliasType = FOUR_CHAR_CODE('drop')
-kDesktopPrinterAliasType = FOUR_CHAR_CODE('dtpa')
-kContainerCDROMAliasType = FOUR_CHAR_CODE('cddr')
-kApplicationCPAliasType = FOUR_CHAR_CODE('acdp')
-kApplicationDAAliasType = FOUR_CHAR_CODE('addp')
-kPackageAliasType = FOUR_CHAR_CODE('fpka')
-kAppPackageAliasType = FOUR_CHAR_CODE('fapa')
-kSystemFolderAliasType = FOUR_CHAR_CODE('fasy')
-kAppleMenuFolderAliasType = FOUR_CHAR_CODE('faam')
-kStartupFolderAliasType = FOUR_CHAR_CODE('fast')
-kPrintMonitorDocsFolderAliasType = FOUR_CHAR_CODE('fapn')
-kPreferencesFolderAliasType = FOUR_CHAR_CODE('fapf')
-kControlPanelFolderAliasType = FOUR_CHAR_CODE('fact')
-kExtensionFolderAliasType = FOUR_CHAR_CODE('faex')
-kExportedFolderAliasType = FOUR_CHAR_CODE('faet')
-kDropFolderAliasType = FOUR_CHAR_CODE('fadr')
-kSharedFolderAliasType = FOUR_CHAR_CODE('fash')
-kMountedFolderAliasType = FOUR_CHAR_CODE('famn')
-kIsOnDesk = 0x0001
-kColor = 0x000E
-kIsShared = 0x0040
-kHasNoINITs = 0x0080
-kHasBeenInited = 0x0100
-kHasCustomIcon = 0x0400
-kIsStationery = 0x0800
-kNameLocked = 0x1000
-kHasBundle = 0x2000
-kIsInvisible = 0x4000
-kIsAlias = 0x8000
-fOnDesk = kIsOnDesk
-fHasBundle = kHasBundle
-fInvisible = kIsInvisible
-fTrash = -3
-fDesktop = -2
-fDisk = 0
-kIsStationary = kIsStationery
-kExtendedFlagsAreInvalid = 0x8000
-kExtendedFlagHasCustomBadge = 0x0100
-kExtendedFlagHasRoutingInfo = 0x0004
-kFirstMagicBusyFiletype = FOUR_CHAR_CODE('bzy ')
-kLastMagicBusyFiletype = FOUR_CHAR_CODE('bzy?')
-kMagicBusyCreationDate = 0x4F3AFDB0
diff --git a/Lib/plat-mac/Carbon/Fm.py b/Lib/plat-mac/Carbon/Fm.py
deleted file mode 100644 (file)
index 0f42fdc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Fm import *
diff --git a/Lib/plat-mac/Carbon/Folder.py b/Lib/plat-mac/Carbon/Folder.py
deleted file mode 100644 (file)
index a4e4902..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Folder import *
diff --git a/Lib/plat-mac/Carbon/Folders.py b/Lib/plat-mac/Carbon/Folders.py
deleted file mode 100644 (file)
index dbf2d6b..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-# Generated from 'Folders.h'
-
-def FOUR_CHAR_CODE(x): return x
-true = True
-false = False
-kOnSystemDisk = -32768
-kOnAppropriateDisk = -32767
-kSystemDomain = -32766
-kLocalDomain = -32765
-kNetworkDomain = -32764
-kUserDomain = -32763
-kClassicDomain = -32762
-kCreateFolder = true
-kDontCreateFolder = false
-kSystemFolderType = FOUR_CHAR_CODE('macs')
-kDesktopFolderType = FOUR_CHAR_CODE('desk')
-kSystemDesktopFolderType = FOUR_CHAR_CODE('sdsk')
-kTrashFolderType = FOUR_CHAR_CODE('trsh')
-kSystemTrashFolderType = FOUR_CHAR_CODE('strs')
-kWhereToEmptyTrashFolderType = FOUR_CHAR_CODE('empt')
-kPrintMonitorDocsFolderType = FOUR_CHAR_CODE('prnt')
-kStartupFolderType = FOUR_CHAR_CODE('strt')
-kShutdownFolderType = FOUR_CHAR_CODE('shdf')
-kAppleMenuFolderType = FOUR_CHAR_CODE('amnu')
-kControlPanelFolderType = FOUR_CHAR_CODE('ctrl')
-kSystemControlPanelFolderType = FOUR_CHAR_CODE('sctl')
-kExtensionFolderType = FOUR_CHAR_CODE('extn')
-kFontsFolderType = FOUR_CHAR_CODE('font')
-kPreferencesFolderType = FOUR_CHAR_CODE('pref')
-kSystemPreferencesFolderType = FOUR_CHAR_CODE('sprf')
-kTemporaryFolderType = FOUR_CHAR_CODE('temp')
-kExtensionDisabledFolderType = FOUR_CHAR_CODE('extD')
-kControlPanelDisabledFolderType = FOUR_CHAR_CODE('ctrD')
-kSystemExtensionDisabledFolderType = FOUR_CHAR_CODE('macD')
-kStartupItemsDisabledFolderType = FOUR_CHAR_CODE('strD')
-kShutdownItemsDisabledFolderType = FOUR_CHAR_CODE('shdD')
-kApplicationsFolderType = FOUR_CHAR_CODE('apps')
-kDocumentsFolderType = FOUR_CHAR_CODE('docs')
-kVolumeRootFolderType = FOUR_CHAR_CODE('root')
-kChewableItemsFolderType = FOUR_CHAR_CODE('flnt')
-kApplicationSupportFolderType = FOUR_CHAR_CODE('asup')
-kTextEncodingsFolderType = FOUR_CHAR_CODE('\xc4tex')
-kStationeryFolderType = FOUR_CHAR_CODE('odst')
-kOpenDocFolderType = FOUR_CHAR_CODE('odod')
-kOpenDocShellPlugInsFolderType = FOUR_CHAR_CODE('odsp')
-kEditorsFolderType = FOUR_CHAR_CODE('oded')
-kOpenDocEditorsFolderType = FOUR_CHAR_CODE('\xc4odf')
-kOpenDocLibrariesFolderType = FOUR_CHAR_CODE('odlb')
-kGenEditorsFolderType = FOUR_CHAR_CODE('\xc4edi')
-kHelpFolderType = FOUR_CHAR_CODE('\xc4hlp')
-kInternetPlugInFolderType = FOUR_CHAR_CODE('\xc4net')
-kModemScriptsFolderType = FOUR_CHAR_CODE('\xc4mod')
-kPrinterDescriptionFolderType = FOUR_CHAR_CODE('ppdf')
-kPrinterDriverFolderType = FOUR_CHAR_CODE('\xc4prd')
-kScriptingAdditionsFolderType = FOUR_CHAR_CODE('\xc4scr')
-kSharedLibrariesFolderType = FOUR_CHAR_CODE('\xc4lib')
-kVoicesFolderType = FOUR_CHAR_CODE('fvoc')
-kControlStripModulesFolderType = FOUR_CHAR_CODE('sdev')
-kAssistantsFolderType = FOUR_CHAR_CODE('ast\xc4')
-kUtilitiesFolderType = FOUR_CHAR_CODE('uti\xc4')
-kAppleExtrasFolderType = FOUR_CHAR_CODE('aex\xc4')
-kContextualMenuItemsFolderType = FOUR_CHAR_CODE('cmnu')
-kMacOSReadMesFolderType = FOUR_CHAR_CODE('mor\xc4')
-kALMModulesFolderType = FOUR_CHAR_CODE('walk')
-kALMPreferencesFolderType = FOUR_CHAR_CODE('trip')
-kALMLocationsFolderType = FOUR_CHAR_CODE('fall')
-kColorSyncProfilesFolderType = FOUR_CHAR_CODE('prof')
-kThemesFolderType = FOUR_CHAR_CODE('thme')
-kFavoritesFolderType = FOUR_CHAR_CODE('favs')
-kInternetFolderType = FOUR_CHAR_CODE('int\xc4')
-kAppearanceFolderType = FOUR_CHAR_CODE('appr')
-kSoundSetsFolderType = FOUR_CHAR_CODE('snds')
-kDesktopPicturesFolderType = FOUR_CHAR_CODE('dtp\xc4')
-kInternetSearchSitesFolderType = FOUR_CHAR_CODE('issf')
-kFindSupportFolderType = FOUR_CHAR_CODE('fnds')
-kFindByContentFolderType = FOUR_CHAR_CODE('fbcf')
-kInstallerLogsFolderType = FOUR_CHAR_CODE('ilgf')
-kScriptsFolderType = FOUR_CHAR_CODE('scr\xc4')
-kFolderActionsFolderType = FOUR_CHAR_CODE('fasf')
-kLauncherItemsFolderType = FOUR_CHAR_CODE('laun')
-kRecentApplicationsFolderType = FOUR_CHAR_CODE('rapp')
-kRecentDocumentsFolderType = FOUR_CHAR_CODE('rdoc')
-kRecentServersFolderType = FOUR_CHAR_CODE('rsvr')
-kSpeakableItemsFolderType = FOUR_CHAR_CODE('spki')
-kKeychainFolderType = FOUR_CHAR_CODE('kchn')
-kQuickTimeExtensionsFolderType = FOUR_CHAR_CODE('qtex')
-kDisplayExtensionsFolderType = FOUR_CHAR_CODE('dspl')
-kMultiprocessingFolderType = FOUR_CHAR_CODE('mpxf')
-kPrintingPlugInsFolderType = FOUR_CHAR_CODE('pplg')
-kDomainTopLevelFolderType = FOUR_CHAR_CODE('dtop')
-kDomainLibraryFolderType = FOUR_CHAR_CODE('dlib')
-kColorSyncFolderType = FOUR_CHAR_CODE('sync')
-kColorSyncCMMFolderType = FOUR_CHAR_CODE('ccmm')
-kColorSyncScriptingFolderType = FOUR_CHAR_CODE('cscr')
-kPrintersFolderType = FOUR_CHAR_CODE('impr')
-kSpeechFolderType = FOUR_CHAR_CODE('spch')
-kCarbonLibraryFolderType = FOUR_CHAR_CODE('carb')
-kDocumentationFolderType = FOUR_CHAR_CODE('info')
-kDeveloperDocsFolderType = FOUR_CHAR_CODE('ddoc')
-kDeveloperHelpFolderType = FOUR_CHAR_CODE('devh')
-kISSDownloadsFolderType = FOUR_CHAR_CODE('issd')
-kUserSpecificTmpFolderType = FOUR_CHAR_CODE('utmp')
-kCachedDataFolderType = FOUR_CHAR_CODE('cach')
-kFrameworksFolderType = FOUR_CHAR_CODE('fram')
-kPrivateFrameworksFolderType = FOUR_CHAR_CODE('pfrm')
-kClassicDesktopFolderType = FOUR_CHAR_CODE('sdsk')
-kDeveloperFolderType = FOUR_CHAR_CODE('devf')
-kSystemSoundsFolderType = FOUR_CHAR_CODE('ssnd')
-kComponentsFolderType = FOUR_CHAR_CODE('cmpd')
-kQuickTimeComponentsFolderType = FOUR_CHAR_CODE('wcmp')
-kCoreServicesFolderType = FOUR_CHAR_CODE('csrv')
-kPictureDocumentsFolderType = FOUR_CHAR_CODE('pdoc')
-kMovieDocumentsFolderType = FOUR_CHAR_CODE('mdoc')
-kMusicDocumentsFolderType = FOUR_CHAR_CODE('\xb5doc')
-kInternetSitesFolderType = FOUR_CHAR_CODE('site')
-kPublicFolderType = FOUR_CHAR_CODE('pubb')
-kAudioSupportFolderType = FOUR_CHAR_CODE('adio')
-kAudioSoundsFolderType = FOUR_CHAR_CODE('asnd')
-kAudioSoundBanksFolderType = FOUR_CHAR_CODE('bank')
-kAudioAlertSoundsFolderType = FOUR_CHAR_CODE('alrt')
-kAudioPlugInsFolderType = FOUR_CHAR_CODE('aplg')
-kAudioComponentsFolderType = FOUR_CHAR_CODE('acmp')
-kKernelExtensionsFolderType = FOUR_CHAR_CODE('kext')
-kDirectoryServicesFolderType = FOUR_CHAR_CODE('dsrv')
-kDirectoryServicesPlugInsFolderType = FOUR_CHAR_CODE('dplg')
-kInstallerReceiptsFolderType = FOUR_CHAR_CODE('rcpt')
-kFileSystemSupportFolderType = FOUR_CHAR_CODE('fsys')
-kAppleShareSupportFolderType = FOUR_CHAR_CODE('shar')
-kAppleShareAuthenticationFolderType = FOUR_CHAR_CODE('auth')
-kMIDIDriversFolderType = FOUR_CHAR_CODE('midi')
-kLocalesFolderType = FOUR_CHAR_CODE('\xc4loc')
-kFindByContentPluginsFolderType = FOUR_CHAR_CODE('fbcp')
-kUsersFolderType = FOUR_CHAR_CODE('usrs')
-kCurrentUserFolderType = FOUR_CHAR_CODE('cusr')
-kCurrentUserRemoteFolderLocation = FOUR_CHAR_CODE('rusf')
-kCurrentUserRemoteFolderType = FOUR_CHAR_CODE('rusr')
-kSharedUserDataFolderType = FOUR_CHAR_CODE('sdat')
-kVolumeSettingsFolderType = FOUR_CHAR_CODE('vsfd')
-kAppleshareAutomountServerAliasesFolderType = FOUR_CHAR_CODE('srv\xc4')
-kPreMacOS91ApplicationsFolderType = FOUR_CHAR_CODE('\x8cpps')
-kPreMacOS91InstallerLogsFolderType = FOUR_CHAR_CODE('\x94lgf')
-kPreMacOS91AssistantsFolderType = FOUR_CHAR_CODE('\x8cst\xc4')
-kPreMacOS91UtilitiesFolderType = FOUR_CHAR_CODE('\x9fti\xc4')
-kPreMacOS91AppleExtrasFolderType = FOUR_CHAR_CODE('\x8cex\xc4')
-kPreMacOS91MacOSReadMesFolderType = FOUR_CHAR_CODE('\xb5or\xc4')
-kPreMacOS91InternetFolderType = FOUR_CHAR_CODE('\x94nt\xc4')
-kPreMacOS91AutomountedServersFolderType = FOUR_CHAR_CODE('\xa7rv\xc4')
-kPreMacOS91StationeryFolderType = FOUR_CHAR_CODE('\xbfdst')
-kCreateFolderAtBoot = 0x00000002
-kCreateFolderAtBootBit = 1
-kFolderCreatedInvisible = 0x00000004
-kFolderCreatedInvisibleBit = 2
-kFolderCreatedNameLocked = 0x00000008
-kFolderCreatedNameLockedBit = 3
-kFolderCreatedAdminPrivs = 0x00000010
-kFolderCreatedAdminPrivsBit = 4
-kFolderInUserFolder = 0x00000020
-kFolderInUserFolderBit = 5
-kFolderTrackedByAlias = 0x00000040
-kFolderTrackedByAliasBit = 6
-kFolderInRemoteUserFolderIfAvailable = 0x00000080
-kFolderInRemoteUserFolderIfAvailableBit = 7
-kFolderNeverMatchedInIdentifyFolder = 0x00000100
-kFolderNeverMatchedInIdentifyFolderBit = 8
-kFolderMustStayOnSameVolume = 0x00000200
-kFolderMustStayOnSameVolumeBit = 9
-kFolderManagerFolderInMacOS9FolderIfMacOSXIsInstalledMask = 0x00000400
-kFolderManagerFolderInMacOS9FolderIfMacOSXIsInstalledBit = 10
-kFolderInLocalOrRemoteUserFolder = kFolderInUserFolder | kFolderInRemoteUserFolderIfAvailable
-kRelativeFolder = FOUR_CHAR_CODE('relf')
-kSpecialFolder = FOUR_CHAR_CODE('spcf')
-kBlessedFolder = FOUR_CHAR_CODE('blsf')
-kRootFolder = FOUR_CHAR_CODE('rotf')
-kCurrentUserFolderLocation = FOUR_CHAR_CODE('cusf')
-kFindFolderRedirectionFlagUseDistinctUserFoldersBit = 0
-kFindFolderRedirectionFlagUseGivenVRefAndDirIDAsUserFolderBit = 1
-kFindFolderRedirectionFlagsUseGivenVRefNumAndDirIDAsRemoteUserFolderBit = 2
-kFolderManagerUserRedirectionGlobalsCurrentVersion = 1
-kFindFolderExtendedFlagsDoNotFollowAliasesBit = 0
-kFindFolderExtendedFlagsDoNotUseUserFolderBit = 1
-kFindFolderExtendedFlagsUseOtherUserRecord = 0x01000000
-kFolderManagerNotificationMessageUserLogIn = FOUR_CHAR_CODE('log+')
-kFolderManagerNotificationMessagePreUserLogIn = FOUR_CHAR_CODE('logj')
-kFolderManagerNotificationMessageUserLogOut = FOUR_CHAR_CODE('log-')
-kFolderManagerNotificationMessagePostUserLogOut = FOUR_CHAR_CODE('logp')
-kFolderManagerNotificationDiscardCachedData = FOUR_CHAR_CODE('dche')
-kFolderManagerNotificationMessageLoginStartup = FOUR_CHAR_CODE('stup')
-kDoNotRemoveWhenCurrentApplicationQuitsBit = 0
-kDoNotRemoveWheCurrentApplicationQuitsBit = kDoNotRemoveWhenCurrentApplicationQuitsBit
-kStopIfAnyNotificationProcReturnsErrorBit = 31
diff --git a/Lib/plat-mac/Carbon/Fonts.py b/Lib/plat-mac/Carbon/Fonts.py
deleted file mode 100644 (file)
index dab3fa2..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-# Generated from 'Fonts.h'
-
-def FOUR_CHAR_CODE(x): return x
-kNilOptions = 0
-systemFont = 0
-applFont = 1
-kFMDefaultOptions = kNilOptions
-kFMDefaultActivationContext = kFMDefaultOptions
-kFMGlobalActivationContext = 0x00000001
-kFMLocalActivationContext = kFMDefaultActivationContext
-kFMDefaultIterationScope = kFMDefaultOptions
-kFMGlobalIterationScope = 0x00000001
-kFMLocalIterationScope = kFMDefaultIterationScope
-kPlatformDefaultGuiFontID = applFont
-kPlatformDefaultGuiFontID = -1
-commandMark = 17
-checkMark = 18
-diamondMark = 19
-appleMark = 20
-propFont = 36864
-prpFntH = 36865
-prpFntW = 36866
-prpFntHW = 36867
-fixedFont = 45056
-fxdFntH = 45057
-fxdFntW = 45058
-fxdFntHW = 45059
-fontWid = 44208
-kFMUseGlobalScopeOption = 0x00000001
-kFontIDNewYork = 2
-kFontIDGeneva = 3
-kFontIDMonaco = 4
-kFontIDVenice = 5
-kFontIDLondon = 6
-kFontIDAthens = 7
-kFontIDSanFrancisco = 8
-kFontIDToronto = 9
-kFontIDCairo = 11
-kFontIDLosAngeles = 12
-kFontIDTimes = 20
-kFontIDHelvetica = 21
-kFontIDCourier = 22
-kFontIDSymbol = 23
-kFontIDMobile = 24
-newYork = kFontIDNewYork
-geneva = kFontIDGeneva
-monaco = kFontIDMonaco
-venice = kFontIDVenice
-london = kFontIDLondon
-athens = kFontIDAthens
-sanFran = kFontIDSanFrancisco
-toronto = kFontIDToronto
-cairo = kFontIDCairo
-losAngeles = kFontIDLosAngeles
-times = kFontIDTimes
-helvetica = kFontIDHelvetica
-courier = kFontIDCourier
-symbol = kFontIDSymbol
-mobile = kFontIDMobile
diff --git a/Lib/plat-mac/Carbon/Help.py b/Lib/plat-mac/Carbon/Help.py
deleted file mode 100644 (file)
index 5fca0d7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Help import *
diff --git a/Lib/plat-mac/Carbon/IBCarbon.py b/Lib/plat-mac/Carbon/IBCarbon.py
deleted file mode 100644 (file)
index 60f0e74..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _IBCarbon import *
diff --git a/Lib/plat-mac/Carbon/IBCarbonRuntime.py b/Lib/plat-mac/Carbon/IBCarbonRuntime.py
deleted file mode 100644 (file)
index 4678018..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# Generated from 'IBCarbonRuntime.h'
-
-kIBCarbonRuntimeCantFindNibFile = -10960
-kIBCarbonRuntimeObjectNotOfRequestedType = -10961
-kIBCarbonRuntimeCantFindObject = -10962
diff --git a/Lib/plat-mac/Carbon/Icn.py b/Lib/plat-mac/Carbon/Icn.py
deleted file mode 100644 (file)
index b04134c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Icn import *
diff --git a/Lib/plat-mac/Carbon/Icons.py b/Lib/plat-mac/Carbon/Icons.py
deleted file mode 100644 (file)
index b5daea2..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-# Generated from 'Icons.h'
-
-def FOUR_CHAR_CODE(x): return x
-from Carbon.Files import *
-kGenericDocumentIconResource = -4000
-kGenericStationeryIconResource = -3985
-kGenericEditionFileIconResource = -3989
-kGenericApplicationIconResource = -3996
-kGenericDeskAccessoryIconResource = -3991
-kGenericFolderIconResource = -3999
-kPrivateFolderIconResource = -3994
-kFloppyIconResource = -3998
-kTrashIconResource = -3993
-kGenericRAMDiskIconResource = -3988
-kGenericCDROMIconResource = -3987
-kDesktopIconResource = -3992
-kOpenFolderIconResource = -3997
-kGenericHardDiskIconResource = -3995
-kGenericFileServerIconResource = -3972
-kGenericSuitcaseIconResource = -3970
-kGenericMoverObjectIconResource = -3969
-kGenericPreferencesIconResource = -3971
-kGenericQueryDocumentIconResource = -16506
-kGenericExtensionIconResource = -16415
-kSystemFolderIconResource = -3983
-kHelpIconResource = -20271
-kAppleMenuFolderIconResource = -3982
-genericDocumentIconResource = kGenericDocumentIconResource
-genericStationeryIconResource = kGenericStationeryIconResource
-genericEditionFileIconResource = kGenericEditionFileIconResource
-genericApplicationIconResource = kGenericApplicationIconResource
-genericDeskAccessoryIconResource = kGenericDeskAccessoryIconResource
-genericFolderIconResource = kGenericFolderIconResource
-privateFolderIconResource = kPrivateFolderIconResource
-floppyIconResource = kFloppyIconResource
-trashIconResource = kTrashIconResource
-genericRAMDiskIconResource = kGenericRAMDiskIconResource
-genericCDROMIconResource = kGenericCDROMIconResource
-desktopIconResource = kDesktopIconResource
-openFolderIconResource = kOpenFolderIconResource
-genericHardDiskIconResource = kGenericHardDiskIconResource
-genericFileServerIconResource = kGenericFileServerIconResource
-genericSuitcaseIconResource = kGenericSuitcaseIconResource
-genericMoverObjectIconResource = kGenericMoverObjectIconResource
-genericPreferencesIconResource = kGenericPreferencesIconResource
-genericQueryDocumentIconResource = kGenericQueryDocumentIconResource
-genericExtensionIconResource = kGenericExtensionIconResource
-systemFolderIconResource = kSystemFolderIconResource
-appleMenuFolderIconResource = kAppleMenuFolderIconResource
-kStartupFolderIconResource = -3981
-kOwnedFolderIconResource = -3980
-kDropFolderIconResource = -3979
-kSharedFolderIconResource = -3978
-kMountedFolderIconResource = -3977
-kControlPanelFolderIconResource = -3976
-kPrintMonitorFolderIconResource = -3975
-kPreferencesFolderIconResource = -3974
-kExtensionsFolderIconResource = -3973
-kFontsFolderIconResource = -3968
-kFullTrashIconResource = -3984
-startupFolderIconResource = kStartupFolderIconResource
-ownedFolderIconResource = kOwnedFolderIconResource
-dropFolderIconResource = kDropFolderIconResource
-sharedFolderIconResource = kSharedFolderIconResource
-mountedFolderIconResource = kMountedFolderIconResource
-controlPanelFolderIconResource = kControlPanelFolderIconResource
-printMonitorFolderIconResource = kPrintMonitorFolderIconResource
-preferencesFolderIconResource = kPreferencesFolderIconResource
-extensionsFolderIconResource = kExtensionsFolderIconResource
-fontsFolderIconResource = kFontsFolderIconResource
-fullTrashIconResource = kFullTrashIconResource
-kThumbnail32BitData = FOUR_CHAR_CODE('it32')
-kThumbnail8BitMask = FOUR_CHAR_CODE('t8mk')
-kHuge1BitMask = FOUR_CHAR_CODE('ich#')
-kHuge4BitData = FOUR_CHAR_CODE('ich4')
-kHuge8BitData = FOUR_CHAR_CODE('ich8')
-kHuge32BitData = FOUR_CHAR_CODE('ih32')
-kHuge8BitMask = FOUR_CHAR_CODE('h8mk')
-kLarge1BitMask = FOUR_CHAR_CODE('ICN#')
-kLarge4BitData = FOUR_CHAR_CODE('icl4')
-kLarge8BitData = FOUR_CHAR_CODE('icl8')
-kLarge32BitData = FOUR_CHAR_CODE('il32')
-kLarge8BitMask = FOUR_CHAR_CODE('l8mk')
-kSmall1BitMask = FOUR_CHAR_CODE('ics#')
-kSmall4BitData = FOUR_CHAR_CODE('ics4')
-kSmall8BitData = FOUR_CHAR_CODE('ics8')
-kSmall32BitData = FOUR_CHAR_CODE('is32')
-kSmall8BitMask = FOUR_CHAR_CODE('s8mk')
-kMini1BitMask = FOUR_CHAR_CODE('icm#')
-kMini4BitData = FOUR_CHAR_CODE('icm4')
-kMini8BitData = FOUR_CHAR_CODE('icm8')
-kTileIconVariant = FOUR_CHAR_CODE('tile')
-kRolloverIconVariant = FOUR_CHAR_CODE('over')
-kDropIconVariant = FOUR_CHAR_CODE('drop')
-kOpenIconVariant = FOUR_CHAR_CODE('open')
-kOpenDropIconVariant = FOUR_CHAR_CODE('odrp')
-large1BitMask = kLarge1BitMask
-large4BitData = kLarge4BitData
-large8BitData = kLarge8BitData
-small1BitMask = kSmall1BitMask
-small4BitData = kSmall4BitData
-small8BitData = kSmall8BitData
-mini1BitMask = kMini1BitMask
-mini4BitData = kMini4BitData
-mini8BitData = kMini8BitData
-kAlignNone = 0x00
-kAlignVerticalCenter = 0x01
-kAlignTop = 0x02
-kAlignBottom = 0x03
-kAlignHorizontalCenter = 0x04
-kAlignAbsoluteCenter = kAlignVerticalCenter | kAlignHorizontalCenter
-kAlignCenterTop = kAlignTop | kAlignHorizontalCenter
-kAlignCenterBottom = kAlignBottom | kAlignHorizontalCenter
-kAlignLeft = 0x08
-kAlignCenterLeft = kAlignVerticalCenter | kAlignLeft
-kAlignTopLeft = kAlignTop | kAlignLeft
-kAlignBottomLeft = kAlignBottom | kAlignLeft
-kAlignRight = 0x0C
-kAlignCenterRight = kAlignVerticalCenter | kAlignRight
-kAlignTopRight = kAlignTop | kAlignRight
-kAlignBottomRight = kAlignBottom | kAlignRight
-atNone = kAlignNone
-atVerticalCenter = kAlignVerticalCenter
-atTop = kAlignTop
-atBottom = kAlignBottom
-atHorizontalCenter = kAlignHorizontalCenter
-atAbsoluteCenter = kAlignAbsoluteCenter
-atCenterTop = kAlignCenterTop
-atCenterBottom = kAlignCenterBottom
-atLeft = kAlignLeft
-atCenterLeft = kAlignCenterLeft
-atTopLeft = kAlignTopLeft
-atBottomLeft = kAlignBottomLeft
-atRight = kAlignRight
-atCenterRight = kAlignCenterRight
-atTopRight = kAlignTopRight
-atBottomRight = kAlignBottomRight
-kTransformNone = 0x00
-kTransformDisabled = 0x01
-kTransformOffline = 0x02
-kTransformOpen = 0x03
-kTransformLabel1 = 0x0100
-kTransformLabel2 = 0x0200
-kTransformLabel3 = 0x0300
-kTransformLabel4 = 0x0400
-kTransformLabel5 = 0x0500
-kTransformLabel6 = 0x0600
-kTransformLabel7 = 0x0700
-kTransformSelected = 0x4000
-kTransformSelectedDisabled = kTransformSelected | kTransformDisabled
-kTransformSelectedOffline = kTransformSelected | kTransformOffline
-kTransformSelectedOpen = kTransformSelected | kTransformOpen
-ttNone = kTransformNone
-ttDisabled = kTransformDisabled
-ttOffline = kTransformOffline
-ttOpen = kTransformOpen
-ttLabel1 = kTransformLabel1
-ttLabel2 = kTransformLabel2
-ttLabel3 = kTransformLabel3
-ttLabel4 = kTransformLabel4
-ttLabel5 = kTransformLabel5
-ttLabel6 = kTransformLabel6
-ttLabel7 = kTransformLabel7
-ttSelected = kTransformSelected
-ttSelectedDisabled = kTransformSelectedDisabled
-ttSelectedOffline = kTransformSelectedOffline
-ttSelectedOpen = kTransformSelectedOpen
-kSelectorLarge1Bit = 0x00000001
-kSelectorLarge4Bit = 0x00000002
-kSelectorLarge8Bit = 0x00000004
-kSelectorLarge32Bit = 0x00000008
-kSelectorLarge8BitMask = 0x00000010
-kSelectorSmall1Bit = 0x00000100
-kSelectorSmall4Bit = 0x00000200
-kSelectorSmall8Bit = 0x00000400
-kSelectorSmall32Bit = 0x00000800
-kSelectorSmall8BitMask = 0x00001000
-kSelectorMini1Bit = 0x00010000
-kSelectorMini4Bit = 0x00020000
-kSelectorMini8Bit = 0x00040000
-kSelectorHuge1Bit = 0x01000000
-kSelectorHuge4Bit = 0x02000000
-kSelectorHuge8Bit = 0x04000000
-kSelectorHuge32Bit = 0x08000000
-kSelectorHuge8BitMask = 0x10000000
-kSelectorAllLargeData = 0x000000FF
-kSelectorAllSmallData = 0x0000FF00
-kSelectorAllMiniData = 0x00FF0000
-# kSelectorAllHugeData = (long)0xFF000000
-kSelectorAll1BitData = kSelectorLarge1Bit | kSelectorSmall1Bit | kSelectorMini1Bit | kSelectorHuge1Bit
-kSelectorAll4BitData = kSelectorLarge4Bit | kSelectorSmall4Bit | kSelectorMini4Bit | kSelectorHuge4Bit
-kSelectorAll8BitData = kSelectorLarge8Bit | kSelectorSmall8Bit | kSelectorMini8Bit | kSelectorHuge8Bit
-kSelectorAll32BitData = kSelectorLarge32Bit | kSelectorSmall32Bit | kSelectorHuge32Bit
-# kSelectorAllAvailableData = (long)0xFFFFFFFF
-svLarge1Bit = kSelectorLarge1Bit
-svLarge4Bit = kSelectorLarge4Bit
-svLarge8Bit = kSelectorLarge8Bit
-svSmall1Bit = kSelectorSmall1Bit
-svSmall4Bit = kSelectorSmall4Bit
-svSmall8Bit = kSelectorSmall8Bit
-svMini1Bit = kSelectorMini1Bit
-svMini4Bit = kSelectorMini4Bit
-svMini8Bit = kSelectorMini8Bit
-svAllLargeData = kSelectorAllLargeData
-svAllSmallData = kSelectorAllSmallData
-svAllMiniData = kSelectorAllMiniData
-svAll1BitData = kSelectorAll1BitData
-svAll4BitData = kSelectorAll4BitData
-svAll8BitData = kSelectorAll8BitData
-# svAllAvailableData = kSelectorAllAvailableData
-kSystemIconsCreator = FOUR_CHAR_CODE('macs')
-# err = GetIconRef(kOnSystemDisk
-kClipboardIcon = FOUR_CHAR_CODE('CLIP')
-kClippingUnknownTypeIcon = FOUR_CHAR_CODE('clpu')
-kClippingPictureTypeIcon = FOUR_CHAR_CODE('clpp')
-kClippingTextTypeIcon = FOUR_CHAR_CODE('clpt')
-kClippingSoundTypeIcon = FOUR_CHAR_CODE('clps')
-kDesktopIcon = FOUR_CHAR_CODE('desk')
-kFinderIcon = FOUR_CHAR_CODE('FNDR')
-kFontSuitcaseIcon = FOUR_CHAR_CODE('FFIL')
-kFullTrashIcon = FOUR_CHAR_CODE('ftrh')
-kGenericApplicationIcon = FOUR_CHAR_CODE('APPL')
-kGenericCDROMIcon = FOUR_CHAR_CODE('cddr')
-kGenericControlPanelIcon = FOUR_CHAR_CODE('APPC')
-kGenericControlStripModuleIcon = FOUR_CHAR_CODE('sdev')
-kGenericComponentIcon = FOUR_CHAR_CODE('thng')
-kGenericDeskAccessoryIcon = FOUR_CHAR_CODE('APPD')
-kGenericDocumentIcon = FOUR_CHAR_CODE('docu')
-kGenericEditionFileIcon = FOUR_CHAR_CODE('edtf')
-kGenericExtensionIcon = FOUR_CHAR_CODE('INIT')
-kGenericFileServerIcon = FOUR_CHAR_CODE('srvr')
-kGenericFontIcon = FOUR_CHAR_CODE('ffil')
-kGenericFontScalerIcon = FOUR_CHAR_CODE('sclr')
-kGenericFloppyIcon = FOUR_CHAR_CODE('flpy')
-kGenericHardDiskIcon = FOUR_CHAR_CODE('hdsk')
-kGenericIDiskIcon = FOUR_CHAR_CODE('idsk')
-kGenericRemovableMediaIcon = FOUR_CHAR_CODE('rmov')
-kGenericMoverObjectIcon = FOUR_CHAR_CODE('movr')
-kGenericPCCardIcon = FOUR_CHAR_CODE('pcmc')
-kGenericPreferencesIcon = FOUR_CHAR_CODE('pref')
-kGenericQueryDocumentIcon = FOUR_CHAR_CODE('qery')
-kGenericRAMDiskIcon = FOUR_CHAR_CODE('ramd')
-kGenericSharedLibaryIcon = FOUR_CHAR_CODE('shlb')
-kGenericStationeryIcon = FOUR_CHAR_CODE('sdoc')
-kGenericSuitcaseIcon = FOUR_CHAR_CODE('suit')
-kGenericURLIcon = FOUR_CHAR_CODE('gurl')
-kGenericWORMIcon = FOUR_CHAR_CODE('worm')
-kInternationalResourcesIcon = FOUR_CHAR_CODE('ifil')
-kKeyboardLayoutIcon = FOUR_CHAR_CODE('kfil')
-kSoundFileIcon = FOUR_CHAR_CODE('sfil')
-kSystemSuitcaseIcon = FOUR_CHAR_CODE('zsys')
-kTrashIcon = FOUR_CHAR_CODE('trsh')
-kTrueTypeFontIcon = FOUR_CHAR_CODE('tfil')
-kTrueTypeFlatFontIcon = FOUR_CHAR_CODE('sfnt')
-kTrueTypeMultiFlatFontIcon = FOUR_CHAR_CODE('ttcf')
-kUserIDiskIcon = FOUR_CHAR_CODE('udsk')
-kInternationResourcesIcon = kInternationalResourcesIcon
-kInternetLocationHTTPIcon = FOUR_CHAR_CODE('ilht')
-kInternetLocationFTPIcon = FOUR_CHAR_CODE('ilft')
-kInternetLocationAppleShareIcon = FOUR_CHAR_CODE('ilaf')
-kInternetLocationAppleTalkZoneIcon = FOUR_CHAR_CODE('ilat')
-kInternetLocationFileIcon = FOUR_CHAR_CODE('ilfi')
-kInternetLocationMailIcon = FOUR_CHAR_CODE('ilma')
-kInternetLocationNewsIcon = FOUR_CHAR_CODE('ilnw')
-kInternetLocationNSLNeighborhoodIcon = FOUR_CHAR_CODE('ilns')
-kInternetLocationGenericIcon = FOUR_CHAR_CODE('ilge')
-kGenericFolderIcon = FOUR_CHAR_CODE('fldr')
-kDropFolderIcon = FOUR_CHAR_CODE('dbox')
-kMountedFolderIcon = FOUR_CHAR_CODE('mntd')
-kOpenFolderIcon = FOUR_CHAR_CODE('ofld')
-kOwnedFolderIcon = FOUR_CHAR_CODE('ownd')
-kPrivateFolderIcon = FOUR_CHAR_CODE('prvf')
-kSharedFolderIcon = FOUR_CHAR_CODE('shfl')
-kSharingPrivsNotApplicableIcon = FOUR_CHAR_CODE('shna')
-kSharingPrivsReadOnlyIcon = FOUR_CHAR_CODE('shro')
-kSharingPrivsReadWriteIcon = FOUR_CHAR_CODE('shrw')
-kSharingPrivsUnknownIcon = FOUR_CHAR_CODE('shuk')
-kSharingPrivsWritableIcon = FOUR_CHAR_CODE('writ')
-kUserFolderIcon = FOUR_CHAR_CODE('ufld')
-kWorkgroupFolderIcon = FOUR_CHAR_CODE('wfld')
-kGuestUserIcon = FOUR_CHAR_CODE('gusr')
-kUserIcon = FOUR_CHAR_CODE('user')
-kOwnerIcon = FOUR_CHAR_CODE('susr')
-kGroupIcon = FOUR_CHAR_CODE('grup')
-kAppearanceFolderIcon = FOUR_CHAR_CODE('appr')
-kAppleExtrasFolderIcon = FOUR_CHAR_CODE('aex\xc4')
-kAppleMenuFolderIcon = FOUR_CHAR_CODE('amnu')
-kApplicationsFolderIcon = FOUR_CHAR_CODE('apps')
-kApplicationSupportFolderIcon = FOUR_CHAR_CODE('asup')
-kAssistantsFolderIcon = FOUR_CHAR_CODE('ast\xc4')
-kColorSyncFolderIcon = FOUR_CHAR_CODE('prof')
-kContextualMenuItemsFolderIcon = FOUR_CHAR_CODE('cmnu')
-kControlPanelDisabledFolderIcon = FOUR_CHAR_CODE('ctrD')
-kControlPanelFolderIcon = FOUR_CHAR_CODE('ctrl')
-kControlStripModulesFolderIcon = FOUR_CHAR_CODE('sdv\xc4')
-kDocumentsFolderIcon = FOUR_CHAR_CODE('docs')
-kExtensionsDisabledFolderIcon = FOUR_CHAR_CODE('extD')
-kExtensionsFolderIcon = FOUR_CHAR_CODE('extn')
-kFavoritesFolderIcon = FOUR_CHAR_CODE('favs')
-kFontsFolderIcon = FOUR_CHAR_CODE('font')
-kHelpFolderIcon = FOUR_CHAR_CODE('\xc4hlp')
-kInternetFolderIcon = FOUR_CHAR_CODE('int\xc4')
-kInternetPlugInFolderIcon = FOUR_CHAR_CODE('\xc4net')
-kInternetSearchSitesFolderIcon = FOUR_CHAR_CODE('issf')
-kLocalesFolderIcon = FOUR_CHAR_CODE('\xc4loc')
-kMacOSReadMeFolderIcon = FOUR_CHAR_CODE('mor\xc4')
-kPublicFolderIcon = FOUR_CHAR_CODE('pubf')
-kPreferencesFolderIcon = FOUR_CHAR_CODE('prf\xc4')
-kPrinterDescriptionFolderIcon = FOUR_CHAR_CODE('ppdf')
-kPrinterDriverFolderIcon = FOUR_CHAR_CODE('\xc4prd')
-kPrintMonitorFolderIcon = FOUR_CHAR_CODE('prnt')
-kRecentApplicationsFolderIcon = FOUR_CHAR_CODE('rapp')
-kRecentDocumentsFolderIcon = FOUR_CHAR_CODE('rdoc')
-kRecentServersFolderIcon = FOUR_CHAR_CODE('rsrv')
-kScriptingAdditionsFolderIcon = FOUR_CHAR_CODE('\xc4scr')
-kSharedLibrariesFolderIcon = FOUR_CHAR_CODE('\xc4lib')
-kScriptsFolderIcon = FOUR_CHAR_CODE('scr\xc4')
-kShutdownItemsDisabledFolderIcon = FOUR_CHAR_CODE('shdD')
-kShutdownItemsFolderIcon = FOUR_CHAR_CODE('shdf')
-kSpeakableItemsFolder = FOUR_CHAR_CODE('spki')
-kStartupItemsDisabledFolderIcon = FOUR_CHAR_CODE('strD')
-kStartupItemsFolderIcon = FOUR_CHAR_CODE('strt')
-kSystemExtensionDisabledFolderIcon = FOUR_CHAR_CODE('macD')
-kSystemFolderIcon = FOUR_CHAR_CODE('macs')
-kTextEncodingsFolderIcon = FOUR_CHAR_CODE('\xc4tex')
-kUsersFolderIcon = FOUR_CHAR_CODE('usr\xc4')
-kUtilitiesFolderIcon = FOUR_CHAR_CODE('uti\xc4')
-kVoicesFolderIcon = FOUR_CHAR_CODE('fvoc')
-kSystemFolderXIcon = FOUR_CHAR_CODE('macx')
-kAppleScriptBadgeIcon = FOUR_CHAR_CODE('scrp')
-kLockedBadgeIcon = FOUR_CHAR_CODE('lbdg')
-kMountedBadgeIcon = FOUR_CHAR_CODE('mbdg')
-kSharedBadgeIcon = FOUR_CHAR_CODE('sbdg')
-kAliasBadgeIcon = FOUR_CHAR_CODE('abdg')
-kAlertCautionBadgeIcon = FOUR_CHAR_CODE('cbdg')
-kAlertNoteIcon = FOUR_CHAR_CODE('note')
-kAlertCautionIcon = FOUR_CHAR_CODE('caut')
-kAlertStopIcon = FOUR_CHAR_CODE('stop')
-kAppleTalkIcon = FOUR_CHAR_CODE('atlk')
-kAppleTalkZoneIcon = FOUR_CHAR_CODE('atzn')
-kAFPServerIcon = FOUR_CHAR_CODE('afps')
-kFTPServerIcon = FOUR_CHAR_CODE('ftps')
-kHTTPServerIcon = FOUR_CHAR_CODE('htps')
-kGenericNetworkIcon = FOUR_CHAR_CODE('gnet')
-kIPFileServerIcon = FOUR_CHAR_CODE('isrv')
-kToolbarCustomizeIcon = FOUR_CHAR_CODE('tcus')
-kToolbarDeleteIcon = FOUR_CHAR_CODE('tdel')
-kToolbarFavoritesIcon = FOUR_CHAR_CODE('tfav')
-kToolbarHomeIcon = FOUR_CHAR_CODE('thom')
-kAppleLogoIcon = FOUR_CHAR_CODE('capl')
-kAppleMenuIcon = FOUR_CHAR_CODE('sapl')
-kBackwardArrowIcon = FOUR_CHAR_CODE('baro')
-kFavoriteItemsIcon = FOUR_CHAR_CODE('favr')
-kForwardArrowIcon = FOUR_CHAR_CODE('faro')
-kGridIcon = FOUR_CHAR_CODE('grid')
-kHelpIcon = FOUR_CHAR_CODE('help')
-kKeepArrangedIcon = FOUR_CHAR_CODE('arng')
-kLockedIcon = FOUR_CHAR_CODE('lock')
-kNoFilesIcon = FOUR_CHAR_CODE('nfil')
-kNoFolderIcon = FOUR_CHAR_CODE('nfld')
-kNoWriteIcon = FOUR_CHAR_CODE('nwrt')
-kProtectedApplicationFolderIcon = FOUR_CHAR_CODE('papp')
-kProtectedSystemFolderIcon = FOUR_CHAR_CODE('psys')
-kRecentItemsIcon = FOUR_CHAR_CODE('rcnt')
-kShortcutIcon = FOUR_CHAR_CODE('shrt')
-kSortAscendingIcon = FOUR_CHAR_CODE('asnd')
-kSortDescendingIcon = FOUR_CHAR_CODE('dsnd')
-kUnlockedIcon = FOUR_CHAR_CODE('ulck')
-kConnectToIcon = FOUR_CHAR_CODE('cnct')
-kGenericWindowIcon = FOUR_CHAR_CODE('gwin')
-kQuestionMarkIcon = FOUR_CHAR_CODE('ques')
-kDeleteAliasIcon = FOUR_CHAR_CODE('dali')
-kEjectMediaIcon = FOUR_CHAR_CODE('ejec')
-kBurningIcon = FOUR_CHAR_CODE('burn')
-kRightContainerArrowIcon = FOUR_CHAR_CODE('rcar')
-kIconServicesNormalUsageFlag = 0
-kIconServicesCatalogInfoMask = (kFSCatInfoNodeID | kFSCatInfoParentDirID | kFSCatInfoVolume | kFSCatInfoNodeFlags | kFSCatInfoFinderInfo | kFSCatInfoFinderXInfo | kFSCatInfoUserAccess)
-kPlotIconRefNormalFlags = 0
-kPlotIconRefNoImage = (1 << 1)
-kPlotIconRefNoMask = (1 << 2)
-kIconFamilyType = FOUR_CHAR_CODE('icns')
diff --git a/Lib/plat-mac/Carbon/Launch.py b/Lib/plat-mac/Carbon/Launch.py
deleted file mode 100644 (file)
index e553f8f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Launch import *
diff --git a/Lib/plat-mac/Carbon/LaunchServices.py b/Lib/plat-mac/Carbon/LaunchServices.py
deleted file mode 100644 (file)
index daff446..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-# Generated from 'LaunchServices.h'
-
-def FOUR_CHAR_CODE(x): return x
-from Carbon.Files import *
-kLSRequestAllInfo = -1
-kLSRolesAll = -1
-kLSUnknownType = FOUR_CHAR_CODE('\0\0\0\0')
-kLSUnknownCreator = FOUR_CHAR_CODE('\0\0\0\0')
-kLSInvalidExtensionIndex = -1
-kLSUnknownErr = -10810
-kLSNotAnApplicationErr = -10811
-kLSNotInitializedErr = -10812
-kLSDataUnavailableErr = -10813
-kLSApplicationNotFoundErr = -10814
-kLSUnknownTypeErr = -10815
-kLSDataTooOldErr = -10816
-kLSDataErr = -10817
-kLSLaunchInProgressErr = -10818
-kLSNotRegisteredErr = -10819
-kLSAppDoesNotClaimTypeErr = -10820
-kLSAppDoesNotSupportSchemeWarning = -10821
-kLSServerCommunicationErr = -10822
-kLSCannotSetInfoErr = -10823
-kLSInitializeDefaults = 0x00000001
-kLSMinCatInfoBitmap = (kFSCatInfoNodeFlags | kFSCatInfoParentDirID | kFSCatInfoFinderInfo | kFSCatInfoFinderXInfo)
-# kLSInvalidExtensionIndex = (unsigned long)0xFFFFFFFF
-kLSRequestExtension = 0x00000001
-kLSRequestTypeCreator = 0x00000002
-kLSRequestBasicFlagsOnly = 0x00000004
-kLSRequestAppTypeFlags = 0x00000008
-kLSRequestAllFlags = 0x00000010
-kLSRequestIconAndKind = 0x00000020
-kLSRequestExtensionFlagsOnly = 0x00000040
-# kLSRequestAllInfo = (unsigned long)0xFFFFFFFF
-kLSItemInfoIsPlainFile = 0x00000001
-kLSItemInfoIsPackage = 0x00000002
-kLSItemInfoIsApplication = 0x00000004
-kLSItemInfoIsContainer = 0x00000008
-kLSItemInfoIsAliasFile = 0x00000010
-kLSItemInfoIsSymlink = 0x00000020
-kLSItemInfoIsInvisible = 0x00000040
-kLSItemInfoIsNativeApp = 0x00000080
-kLSItemInfoIsClassicApp = 0x00000100
-kLSItemInfoAppPrefersNative = 0x00000200
-kLSItemInfoAppPrefersClassic = 0x00000400
-kLSItemInfoAppIsScriptable = 0x00000800
-kLSItemInfoIsVolume = 0x00001000
-kLSItemInfoExtensionIsHidden = 0x00100000
-kLSRolesNone = 0x00000001
-kLSRolesViewer = 0x00000002
-kLSRolesEditor = 0x00000004
-# kLSRolesAll = (unsigned long)0xFFFFFFFF
-kLSUnknownKindID = 0
-# kLSUnknownType = 0
-# kLSUnknownCreator = 0
-kLSAcceptDefault = 0x00000001
-kLSAcceptAllowLoginUI = 0x00000002
-kLSLaunchDefaults = 0x00000001
-kLSLaunchAndPrint = 0x00000002
-kLSLaunchReserved2 = 0x00000004
-kLSLaunchReserved3 = 0x00000008
-kLSLaunchReserved4 = 0x00000010
-kLSLaunchReserved5 = 0x00000020
-kLSLaunchReserved6 = 0x00000040
-kLSLaunchInhibitBGOnly = 0x00000080
-kLSLaunchDontAddToRecents = 0x00000100
-kLSLaunchDontSwitch = 0x00000200
-kLSLaunchNoParams = 0x00000800
-kLSLaunchAsync = 0x00010000
-kLSLaunchStartClassic = 0x00020000
-kLSLaunchInClassic = 0x00040000
-kLSLaunchNewInstance = 0x00080000
-kLSLaunchAndHide = 0x00100000
-kLSLaunchAndHideOthers = 0x00200000
diff --git a/Lib/plat-mac/Carbon/List.py b/Lib/plat-mac/Carbon/List.py
deleted file mode 100644 (file)
index b0d6e22..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _List import *
diff --git a/Lib/plat-mac/Carbon/Lists.py b/Lib/plat-mac/Carbon/Lists.py
deleted file mode 100644 (file)
index 723294c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# Generated from 'Lists.h'
-
-def FOUR_CHAR_CODE(x): return x
-listNotifyNothing = FOUR_CHAR_CODE('nada')
-listNotifyClick = FOUR_CHAR_CODE('clik')
-listNotifyDoubleClick = FOUR_CHAR_CODE('dblc')
-listNotifyPreClick = FOUR_CHAR_CODE('pclk')
-lDrawingModeOffBit = 3
-lDoVAutoscrollBit = 1
-lDoHAutoscrollBit = 0
-lDrawingModeOff = 8
-lDoVAutoscroll = 2
-lDoHAutoscroll = 1
-lOnlyOneBit = 7
-lExtendDragBit = 6
-lNoDisjointBit = 5
-lNoExtendBit = 4
-lNoRectBit = 3
-lUseSenseBit = 2
-lNoNilHiliteBit = 1
-lOnlyOne = -128
-lExtendDrag = 64
-lNoDisjoint = 32
-lNoExtend = 16
-lNoRect = 8
-lUseSense = 4
-lNoNilHilite = 2
-lInitMsg = 0
-lDrawMsg = 1
-lHiliteMsg = 2
-lCloseMsg = 3
-kListDefProcPtr = 0
-kListDefUserProcType = kListDefProcPtr
-kListDefStandardTextType = 1
-kListDefStandardIconType = 2
diff --git a/Lib/plat-mac/Carbon/MacHelp.py b/Lib/plat-mac/Carbon/MacHelp.py
deleted file mode 100644 (file)
index 06b9912..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-# Generated from 'MacHelp.h'
-
-def FOUR_CHAR_CODE(x): return x
-kMacHelpVersion = 0x0003
-kHMSupplyContent = 0
-kHMDisposeContent = 1
-kHMNoContent = FOUR_CHAR_CODE('none')
-kHMCFStringContent = FOUR_CHAR_CODE('cfst')
-kHMPascalStrContent = FOUR_CHAR_CODE('pstr')
-kHMStringResContent = FOUR_CHAR_CODE('str#')
-kHMTEHandleContent = FOUR_CHAR_CODE('txth')
-kHMTextResContent = FOUR_CHAR_CODE('text')
-kHMStrResContent = FOUR_CHAR_CODE('str ')
-kHMDefaultSide = 0
-kHMOutsideTopScriptAligned = 1
-kHMOutsideLeftCenterAligned = 2
-kHMOutsideBottomScriptAligned = 3
-kHMOutsideRightCenterAligned = 4
-kHMOutsideTopLeftAligned = 5
-kHMOutsideTopRightAligned = 6
-kHMOutsideLeftTopAligned = 7
-kHMOutsideLeftBottomAligned = 8
-kHMOutsideBottomLeftAligned = 9
-kHMOutsideBottomRightAligned = 10
-kHMOutsideRightTopAligned = 11
-kHMOutsideRightBottomAligned = 12
-kHMOutsideTopCenterAligned = 13
-kHMOutsideBottomCenterAligned = 14
-kHMInsideRightCenterAligned = 15
-kHMInsideLeftCenterAligned = 16
-kHMInsideBottomCenterAligned = 17
-kHMInsideTopCenterAligned = 18
-kHMInsideTopLeftCorner = 19
-kHMInsideTopRightCorner = 20
-kHMInsideBottomLeftCorner = 21
-kHMInsideBottomRightCorner = 22
-kHMAbsoluteCenterAligned = 23
-kHMTopSide = kHMOutsideTopScriptAligned
-kHMLeftSide = kHMOutsideLeftCenterAligned
-kHMBottomSide = kHMOutsideBottomScriptAligned
-kHMRightSide = kHMOutsideRightCenterAligned
-kHMTopLeftCorner = kHMOutsideTopLeftAligned
-kHMTopRightCorner = kHMOutsideTopRightAligned
-kHMLeftTopCorner = kHMOutsideLeftTopAligned
-kHMLeftBottomCorner = kHMOutsideLeftBottomAligned
-kHMBottomLeftCorner = kHMOutsideBottomLeftAligned
-kHMBottomRightCorner = kHMOutsideBottomRightAligned
-kHMRightTopCorner = kHMOutsideRightTopAligned
-kHMRightBottomCorner = kHMOutsideRightBottomAligned
-kHMContentProvided = 0
-kHMContentNotProvided = 1
-kHMContentNotProvidedDontPropagate = 2
-kHMMinimumContentIndex = 0
-kHMMaximumContentIndex = 1
-errHMIllegalContentForMinimumState = -10980
-errHMIllegalContentForMaximumState = -10981
-kHMIllegalContentForMinimumState = errHMIllegalContentForMinimumState
-kHelpTagEventHandlerTag = FOUR_CHAR_CODE('hevt')
diff --git a/Lib/plat-mac/Carbon/MacTextEditor.py b/Lib/plat-mac/Carbon/MacTextEditor.py
deleted file mode 100644 (file)
index aa8a12e..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-# Generated from 'MacTextEditor.h'
-
-
-def FOUR_CHAR_CODE(x): return x
-false = 0
-true = 1
-kTXNClearThisControl = 0xFFFFFFFF
-kTXNClearTheseFontFeatures = 0x80000000
-kTXNDontCareTypeSize = 0xFFFFFFFF
-kTXNDecrementTypeSize = 0x80000000
-kTXNUseCurrentSelection = 0xFFFFFFFF
-kTXNStartOffset = 0
-kTXNEndOffset = 0x7FFFFFFF
-MovieFileType = FOUR_CHAR_CODE('moov')
-kTXNUseEncodingWordRulesMask = 0x80000000
-kTXNFontSizeAttributeSize = 4
-normal = 0
-kTXNWillDefaultToATSUIBit = 0
-kTXNWillDefaultToCarbonEventBit = 1
-kTXNWillDefaultToATSUIMask = 1 << kTXNWillDefaultToATSUIBit
-kTXNWillDefaultToCarbonEventMask = 1 << kTXNWillDefaultToCarbonEventBit
-kTXNWantMoviesBit = 0
-kTXNWantSoundBit = 1
-kTXNWantGraphicsBit = 2
-kTXNAlwaysUseQuickDrawTextBit = 3
-kTXNUseTemporaryMemoryBit = 4
-kTXNWantMoviesMask = 1 << kTXNWantMoviesBit
-kTXNWantSoundMask = 1 << kTXNWantSoundBit
-kTXNWantGraphicsMask = 1 << kTXNWantGraphicsBit
-kTXNAlwaysUseQuickDrawTextMask = 1 << kTXNAlwaysUseQuickDrawTextBit
-kTXNUseTemporaryMemoryMask = 1 << kTXNUseTemporaryMemoryBit
-kTXNDrawGrowIconBit = 0
-kTXNShowWindowBit = 1
-kTXNWantHScrollBarBit = 2
-kTXNWantVScrollBarBit = 3
-kTXNNoTSMEverBit = 4
-kTXNReadOnlyBit = 5
-kTXNNoKeyboardSyncBit = 6
-kTXNNoSelectionBit = 7
-kTXNSaveStylesAsSTYLResourceBit = 8
-kOutputTextInUnicodeEncodingBit = 9
-kTXNDoNotInstallDragProcsBit = 10
-kTXNAlwaysWrapAtViewEdgeBit = 11
-kTXNDontDrawCaretWhenInactiveBit = 12
-kTXNDontDrawSelectionWhenInactiveBit = 13
-kTXNSingleLineOnlyBit = 14
-kTXNDisableDragAndDropBit = 15
-kTXNUseQDforImagingBit = 16
-kTXNDrawGrowIconMask = 1 << kTXNDrawGrowIconBit
-kTXNShowWindowMask = 1 << kTXNShowWindowBit
-kTXNWantHScrollBarMask = 1 << kTXNWantHScrollBarBit
-kTXNWantVScrollBarMask = 1 << kTXNWantVScrollBarBit
-kTXNNoTSMEverMask = 1 << kTXNNoTSMEverBit
-kTXNReadOnlyMask = 1 << kTXNReadOnlyBit
-kTXNNoKeyboardSyncMask = 1 << kTXNNoKeyboardSyncBit
-kTXNNoSelectionMask = 1 << kTXNNoSelectionBit
-kTXNSaveStylesAsSTYLResourceMask = 1 << kTXNSaveStylesAsSTYLResourceBit
-kOutputTextInUnicodeEncodingMask = 1 << kOutputTextInUnicodeEncodingBit
-kTXNDoNotInstallDragProcsMask = 1 << kTXNDoNotInstallDragProcsBit
-kTXNAlwaysWrapAtViewEdgeMask = 1 << kTXNAlwaysWrapAtViewEdgeBit
-kTXNDontDrawCaretWhenInactiveMask = 1 << kTXNDontDrawCaretWhenInactiveBit
-kTXNDontDrawSelectionWhenInactiveMask = 1 << kTXNDontDrawSelectionWhenInactiveBit
-kTXNSingleLineOnlyMask = 1 << kTXNSingleLineOnlyBit
-kTXNDisableDragAndDropMask = 1 << kTXNDisableDragAndDropBit
-kTXNUseQDforImagingMask = 1 << kTXNUseQDforImagingBit
-kTXNSetFlushnessBit = 0
-kTXNSetJustificationBit = 1
-kTXNUseFontFallBackBit = 2
-kTXNRotateTextBit = 3
-kTXNUseVerticalTextBit = 4
-kTXNDontUpdateBoxRectBit = 5
-kTXNDontDrawTextBit = 6
-kTXNUseCGContextRefBit = 7
-kTXNImageWithQDBit = 8
-kTXNDontWrapTextBit = 9
-kTXNSetFlushnessMask = 1 << kTXNSetFlushnessBit
-kTXNSetJustificationMask = 1 << kTXNSetJustificationBit
-kTXNUseFontFallBackMask = 1 << kTXNUseFontFallBackBit
-kTXNRotateTextMask = 1 << kTXNRotateTextBit
-kTXNUseVerticalTextMask = 1 << kTXNUseVerticalTextBit
-kTXNDontUpdateBoxRectMask = 1 << kTXNDontUpdateBoxRectBit
-kTXNDontDrawTextMask = 1 << kTXNDontDrawTextBit
-kTXNUseCGContextRefMask = 1 << kTXNUseCGContextRefBit
-kTXNImageWithQDMask = 1 << kTXNImageWithQDBit
-kTXNDontWrapTextMask = 1 << kTXNDontWrapTextBit
-kTXNFontContinuousBit = 0
-kTXNSizeContinuousBit = 1
-kTXNStyleContinuousBit = 2
-kTXNColorContinuousBit = 3
-kTXNFontContinuousMask = 1 << kTXNFontContinuousBit
-kTXNSizeContinuousMask = 1 << kTXNSizeContinuousBit
-kTXNStyleContinuousMask = 1 << kTXNStyleContinuousBit
-kTXNColorContinuousMask = 1 << kTXNColorContinuousBit
-kTXNIgnoreCaseBit = 0
-kTXNEntireWordBit = 1
-kTXNUseEncodingWordRulesBit = 31
-kTXNIgnoreCaseMask = 1 << kTXNIgnoreCaseBit
-kTXNEntireWordMask = 1 << kTXNEntireWordBit
-# kTXNUseEncodingWordRulesMask = (unsigned long)(1L << kTXNUseEncodingWordRulesBit)
-kTXNTextensionFile = FOUR_CHAR_CODE('txtn')
-kTXNTextFile = FOUR_CHAR_CODE('TEXT')
-kTXNPictureFile = FOUR_CHAR_CODE('PICT')
-kTXNMovieFile = FOUR_CHAR_CODE('MooV')
-kTXNSoundFile = FOUR_CHAR_CODE('sfil')
-kTXNAIFFFile = FOUR_CHAR_CODE('AIFF')
-kTXNUnicodeTextFile = FOUR_CHAR_CODE('utxt')
-kTXNTextEditStyleFrameType = 1
-kTXNPageFrameType = 2
-kTXNMultipleFrameType = 3
-kTXNTextData = FOUR_CHAR_CODE('TEXT')
-kTXNPictureData = FOUR_CHAR_CODE('PICT')
-kTXNMovieData = FOUR_CHAR_CODE('moov')
-kTXNSoundData = FOUR_CHAR_CODE('snd ')
-kTXNUnicodeTextData = FOUR_CHAR_CODE('utxt')
-kTXNLineDirectionTag = FOUR_CHAR_CODE('lndr')
-kTXNJustificationTag = FOUR_CHAR_CODE('just')
-kTXNIOPrivilegesTag = FOUR_CHAR_CODE('iopv')
-kTXNSelectionStateTag = FOUR_CHAR_CODE('slst')
-kTXNInlineStateTag = FOUR_CHAR_CODE('inst')
-kTXNWordWrapStateTag = FOUR_CHAR_CODE('wwrs')
-kTXNKeyboardSyncStateTag = FOUR_CHAR_CODE('kbsy')
-kTXNAutoIndentStateTag = FOUR_CHAR_CODE('auin')
-kTXNTabSettingsTag = FOUR_CHAR_CODE('tabs')
-kTXNRefConTag = FOUR_CHAR_CODE('rfcn')
-kTXNMarginsTag = FOUR_CHAR_CODE('marg')
-kTXNFlattenMoviesTag = FOUR_CHAR_CODE('flat')
-kTXNDoFontSubstitution = FOUR_CHAR_CODE('fSub')
-kTXNNoUserIOTag = FOUR_CHAR_CODE('nuio')
-kTXNUseCarbonEvents = FOUR_CHAR_CODE('cbcb')
-kTXNDrawCaretWhenInactiveTag = FOUR_CHAR_CODE('dcrt')
-kTXNDrawSelectionWhenInactiveTag = FOUR_CHAR_CODE('dsln')
-kTXNDisableDragAndDropTag = FOUR_CHAR_CODE('drag')
-kTXNTypingAction = 0
-kTXNCutAction = 1
-kTXNPasteAction = 2
-kTXNClearAction = 3
-kTXNChangeFontAction = 4
-kTXNChangeFontColorAction = 5
-kTXNChangeFontSizeAction = 6
-kTXNChangeStyleAction = 7
-kTXNAlignLeftAction = 8
-kTXNAlignCenterAction = 9
-kTXNAlignRightAction = 10
-kTXNDropAction = 11
-kTXNMoveAction = 12
-kTXNFontFeatureAction = 13
-kTXNFontVariationAction = 14
-kTXNUndoLastAction = 1024
-# kTXNClearThisControl = (long)0xFFFFFFFF
-# kTXNClearTheseFontFeatures = (long)0x80000000
-kTXNReadWrite = false
-kTXNReadOnly = true
-kTXNSelectionOn = true
-kTXNSelectionOff = false
-kTXNUseInline = false
-kTXNUseBottomline = true
-kTXNAutoWrap = false
-kTXNNoAutoWrap = true
-kTXNSyncKeyboard = false
-kTXNNoSyncKeyboard = true
-kTXNAutoIndentOff = false
-kTXNAutoIndentOn = true
-kTXNDontDrawCaretWhenInactive = false
-kTXNDrawCaretWhenInactive = true
-kTXNDontDrawSelectionWhenInactive = false
-kTXNDrawSelectionWhenInactive = true
-kTXNEnableDragAndDrop = false
-kTXNDisableDragAndDrop = true
-kTXNRightTab = -1
-kTXNLeftTab = 0
-kTXNCenterTab = 1
-kTXNLeftToRight = 0
-kTXNRightToLeft = 1
-kTXNFlushDefault = 0
-kTXNFlushLeft = 1
-kTXNFlushRight = 2
-kTXNCenter = 4
-kTXNFullJust = 8
-kTXNForceFullJust = 16
-kScrollBarsAlwaysActive = true
-kScrollBarsSyncWithFocus = false
-# kTXNDontCareTypeSize = (long)0xFFFFFFFF
-kTXNDontCareTypeStyle = 0xFF
-kTXNIncrementTypeSize = 0x00000001
-# kTXNDecrementTypeSize = (long)0x80000000
-kTXNUseScriptDefaultValue = -1
-kTXNNoFontVariations = 0x7FFF
-# kTXNUseCurrentSelection = (unsigned long)0xFFFFFFFF
-# kTXNStartOffset = 0
-# kTXNEndOffset = 0x7FFFFFFF
-kTXNSingleStylePerTextDocumentResType = FOUR_CHAR_CODE('MPSR')
-kTXNMultipleStylesPerTextDocumentResType = FOUR_CHAR_CODE('styl')
-kTXNShowStart = false
-kTXNShowEnd = true
-kTXNDefaultFontName = 0
-kTXNDefaultFontSize = 0x000C0000
-kTXNDefaultFontStyle = normal
-kTXNQDFontNameAttribute = FOUR_CHAR_CODE('fntn')
-kTXNQDFontFamilyIDAttribute = FOUR_CHAR_CODE('font')
-kTXNQDFontSizeAttribute = FOUR_CHAR_CODE('size')
-kTXNQDFontStyleAttribute = FOUR_CHAR_CODE('face')
-kTXNQDFontColorAttribute = FOUR_CHAR_CODE('klor')
-kTXNTextEncodingAttribute = FOUR_CHAR_CODE('encd')
-kTXNATSUIFontFeaturesAttribute = FOUR_CHAR_CODE('atfe')
-kTXNATSUIFontVariationsAttribute = FOUR_CHAR_CODE('atva')
-# kTXNQDFontNameAttributeSize = sizeof(Str255)
-# kTXNQDFontFamilyIDAttributeSize = sizeof(SInt16)
-# kTXNQDFontSizeAttributeSize = sizeof(SInt16)
-# kTXNQDFontStyleAttributeSize = sizeof(Style)
-# kTXNQDFontColorAttributeSize = sizeof(RGBColor)
-# kTXNTextEncodingAttributeSize = sizeof(TextEncoding)
-# kTXNFontSizeAttributeSize = sizeof(Fixed)
-kTXNSystemDefaultEncoding = 0
-kTXNMacOSEncoding = 1
-kTXNUnicodeEncoding = 2
-kTXNBackgroundTypeRGB = 1
-kTXNTextInputCountBit = 0
-kTXNRunCountBit = 1
-kTXNTextInputCountMask = 1 << kTXNTextInputCountBit
-kTXNRunCountMask = 1 << kTXNRunCountBit
-kTXNAllCountMask = kTXNTextInputCountMask | kTXNRunCountMask
-kTXNNoAppleEventHandlersBit = 0
-kTXNRestartAppleEventHandlersBit = 1
-kTXNNoAppleEventHandlersMask = 1 << kTXNNoAppleEventHandlersBit
-kTXNRestartAppleEventHandlersMask = 1 << kTXNRestartAppleEventHandlersBit
-# status = TXNInitTextension( &defaults
diff --git a/Lib/plat-mac/Carbon/MediaDescr.py b/Lib/plat-mac/Carbon/MediaDescr.py
deleted file mode 100644 (file)
index 4a40062..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-# Parsers/generators for QuickTime media descriptions
-import struct
-
-Error = 'MediaDescr.Error'
-
-class _MediaDescriptionCodec:
-    def __init__(self, trunc, size, names, fmt):
-        self.trunc = trunc
-        self.size = size
-        self.names = names
-        self.fmt = fmt
-
-    def decode(self, data):
-        if self.trunc:
-            data = data[:self.size]
-        values = struct.unpack(self.fmt, data)
-        if len(values) != len(self.names):
-            raise Error('Format length does not match number of names', descr)
-        rv = {}
-        for i in range(len(values)):
-            name = self.names[i]
-            value = values[i]
-            if type(name) == type(()):
-                name, cod, dec = name
-                value = dec(value)
-            rv[name] = value
-        return rv
-
-    def encode(dict):
-        list = [self.fmt]
-        for name in self.names:
-            if type(name) == type(()):
-                name, cod, dec = name
-            else:
-                cod = dec = None
-            value = dict[name]
-            if cod:
-                value = cod(value)
-            list.append(value)
-        rv = struct.pack(*list)
-        return rv
-
-# Helper functions
-def _tofixed(float):
-    hi = int(float)
-    lo = int(float*0x10000) & 0xffff
-    return (hi<<16)|lo
-
-def _fromfixed(fixed):
-    hi = (fixed >> 16) & 0xffff
-    lo = (fixed & 0xffff)
-    return hi + (lo / float(0x10000))
-
-def _tostr31(str):
-    return chr(len(str)) + str + '\0'*(31-len(str))
-
-def _fromstr31(str31):
-    return str31[1:1+ord(str31[0])]
-
-SampleDescription = _MediaDescriptionCodec(
-        1,      # May be longer, truncate
-        16,     # size
-        ('descSize', 'dataFormat', 'resvd1', 'resvd2', 'dataRefIndex'), # Attributes
-        "l4slhh"        # Format
-)
-
-SoundDescription = _MediaDescriptionCodec(
-        1,
-        36,
-        ('descSize', 'dataFormat', 'resvd1', 'resvd2', 'dataRefIndex',
-        'version', 'revlevel', 'vendor', 'numChannels', 'sampleSize',
-        'compressionID', 'packetSize', ('sampleRate', _tofixed, _fromfixed)),
-        "l4slhhhh4shhhhl"       # Format
-)
-
-SoundDescriptionV1 = _MediaDescriptionCodec(
-        1,
-        52,
-        ('descSize', 'dataFormat', 'resvd1', 'resvd2', 'dataRefIndex',
-        'version', 'revlevel', 'vendor', 'numChannels', 'sampleSize',
-        'compressionID', 'packetSize', ('sampleRate', _tofixed, _fromfixed), 'samplesPerPacket',
-        'bytesPerPacket', 'bytesPerFrame', 'bytesPerSample'),
-        "l4slhhhh4shhhhlllll"   # Format
-)
-
-ImageDescription = _MediaDescriptionCodec(
-        1,      # May be longer, truncate
-        86,     # size
-        ('idSize', 'cType', 'resvd1', 'resvd2', 'dataRefIndex', 'version',
-         'revisionLevel', 'vendor', 'temporalQuality', 'spatialQuality',
-         'width', 'height', ('hRes', _tofixed, _fromfixed), ('vRes', _tofixed, _fromfixed),
-        'dataSize', 'frameCount', ('name', _tostr31, _fromstr31),
-         'depth', 'clutID'),
-        'l4slhhhh4sllhhlllh32shh',
-)
-
-# XXXX Others, like TextDescription and such, remain to be done.
diff --git a/Lib/plat-mac/Carbon/Menu.py b/Lib/plat-mac/Carbon/Menu.py
deleted file mode 100644 (file)
index 075cb9d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Menu import *
diff --git a/Lib/plat-mac/Carbon/Menus.py b/Lib/plat-mac/Carbon/Menus.py
deleted file mode 100644 (file)
index 01affb0..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-# Generated from 'Menus.h'
-
-def FOUR_CHAR_CODE(x): return x
-noMark = 0
-kMenuDrawMsg = 0
-kMenuSizeMsg = 2
-kMenuPopUpMsg = 3
-kMenuCalcItemMsg = 5
-kMenuThemeSavvyMsg = 7
-mDrawMsg = 0
-mSizeMsg = 2
-mPopUpMsg = 3
-mCalcItemMsg = 5
-mChooseMsg = 1
-mDrawItemMsg = 4
-kMenuChooseMsg = 1
-kMenuDrawItemMsg = 4
-kThemeSavvyMenuResponse = 0x7473
-kMenuInitMsg = 8
-kMenuDisposeMsg = 9
-kMenuFindItemMsg = 10
-kMenuHiliteItemMsg = 11
-kMenuDrawItemsMsg = 12
-textMenuProc = 0
-hMenuCmd = 27
-hierMenu = -1
-kInsertHierarchicalMenu = -1
-mctAllItems = -98
-mctLastIDIndic = -99
-kMenuStdMenuProc = 63
-kMenuStdMenuBarProc = 63
-kMenuNoModifiers = 0
-kMenuShiftModifier = (1 << 0)
-kMenuOptionModifier = (1 << 1)
-kMenuControlModifier = (1 << 2)
-kMenuNoCommandModifier = (1 << 3)
-kMenuNoIcon = 0
-kMenuIconType = 1
-kMenuShrinkIconType = 2
-kMenuSmallIconType = 3
-kMenuColorIconType = 4
-kMenuIconSuiteType = 5
-kMenuIconRefType = 6
-kMenuCGImageRefType = 7
-kMenuSystemIconSelectorType = 8
-kMenuIconResourceType = 9
-kMenuNullGlyph = 0x00
-kMenuTabRightGlyph = 0x02
-kMenuTabLeftGlyph = 0x03
-kMenuEnterGlyph = 0x04
-kMenuShiftGlyph = 0x05
-kMenuControlGlyph = 0x06
-kMenuOptionGlyph = 0x07
-kMenuSpaceGlyph = 0x09
-kMenuDeleteRightGlyph = 0x0A
-kMenuReturnGlyph = 0x0B
-kMenuReturnR2LGlyph = 0x0C
-kMenuNonmarkingReturnGlyph = 0x0D
-kMenuPencilGlyph = 0x0F
-kMenuDownwardArrowDashedGlyph = 0x10
-kMenuCommandGlyph = 0x11
-kMenuCheckmarkGlyph = 0x12
-kMenuDiamondGlyph = 0x13
-kMenuAppleLogoFilledGlyph = 0x14
-kMenuParagraphKoreanGlyph = 0x15
-kMenuDeleteLeftGlyph = 0x17
-kMenuLeftArrowDashedGlyph = 0x18
-kMenuUpArrowDashedGlyph = 0x19
-kMenuRightArrowDashedGlyph = 0x1A
-kMenuEscapeGlyph = 0x1B
-kMenuClearGlyph = 0x1C
-kMenuLeftDoubleQuotesJapaneseGlyph = 0x1D
-kMenuRightDoubleQuotesJapaneseGlyph = 0x1E
-kMenuTrademarkJapaneseGlyph = 0x1F
-kMenuBlankGlyph = 0x61
-kMenuPageUpGlyph = 0x62
-kMenuCapsLockGlyph = 0x63
-kMenuLeftArrowGlyph = 0x64
-kMenuRightArrowGlyph = 0x65
-kMenuNorthwestArrowGlyph = 0x66
-kMenuHelpGlyph = 0x67
-kMenuUpArrowGlyph = 0x68
-kMenuSoutheastArrowGlyph = 0x69
-kMenuDownArrowGlyph = 0x6A
-kMenuPageDownGlyph = 0x6B
-kMenuAppleLogoOutlineGlyph = 0x6C
-kMenuContextualMenuGlyph = 0x6D
-kMenuPowerGlyph = 0x6E
-kMenuF1Glyph = 0x6F
-kMenuF2Glyph = 0x70
-kMenuF3Glyph = 0x71
-kMenuF4Glyph = 0x72
-kMenuF5Glyph = 0x73
-kMenuF6Glyph = 0x74
-kMenuF7Glyph = 0x75
-kMenuF8Glyph = 0x76
-kMenuF9Glyph = 0x77
-kMenuF10Glyph = 0x78
-kMenuF11Glyph = 0x79
-kMenuF12Glyph = 0x7A
-kMenuF13Glyph = 0x87
-kMenuF14Glyph = 0x88
-kMenuF15Glyph = 0x89
-kMenuControlISOGlyph = 0x8A
-kMenuAttrExcludesMarkColumn = (1 << 0)
-kMenuAttrAutoDisable = (1 << 2)
-kMenuAttrUsePencilGlyph = (1 << 3)
-kMenuAttrHidden = (1 << 4)
-kMenuItemAttrDisabled = (1 << 0)
-kMenuItemAttrIconDisabled = (1 << 1)
-kMenuItemAttrSubmenuParentChoosable = (1 << 2)
-kMenuItemAttrDynamic = (1 << 3)
-kMenuItemAttrNotPreviousAlternate = (1 << 4)
-kMenuItemAttrHidden = (1 << 5)
-kMenuItemAttrSeparator = (1 << 6)
-kMenuItemAttrSectionHeader = (1 << 7)
-kMenuItemAttrIgnoreMeta = (1 << 8)
-kMenuItemAttrAutoRepeat = (1 << 9)
-kMenuItemAttrUseVirtualKey = (1 << 10)
-kMenuItemAttrCustomDraw = (1 << 11)
-kMenuItemAttrIncludeInCmdKeyMatching = (1 << 12)
-kMenuTrackingModeMouse = 1
-kMenuTrackingModeKeyboard = 2
-kMenuEventIncludeDisabledItems = 0x0001
-kMenuEventQueryOnly = 0x0002
-kMenuEventDontCheckSubmenus = 0x0004
-kMenuItemDataText = (1 << 0)
-kMenuItemDataMark = (1 << 1)
-kMenuItemDataCmdKey = (1 << 2)
-kMenuItemDataCmdKeyGlyph = (1 << 3)
-kMenuItemDataCmdKeyModifiers = (1 << 4)
-kMenuItemDataStyle = (1 << 5)
-kMenuItemDataEnabled = (1 << 6)
-kMenuItemDataIconEnabled = (1 << 7)
-kMenuItemDataIconID = (1 << 8)
-kMenuItemDataIconHandle = (1 << 9)
-kMenuItemDataCommandID = (1 << 10)
-kMenuItemDataTextEncoding = (1 << 11)
-kMenuItemDataSubmenuID = (1 << 12)
-kMenuItemDataSubmenuHandle = (1 << 13)
-kMenuItemDataFontID = (1 << 14)
-kMenuItemDataRefcon = (1 << 15)
-kMenuItemDataAttributes = (1 << 16)
-kMenuItemDataCFString = (1 << 17)
-kMenuItemDataProperties = (1 << 18)
-kMenuItemDataIndent = (1 << 19)
-kMenuItemDataCmdVirtualKey = (1 << 20)
-kMenuItemDataAllDataVersionOne = 0x000FFFFF
-kMenuItemDataAllDataVersionTwo = kMenuItemDataAllDataVersionOne | kMenuItemDataCmdVirtualKey
-kMenuDefProcPtr = 0
-kMenuPropertyPersistent = 0x00000001
-kHierarchicalFontMenuOption = 0x00000001
-gestaltContextualMenuAttr = FOUR_CHAR_CODE('cmnu')
-gestaltContextualMenuUnusedBit = 0
-gestaltContextualMenuTrapAvailable = 1
-gestaltContextualMenuHasAttributeAndModifierKeys = 2
-gestaltContextualMenuHasUnicodeSupport = 3
-kCMHelpItemNoHelp = 0
-kCMHelpItemAppleGuide = 1
-kCMHelpItemOtherHelp = 2
-kCMHelpItemRemoveHelp = 3
-kCMNothingSelected = 0
-kCMMenuItemSelected = 1
-kCMShowHelpSelected = 3
-keyContextualMenuName = FOUR_CHAR_CODE('pnam')
-keyContextualMenuCommandID = FOUR_CHAR_CODE('cmcd')
-keyContextualMenuSubmenu = FOUR_CHAR_CODE('cmsb')
-keyContextualMenuAttributes = FOUR_CHAR_CODE('cmat')
-keyContextualMenuModifiers = FOUR_CHAR_CODE('cmmd')
diff --git a/Lib/plat-mac/Carbon/Mlte.py b/Lib/plat-mac/Carbon/Mlte.py
deleted file mode 100644 (file)
index b81fbc5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Mlte import *
diff --git a/Lib/plat-mac/Carbon/OSA.py b/Lib/plat-mac/Carbon/OSA.py
deleted file mode 100644 (file)
index 8d6732c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _OSA import *
diff --git a/Lib/plat-mac/Carbon/OSAconst.py b/Lib/plat-mac/Carbon/OSAconst.py
deleted file mode 100644 (file)
index 99b3205..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-# Generated from 'OSA.h'
-
-def FOUR_CHAR_CODE(x): return x
-from Carbon.AppleEvents import *
-kAEUseStandardDispatch = -1
-kOSAComponentType = FOUR_CHAR_CODE('osa ')
-kOSAGenericScriptingComponentSubtype = FOUR_CHAR_CODE('scpt')
-kOSAFileType = FOUR_CHAR_CODE('osas')
-kOSASuite = FOUR_CHAR_CODE('ascr')
-kOSARecordedText = FOUR_CHAR_CODE('recd')
-kOSAScriptIsModified = FOUR_CHAR_CODE('modi')
-kOSAScriptIsTypeCompiledScript = FOUR_CHAR_CODE('cscr')
-kOSAScriptIsTypeScriptValue = FOUR_CHAR_CODE('valu')
-kOSAScriptIsTypeScriptContext = FOUR_CHAR_CODE('cntx')
-kOSAScriptBestType = FOUR_CHAR_CODE('best')
-kOSACanGetSource = FOUR_CHAR_CODE('gsrc')
-typeOSADialectInfo = FOUR_CHAR_CODE('difo')
-keyOSADialectName = FOUR_CHAR_CODE('dnam')
-keyOSADialectCode = FOUR_CHAR_CODE('dcod')
-keyOSADialectLangCode = FOUR_CHAR_CODE('dlcd')
-keyOSADialectScriptCode = FOUR_CHAR_CODE('dscd')
-kOSANullScript = 0
-kOSANullMode = 0
-kOSAModeNull = 0
-kOSASupportsCompiling = 0x0002
-kOSASupportsGetSource = 0x0004
-kOSASupportsAECoercion = 0x0008
-kOSASupportsAESending = 0x0010
-kOSASupportsRecording = 0x0020
-kOSASupportsConvenience = 0x0040
-kOSASupportsDialects = 0x0080
-kOSASupportsEventHandling = 0x0100
-kOSASelectLoad = 0x0001
-kOSASelectStore = 0x0002
-kOSASelectExecute = 0x0003
-kOSASelectDisplay = 0x0004
-kOSASelectScriptError = 0x0005
-kOSASelectDispose = 0x0006
-kOSASelectSetScriptInfo = 0x0007
-kOSASelectGetScriptInfo = 0x0008
-kOSASelectSetActiveProc = 0x0009
-kOSASelectGetActiveProc = 0x000A
-kOSASelectScriptingComponentName = 0x0102
-kOSASelectCompile = 0x0103
-kOSASelectCopyID = 0x0104
-kOSASelectCopyScript = 0x0105
-kOSASelectGetSource = 0x0201
-kOSASelectCoerceFromDesc = 0x0301
-kOSASelectCoerceToDesc = 0x0302
-kOSASelectSetSendProc = 0x0401
-kOSASelectGetSendProc = 0x0402
-kOSASelectSetCreateProc = 0x0403
-kOSASelectGetCreateProc = 0x0404
-kOSASelectSetDefaultTarget = 0x0405
-kOSASelectStartRecording = 0x0501
-kOSASelectStopRecording = 0x0502
-kOSASelectLoadExecute = 0x0601
-kOSASelectCompileExecute = 0x0602
-kOSASelectDoScript = 0x0603
-kOSASelectSetCurrentDialect = 0x0701
-kOSASelectGetCurrentDialect = 0x0702
-kOSASelectAvailableDialects = 0x0703
-kOSASelectGetDialectInfo = 0x0704
-kOSASelectAvailableDialectCodeList = 0x0705
-kOSASelectSetResumeDispatchProc = 0x0801
-kOSASelectGetResumeDispatchProc = 0x0802
-kOSASelectExecuteEvent = 0x0803
-kOSASelectDoEvent = 0x0804
-kOSASelectMakeContext = 0x0805
-kOSADebuggerCreateSession = 0x0901
-kOSADebuggerGetSessionState = 0x0902
-kOSADebuggerSessionStep = 0x0903
-kOSADebuggerDisposeSession = 0x0904
-kOSADebuggerGetStatementRanges = 0x0905
-kOSADebuggerGetBreakpoint = 0x0910
-kOSADebuggerSetBreakpoint = 0x0911
-kOSADebuggerGetDefaultBreakpoint = 0x0912
-kOSADebuggerGetCurrentCallFrame = 0x0906
-kOSADebuggerGetCallFrameState = 0x0907
-kOSADebuggerGetVariable = 0x0908
-kOSADebuggerSetVariable = 0x0909
-kOSADebuggerGetPreviousCallFrame = 0x090A
-kOSADebuggerDisposeCallFrame = 0x090B
-kOSADebuggerCountVariables = 0x090C
-kOSASelectComponentSpecificStart = 0x1001
-kOSAModePreventGetSource = 0x00000001
-kOSAModeNeverInteract = kAENeverInteract
-kOSAModeCanInteract = kAECanInteract
-kOSAModeAlwaysInteract = kAEAlwaysInteract
-kOSAModeDontReconnect = kAEDontReconnect
-kOSAModeCantSwitchLayer = 0x00000040
-kOSAModeDoRecord = 0x00001000
-kOSAModeCompileIntoContext = 0x00000002
-kOSAModeAugmentContext = 0x00000004
-kOSAModeDisplayForHumans = 0x00000008
-kOSAModeDontStoreParent = 0x00010000
-kOSAModeDispatchToDirectObject = 0x00020000
-kOSAModeDontGetDataForArguments = 0x00040000
-kOSAScriptResourceType = kOSAGenericScriptingComponentSubtype
-typeOSAGenericStorage = kOSAScriptResourceType
-kOSAErrorNumber = keyErrorNumber
-kOSAErrorMessage = keyErrorString
-kOSAErrorBriefMessage = FOUR_CHAR_CODE('errb')
-kOSAErrorApp = FOUR_CHAR_CODE('erap')
-kOSAErrorPartialResult = FOUR_CHAR_CODE('ptlr')
-kOSAErrorOffendingObject = FOUR_CHAR_CODE('erob')
-kOSAErrorExpectedType = FOUR_CHAR_CODE('errt')
-kOSAErrorRange = FOUR_CHAR_CODE('erng')
-typeOSAErrorRange = FOUR_CHAR_CODE('erng')
-keyOSASourceStart = FOUR_CHAR_CODE('srcs')
-keyOSASourceEnd = FOUR_CHAR_CODE('srce')
-kOSAUseStandardDispatch = kAEUseStandardDispatch
-kOSANoDispatch = kAENoDispatch
-kOSADontUsePhac = 0x0001
-eNotStarted = 0
-eRunnable = 1
-eRunning = 2
-eStopped = 3
-eTerminated = 4
-eStepOver = 0
-eStepIn = 1
-eStepOut = 2
-eRun = 3
-eLocal = 0
-eGlobal = 1
-eProperties = 2
-keyProgramState = FOUR_CHAR_CODE('dsps')
-typeStatementRange = FOUR_CHAR_CODE('srng')
-keyProcedureName = FOUR_CHAR_CODE('dfnm')
-keyStatementRange = FOUR_CHAR_CODE('dfsr')
-keyLocalsNames = FOUR_CHAR_CODE('dfln')
-keyGlobalsNames = FOUR_CHAR_CODE('dfgn')
-keyParamsNames = FOUR_CHAR_CODE('dfpn')
diff --git a/Lib/plat-mac/Carbon/QDOffscreen.py b/Lib/plat-mac/Carbon/QDOffscreen.py
deleted file mode 100644 (file)
index bda14da..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# Generated from 'QDOffscreen.h'
-
-def FOUR_CHAR_CODE(x): return x
-pixPurgeBit = 0
-noNewDeviceBit = 1
-useTempMemBit = 2
-keepLocalBit = 3
-useDistantHdwrMemBit = 4
-useLocalHdwrMemBit = 5
-pixelsPurgeableBit = 6
-pixelsLockedBit = 7
-mapPixBit = 16
-newDepthBit = 17
-alignPixBit = 18
-newRowBytesBit = 19
-reallocPixBit = 20
-clipPixBit = 28
-stretchPixBit = 29
-ditherPixBit = 30
-gwFlagErrBit = 31
-pixPurge = 1 << pixPurgeBit
-noNewDevice = 1 << noNewDeviceBit
-useTempMem = 1 << useTempMemBit
-keepLocal = 1 << keepLocalBit
-useDistantHdwrMem = 1 << useDistantHdwrMemBit
-useLocalHdwrMem = 1 << useLocalHdwrMemBit
-pixelsPurgeable = 1 << pixelsPurgeableBit
-pixelsLocked = 1 << pixelsLockedBit
-kAllocDirectDrawSurface = 1 << 14
-mapPix = 1 << mapPixBit
-newDepth = 1 << newDepthBit
-alignPix = 1 << alignPixBit
-newRowBytes = 1 << newRowBytesBit
-reallocPix = 1 << reallocPixBit
-clipPix = 1 << clipPixBit
-stretchPix = 1 << stretchPixBit
-ditherPix = 1 << ditherPixBit
-gwFlagErr = 1 << gwFlagErrBit
-deviceIsIndirect = (1 << 0)
-deviceNeedsLock = (1 << 1)
-deviceIsStatic = (1 << 2)
-deviceIsExternalBuffer = (1 << 3)
-deviceIsDDSurface = (1 << 4)
-deviceIsDCISurface = (1 << 5)
-deviceIsGDISurface = (1 << 6)
-deviceIsAScreen = (1 << 7)
-deviceIsOverlaySurface = (1 << 8)
diff --git a/Lib/plat-mac/Carbon/Qd.py b/Lib/plat-mac/Carbon/Qd.py
deleted file mode 100644 (file)
index 227fe98..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Qd import *
diff --git a/Lib/plat-mac/Carbon/Qdoffs.py b/Lib/plat-mac/Carbon/Qdoffs.py
deleted file mode 100644 (file)
index 90a3d2c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Qdoffs import *
diff --git a/Lib/plat-mac/Carbon/Qt.py b/Lib/plat-mac/Carbon/Qt.py
deleted file mode 100644 (file)
index 6b8af94..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-from _Qt import *
-try:
-    _ = AddFilePreview
-except:
-    raise ImportError("Old (2.3) _Qt.so module loaded in stead of new (2.4) _Qt.so")
diff --git a/Lib/plat-mac/Carbon/QuickDraw.py b/Lib/plat-mac/Carbon/QuickDraw.py
deleted file mode 100644 (file)
index 978f2a6..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-# Generated from 'QuickDraw.h'
-
-
-def FOUR_CHAR_CODE(x): return x
-normal                                          = 0
-bold                                            = 1
-italic                                          = 2
-underline                                       = 4
-outline                                         = 8
-shadow                                          = 0x10
-condense                                        = 0x20
-extend                                          = 0x40
-invalColReq = -1
-srcCopy = 0
-srcOr = 1
-srcXor = 2
-srcBic = 3
-notSrcCopy = 4
-notSrcOr = 5
-notSrcXor = 6
-notSrcBic = 7
-patCopy = 8
-patOr = 9
-patXor = 10
-patBic = 11
-notPatCopy = 12
-notPatOr = 13
-notPatXor = 14
-notPatBic = 15
-grayishTextOr = 49
-hilitetransfermode = 50
-hilite = 50
-blend = 32
-addPin = 33
-addOver = 34
-subPin = 35
-addMax = 37
-adMax = 37
-subOver = 38
-adMin = 39
-ditherCopy = 64
-transparent = 36
-italicBit = 1
-ulineBit = 2
-outlineBit = 3
-shadowBit = 4
-condenseBit = 5
-extendBit = 6
-normalBit = 0
-inverseBit = 1
-redBit = 4
-greenBit = 3
-blueBit = 2
-cyanBit = 8
-magentaBit = 7
-yellowBit = 6
-blackBit = 5
-blackColor = 33
-whiteColor = 30
-redColor = 205
-greenColor = 341
-blueColor = 409
-cyanColor = 273
-magentaColor = 137
-yellowColor = 69
-picLParen = 0
-picRParen = 1
-clutType = 0
-fixedType = 1
-directType = 2
-gdDevType = 0
-interlacedDevice = 2
-hwMirroredDevice = 4
-roundedDevice = 5
-hasAuxMenuBar = 6
-burstDevice = 7
-ext32Device = 8
-ramInit = 10
-mainScreen = 11
-allInit = 12
-screenDevice = 13
-noDriver = 14
-screenActive = 15
-hiliteBit = 7
-pHiliteBit = 0
-defQDColors = 127
-RGBDirect = 16
-baseAddr32 = 4
-sysPatListID = 0
-iBeamCursor = 1
-crossCursor = 2
-plusCursor = 3
-watchCursor = 4
-kQDGrafVerbFrame = 0
-kQDGrafVerbPaint = 1
-kQDGrafVerbErase = 2
-kQDGrafVerbInvert = 3
-kQDGrafVerbFill = 4
-frame = kQDGrafVerbFrame
-paint = kQDGrafVerbPaint
-erase = kQDGrafVerbErase
-invert = kQDGrafVerbInvert
-fill = kQDGrafVerbFill
-chunky = 0
-chunkyPlanar = 1
-planar = 2
-singleDevicesBit = 0
-dontMatchSeedsBit = 1
-allDevicesBit = 2
-singleDevices = 1 << singleDevicesBit
-dontMatchSeeds = 1 << dontMatchSeedsBit
-allDevices = 1 << allDevicesBit
-kPrinterFontStatus = 0
-kPrinterScalingStatus = 1
-kNoConstraint = 0
-kVerticalConstraint = 1
-kHorizontalConstraint = 2
-k1MonochromePixelFormat = 0x00000001
-k2IndexedPixelFormat = 0x00000002
-k4IndexedPixelFormat = 0x00000004
-k8IndexedPixelFormat = 0x00000008
-k16BE555PixelFormat = 0x00000010
-k24RGBPixelFormat = 0x00000018
-k32ARGBPixelFormat = 0x00000020
-k1IndexedGrayPixelFormat = 0x00000021
-k2IndexedGrayPixelFormat = 0x00000022
-k4IndexedGrayPixelFormat = 0x00000024
-k8IndexedGrayPixelFormat = 0x00000028
-k16LE555PixelFormat = FOUR_CHAR_CODE('L555')
-k16LE5551PixelFormat = FOUR_CHAR_CODE('5551')
-k16BE565PixelFormat = FOUR_CHAR_CODE('B565')
-k16LE565PixelFormat = FOUR_CHAR_CODE('L565')
-k24BGRPixelFormat = FOUR_CHAR_CODE('24BG')
-k32BGRAPixelFormat = FOUR_CHAR_CODE('BGRA')
-k32ABGRPixelFormat = FOUR_CHAR_CODE('ABGR')
-k32RGBAPixelFormat = FOUR_CHAR_CODE('RGBA')
-kYUVSPixelFormat = FOUR_CHAR_CODE('yuvs')
-kYUVUPixelFormat = FOUR_CHAR_CODE('yuvu')
-kYVU9PixelFormat = FOUR_CHAR_CODE('YVU9')
-kYUV411PixelFormat = FOUR_CHAR_CODE('Y411')
-kYVYU422PixelFormat = FOUR_CHAR_CODE('YVYU')
-kUYVY422PixelFormat = FOUR_CHAR_CODE('UYVY')
-kYUV211PixelFormat = FOUR_CHAR_CODE('Y211')
-k2vuyPixelFormat = FOUR_CHAR_CODE('2vuy')
-kCursorImageMajorVersion = 0x0001
-kCursorImageMinorVersion = 0x0000
-kQDParseRegionFromTop = (1 << 0)
-kQDParseRegionFromBottom = (1 << 1)
-kQDParseRegionFromLeft = (1 << 2)
-kQDParseRegionFromRight = (1 << 3)
-kQDParseRegionFromTopLeft = kQDParseRegionFromTop | kQDParseRegionFromLeft
-kQDParseRegionFromBottomRight = kQDParseRegionFromBottom | kQDParseRegionFromRight
-kQDRegionToRectsMsgInit = 1
-kQDRegionToRectsMsgParse = 2
-kQDRegionToRectsMsgTerminate = 3
-colorXorXFer = 52
-noiseXFer = 53
-customXFer = 54
-kXFer1PixelAtATime = 0x00000001
-kXFerConvertPixelToRGB32 = 0x00000002
-kCursorComponentsVersion = 0x00010001
-kCursorComponentType = FOUR_CHAR_CODE('curs')
-cursorDoesAnimate = 1 << 0
-cursorDoesHardware = 1 << 1
-cursorDoesUnreadableScreenBits = 1 << 2
-kRenderCursorInHardware = 1 << 0
-kRenderCursorInSoftware = 1 << 1
-kCursorComponentInit = 0x0001
-kCursorComponentGetInfo = 0x0002
-kCursorComponentSetOutputMode = 0x0003
-kCursorComponentSetData = 0x0004
-kCursorComponentReconfigure = 0x0005
-kCursorComponentDraw = 0x0006
-kCursorComponentErase = 0x0007
-kCursorComponentMove = 0x0008
-kCursorComponentAnimate = 0x0009
-kCursorComponentLastReserved = 0x0050
-# Generated from 'QuickDrawText.h'
-
-
-def FOUR_CHAR_CODE(x): return x
-normal                                          = 0
-bold                                            = 1
-italic                                          = 2
-underline                                       = 4
-outline                                         = 8
-shadow                                          = 0x10
-condense                                        = 0x20
-extend                                          = 0x40
-leftCaret = 0
-rightCaret = -1
-kHilite = 1
-smLeftCaret = 0
-smRightCaret = -1
-smHilite = 1
-onlyStyleRun = 0
-leftStyleRun = 1
-rightStyleRun = 2
-middleStyleRun = 3
-smOnlyStyleRun = 0
-smLeftStyleRun = 1
-smRightStyleRun = 2
-smMiddleStyleRun = 3
-truncEnd = 0
-truncMiddle = 0x4000
-smTruncEnd = 0
-smTruncMiddle = 0x4000
-notTruncated = 0
-truncated = 1
-truncErr = -1
-smNotTruncated = 0
-smTruncated = 1
-smTruncErr = -1
-smBreakWord = 0
-smBreakChar = 1
-smBreakOverflow = 2
-tfAntiAlias = 1 << 0
-tfUnicode = 1 << 1
diff --git a/Lib/plat-mac/Carbon/QuickTime.py b/Lib/plat-mac/Carbon/QuickTime.py
deleted file mode 100644 (file)
index 0364a8f..0000000
+++ /dev/null
@@ -1,3468 +0,0 @@
-# Generated from 'Movies.h'
-
-def FOUR_CHAR_CODE(x): return x
-xmlIdentifierUnrecognized = -1
-kControllerMinimum = -0xf777
-notImplementedMusicOSErr      = -2071
-cantSendToSynthesizerOSErr    = -2072
-cantReceiveFromSynthesizerOSErr = -2073
-illegalVoiceAllocationOSErr   = -2074
-illegalPartOSErr              = -2075
-illegalChannelOSErr           = -2076
-illegalKnobOSErr              = -2077
-illegalKnobValueOSErr         = -2078
-illegalInstrumentOSErr        = -2079
-illegalControllerOSErr        = -2080
-midiManagerAbsentOSErr        = -2081
-synthesizerNotRespondingOSErr = -2082
-synthesizerOSErr              = -2083
-illegalNoteChannelOSErr       = -2084
-noteChannelNotAllocatedOSErr  = -2085
-tunePlayerFullOSErr           = -2086
-tuneParseOSErr                = -2087
-MovieFileType = FOUR_CHAR_CODE('MooV')
-MovieScrapType = FOUR_CHAR_CODE('moov')
-MovieResourceType = FOUR_CHAR_CODE('moov')
-MovieForwardPointerResourceType = FOUR_CHAR_CODE('fore')
-MovieBackwardPointerResourceType = FOUR_CHAR_CODE('back')
-MovieResourceAtomType = FOUR_CHAR_CODE('moov')
-MovieDataAtomType = FOUR_CHAR_CODE('mdat')
-FreeAtomType = FOUR_CHAR_CODE('free')
-SkipAtomType = FOUR_CHAR_CODE('skip')
-WideAtomPlaceholderType = FOUR_CHAR_CODE('wide')
-MediaHandlerType = FOUR_CHAR_CODE('mhlr')
-DataHandlerType = FOUR_CHAR_CODE('dhlr')
-VideoMediaType = FOUR_CHAR_CODE('vide')
-SoundMediaType = FOUR_CHAR_CODE('soun')
-TextMediaType = FOUR_CHAR_CODE('text')
-BaseMediaType = FOUR_CHAR_CODE('gnrc')
-MPEGMediaType = FOUR_CHAR_CODE('MPEG')
-MusicMediaType = FOUR_CHAR_CODE('musi')
-TimeCodeMediaType = FOUR_CHAR_CODE('tmcd')
-SpriteMediaType = FOUR_CHAR_CODE('sprt')
-FlashMediaType = FOUR_CHAR_CODE('flsh')
-MovieMediaType = FOUR_CHAR_CODE('moov')
-TweenMediaType = FOUR_CHAR_CODE('twen')
-ThreeDeeMediaType = FOUR_CHAR_CODE('qd3d')
-SkinMediaType = FOUR_CHAR_CODE('skin')
-HandleDataHandlerSubType = FOUR_CHAR_CODE('hndl')
-PointerDataHandlerSubType = FOUR_CHAR_CODE('ptr ')
-NullDataHandlerSubType = FOUR_CHAR_CODE('null')
-ResourceDataHandlerSubType = FOUR_CHAR_CODE('rsrc')
-URLDataHandlerSubType = FOUR_CHAR_CODE('url ')
-WiredActionHandlerType = FOUR_CHAR_CODE('wire')
-VisualMediaCharacteristic = FOUR_CHAR_CODE('eyes')
-AudioMediaCharacteristic = FOUR_CHAR_CODE('ears')
-kCharacteristicCanSendVideo = FOUR_CHAR_CODE('vsnd')
-kCharacteristicProvidesActions = FOUR_CHAR_CODE('actn')
-kCharacteristicNonLinear = FOUR_CHAR_CODE('nonl')
-kCharacteristicCanStep = FOUR_CHAR_CODE('step')
-kCharacteristicHasNoDuration = FOUR_CHAR_CODE('noti')
-kCharacteristicHasSkinData = FOUR_CHAR_CODE('skin')
-kCharacteristicProvidesKeyFocus = FOUR_CHAR_CODE('keyf')
-kUserDataMovieControllerType = FOUR_CHAR_CODE('ctyp')
-kUserDataName = FOUR_CHAR_CODE('name')
-kUserDataTextAlbum = FOUR_CHAR_CODE('\xa9alb')
-kUserDataTextArtist = FOUR_CHAR_CODE('\xa9ART')
-kUserDataTextAuthor = FOUR_CHAR_CODE('\xa9aut')
-kUserDataTextChapter = FOUR_CHAR_CODE('\xa9chp')
-kUserDataTextComment = FOUR_CHAR_CODE('\xa9cmt')
-kUserDataTextComposer = FOUR_CHAR_CODE('\xa9com')
-kUserDataTextCopyright = FOUR_CHAR_CODE('\xa9cpy')
-kUserDataTextCreationDate = FOUR_CHAR_CODE('\xa9day')
-kUserDataTextDescription = FOUR_CHAR_CODE('\xa9des')
-kUserDataTextDirector = FOUR_CHAR_CODE('\xa9dir')
-kUserDataTextDisclaimer = FOUR_CHAR_CODE('\xa9dis')
-kUserDataTextEncodedBy = FOUR_CHAR_CODE('\xa9enc')
-kUserDataTextFullName = FOUR_CHAR_CODE('\xa9nam')
-kUserDataTextGenre = FOUR_CHAR_CODE('\xa9gen')
-kUserDataTextHostComputer = FOUR_CHAR_CODE('\xa9hst')
-kUserDataTextInformation = FOUR_CHAR_CODE('\xa9inf')
-kUserDataTextKeywords = FOUR_CHAR_CODE('\xa9key')
-kUserDataTextMake = FOUR_CHAR_CODE('\xa9mak')
-kUserDataTextModel = FOUR_CHAR_CODE('\xa9mod')
-kUserDataTextOriginalArtist = FOUR_CHAR_CODE('\xa9ope')
-kUserDataTextOriginalFormat = FOUR_CHAR_CODE('\xa9fmt')
-kUserDataTextOriginalSource = FOUR_CHAR_CODE('\xa9src')
-kUserDataTextPerformers = FOUR_CHAR_CODE('\xa9prf')
-kUserDataTextProducer = FOUR_CHAR_CODE('\xa9prd')
-kUserDataTextProduct = FOUR_CHAR_CODE('\xa9PRD')
-kUserDataTextSoftware = FOUR_CHAR_CODE('\xa9swr')
-kUserDataTextSpecialPlaybackRequirements = FOUR_CHAR_CODE('\xa9req')
-kUserDataTextTrack = FOUR_CHAR_CODE('\xa9trk')
-kUserDataTextWarning = FOUR_CHAR_CODE('\xa9wrn')
-kUserDataTextWriter = FOUR_CHAR_CODE('\xa9wrt')
-kUserDataTextURLLink = FOUR_CHAR_CODE('\xa9url')
-kUserDataTextEditDate1 = FOUR_CHAR_CODE('\xa9ed1')
-kUserDataUnicodeBit = 1 << 7
-DoTheRightThing = 0
-kQTNetworkStatusNoNetwork = -2
-kQTNetworkStatusUncertain = -1
-kQTNetworkStatusNotConnected = 0
-kQTNetworkStatusConnected = 1
-kMusicFlagDontPlay2Soft = 1 << 0
-kMusicFlagDontSlaveToMovie = 1 << 1
-dfDontDisplay = 1 << 0
-dfDontAutoScale = 1 << 1
-dfClipToTextBox = 1 << 2
-dfUseMovieBGColor = 1 << 3
-dfShrinkTextBoxToFit = 1 << 4
-dfScrollIn = 1 << 5
-dfScrollOut = 1 << 6
-dfHorizScroll = 1 << 7
-dfReverseScroll = 1 << 8
-dfContinuousScroll = 1 << 9
-dfFlowHoriz = 1 << 10
-dfContinuousKaraoke = 1 << 11
-dfDropShadow = 1 << 12
-dfAntiAlias = 1 << 13
-dfKeyedText = 1 << 14
-dfInverseHilite = 1 << 15
-dfTextColorHilite = 1 << 16
-searchTextDontGoToFoundTime = 1 << 16
-searchTextDontHiliteFoundText = 1 << 17
-searchTextOneTrackOnly = 1 << 18
-searchTextEnabledTracksOnly = 1 << 19
-kTextTextHandle = 1
-kTextTextPtr = 2
-kTextTEStyle = 3
-kTextSelection = 4
-kTextBackColor = 5
-kTextForeColor = 6
-kTextFace = 7
-kTextFont = 8
-kTextSize = 9
-kTextAlignment = 10
-kTextHilite = 11
-kTextDropShadow = 12
-kTextDisplayFlags = 13
-kTextScroll = 14
-kTextRelativeScroll = 15
-kTextHyperTextFace = 16
-kTextHyperTextColor = 17
-kTextKeyEntry = 18
-kTextMouseDown = 19
-kTextTextBox = 20
-kTextEditState = 21
-kTextLength = 22
-k3DMediaRendererEntry = FOUR_CHAR_CODE('rend')
-k3DMediaRendererName = FOUR_CHAR_CODE('name')
-k3DMediaRendererCode = FOUR_CHAR_CODE('rcod')
-movieProgressOpen = 0
-movieProgressUpdatePercent = 1
-movieProgressClose = 2
-progressOpFlatten = 1
-progressOpInsertTrackSegment = 2
-progressOpInsertMovieSegment = 3
-progressOpPaste = 4
-progressOpAddMovieSelection = 5
-progressOpCopy = 6
-progressOpCut = 7
-progressOpLoadMovieIntoRam = 8
-progressOpLoadTrackIntoRam = 9
-progressOpLoadMediaIntoRam = 10
-progressOpImportMovie = 11
-progressOpExportMovie = 12
-mediaQualityDraft = 0x0000
-mediaQualityNormal = 0x0040
-mediaQualityBetter = 0x0080
-mediaQualityBest = 0x00C0
-kQTEventPayloadIsQTList = 1 << 0
-kActionMovieSetVolume = 1024
-kActionMovieSetRate = 1025
-kActionMovieSetLoopingFlags = 1026
-kActionMovieGoToTime = 1027
-kActionMovieGoToTimeByName = 1028
-kActionMovieGoToBeginning = 1029
-kActionMovieGoToEnd = 1030
-kActionMovieStepForward = 1031
-kActionMovieStepBackward = 1032
-kActionMovieSetSelection = 1033
-kActionMovieSetSelectionByName = 1034
-kActionMoviePlaySelection = 1035
-kActionMovieSetLanguage = 1036
-kActionMovieChanged = 1037
-kActionMovieRestartAtTime = 1038
-kActionMovieGotoNextChapter = 1039
-kActionMovieGotoPreviousChapter = 1040
-kActionMovieGotoFirstChapter = 1041
-kActionMovieGotoLastChapter = 1042
-kActionMovieGotoChapterByIndex = 1043
-kActionMovieSetScale = 1044
-kActionTrackSetVolume = 2048
-kActionTrackSetBalance = 2049
-kActionTrackSetEnabled = 2050
-kActionTrackSetMatrix = 2051
-kActionTrackSetLayer = 2052
-kActionTrackSetClip = 2053
-kActionTrackSetCursor = 2054
-kActionTrackSetGraphicsMode = 2055
-kActionTrackSetIdleFrequency = 2056
-kActionTrackSetBassTreble = 2057
-kActionSpriteSetMatrix = 3072
-kActionSpriteSetImageIndex = 3073
-kActionSpriteSetVisible = 3074
-kActionSpriteSetLayer = 3075
-kActionSpriteSetGraphicsMode = 3076
-kActionSpritePassMouseToCodec = 3078
-kActionSpriteClickOnCodec = 3079
-kActionSpriteTranslate = 3080
-kActionSpriteScale = 3081
-kActionSpriteRotate = 3082
-kActionSpriteStretch = 3083
-kActionSpriteSetCanBeHitTested = 3094
-kActionQTVRSetPanAngle = 4096
-kActionQTVRSetTiltAngle = 4097
-kActionQTVRSetFieldOfView = 4098
-kActionQTVRShowDefaultView = 4099
-kActionQTVRGoToNodeID = 4100
-kActionQTVREnableHotSpot = 4101
-kActionQTVRShowHotSpots = 4102
-kActionQTVRTranslateObject = 4103
-kActionQTVRSetViewState = 4109
-kActionMusicPlayNote = 5120
-kActionMusicSetController = 5121
-kActionCase = 6144
-kActionWhile = 6145
-kActionGoToURL = 6146
-kActionSendQTEventToSprite = 6147
-kActionDebugStr = 6148
-kActionPushCurrentTime = 6149
-kActionPushCurrentTimeWithLabel = 6150
-kActionPopAndGotoTopTime = 6151
-kActionPopAndGotoLabeledTime = 6152
-kActionStatusString = 6153
-kActionSendQTEventToTrackObject = 6154
-kActionAddChannelSubscription = 6155
-kActionRemoveChannelSubscription = 6156
-kActionOpenCustomActionHandler = 6157
-kActionDoScript = 6158
-kActionDoCompressedActions = 6159
-kActionSendAppMessage = 6160
-kActionLoadComponent = 6161
-kActionSetFocus = 6162
-kActionDontPassKeyEvent = 6163
-kActionSetRandomSeed = 6164
-kActionSpriteTrackSetVariable = 7168
-kActionSpriteTrackNewSprite = 7169
-kActionSpriteTrackDisposeSprite = 7170
-kActionSpriteTrackSetVariableToString = 7171
-kActionSpriteTrackConcatVariables = 7172
-kActionSpriteTrackSetVariableToMovieURL = 7173
-kActionSpriteTrackSetVariableToMovieBaseURL = 7174
-kActionSpriteTrackSetAllSpritesHitTestingMode = 7181
-kActionSpriteTrackNewImage = 7182
-kActionSpriteTrackDisposeImage = 7183
-kActionApplicationNumberAndString = 8192
-kActionQD3DNamedObjectTranslateTo = 9216
-kActionQD3DNamedObjectScaleTo = 9217
-kActionQD3DNamedObjectRotateTo = 9218
-kActionFlashTrackSetPan = 10240
-kActionFlashTrackSetZoom = 10241
-kActionFlashTrackSetZoomRect = 10242
-kActionFlashTrackGotoFrameNumber = 10243
-kActionFlashTrackGotoFrameLabel = 10244
-kActionFlashTrackSetFlashVariable = 10245
-kActionFlashTrackDoButtonActions = 10246
-kActionMovieTrackAddChildMovie = 11264
-kActionMovieTrackLoadChildMovie = 11265
-kActionMovieTrackLoadChildMovieWithQTListParams = 11266
-kActionTextTrackPasteText = 12288
-kActionTextTrackSetTextBox = 12291
-kActionTextTrackSetTextStyle = 12292
-kActionTextTrackSetSelection = 12293
-kActionTextTrackSetBackgroundColor = 12294
-kActionTextTrackSetForegroundColor = 12295
-kActionTextTrackSetFace = 12296
-kActionTextTrackSetFont = 12297
-kActionTextTrackSetSize = 12298
-kActionTextTrackSetAlignment = 12299
-kActionTextTrackSetHilite = 12300
-kActionTextTrackSetDropShadow = 12301
-kActionTextTrackSetDisplayFlags = 12302
-kActionTextTrackSetScroll = 12303
-kActionTextTrackRelativeScroll = 12304
-kActionTextTrackFindText = 12305
-kActionTextTrackSetHyperTextFace = 12306
-kActionTextTrackSetHyperTextColor = 12307
-kActionTextTrackKeyEntry = 12308
-kActionTextTrackMouseDown = 12309
-kActionTextTrackSetEditable = 12310
-kActionListAddElement = 13312
-kActionListRemoveElements = 13313
-kActionListSetElementValue = 13314
-kActionListPasteFromXML = 13315
-kActionListSetMatchingFromXML = 13316
-kActionListSetFromURL = 13317
-kActionListExchangeLists = 13318
-kActionListServerQuery = 13319
-kOperandExpression = 1
-kOperandConstant = 2
-kOperandSubscribedToChannel = 3
-kOperandUniqueCustomActionHandlerID = 4
-kOperandCustomActionHandlerIDIsOpen = 5
-kOperandConnectionSpeed = 6
-kOperandGMTDay = 7
-kOperandGMTMonth = 8
-kOperandGMTYear = 9
-kOperandGMTHours = 10
-kOperandGMTMinutes = 11
-kOperandGMTSeconds = 12
-kOperandLocalDay = 13
-kOperandLocalMonth = 14
-kOperandLocalYear = 15
-kOperandLocalHours = 16
-kOperandLocalMinutes = 17
-kOperandLocalSeconds = 18
-kOperandRegisteredForQuickTimePro = 19
-kOperandPlatformRunningOn = 20
-kOperandQuickTimeVersion = 21
-kOperandComponentVersion = 22
-kOperandOriginalHandlerRefcon = 23
-kOperandTicks = 24
-kOperandMaxLoadedTimeInMovie = 25
-kOperandEventParameter = 26
-kOperandFreeMemory = 27
-kOperandNetworkStatus = 28
-kOperandQuickTimeVersionRegistered = 29
-kOperandSystemVersion = 30
-kOperandMovieVolume = 1024
-kOperandMovieRate = 1025
-kOperandMovieIsLooping = 1026
-kOperandMovieLoopIsPalindrome = 1027
-kOperandMovieTime = 1028
-kOperandMovieDuration = 1029
-kOperandMovieTimeScale = 1030
-kOperandMovieWidth = 1031
-kOperandMovieHeight = 1032
-kOperandMovieLoadState = 1033
-kOperandMovieTrackCount = 1034
-kOperandMovieIsActive = 1035
-kOperandMovieName = 1036
-kOperandMovieID = 1037
-kOperandMovieChapterCount = 1038
-kOperandMovieChapterIndex = 1039
-kOperandMovieChapterName = 1040
-kOperandMovieChapterNameByIndex = 1041
-kOperandMovieChapterIndexByName = 1042
-kOperandMovieAnnotation = 1043
-kOperandMovieConnectionFlags = 1044
-kOperandMovieConnectionString = 1045
-kOperandTrackVolume = 2048
-kOperandTrackBalance = 2049
-kOperandTrackEnabled = 2050
-kOperandTrackLayer = 2051
-kOperandTrackWidth = 2052
-kOperandTrackHeight = 2053
-kOperandTrackDuration = 2054
-kOperandTrackName = 2055
-kOperandTrackID = 2056
-kOperandTrackIdleFrequency = 2057
-kOperandTrackBass = 2058
-kOperandTrackTreble = 2059
-kOperandSpriteBoundsLeft = 3072
-kOperandSpriteBoundsTop = 3073
-kOperandSpriteBoundsRight = 3074
-kOperandSpriteBoundsBottom = 3075
-kOperandSpriteImageIndex = 3076
-kOperandSpriteVisible = 3077
-kOperandSpriteLayer = 3078
-kOperandSpriteTrackVariable = 3079
-kOperandSpriteTrackNumSprites = 3080
-kOperandSpriteTrackNumImages = 3081
-kOperandSpriteID = 3082
-kOperandSpriteIndex = 3083
-kOperandSpriteFirstCornerX = 3084
-kOperandSpriteFirstCornerY = 3085
-kOperandSpriteSecondCornerX = 3086
-kOperandSpriteSecondCornerY = 3087
-kOperandSpriteThirdCornerX = 3088
-kOperandSpriteThirdCornerY = 3089
-kOperandSpriteFourthCornerX = 3090
-kOperandSpriteFourthCornerY = 3091
-kOperandSpriteImageRegistrationPointX = 3092
-kOperandSpriteImageRegistrationPointY = 3093
-kOperandSpriteTrackSpriteIDAtPoint = 3094
-kOperandSpriteName = 3095
-kOperandSpriteCanBeHitTested = 3105
-kOperandSpriteTrackAllSpritesHitTestingMode = 3106
-kOperandSpriteTrackImageIDByIndex = 3107
-kOperandSpriteTrackImageIndexByID = 3108
-kOperandQTVRPanAngle = 4096
-kOperandQTVRTiltAngle = 4097
-kOperandQTVRFieldOfView = 4098
-kOperandQTVRNodeID = 4099
-kOperandQTVRHotSpotsVisible = 4100
-kOperandQTVRViewCenterH = 4101
-kOperandQTVRViewCenterV = 4102
-kOperandQTVRViewStateCount = 4103
-kOperandQTVRViewState = 4104
-kOperandMouseLocalHLoc = 5120
-kOperandMouseLocalVLoc = 5121
-kOperandKeyIsDown = 5122
-kOperandRandom = 5123
-kOperandCanHaveFocus = 5124
-kOperandHasFocus = 5125
-kOperandTextTrackEditable = 6144
-kOperandTextTrackCopyText = 6145
-kOperandTextTrackStartSelection = 6146
-kOperandTextTrackEndSelection = 6147
-kOperandTextTrackTextBoxLeft = 6148
-kOperandTextTrackTextBoxTop = 6149
-kOperandTextTrackTextBoxRight = 6150
-kOperandTextTrackTextBoxBottom = 6151
-kOperandTextTrackTextLength = 6152
-kOperandListCountElements = 7168
-kOperandListGetElementPathByIndex = 7169
-kOperandListGetElementValue = 7170
-kOperandListCopyToXML = 7171
-kOperandSin = 8192
-kOperandCos = 8193
-kOperandTan = 8194
-kOperandATan = 8195
-kOperandATan2 = 8196
-kOperandDegreesToRadians = 8197
-kOperandRadiansToDegrees = 8198
-kOperandSquareRoot = 8199
-kOperandExponent = 8200
-kOperandLog = 8201
-kOperandFlashTrackVariable = 9216
-kOperandStringLength = 10240
-kOperandStringCompare = 10241
-kOperandStringSubString = 10242
-kOperandStringConcat = 10243
-kFirstMovieAction = kActionMovieSetVolume
-kLastMovieAction = kActionMovieSetScale
-kFirstTrackAction = kActionTrackSetVolume
-kLastTrackAction = kActionTrackSetBassTreble
-kFirstSpriteAction = kActionSpriteSetMatrix
-kLastSpriteAction = kActionSpriteSetCanBeHitTested
-kFirstQTVRAction = kActionQTVRSetPanAngle
-kLastQTVRAction = kActionQTVRSetViewState
-kFirstMusicAction = kActionMusicPlayNote
-kLastMusicAction = kActionMusicSetController
-kFirstSystemAction = kActionCase
-kLastSystemAction = kActionSetRandomSeed
-kFirstSpriteTrackAction = kActionSpriteTrackSetVariable
-kLastSpriteTrackAction = kActionSpriteTrackDisposeImage
-kFirstApplicationAction = kActionApplicationNumberAndString
-kLastApplicationAction = kActionApplicationNumberAndString
-kFirstQD3DNamedObjectAction = kActionQD3DNamedObjectTranslateTo
-kLastQD3DNamedObjectAction = kActionQD3DNamedObjectRotateTo
-kFirstFlashTrackAction = kActionFlashTrackSetPan
-kLastFlashTrackAction = kActionFlashTrackDoButtonActions
-kFirstMovieTrackAction = kActionMovieTrackAddChildMovie
-kLastMovieTrackAction = kActionMovieTrackLoadChildMovieWithQTListParams
-kFirstTextTrackAction = kActionTextTrackPasteText
-kLastTextTrackAction = kActionTextTrackSetEditable
-kFirstMultiTargetAction = kActionListAddElement
-kLastMultiTargetAction = kActionListServerQuery
-kFirstAction = kFirstMovieAction
-kLastAction = kLastMultiTargetAction
-kTargetMovie = FOUR_CHAR_CODE('moov')
-kTargetMovieName = FOUR_CHAR_CODE('mona')
-kTargetMovieID = FOUR_CHAR_CODE('moid')
-kTargetRootMovie = FOUR_CHAR_CODE('moro')
-kTargetParentMovie = FOUR_CHAR_CODE('mopa')
-kTargetChildMovieTrackName = FOUR_CHAR_CODE('motn')
-kTargetChildMovieTrackID = FOUR_CHAR_CODE('moti')
-kTargetChildMovieTrackIndex = FOUR_CHAR_CODE('motx')
-kTargetChildMovieMovieName = FOUR_CHAR_CODE('momn')
-kTargetChildMovieMovieID = FOUR_CHAR_CODE('momi')
-kTargetTrackName = FOUR_CHAR_CODE('trna')
-kTargetTrackID = FOUR_CHAR_CODE('trid')
-kTargetTrackType = FOUR_CHAR_CODE('trty')
-kTargetTrackIndex = FOUR_CHAR_CODE('trin')
-kTargetSpriteName = FOUR_CHAR_CODE('spna')
-kTargetSpriteID = FOUR_CHAR_CODE('spid')
-kTargetSpriteIndex = FOUR_CHAR_CODE('spin')
-kTargetQD3DNamedObjectName = FOUR_CHAR_CODE('nana')
-kTargetCurrentQTEventParams = FOUR_CHAR_CODE('evpa')
-kQTEventType = FOUR_CHAR_CODE('evnt')
-kAction = FOUR_CHAR_CODE('actn')
-kWhichAction = FOUR_CHAR_CODE('whic')
-kActionParameter = FOUR_CHAR_CODE('parm')
-kActionTarget = FOUR_CHAR_CODE('targ')
-kActionFlags = FOUR_CHAR_CODE('flag')
-kActionParameterMinValue = FOUR_CHAR_CODE('minv')
-kActionParameterMaxValue = FOUR_CHAR_CODE('maxv')
-kActionListAtomType = FOUR_CHAR_CODE('list')
-kExpressionContainerAtomType = FOUR_CHAR_CODE('expr')
-kConditionalAtomType = FOUR_CHAR_CODE('test')
-kOperatorAtomType = FOUR_CHAR_CODE('oper')
-kOperandAtomType = FOUR_CHAR_CODE('oprn')
-kCommentAtomType = FOUR_CHAR_CODE('why ')
-kCustomActionHandler = FOUR_CHAR_CODE('cust')
-kCustomHandlerID = FOUR_CHAR_CODE('id  ')
-kCustomHandlerDesc = FOUR_CHAR_CODE('desc')
-kQTEventRecordAtomType = FOUR_CHAR_CODE('erec')
-kQTEventMouseClick = FOUR_CHAR_CODE('clik')
-kQTEventMouseClickEnd = FOUR_CHAR_CODE('cend')
-kQTEventMouseClickEndTriggerButton = FOUR_CHAR_CODE('trig')
-kQTEventMouseEnter = FOUR_CHAR_CODE('entr')
-kQTEventMouseExit = FOUR_CHAR_CODE('exit')
-kQTEventMouseMoved = FOUR_CHAR_CODE('move')
-kQTEventFrameLoaded = FOUR_CHAR_CODE('fram')
-kQTEventIdle = FOUR_CHAR_CODE('idle')
-kQTEventKey = FOUR_CHAR_CODE('key ')
-kQTEventMovieLoaded = FOUR_CHAR_CODE('load')
-kQTEventRequestToModifyMovie = FOUR_CHAR_CODE('reqm')
-kQTEventListReceived = FOUR_CHAR_CODE('list')
-kQTEventKeyUp = FOUR_CHAR_CODE('keyU')
-kActionFlagActionIsDelta = 1 << 1
-kActionFlagParameterWrapsAround = 1 << 2
-kActionFlagActionIsToggle = 1 << 3
-kStatusStringIsURLLink = 1 << 1
-kStatusStringIsStreamingStatus = 1 << 2
-kStatusHasCodeNumber = 1 << 3
-kStatusIsError = 1 << 4
-kScriptIsUnknownType = 1 << 0
-kScriptIsJavaScript = 1 << 1
-kScriptIsLingoEvent = 1 << 2
-kScriptIsVBEvent = 1 << 3
-kScriptIsProjectorCommand = 1 << 4
-kScriptIsAppleScript = 1 << 5
-kQTRegistrationDialogTimeOutFlag = 1 << 0
-kQTRegistrationDialogShowDialog = 1 << 1
-kQTRegistrationDialogForceDialog = 1 << 2
-kOperatorAdd = FOUR_CHAR_CODE('add ')
-kOperatorSubtract = FOUR_CHAR_CODE('sub ')
-kOperatorMultiply = FOUR_CHAR_CODE('mult')
-kOperatorDivide = FOUR_CHAR_CODE('div ')
-kOperatorOr = FOUR_CHAR_CODE('or  ')
-kOperatorAnd = FOUR_CHAR_CODE('and ')
-kOperatorNot = FOUR_CHAR_CODE('not ')
-kOperatorLessThan = FOUR_CHAR_CODE('<   ')
-kOperatorLessThanEqualTo = FOUR_CHAR_CODE('<=  ')
-kOperatorEqualTo = FOUR_CHAR_CODE('=   ')
-kOperatorNotEqualTo = FOUR_CHAR_CODE('!=  ')
-kOperatorGreaterThan = FOUR_CHAR_CODE('>   ')
-kOperatorGreaterThanEqualTo = FOUR_CHAR_CODE('>=  ')
-kOperatorModulo = FOUR_CHAR_CODE('mod ')
-kOperatorIntegerDivide = FOUR_CHAR_CODE('idiv')
-kOperatorAbsoluteValue = FOUR_CHAR_CODE('abs ')
-kOperatorNegate = FOUR_CHAR_CODE('neg ')
-kPlatformMacintosh = 1
-kPlatformWindows = 2
-kSystemIsWindows9x = 0x00010000
-kSystemIsWindowsNT = 0x00020000
-kMediaPropertyNonLinearAtomType = FOUR_CHAR_CODE('nonl')
-kMediaPropertyHasActions = 105
-loopTimeBase = 1
-palindromeLoopTimeBase = 2
-maintainTimeBaseZero = 4
-triggerTimeFwd = 0x0001
-triggerTimeBwd = 0x0002
-triggerTimeEither = 0x0003
-triggerRateLT = 0x0004
-triggerRateGT = 0x0008
-triggerRateEqual = 0x0010
-triggerRateLTE = triggerRateLT | triggerRateEqual
-triggerRateGTE = triggerRateGT | triggerRateEqual
-triggerRateNotEqual = triggerRateGT | triggerRateEqual | triggerRateLT
-triggerRateChange = 0
-triggerAtStart = 0x0001
-triggerAtStop = 0x0002
-timeBaseBeforeStartTime = 1
-timeBaseAfterStopTime = 2
-callBackAtTime = 1
-callBackAtRate = 2
-callBackAtTimeJump = 3
-callBackAtExtremes = 4
-callBackAtTimeBaseDisposed = 5
-callBackAtInterrupt = 0x8000
-callBackAtDeferredTask = 0x4000
-qtcbNeedsRateChanges = 1
-qtcbNeedsTimeChanges = 2
-qtcbNeedsStartStopChanges = 4
-keepInRam = 1 << 0
-unkeepInRam = 1 << 1
-flushFromRam = 1 << 2
-loadForwardTrackEdits = 1 << 3
-loadBackwardTrackEdits = 1 << 4
-newMovieActive = 1 << 0
-newMovieDontResolveDataRefs = 1 << 1
-newMovieDontAskUnresolvedDataRefs = 1 << 2
-newMovieDontAutoAlternates = 1 << 3
-newMovieDontUpdateForeBackPointers = 1 << 4
-newMovieDontAutoUpdateClock = 1 << 5
-newMovieAsyncOK = 1 << 8
-newMovieIdleImportOK = 1 << 10
-newMovieDontInteractWithUser = 1 << 11
-trackUsageInMovie = 1 << 1
-trackUsageInPreview = 1 << 2
-trackUsageInPoster = 1 << 3
-mediaSampleNotSync = 1 << 0
-mediaSampleShadowSync = 1 << 1
-pasteInParallel = 1 << 0
-showUserSettingsDialog = 1 << 1
-movieToFileOnlyExport = 1 << 2
-movieFileSpecValid = 1 << 3
-nextTimeMediaSample = 1 << 0
-nextTimeMediaEdit = 1 << 1
-nextTimeTrackEdit = 1 << 2
-nextTimeSyncSample = 1 << 3
-nextTimeStep = 1 << 4
-nextTimeEdgeOK = 1 << 14
-nextTimeIgnoreActiveSegment = 1 << 15
-createMovieFileDeleteCurFile = 1 << 31
-createMovieFileDontCreateMovie = 1 << 30
-createMovieFileDontOpenFile = 1 << 29
-createMovieFileDontCreateResFile = 1 << 28
-flattenAddMovieToDataFork = 1 << 0
-flattenActiveTracksOnly = 1 << 2
-flattenDontInterleaveFlatten = 1 << 3
-flattenFSSpecPtrIsDataRefRecordPtr = 1 << 4
-flattenCompressMovieResource = 1 << 5
-flattenForceMovieResourceBeforeMovieData = 1 << 6
-movieInDataForkResID = -1
-mcTopLeftMovie = 1 << 0
-mcScaleMovieToFit = 1 << 1
-mcWithBadge = 1 << 2
-mcNotVisible = 1 << 3
-mcWithFrame = 1 << 4
-movieScrapDontZeroScrap = 1 << 0
-movieScrapOnlyPutMovie = 1 << 1
-dataRefSelfReference = 1 << 0
-dataRefWasNotResolved = 1 << 1
-kMovieAnchorDataRefIsDefault = 1 << 0
-hintsScrubMode = 1 << 0
-hintsLoop = 1 << 1
-hintsDontPurge = 1 << 2
-hintsUseScreenBuffer = 1 << 5
-hintsAllowInterlace = 1 << 6
-hintsUseSoundInterp = 1 << 7
-hintsHighQuality = 1 << 8
-hintsPalindrome = 1 << 9
-hintsInactive = 1 << 11
-hintsOffscreen = 1 << 12
-hintsDontDraw = 1 << 13
-hintsAllowBlacklining = 1 << 14
-hintsDontUseVideoOverlaySurface = 1 << 16
-hintsIgnoreBandwidthRestrictions = 1 << 17
-hintsPlayingEveryFrame = 1 << 18
-hintsAllowDynamicResize = 1 << 19
-hintsSingleField = 1 << 20
-hintsNoRenderingTimeOut = 1 << 21
-hintsFlushVideoInsteadOfDirtying = 1 << 22
-hintsEnableSubPixelPositioning = 1 << 23
-mediaHandlerFlagBaseClient = 1
-movieTrackMediaType = 1 << 0
-movieTrackCharacteristic = 1 << 1
-movieTrackEnabledOnly = 1 << 2
-kMovieControlOptionHideController = (1 << 0)
-kMovieControlOptionLocateTopLeft = (1 << 1)
-kMovieControlOptionEnableEditing = (1 << 2)
-kMovieControlOptionHandleEditingHI = (1 << 3)
-kMovieControlOptionSetKeysEnabled = (1 << 4)
-kMovieControlOptionManuallyIdled = (1 << 5)
-kMovieControlDataMovieController = FOUR_CHAR_CODE('mc  ')
-kMovieControlDataMovie = FOUR_CHAR_CODE('moov')
-kMovieControlDataManualIdling = FOUR_CHAR_CODE('manu')
-movieDrawingCallWhenChanged = 0
-movieDrawingCallAlways = 1
-kQTCloneShareSamples = 1 << 0
-kQTCloneDontCopyEdits = 1 << 1
-kGetMovieImporterValidateToFind = 1 << 0
-kGetMovieImporterAllowNewFile = 1 << 1
-kGetMovieImporterDontConsiderGraphicsImporters = 1 << 2
-kGetMovieImporterDontConsiderFileOnlyImporters = 1 << 6
-kGetMovieImporterAutoImportOnly = 1 << 10
-kQTGetMIMETypeInfoIsQuickTimeMovieType = FOUR_CHAR_CODE('moov')
-kQTGetMIMETypeInfoIsUnhelpfulType = FOUR_CHAR_CODE('dumb')
-kQTCopyUserDataReplace = FOUR_CHAR_CODE('rplc')
-kQTCopyUserDataMerge = FOUR_CHAR_CODE('merg')
-kMovieLoadStateError = -1
-kMovieLoadStateLoading = 1000
-kMovieLoadStateLoaded = 2000
-kMovieLoadStatePlayable = 10000
-kMovieLoadStatePlaythroughOK = 20000
-kMovieLoadStateComplete = 100000
-kQTDontUseDataToFindImporter = 1 << 0
-kQTDontLookForMovieImporterIfGraphicsImporterFound = 1 << 1
-kQTAllowOpeningStillImagesAsMovies = 1 << 2
-kQTAllowImportersThatWouldCreateNewFile = 1 << 3
-kQTAllowAggressiveImporters = 1 << 4
-preloadAlways = 1 << 0
-preloadOnlyIfEnabled = 1 << 1
-fullScreenHideCursor = 1 << 0
-fullScreenAllowEvents = 1 << 1
-fullScreenDontChangeMenuBar = 1 << 2
-fullScreenPreflightSize = 1 << 3
-movieExecuteWiredActionDontExecute = 1 << 0
-kRefConNavigationNext = 0
-kRefConNavigationPrevious = 1
-kRefConPropertyCanHaveFocus = 1
-kRefConPropertyHasFocus = 2
-kTrackFocusCanEditFlag = FOUR_CHAR_CODE('kedt')
-kTrackDefaultFocusFlags = FOUR_CHAR_CODE('kfoc')
-kTrackFocusDefaultRefcon = FOUR_CHAR_CODE('kref')
-kTrackFocusOn = 1
-kTrackHandlesTabs = 2
-kFlashTrackPropertyAcceptAllClicks = FOUR_CHAR_CODE('clik')
-kBackgroundSpriteLayerNum = 32767
-kSpritePropertyMatrix = 1
-kSpritePropertyImageDescription = 2
-kSpritePropertyImageDataPtr = 3
-kSpritePropertyVisible = 4
-kSpritePropertyLayer = 5
-kSpritePropertyGraphicsMode = 6
-kSpritePropertyImageDataSize = 7
-kSpritePropertyActionHandlingSpriteID = 8
-kSpritePropertyCanBeHitTested = 9
-kSpritePropertyImageIndex = 100
-kSpriteTrackPropertyBackgroundColor = 101
-kSpriteTrackPropertyOffscreenBitDepth = 102
-kSpriteTrackPropertySampleFormat = 103
-kSpriteTrackPropertyScaleSpritesToScaleWorld = 104
-kSpriteTrackPropertyHasActions = 105
-kSpriteTrackPropertyVisible = 106
-kSpriteTrackPropertyQTIdleEventsFrequency = 107
-kSpriteTrackPropertyAllSpritesHitTestingMode = 108
-kSpriteTrackPropertyPreferredDepthInterpretationMode = 109
-kSpriteImagePropertyRegistrationPoint = 1000
-kSpriteImagePropertyGroupID = 1001
-kSpriteTrackPreferredDepthCompatibilityMode = 0
-kSpriteTrackPreferredDepthModernMode = 1
-kSpriteHitTestUseSpritesOwnPropertiesMode = 0
-kSpriteHitTestTreatAllSpritesAsHitTestableMode = 1
-kSpriteHitTestTreatAllSpritesAsNotHitTestableMode = 2
-kNoQTIdleEvents = -1
-kGetSpriteWorldInvalidRegionAndLeaveIntact = -1
-kGetSpriteWorldInvalidRegionAndThenSetEmpty = -2
-kOnlyDrawToSpriteWorld = 1 << 0
-kSpriteWorldPreflight = 1 << 1
-kSpriteWorldDidDraw = 1 << 0
-kSpriteWorldNeedsToDraw = 1 << 1
-kKeyFrameAndSingleOverride = 1 << 1
-kKeyFrameAndAllOverrides = 1 << 2
-kScaleSpritesToScaleWorld = 1 << 1
-kSpriteWorldHighQuality = 1 << 2
-kSpriteWorldDontAutoInvalidate = 1 << 3
-kSpriteWorldInvisible = 1 << 4
-kSpriteWorldDirtyInsteadOfFlush = 1 << 5
-kParentAtomIsContainer = 0
-kTweenRecordNoFlags = 0
-kTweenRecordIsAtInterruptTime = 0x00000001
-kEffectNameAtom = FOUR_CHAR_CODE('name')
-kEffectTypeAtom = FOUR_CHAR_CODE('type')
-kEffectManufacturerAtom = FOUR_CHAR_CODE('manu')
-pdActionConfirmDialog = 1
-pdActionSetAppleMenu = 2
-pdActionSetEditMenu = 3
-pdActionGetDialogValues = 4
-pdActionSetPreviewUserItem = 5
-pdActionSetPreviewPicture = 6
-pdActionSetColorPickerEventProc = 7
-pdActionSetDialogTitle = 8
-pdActionGetSubPanelMenu = 9
-pdActionActivateSubPanel = 10
-pdActionConductStopAlert = 11
-pdActionModelessCallback = 12
-pdActionFetchPreview = 13
-pdActionSetDialogSettings = 14
-pdActionGetDialogSettings = 15
-pdActionGetNextSample = 16
-pdActionGetPreviousSample = 17
-pdActionCompactSample = 18
-pdActionSetEditCallout = 19
-pdActionSetSampleTime = 20
-pdActionDoEditCommand = 21
-pdActionGetSubPanelMenuValue = 22
-pdActionCustomNewControl = 23
-pdActionCustomDisposeControl = 24
-pdActionCustomPositionControl = 25
-pdActionCustomShowHideControl = 26
-pdActionCustomHandleEvent = 27
-pdActionCustomSetFocus = 28
-pdActionCustomSetEditMenu = 29
-pdActionCustomSetPreviewPicture = 30
-pdActionCustomSetEditCallout = 31
-pdActionCustomGetEnableValue = 32
-pdActionCustomSetSampleTime = 33
-pdActionCustomGetValue = 34
-pdActionCustomDoEditCommand = 35
-pdSampleTimeDisplayOptionsNone = 0x00000000
-pdActionFocusOff = 0
-pdActionFocusFirst = 1
-pdActionFocusLast = 2
-pdActionFocusForward = 3
-pdActionFocusBackward = 4
-elOptionsIncludeNoneInList = 0x00000001
-pdOptionsCollectOneValue = 0x00000001
-pdOptionsAllowOptionalInterpolations = 0x00000002
-pdOptionsModalDialogBox = 0x00000004
-pdOptionsEditCurrentEffectOnly = 0x00000008
-pdOptionsHidePreview = 0x00000010
-effectIsRealtime = 0
-kAccessKeyAtomType = FOUR_CHAR_CODE('acky')
-kAccessKeySystemFlag = 1 << 0
-ConnectionSpeedPrefsType = FOUR_CHAR_CODE('cspd')
-BandwidthManagementPrefsType = FOUR_CHAR_CODE('bwmg')
-kQTIdlePriority = 10
-kQTNonRealTimePriority = 20
-kQTRealTimeSharedPriority = 25
-kQTRealTimePriority = 30
-kQTBandwidthNotifyNeedToStop = 1 << 0
-kQTBandwidthNotifyGoodToGo = 1 << 1
-kQTBandwidthChangeRequest = 1 << 2
-kQTBandwidthQueueRequest = 1 << 3
-kQTBandwidthScheduledRequest = 1 << 4
-kQTBandwidthVoluntaryRelease = 1 << 5
-kITextRemoveEverythingBut = 0 << 1
-kITextRemoveLeaveSuggestedAlternate = 1 << 1
-kITextAtomType = FOUR_CHAR_CODE('itxt')
-kITextStringAtomType = FOUR_CHAR_CODE('text')
-kQTParseTextHREFText = FOUR_CHAR_CODE('text')
-kQTParseTextHREFBaseURL = FOUR_CHAR_CODE('burl')
-kQTParseTextHREFClickPoint = FOUR_CHAR_CODE('clik')
-kQTParseTextHREFUseAltDelim = FOUR_CHAR_CODE('altd')
-kQTParseTextHREFDelimiter = FOUR_CHAR_CODE('delm')
-kQTParseTextHREFRecomposeHREF = FOUR_CHAR_CODE('rhrf')
-kQTParseTextHREFURL = FOUR_CHAR_CODE('url ')
-kQTParseTextHREFTarget = FOUR_CHAR_CODE('targ')
-kQTParseTextHREFChapter = FOUR_CHAR_CODE('chap')
-kQTParseTextHREFIsAutoHREF = FOUR_CHAR_CODE('auto')
-kQTParseTextHREFIsServerMap = FOUR_CHAR_CODE('smap')
-kQTParseTextHREFHREF = FOUR_CHAR_CODE('href')
-kQTParseTextHREFEMBEDArgs = FOUR_CHAR_CODE('mbed')
-kTrackReferenceChapterList = FOUR_CHAR_CODE('chap')
-kTrackReferenceTimeCode = FOUR_CHAR_CODE('tmcd')
-kTrackReferenceModifier = FOUR_CHAR_CODE('ssrc')
-kTrackModifierInput = 0x696E
-kTrackModifierType = 0x7479
-kTrackModifierReference = FOUR_CHAR_CODE('ssrc')
-kTrackModifierObjectID = FOUR_CHAR_CODE('obid')
-kTrackModifierInputName = FOUR_CHAR_CODE('name')
-kInputMapSubInputID = FOUR_CHAR_CODE('subi')
-kTrackModifierTypeMatrix = 1
-kTrackModifierTypeClip = 2
-kTrackModifierTypeGraphicsMode = 5
-kTrackModifierTypeVolume = 3
-kTrackModifierTypeBalance = 4
-kTrackModifierTypeImage = FOUR_CHAR_CODE('vide')
-kTrackModifierObjectMatrix = 6
-kTrackModifierObjectGraphicsMode = 7
-kTrackModifierType3d4x4Matrix = 8
-kTrackModifierCameraData = 9
-kTrackModifierSoundLocalizationData = 10
-kTrackModifierObjectImageIndex = 11
-kTrackModifierObjectLayer = 12
-kTrackModifierObjectVisible = 13
-kTrackModifierAngleAspectCamera = 14
-kTrackModifierPanAngle = FOUR_CHAR_CODE('pan ')
-kTrackModifierTiltAngle = FOUR_CHAR_CODE('tilt')
-kTrackModifierVerticalFieldOfViewAngle = FOUR_CHAR_CODE('fov ')
-kTrackModifierObjectQTEventSend = FOUR_CHAR_CODE('evnt')
-kTrackModifierObjectCanBeHitTested = 15
-kTweenTypeShort = 1
-kTweenTypeLong = 2
-kTweenTypeFixed = 3
-kTweenTypePoint = 4
-kTweenTypeQDRect = 5
-kTweenTypeQDRegion = 6
-kTweenTypeMatrix = 7
-kTweenTypeRGBColor = 8
-kTweenTypeGraphicsModeWithRGBColor = 9
-kTweenTypeQTFloatSingle = 10
-kTweenTypeQTFloatDouble = 11
-kTweenTypeFixedPoint = 12
-kTweenType3dScale = FOUR_CHAR_CODE('3sca')
-kTweenType3dTranslate = FOUR_CHAR_CODE('3tra')
-kTweenType3dRotate = FOUR_CHAR_CODE('3rot')
-kTweenType3dRotateAboutPoint = FOUR_CHAR_CODE('3rap')
-kTweenType3dRotateAboutAxis = FOUR_CHAR_CODE('3rax')
-kTweenType3dRotateAboutVector = FOUR_CHAR_CODE('3rvc')
-kTweenType3dQuaternion = FOUR_CHAR_CODE('3qua')
-kTweenType3dMatrix = FOUR_CHAR_CODE('3mat')
-kTweenType3dCameraData = FOUR_CHAR_CODE('3cam')
-kTweenType3dAngleAspectCameraData = FOUR_CHAR_CODE('3caa')
-kTweenType3dSoundLocalizationData = FOUR_CHAR_CODE('3slc')
-kTweenTypePathToMatrixTranslation = FOUR_CHAR_CODE('gxmt')
-kTweenTypePathToMatrixRotation = FOUR_CHAR_CODE('gxpr')
-kTweenTypePathToMatrixTranslationAndRotation = FOUR_CHAR_CODE('gxmr')
-kTweenTypePathToFixedPoint = FOUR_CHAR_CODE('gxfp')
-kTweenTypePathXtoY = FOUR_CHAR_CODE('gxxy')
-kTweenTypePathYtoX = FOUR_CHAR_CODE('gxyx')
-kTweenTypeAtomList = FOUR_CHAR_CODE('atom')
-kTweenTypePolygon = FOUR_CHAR_CODE('poly')
-kTweenTypeMultiMatrix = FOUR_CHAR_CODE('mulm')
-kTweenTypeSpin = FOUR_CHAR_CODE('spin')
-kTweenType3dMatrixNonLinear = FOUR_CHAR_CODE('3nlr')
-kTweenType3dVRObject = FOUR_CHAR_CODE('3vro')
-kTweenEntry = FOUR_CHAR_CODE('twen')
-kTweenData = FOUR_CHAR_CODE('data')
-kTweenType = FOUR_CHAR_CODE('twnt')
-kTweenStartOffset = FOUR_CHAR_CODE('twst')
-kTweenDuration = FOUR_CHAR_CODE('twdu')
-kTweenFlags = FOUR_CHAR_CODE('flag')
-kTweenOutputMin = FOUR_CHAR_CODE('omin')
-kTweenOutputMax = FOUR_CHAR_CODE('omax')
-kTweenSequenceElement = FOUR_CHAR_CODE('seqe')
-kTween3dInitialCondition = FOUR_CHAR_CODE('icnd')
-kTweenInterpolationID = FOUR_CHAR_CODE('intr')
-kTweenRegionData = FOUR_CHAR_CODE('qdrg')
-kTweenPictureData = FOUR_CHAR_CODE('PICT')
-kListElementType = FOUR_CHAR_CODE('type')
-kListElementDataType = FOUR_CHAR_CODE('daty')
-kNameAtom = FOUR_CHAR_CODE('name')
-kInitialRotationAtom = FOUR_CHAR_CODE('inro')
-kNonLinearTweenHeader = FOUR_CHAR_CODE('nlth')
-kTweenReturnDelta = 1 << 0
-kQTRestrictionClassSave = FOUR_CHAR_CODE('save')
-kQTRestrictionSaveDontAddMovieResource = (1 << 0)
-kQTRestrictionSaveDontFlatten = (1 << 1)
-kQTRestrictionSaveDontExport = (1 << 2)
-kQTRestrictionSaveDontExtract = (1 << 3)
-kQTRestrictionClassEdit = FOUR_CHAR_CODE('edit')
-kQTRestrictionEditDontCopy = (1 << 0)
-kQTRestrictionEditDontCut = (1 << 1)
-kQTRestrictionEditDontPaste = (1 << 2)
-kQTRestrictionEditDontClear = (1 << 3)
-kQTRestrictionEditDontModify = (1 << 4)
-kQTRestrictionEditDontExtract = (1 << 5)
-videoFlagDontLeanAhead = 1 << 0
-txtProcDefaultDisplay = 0
-txtProcDontDisplay = 1
-txtProcDoDisplay = 2
-findTextEdgeOK = 1 << 0
-findTextCaseSensitive = 1 << 1
-findTextReverseSearch = 1 << 2
-findTextWrapAround = 1 << 3
-findTextUseOffset = 1 << 4
-dropShadowOffsetType = FOUR_CHAR_CODE('drpo')
-dropShadowTranslucencyType = FOUR_CHAR_CODE('drpt')
-spriteHitTestBounds = 1 << 0
-spriteHitTestImage = 1 << 1
-spriteHitTestInvisibleSprites = 1 << 2
-spriteHitTestIsClick = 1 << 3
-spriteHitTestLocInDisplayCoordinates = 1 << 4
-spriteHitTestTreatAllSpritesAsHitTestable = 1 << 5
-kSpriteAtomType = FOUR_CHAR_CODE('sprt')
-kSpriteImagesContainerAtomType = FOUR_CHAR_CODE('imct')
-kSpriteImageAtomType = FOUR_CHAR_CODE('imag')
-kSpriteImageDataAtomType = FOUR_CHAR_CODE('imda')
-kSpriteImageDataRefAtomType = FOUR_CHAR_CODE('imre')
-kSpriteImageDataRefTypeAtomType = FOUR_CHAR_CODE('imrt')
-kSpriteImageGroupIDAtomType = FOUR_CHAR_CODE('imgr')
-kSpriteImageRegistrationAtomType = FOUR_CHAR_CODE('imrg')
-kSpriteImageDefaultImageIndexAtomType = FOUR_CHAR_CODE('defi')
-kSpriteSharedDataAtomType = FOUR_CHAR_CODE('dflt')
-kSpriteNameAtomType = FOUR_CHAR_CODE('name')
-kSpriteImageNameAtomType = FOUR_CHAR_CODE('name')
-kSpriteUsesImageIDsAtomType = FOUR_CHAR_CODE('uses')
-kSpriteBehaviorsAtomType = FOUR_CHAR_CODE('beha')
-kSpriteImageBehaviorAtomType = FOUR_CHAR_CODE('imag')
-kSpriteCursorBehaviorAtomType = FOUR_CHAR_CODE('crsr')
-kSpriteStatusStringsBehaviorAtomType = FOUR_CHAR_CODE('sstr')
-kSpriteVariablesContainerAtomType = FOUR_CHAR_CODE('vars')
-kSpriteStringVariableAtomType = FOUR_CHAR_CODE('strv')
-kSpriteFloatingPointVariableAtomType = FOUR_CHAR_CODE('flov')
-kMovieMediaDataReference = FOUR_CHAR_CODE('mmdr')
-kMovieMediaDefaultDataReferenceID = FOUR_CHAR_CODE('ddri')
-kMovieMediaSlaveTime = FOUR_CHAR_CODE('slti')
-kMovieMediaSlaveAudio = FOUR_CHAR_CODE('slau')
-kMovieMediaSlaveGraphicsMode = FOUR_CHAR_CODE('slgr')
-kMovieMediaAutoPlay = FOUR_CHAR_CODE('play')
-kMovieMediaLoop = FOUR_CHAR_CODE('loop')
-kMovieMediaUseMIMEType = FOUR_CHAR_CODE('mime')
-kMovieMediaTitle = FOUR_CHAR_CODE('titl')
-kMovieMediaAltText = FOUR_CHAR_CODE('altt')
-kMovieMediaClipBegin = FOUR_CHAR_CODE('clpb')
-kMovieMediaClipDuration = FOUR_CHAR_CODE('clpd')
-kMovieMediaRegionAtom = FOUR_CHAR_CODE('regi')
-kMovieMediaSlaveTrackDuration = FOUR_CHAR_CODE('sltr')
-kMovieMediaEnableFrameStepping = FOUR_CHAR_CODE('enfs')
-kMovieMediaBackgroundColor = FOUR_CHAR_CODE('bkcl')
-kMovieMediaPrerollTime = FOUR_CHAR_CODE('prer')
-kMovieMediaFitNone = 0
-kMovieMediaFitScroll = FOUR_CHAR_CODE('scro')
-kMovieMediaFitClipIfNecessary = FOUR_CHAR_CODE('hidd')
-kMovieMediaFitFill = FOUR_CHAR_CODE('fill')
-kMovieMediaFitMeet = FOUR_CHAR_CODE('meet')
-kMovieMediaFitSlice = FOUR_CHAR_CODE('slic')
-kMovieMediaSpatialAdjustment = FOUR_CHAR_CODE('fit ')
-kMovieMediaRectangleAtom = FOUR_CHAR_CODE('rect')
-kMovieMediaTop = FOUR_CHAR_CODE('top ')
-kMovieMediaLeft = FOUR_CHAR_CODE('left')
-kMovieMediaWidth = FOUR_CHAR_CODE('wd  ')
-kMovieMediaHeight = FOUR_CHAR_CODE('ht  ')
-kMoviePropertyDuration = FOUR_CHAR_CODE('dura')
-kMoviePropertyTimeScale = FOUR_CHAR_CODE('tims')
-kMoviePropertyTime = FOUR_CHAR_CODE('timv')
-kMoviePropertyNaturalBounds = FOUR_CHAR_CODE('natb')
-kMoviePropertyMatrix = FOUR_CHAR_CODE('mtrx')
-kMoviePropertyTrackList = FOUR_CHAR_CODE('tlst')
-kTrackPropertyMediaType = FOUR_CHAR_CODE('mtyp')
-kTrackPropertyInstantiation = FOUR_CHAR_CODE('inst')
-MovieControllerComponentType = FOUR_CHAR_CODE('play')
-kMovieControllerQTVRFlag = 1 << 0
-kMovieControllerDontDisplayToUser = 1 << 1
-mcActionIdle = 1
-mcActionDraw = 2
-mcActionActivate = 3
-mcActionDeactivate = 4
-mcActionMouseDown = 5
-mcActionKey = 6
-mcActionPlay = 8
-mcActionGoToTime = 12
-mcActionSetVolume = 14
-mcActionGetVolume = 15
-mcActionStep = 18
-mcActionSetLooping = 21
-mcActionGetLooping = 22
-mcActionSetLoopIsPalindrome = 23
-mcActionGetLoopIsPalindrome = 24
-mcActionSetGrowBoxBounds = 25
-mcActionControllerSizeChanged = 26
-mcActionSetSelectionBegin = 29
-mcActionSetSelectionDuration = 30
-mcActionSetKeysEnabled = 32
-mcActionGetKeysEnabled = 33
-mcActionSetPlaySelection = 34
-mcActionGetPlaySelection = 35
-mcActionSetUseBadge = 36
-mcActionGetUseBadge = 37
-mcActionSetFlags = 38
-mcActionGetFlags = 39
-mcActionSetPlayEveryFrame = 40
-mcActionGetPlayEveryFrame = 41
-mcActionGetPlayRate = 42
-mcActionShowBalloon = 43
-mcActionBadgeClick = 44
-mcActionMovieClick = 45
-mcActionSuspend = 46
-mcActionResume = 47
-mcActionSetControllerKeysEnabled = 48
-mcActionGetTimeSliderRect = 49
-mcActionMovieEdited = 50
-mcActionGetDragEnabled = 51
-mcActionSetDragEnabled = 52
-mcActionGetSelectionBegin = 53
-mcActionGetSelectionDuration = 54
-mcActionPrerollAndPlay = 55
-mcActionGetCursorSettingEnabled = 56
-mcActionSetCursorSettingEnabled = 57
-mcActionSetColorTable = 58
-mcActionLinkToURL = 59
-mcActionCustomButtonClick = 60
-mcActionForceTimeTableUpdate = 61
-mcActionSetControllerTimeLimits = 62
-mcActionExecuteAllActionsForQTEvent = 63
-mcActionExecuteOneActionForQTEvent = 64
-mcActionAdjustCursor = 65
-mcActionUseTrackForTimeTable = 66
-mcActionClickAndHoldPoint = 67
-mcActionShowMessageString = 68
-mcActionShowStatusString = 69
-mcActionGetExternalMovie = 70
-mcActionGetChapterTime = 71
-mcActionPerformActionList = 72
-mcActionEvaluateExpression = 73
-mcActionFetchParameterAs = 74
-mcActionGetCursorByID = 75
-mcActionGetNextURL = 76
-mcActionMovieChanged = 77
-mcActionDoScript = 78
-mcActionRestartAtTime = 79
-mcActionGetIndChapter = 80
-mcActionLinkToURLExtended = 81
-mcActionSetVolumeStep = 82
-mcActionAutoPlay = 83
-mcActionPauseToBuffer = 84
-mcActionAppMessageReceived = 85
-mcActionEvaluateExpressionWithType = 89
-mcActionGetMovieName = 90
-mcActionGetMovieID = 91
-mcActionGetMovieActive = 92
-mcFlagSuppressMovieFrame = 1 << 0
-mcFlagSuppressStepButtons = 1 << 1
-mcFlagSuppressSpeakerButton = 1 << 2
-mcFlagsUseWindowPalette = 1 << 3
-mcFlagsDontInvalidate = 1 << 4
-mcFlagsUseCustomButton = 1 << 5
-mcPositionDontInvalidate = 1 << 5
-kMCIEEnabledButtonPicture = 1
-kMCIEDisabledButtonPicture = 2
-kMCIEDepressedButtonPicture = 3
-kMCIEEnabledSizeBoxPicture = 4
-kMCIEDisabledSizeBoxPicture = 5
-kMCIEEnabledUnavailableButtonPicture = 6
-kMCIEDisabledUnavailableButtonPicture = 7
-kMCIESoundSlider = 128
-kMCIESoundThumb = 129
-kMCIEColorTable = 256
-kMCIEIsFlatAppearance = 257
-kMCIEDoButtonIconsDropOnDepress = 258
-mcInfoUndoAvailable = 1 << 0
-mcInfoCutAvailable = 1 << 1
-mcInfoCopyAvailable = 1 << 2
-mcInfoPasteAvailable = 1 << 3
-mcInfoClearAvailable = 1 << 4
-mcInfoHasSound = 1 << 5
-mcInfoIsPlaying = 1 << 6
-mcInfoIsLooping = 1 << 7
-mcInfoIsInPalindrome = 1 << 8
-mcInfoEditingEnabled = 1 << 9
-mcInfoMovieIsInteractive = 1 << 10
-mcMenuUndo = 1
-mcMenuCut = 3
-mcMenuCopy = 4
-mcMenuPaste = 5
-mcMenuClear = 6
-kQTAppMessageSoftwareChanged = 1
-kQTAppMessageWindowCloseRequested = 3
-kQTAppMessageExitFullScreenRequested = 4
-kQTAppMessageDisplayChannels = 5
-kQTAppMessageEnterFullScreenRequested = 6
-kFetchAsBooleanPtr = 1
-kFetchAsShortPtr = 2
-kFetchAsLongPtr = 3
-kFetchAsMatrixRecordPtr = 4
-kFetchAsModifierTrackGraphicsModeRecord = 5
-kFetchAsHandle = 6
-kFetchAsStr255 = 7
-kFetchAsFloatPtr = 8
-kFetchAsPointPtr = 9
-kFetchAsNewAtomContainer = 10
-kFetchAsQTEventRecordPtr = 11
-kFetchAsFixedPtr = 12
-kFetchAsSetControllerValuePtr = 13
-kFetchAsRgnHandle = 14
-kFetchAsComponentDescriptionPtr = 15
-kFetchAsCString = 16
-kQTCursorOpenHand = -19183
-kQTCursorClosedHand = -19182
-kQTCursorPointingHand = -19181
-kQTCursorRightArrow = -19180
-kQTCursorLeftArrow = -19179
-kQTCursorDownArrow = -19178
-kQTCursorUpArrow = -19177
-kQTCursorIBeam = -19176
-kControllerUnderstandsIdleManagers = 1 << 0
-kVideoMediaResetStatisticsSelect = 0x0105
-kVideoMediaGetStatisticsSelect = 0x0106
-kVideoMediaGetStallCountSelect = 0x010E
-kVideoMediaSetCodecParameterSelect = 0x010F
-kVideoMediaGetCodecParameterSelect = 0x0110
-kTextMediaSetTextProcSelect = 0x0101
-kTextMediaAddTextSampleSelect = 0x0102
-kTextMediaAddTESampleSelect = 0x0103
-kTextMediaAddHiliteSampleSelect = 0x0104
-kTextMediaDrawRawSelect = 0x0109
-kTextMediaSetTextPropertySelect = 0x010A
-kTextMediaRawSetupSelect = 0x010B
-kTextMediaRawIdleSelect = 0x010C
-kTextMediaGetTextPropertySelect = 0x010D
-kTextMediaFindNextTextSelect = 0x0105
-kTextMediaHiliteTextSampleSelect = 0x0106
-kTextMediaSetTextSampleDataSelect = 0x0107
-kSpriteMediaSetPropertySelect = 0x0101
-kSpriteMediaGetPropertySelect = 0x0102
-kSpriteMediaHitTestSpritesSelect = 0x0103
-kSpriteMediaCountSpritesSelect = 0x0104
-kSpriteMediaCountImagesSelect = 0x0105
-kSpriteMediaGetIndImageDescriptionSelect = 0x0106
-kSpriteMediaGetDisplayedSampleNumberSelect = 0x0107
-kSpriteMediaGetSpriteNameSelect = 0x0108
-kSpriteMediaGetImageNameSelect = 0x0109
-kSpriteMediaSetSpritePropertySelect = 0x010A
-kSpriteMediaGetSpritePropertySelect = 0x010B
-kSpriteMediaHitTestAllSpritesSelect = 0x010C
-kSpriteMediaHitTestOneSpriteSelect = 0x010D
-kSpriteMediaSpriteIndexToIDSelect = 0x010E
-kSpriteMediaSpriteIDToIndexSelect = 0x010F
-kSpriteMediaGetSpriteActionsForQTEventSelect = 0x0110
-kSpriteMediaSetActionVariableSelect = 0x0111
-kSpriteMediaGetActionVariableSelect = 0x0112
-kSpriteMediaGetIndImagePropertySelect = 0x0113
-kSpriteMediaNewSpriteSelect = 0x0114
-kSpriteMediaDisposeSpriteSelect = 0x0115
-kSpriteMediaSetActionVariableToStringSelect = 0x0116
-kSpriteMediaGetActionVariableAsStringSelect = 0x0117
-kSpriteMediaNewImageSelect = 0x011B
-kSpriteMediaDisposeImageSelect = 0x011C
-kSpriteMediaImageIndexToIDSelect = 0x011D
-kSpriteMediaImageIDToIndexSelect = 0x011E
-kFlashMediaSetPanSelect = 0x0101
-kFlashMediaSetZoomSelect = 0x0102
-kFlashMediaSetZoomRectSelect = 0x0103
-kFlashMediaGetRefConBoundsSelect = 0x0104
-kFlashMediaGetRefConIDSelect = 0x0105
-kFlashMediaIDToRefConSelect = 0x0106
-kFlashMediaGetDisplayedFrameNumberSelect = 0x0107
-kFlashMediaFrameNumberToMovieTimeSelect = 0x0108
-kFlashMediaFrameLabelToMovieTimeSelect = 0x0109
-kFlashMediaGetFlashVariableSelect = 0x010A
-kFlashMediaSetFlashVariableSelect = 0x010B
-kFlashMediaDoButtonActionsSelect = 0x010C
-kFlashMediaGetSupportedSwfVersionSelect = 0x010D
-kMovieMediaGetChildDoMCActionCallbackSelect = 0x0102
-kMovieMediaGetDoMCActionCallbackSelect = 0x0103
-kMovieMediaGetCurrentMoviePropertySelect = 0x0104
-kMovieMediaGetCurrentTrackPropertySelect = 0x0105
-kMovieMediaGetChildMovieDataReferenceSelect = 0x0106
-kMovieMediaSetChildMovieDataReferenceSelect = 0x0107
-kMovieMediaLoadChildMovieFromDataReferenceSelect = 0x0108
-kMedia3DGetNamedObjectListSelect = 0x0101
-kMedia3DGetRendererListSelect = 0x0102
-kMedia3DGetCurrentGroupSelect = 0x0103
-kMedia3DTranslateNamedObjectToSelect = 0x0104
-kMedia3DScaleNamedObjectToSelect = 0x0105
-kMedia3DRotateNamedObjectToSelect = 0x0106
-kMedia3DSetCameraDataSelect = 0x0107
-kMedia3DGetCameraDataSelect = 0x0108
-kMedia3DSetCameraAngleAspectSelect = 0x0109
-kMedia3DGetCameraAngleAspectSelect = 0x010A
-kMedia3DSetCameraRangeSelect = 0x010D
-kMedia3DGetCameraRangeSelect = 0x010E
-kMedia3DGetViewObjectSelect = 0x010F
-kMCSetMovieSelect = 0x0002
-kMCGetIndMovieSelect = 0x0005
-kMCRemoveAllMoviesSelect = 0x0006
-kMCRemoveAMovieSelect = 0x0003
-kMCRemoveMovieSelect = 0x0006
-kMCIsPlayerEventSelect = 0x0007
-kMCSetActionFilterSelect = 0x0008
-kMCDoActionSelect = 0x0009
-kMCSetControllerAttachedSelect = 0x000A
-kMCIsControllerAttachedSelect = 0x000B
-kMCSetControllerPortSelect = 0x000C
-kMCGetControllerPortSelect = 0x000D
-kMCSetVisibleSelect = 0x000E
-kMCGetVisibleSelect = 0x000F
-kMCGetControllerBoundsRectSelect = 0x0010
-kMCSetControllerBoundsRectSelect = 0x0011
-kMCGetControllerBoundsRgnSelect = 0x0012
-kMCGetWindowRgnSelect = 0x0013
-kMCMovieChangedSelect = 0x0014
-kMCSetDurationSelect = 0x0015
-kMCGetCurrentTimeSelect = 0x0016
-kMCNewAttachedControllerSelect = 0x0017
-kMCDrawSelect = 0x0018
-kMCActivateSelect = 0x0019
-kMCIdleSelect = 0x001A
-kMCKeySelect = 0x001B
-kMCClickSelect = 0x001C
-kMCEnableEditingSelect = 0x001D
-kMCIsEditingEnabledSelect = 0x001E
-kMCCopySelect = 0x001F
-kMCCutSelect = 0x0020
-kMCPasteSelect = 0x0021
-kMCClearSelect = 0x0022
-kMCUndoSelect = 0x0023
-kMCPositionControllerSelect = 0x0024
-kMCGetControllerInfoSelect = 0x0025
-kMCSetClipSelect = 0x0028
-kMCGetClipSelect = 0x0029
-kMCDrawBadgeSelect = 0x002A
-kMCSetUpEditMenuSelect = 0x002B
-kMCGetMenuStringSelect = 0x002C
-kMCSetActionFilterWithRefConSelect = 0x002D
-kMCPtInControllerSelect = 0x002E
-kMCInvalidateSelect = 0x002F
-kMCAdjustCursorSelect = 0x0030
-kMCGetInterfaceElementSelect = 0x0031
-kMCGetDoActionsProcSelect = 0x0032
-kMCAddMovieSegmentSelect = 0x0033
-kMCTrimMovieSegmentSelect = 0x0034
-kMCSetIdleManagerSelect = 0x0035
-kMCSetControllerCapabilitiesSelect = 0x0036
-kMusicMediaGetIndexedTunePlayerSelect = 0x0101
-kRawCodecType = FOUR_CHAR_CODE('raw ')
-kCinepakCodecType = FOUR_CHAR_CODE('cvid')
-kGraphicsCodecType = FOUR_CHAR_CODE('smc ')
-kAnimationCodecType = FOUR_CHAR_CODE('rle ')
-kVideoCodecType = FOUR_CHAR_CODE('rpza')
-kComponentVideoCodecType = FOUR_CHAR_CODE('yuv2')
-kJPEGCodecType = FOUR_CHAR_CODE('jpeg')
-kMotionJPEGACodecType = FOUR_CHAR_CODE('mjpa')
-kMotionJPEGBCodecType = FOUR_CHAR_CODE('mjpb')
-kSGICodecType = FOUR_CHAR_CODE('.SGI')
-kPlanarRGBCodecType = FOUR_CHAR_CODE('8BPS')
-kMacPaintCodecType = FOUR_CHAR_CODE('PNTG')
-kGIFCodecType = FOUR_CHAR_CODE('gif ')
-kPhotoCDCodecType = FOUR_CHAR_CODE('kpcd')
-kQuickDrawGXCodecType = FOUR_CHAR_CODE('qdgx')
-kAVRJPEGCodecType = FOUR_CHAR_CODE('avr ')
-kOpenDMLJPEGCodecType = FOUR_CHAR_CODE('dmb1')
-kBMPCodecType = FOUR_CHAR_CODE('WRLE')
-kWindowsRawCodecType = FOUR_CHAR_CODE('WRAW')
-kVectorCodecType = FOUR_CHAR_CODE('path')
-kQuickDrawCodecType = FOUR_CHAR_CODE('qdrw')
-kWaterRippleCodecType = FOUR_CHAR_CODE('ripl')
-kFireCodecType = FOUR_CHAR_CODE('fire')
-kCloudCodecType = FOUR_CHAR_CODE('clou')
-kH261CodecType = FOUR_CHAR_CODE('h261')
-kH263CodecType = FOUR_CHAR_CODE('h263')
-kDVCNTSCCodecType = FOUR_CHAR_CODE('dvc ')
-kDVCPALCodecType = FOUR_CHAR_CODE('dvcp')
-kDVCProPALCodecType = FOUR_CHAR_CODE('dvpp')
-kBaseCodecType = FOUR_CHAR_CODE('base')
-kFLCCodecType = FOUR_CHAR_CODE('flic')
-kTargaCodecType = FOUR_CHAR_CODE('tga ')
-kPNGCodecType = FOUR_CHAR_CODE('png ')
-kTIFFCodecType = FOUR_CHAR_CODE('tiff')
-kComponentVideoSigned = FOUR_CHAR_CODE('yuvu')
-kComponentVideoUnsigned = FOUR_CHAR_CODE('yuvs')
-kCMYKCodecType = FOUR_CHAR_CODE('cmyk')
-kMicrosoftVideo1CodecType = FOUR_CHAR_CODE('msvc')
-kSorensonCodecType = FOUR_CHAR_CODE('SVQ1')
-kSorenson3CodecType = FOUR_CHAR_CODE('SVQ3')
-kIndeo4CodecType = FOUR_CHAR_CODE('IV41')
-kMPEG4VisualCodecType = FOUR_CHAR_CODE('mp4v')
-k64ARGBCodecType = FOUR_CHAR_CODE('b64a')
-k48RGBCodecType = FOUR_CHAR_CODE('b48r')
-k32AlphaGrayCodecType = FOUR_CHAR_CODE('b32a')
-k16GrayCodecType = FOUR_CHAR_CODE('b16g')
-kMpegYUV420CodecType = FOUR_CHAR_CODE('myuv')
-kYUV420CodecType = FOUR_CHAR_CODE('y420')
-kSorensonYUV9CodecType = FOUR_CHAR_CODE('syv9')
-k422YpCbCr8CodecType = FOUR_CHAR_CODE('2vuy')
-k444YpCbCr8CodecType = FOUR_CHAR_CODE('v308')
-k4444YpCbCrA8CodecType = FOUR_CHAR_CODE('v408')
-k422YpCbCr16CodecType = FOUR_CHAR_CODE('v216')
-k422YpCbCr10CodecType = FOUR_CHAR_CODE('v210')
-k444YpCbCr10CodecType = FOUR_CHAR_CODE('v410')
-k4444YpCbCrA8RCodecType = FOUR_CHAR_CODE('r408')
-kBlurImageFilterType = FOUR_CHAR_CODE('blur')
-kSharpenImageFilterType = FOUR_CHAR_CODE('shrp')
-kEdgeDetectImageFilterType = FOUR_CHAR_CODE('edge')
-kEmbossImageFilterType = FOUR_CHAR_CODE('embs')
-kConvolveImageFilterType = FOUR_CHAR_CODE('genk')
-kAlphaGainImageFilterType = FOUR_CHAR_CODE('gain')
-kRGBColorBalanceImageFilterType = FOUR_CHAR_CODE('rgbb')
-kHSLColorBalanceImageFilterType = FOUR_CHAR_CODE('hslb')
-kColorSyncImageFilterType = FOUR_CHAR_CODE('sync')
-kFilmNoiseImageFilterType = FOUR_CHAR_CODE('fmns')
-kSolarizeImageFilterType = FOUR_CHAR_CODE('solr')
-kColorTintImageFilterType = FOUR_CHAR_CODE('tint')
-kLensFlareImageFilterType = FOUR_CHAR_CODE('lens')
-kBrightnessContrastImageFilterType = FOUR_CHAR_CODE('brco')
-kAlphaCompositorTransitionType = FOUR_CHAR_CODE('blnd')
-kCrossFadeTransitionType = FOUR_CHAR_CODE('dslv')
-kChannelCompositeEffectType = FOUR_CHAR_CODE('chan')
-kChromaKeyTransitionType = FOUR_CHAR_CODE('ckey')
-kImplodeTransitionType = FOUR_CHAR_CODE('mplo')
-kExplodeTransitionType = FOUR_CHAR_CODE('xplo')
-kGradientTransitionType = FOUR_CHAR_CODE('matt')
-kPushTransitionType = FOUR_CHAR_CODE('push')
-kSlideTransitionType = FOUR_CHAR_CODE('slid')
-kWipeTransitionType = FOUR_CHAR_CODE('smpt')
-kIrisTransitionType = FOUR_CHAR_CODE('smp2')
-kRadialTransitionType = FOUR_CHAR_CODE('smp3')
-kMatrixTransitionType = FOUR_CHAR_CODE('smp4')
-kZoomTransitionType = FOUR_CHAR_CODE('zoom')
-kTravellingMatteEffectType = FOUR_CHAR_CODE('trav')
-kCMYKPixelFormat = FOUR_CHAR_CODE('cmyk')
-k64ARGBPixelFormat = FOUR_CHAR_CODE('b64a')
-k48RGBPixelFormat = FOUR_CHAR_CODE('b48r')
-k32AlphaGrayPixelFormat = FOUR_CHAR_CODE('b32a')
-k16GrayPixelFormat = FOUR_CHAR_CODE('b16g')
-k422YpCbCr8PixelFormat = FOUR_CHAR_CODE('2vuy')
-k4444YpCbCrA8PixelFormat = FOUR_CHAR_CODE('v408')
-k4444YpCbCrA8RPixelFormat = FOUR_CHAR_CODE('r408')
-kYUV420PixelFormat = FOUR_CHAR_CODE('y420')
-codecInfoDoes1 = (1 << 0)
-codecInfoDoes2 = (1 << 1)
-codecInfoDoes4 = (1 << 2)
-codecInfoDoes8 = (1 << 3)
-codecInfoDoes16 = (1 << 4)
-codecInfoDoes32 = (1 << 5)
-codecInfoDoesDither = (1 << 6)
-codecInfoDoesStretch = (1 << 7)
-codecInfoDoesShrink = (1 << 8)
-codecInfoDoesMask = (1 << 9)
-codecInfoDoesTemporal = (1 << 10)
-codecInfoDoesDouble = (1 << 11)
-codecInfoDoesQuad = (1 << 12)
-codecInfoDoesHalf = (1 << 13)
-codecInfoDoesQuarter = (1 << 14)
-codecInfoDoesRotate = (1 << 15)
-codecInfoDoesHorizFlip = (1 << 16)
-codecInfoDoesVertFlip = (1 << 17)
-codecInfoHasEffectParameterList = (1 << 18)
-codecInfoDoesBlend = (1 << 19)
-codecInfoDoesWarp = (1 << 20)
-codecInfoDoesRecompress = (1 << 21)
-codecInfoDoesSpool = (1 << 22)
-codecInfoDoesRateConstrain = (1 << 23)
-codecInfoDepth1 = (1 << 0)
-codecInfoDepth2 = (1 << 1)
-codecInfoDepth4 = (1 << 2)
-codecInfoDepth8 = (1 << 3)
-codecInfoDepth16 = (1 << 4)
-codecInfoDepth32 = (1 << 5)
-codecInfoDepth24 = (1 << 6)
-codecInfoDepth33 = (1 << 7)
-codecInfoDepth34 = (1 << 8)
-codecInfoDepth36 = (1 << 9)
-codecInfoDepth40 = (1 << 10)
-codecInfoStoresClut = (1 << 11)
-codecInfoDoesLossless = (1 << 12)
-codecInfoSequenceSensitive = (1 << 13)
-codecFlagUseImageBuffer = (1 << 0)
-codecFlagUseScreenBuffer = (1 << 1)
-codecFlagUpdatePrevious = (1 << 2)
-codecFlagNoScreenUpdate = (1 << 3)
-codecFlagWasCompressed = (1 << 4)
-codecFlagDontOffscreen = (1 << 5)
-codecFlagUpdatePreviousComp = (1 << 6)
-codecFlagForceKeyFrame = (1 << 7)
-codecFlagOnlyScreenUpdate = (1 << 8)
-codecFlagLiveGrab = (1 << 9)
-codecFlagDiffFrame = (1 << 9)
-codecFlagDontUseNewImageBuffer = (1 << 10)
-codecFlagInterlaceUpdate = (1 << 11)
-codecFlagCatchUpDiff = (1 << 12)
-codecFlagSupportDisable = (1 << 13)
-codecFlagReenable = (1 << 14)
-codecFlagOutUpdateOnNextIdle = (1 << 9)
-codecFlagOutUpdateOnDataSourceChange = (1 << 10)
-codecFlagSequenceSensitive = (1 << 11)
-codecFlagOutUpdateOnTimeChange = (1 << 12)
-codecFlagImageBufferNotSourceImage = (1 << 13)
-codecFlagUsedNewImageBuffer = (1 << 14)
-codecFlagUsedImageBuffer = (1 << 15)
-codecMinimumDataSize = 32768
-compressorComponentType = FOUR_CHAR_CODE('imco')
-decompressorComponentType = FOUR_CHAR_CODE('imdc')
-codecLosslessQuality = 0x00000400
-codecMaxQuality = 0x000003FF
-codecMinQuality = 0x00000000
-codecLowQuality = 0x00000100
-codecNormalQuality = 0x00000200
-codecHighQuality = 0x00000300
-codecLockBitsShieldCursor = (1 << 0)
-codecCompletionSource = (1 << 0)
-codecCompletionDest = (1 << 1)
-codecCompletionDontUnshield = (1 << 2)
-codecCompletionWentOffscreen = (1 << 3)
-codecCompletionUnlockBits = (1 << 4)
-codecCompletionForceChainFlush = (1 << 5)
-codecCompletionDropped = (1 << 6)
-codecProgressOpen = 0
-codecProgressUpdatePercent = 1
-codecProgressClose = 2
-defaultDither = 0
-forceDither = 1
-suppressDither = 2
-useColorMatching = 4
-callStdBits = 1
-callOldBits = 2
-noDefaultOpcodes = 4
-graphicsModeStraightAlpha = 256
-graphicsModePreWhiteAlpha = 257
-graphicsModePreBlackAlpha = 258
-graphicsModeComposition = 259
-graphicsModeStraightAlphaBlend = 260
-graphicsModePreMulColorAlpha = 261
-evenField1ToEvenFieldOut = 1 << 0
-evenField1ToOddFieldOut = 1 << 1
-oddField1ToEvenFieldOut = 1 << 2
-oddField1ToOddFieldOut = 1 << 3
-evenField2ToEvenFieldOut = 1 << 4
-evenField2ToOddFieldOut = 1 << 5
-oddField2ToEvenFieldOut = 1 << 6
-oddField2ToOddFieldOut = 1 << 7
-icmFrameTimeHasVirtualStartTimeAndDuration = 1 << 0
-codecDSequenceDisableOverlaySurface = (1 << 5)
-codecDSequenceSingleField = (1 << 6)
-codecDSequenceBidirectionalPrediction = (1 << 7)
-codecDSequenceFlushInsteadOfDirtying = (1 << 8)
-codecDSequenceEnableSubPixelPositioning = (1 << 9)
-kICMSequenceTaskWeight = FOUR_CHAR_CODE('twei')
-kICMSequenceTaskName = FOUR_CHAR_CODE('tnam')
-kICMSequenceUserPreferredCodecs = FOUR_CHAR_CODE('punt')
-kImageDescriptionSampleFormat = FOUR_CHAR_CODE('idfm')
-kImageDescriptionClassicAtomFormat = FOUR_CHAR_CODE('atom')
-kImageDescriptionQTAtomFormat = FOUR_CHAR_CODE('qtat')
-kImageDescriptionEffectDataFormat = FOUR_CHAR_CODE('fxat')
-kImageDescriptionPrivateDataFormat = FOUR_CHAR_CODE('priv')
-kImageDescriptionAlternateCodec = FOUR_CHAR_CODE('subs')
-kImageDescriptionColorSpace = FOUR_CHAR_CODE('cspc')
-sfpItemPreviewAreaUser = 11
-sfpItemPreviewStaticText = 12
-sfpItemPreviewDividerUser = 13
-sfpItemCreatePreviewButton = 14
-sfpItemShowPreviewButton = 15
-kICMPixelFormatIsPlanarMask = 0x0F
-kICMPixelFormatIsIndexed = (1 << 4)
-kICMPixelFormatIsSupportedByQD = (1 << 5)
-kICMPixelFormatIsMonochrome = (1 << 6)
-kICMPixelFormatHasAlphaChannel = (1 << 7)
-kICMGetChainUltimateParent = 0
-kICMGetChainParent = 1
-kICMGetChainChild = 2
-kICMGetChainUltimateChild = 3
-kDontUseValidateToFindGraphicsImporter = 1 << 0
-kICMTempThenAppMemory = 1 << 12
-kICMAppThenTempMemory = 1 << 13
-kQTUsePlatformDefaultGammaLevel = 0
-kQTUseSourceGammaLevel = -1
-kQTCCIR601VideoGammaLevel = 0x00023333
-identityMatrixType = 0x00
-translateMatrixType = 0x01
-scaleMatrixType = 0x02
-scaleTranslateMatrixType = 0x03
-linearMatrixType = 0x04
-linearTranslateMatrixType = 0x05
-perspectiveMatrixType = 0x06
-GraphicsImporterComponentType = FOUR_CHAR_CODE('grip')
-graphicsImporterUsesImageDecompressor = 1 << 23
-quickTimeImageFileImageDescriptionAtom = FOUR_CHAR_CODE('idsc')
-quickTimeImageFileImageDataAtom = FOUR_CHAR_CODE('idat')
-quickTimeImageFileMetaDataAtom = FOUR_CHAR_CODE('meta')
-quickTimeImageFileColorSyncProfileAtom = FOUR_CHAR_CODE('iicc')
-graphicsImporterDrawsAllPixels = 0
-graphicsImporterDoesntDrawAllPixels = 1
-graphicsImporterDontKnowIfDrawAllPixels = 2
-kGraphicsImporterDontDoGammaCorrection = 1 << 0
-kGraphicsImporterTrustResolutionFromFile = 1 << 1
-kGraphicsImporterEnableSubPixelPositioning = 1 << 2
-kGraphicsExportGroup = FOUR_CHAR_CODE('expo')
-kGraphicsExportFileType = FOUR_CHAR_CODE('ftyp')
-kGraphicsExportMIMEType = FOUR_CHAR_CODE('mime')
-kGraphicsExportExtension = FOUR_CHAR_CODE('ext ')
-kGraphicsExportDescription = FOUR_CHAR_CODE('desc')
-kQTPhotoshopLayerMode = FOUR_CHAR_CODE('lmod')
-kQTPhotoshopLayerOpacity = FOUR_CHAR_CODE('lopa')
-kQTPhotoshopLayerClipping = FOUR_CHAR_CODE('lclp')
-kQTPhotoshopLayerFlags = FOUR_CHAR_CODE('lflg')
-kQTPhotoshopLayerName = FOUR_CHAR_CODE('\xa9lnm')
-kQTPhotoshopLayerUnicodeName = FOUR_CHAR_CODE('luni')
-kQTIndexedImageType = FOUR_CHAR_CODE('nth?')
-kQTIndexedImageIsThumbnail = FOUR_CHAR_CODE('n=th')
-kQTIndexedImageIsLayer = FOUR_CHAR_CODE('n=ly')
-kQTIndexedImageIsPage = FOUR_CHAR_CODE('n=pg')
-kQTIndexedImageIsMultiResolution = FOUR_CHAR_CODE('n=rs')
-kQTTIFFUserDataPrefix = 0x74690000
-kQTTIFFExifUserDataPrefix = 0x65780000
-kQTTIFFExifGPSUserDataPrefix = 0x67700000
-kQTAlphaMode = FOUR_CHAR_CODE('almo')
-kQTAlphaModePreMulColor = FOUR_CHAR_CODE('almp')
-kUserDataIPTC = FOUR_CHAR_CODE('iptc')
-kQTTIFFUserDataOrientation = 0x74690112
-kQTTIFFUserDataTransferFunction = 0x7469012D
-kQTTIFFUserDataWhitePoint = 0x7469013E
-kQTTIFFUserDataPrimaryChromaticities = 0x7469013F
-kQTTIFFUserDataTransferRange = 0x74690156
-kQTTIFFUserDataYCbCrPositioning = 0x74690213
-kQTTIFFUserDataReferenceBlackWhite = 0x74690214
-kQTTIFFUserDataModelPixelScale = 0x7469830E
-kQTTIFFUserDataModelTransformation = 0x746985D8
-kQTTIFFUserDataModelTiepoint = 0x74698482
-kQTTIFFUserDataGeoKeyDirectory = 0x746987AF
-kQTTIFFUserDataGeoDoubleParams = 0x746987B0
-kQTTIFFUserDataGeoAsciiParams = 0x746987B1
-kQTTIFFUserDataIntergraphMatrix = 0x74698480
-kQTExifUserDataExifVersion = 0x65789000
-kQTExifUserDataFlashPixVersion = 0x6578A000
-kQTExifUserDataColorSpace = 0x6578A001
-kQTExifUserDataComponentsConfiguration = 0x65789101
-kQTExifUserDataCompressedBitsPerPixel = 0x65789102
-kQTExifUserDataPixelXDimension = 0x6578A002
-kQTExifUserDataPixelYDimension = 0x6578A003
-kQTExifUserDataMakerNote = 0x6578927C
-kQTExifUserDataUserComment = 0x6578928C
-kQTExifUserDataRelatedSoundFile = 0x6578A004
-kQTExifUserDataDateTimeOriginal = 0x65789003
-kQTExifUserDataDateTimeDigitized = 0x65789004
-kQTExifUserDataSubSecTime = 0x65789290
-kQTExifUserDataSubSecTimeOriginal = 0x65789291
-kQTExifUserDataSubSecTimeDigitized = 0x65789292
-kQTExifUserDataExposureTime = 0x6578829A
-kQTExifUserDataFNumber = 0x6578829D
-kQTExifUserDataExposureProgram = 0x65788822
-kQTExifUserDataSpectralSensitivity = 0x65788824
-kQTExifUserDataISOSpeedRatings = 0x65788827
-kQTExifUserDataShutterSpeedValue = 0x65789201
-kQTExifUserDataApertureValue = 0x65789202
-kQTExifUserDataBrightnessValue = 0x65789203
-kQTExifUserDataExposureBiasValue = 0x65789204
-kQTExifUserDataMaxApertureValue = 0x65789205
-kQTExifUserDataSubjectDistance = 0x65789206
-kQTExifUserDataMeteringMode = 0x65789207
-kQTExifUserDataLightSource = 0x65789208
-kQTExifUserDataFlash = 0x65789209
-kQTExifUserDataFocalLength = 0x6578920A
-kQTExifUserDataFlashEnergy = 0x6578A20B
-kQTExifUserDataFocalPlaneXResolution = 0x6578A20E
-kQTExifUserDataFocalPlaneYResolution = 0x6578A20F
-kQTExifUserDataFocalPlaneResolutionUnit = 0x6578A210
-kQTExifUserDataSubjectLocation = 0x6578A214
-kQTExifUserDataExposureIndex = 0x6578A215
-kQTExifUserDataSensingMethod = 0x6578A217
-kQTExifUserDataFileSource = 0x6578A300
-kQTExifUserDataSceneType = 0x6578A301
-kQTExifUserDataGPSVersionID = 0x06770000
-kQTExifUserDataGPSLatitudeRef = 0x06770001
-kQTExifUserDataGPSLatitude = 0x06770002
-kQTExifUserDataGPSLongitudeRef = 0x06770003
-kQTExifUserDataGPSLongitude = 0x06770004
-kQTExifUserDataGPSAltitudeRef = 0x06770005
-kQTExifUserDataGPSAltitude = 0x06770006
-kQTExifUserDataGPSTimeStamp = 0x06770007
-kQTExifUserDataGPSSatellites = 0x06770008
-kQTExifUserDataGPSStatus = 0x06770009
-kQTExifUserDataGPSMeasureMode = 0x0677000A
-kQTExifUserDataGPSDOP = 0x0677000B
-kQTExifUserDataGPSSpeedRef = 0x0677000C
-kQTExifUserDataGPSSpeed = 0x0677000D
-kQTExifUserDataGPSTrackRef = 0x0677000E
-kQTExifUserDataGPSTrack = 0x0677000F
-kQTExifUserDataGPSImgDirectionRef = 0x06770010
-kQTExifUserDataGPSImgDirection = 0x06770011
-kQTExifUserDataGPSMapDatum = 0x06770012
-kQTExifUserDataGPSDestLatitudeRef = 0x06770013
-kQTExifUserDataGPSDestLatitude = 0x06770014
-kQTExifUserDataGPSDestLongitudeRef = 0x06770015
-kQTExifUserDataGPSDestLongitude = 0x06770016
-kQTExifUserDataGPSDestBearingRef = 0x06770017
-kQTExifUserDataGPSDestBearing = 0x06770018
-kQTExifUserDataGPSDestDistanceRef = 0x06770019
-kQTExifUserDataGPSDestDistance = 0x0677001A
-GraphicsExporterComponentType = FOUR_CHAR_CODE('grex')
-kBaseGraphicsExporterSubType = FOUR_CHAR_CODE('base')
-graphicsExporterIsBaseExporter = 1 << 0
-graphicsExporterCanTranscode = 1 << 1
-graphicsExporterUsesImageCompressor = 1 << 2
-kQTResolutionSettings = FOUR_CHAR_CODE('reso')
-kQTTargetDataSize = FOUR_CHAR_CODE('dasz')
-kQTDontRecompress = FOUR_CHAR_CODE('dntr')
-kQTInterlaceStyle = FOUR_CHAR_CODE('ilac')
-kQTColorSyncProfile = FOUR_CHAR_CODE('iccp')
-kQTThumbnailSettings = FOUR_CHAR_CODE('thum')
-kQTEnableExif = FOUR_CHAR_CODE('exif')
-kQTMetaData = FOUR_CHAR_CODE('meta')
-kQTTIFFCompressionMethod = FOUR_CHAR_CODE('tifc')
-kQTTIFFCompression_None = 1
-kQTTIFFCompression_PackBits = 32773
-kQTTIFFLittleEndian = FOUR_CHAR_CODE('tife')
-kQTPNGFilterPreference = FOUR_CHAR_CODE('pngf')
-kQTPNGFilterBestForColorType = FOUR_CHAR_CODE('bflt')
-kQTPNGFilterNone = 0
-kQTPNGFilterSub = 1
-kQTPNGFilterUp = 2
-kQTPNGFilterAverage = 3
-kQTPNGFilterPaeth = 4
-kQTPNGFilterAdaptivePerRow = FOUR_CHAR_CODE('aflt')
-kQTPNGInterlaceStyle = FOUR_CHAR_CODE('ilac')
-kQTPNGInterlaceNone = 0
-kQTPNGInterlaceAdam7 = 1
-ImageTranscodererComponentType = FOUR_CHAR_CODE('imtc')
-kGraphicsImportSetDataReferenceSelect = 0x0001
-kGraphicsImportGetDataReferenceSelect = 0x0002
-kGraphicsImportSetDataFileSelect = 0x0003
-kGraphicsImportGetDataFileSelect = 0x0004
-kGraphicsImportSetDataHandleSelect = 0x0005
-kGraphicsImportGetDataHandleSelect = 0x0006
-kGraphicsImportGetImageDescriptionSelect = 0x0007
-kGraphicsImportGetDataOffsetAndSizeSelect = 0x0008
-kGraphicsImportReadDataSelect = 0x0009
-kGraphicsImportSetClipSelect = 0x000A
-kGraphicsImportGetClipSelect = 0x000B
-kGraphicsImportSetSourceRectSelect = 0x000C
-kGraphicsImportGetSourceRectSelect = 0x000D
-kGraphicsImportGetNaturalBoundsSelect = 0x000E
-kGraphicsImportDrawSelect = 0x000F
-kGraphicsImportSetGWorldSelect = 0x0010
-kGraphicsImportGetGWorldSelect = 0x0011
-kGraphicsImportSetMatrixSelect = 0x0012
-kGraphicsImportGetMatrixSelect = 0x0013
-kGraphicsImportSetBoundsRectSelect = 0x0014
-kGraphicsImportGetBoundsRectSelect = 0x0015
-kGraphicsImportSaveAsPictureSelect = 0x0016
-kGraphicsImportSetGraphicsModeSelect = 0x0017
-kGraphicsImportGetGraphicsModeSelect = 0x0018
-kGraphicsImportSetQualitySelect = 0x0019
-kGraphicsImportGetQualitySelect = 0x001A
-kGraphicsImportSaveAsQuickTimeImageFileSelect = 0x001B
-kGraphicsImportSetDataReferenceOffsetAndLimitSelect = 0x001C
-kGraphicsImportGetDataReferenceOffsetAndLimitSelect = 0x001D
-kGraphicsImportGetAliasedDataReferenceSelect = 0x001E
-kGraphicsImportValidateSelect = 0x001F
-kGraphicsImportGetMetaDataSelect = 0x0020
-kGraphicsImportGetMIMETypeListSelect = 0x0021
-kGraphicsImportDoesDrawAllPixelsSelect = 0x0022
-kGraphicsImportGetAsPictureSelect = 0x0023
-kGraphicsImportExportImageFileSelect = 0x0024
-kGraphicsImportGetExportImageTypeListSelect = 0x0025
-kGraphicsImportDoExportImageFileDialogSelect = 0x0026
-kGraphicsImportGetExportSettingsAsAtomContainerSelect = 0x0027
-kGraphicsImportSetExportSettingsFromAtomContainerSelect = 0x0028
-kGraphicsImportSetProgressProcSelect = 0x0029
-kGraphicsImportGetProgressProcSelect = 0x002A
-kGraphicsImportGetImageCountSelect = 0x002B
-kGraphicsImportSetImageIndexSelect = 0x002C
-kGraphicsImportGetImageIndexSelect = 0x002D
-kGraphicsImportGetDataOffsetAndSize64Select = 0x002E
-kGraphicsImportReadData64Select = 0x002F
-kGraphicsImportSetDataReferenceOffsetAndLimit64Select = 0x0030
-kGraphicsImportGetDataReferenceOffsetAndLimit64Select = 0x0031
-kGraphicsImportGetDefaultMatrixSelect = 0x0032
-kGraphicsImportGetDefaultClipSelect = 0x0033
-kGraphicsImportGetDefaultGraphicsModeSelect = 0x0034
-kGraphicsImportGetDefaultSourceRectSelect = 0x0035
-kGraphicsImportGetColorSyncProfileSelect = 0x0036
-kGraphicsImportSetDestRectSelect = 0x0037
-kGraphicsImportGetDestRectSelect = 0x0038
-kGraphicsImportSetFlagsSelect = 0x0039
-kGraphicsImportGetFlagsSelect = 0x003A
-kGraphicsImportGetBaseDataOffsetAndSize64Select = 0x003D
-kGraphicsImportSetImageIndexToThumbnailSelect = 0x003E
-kGraphicsExportDoExportSelect = 0x0001
-kGraphicsExportCanTranscodeSelect = 0x0002
-kGraphicsExportDoTranscodeSelect = 0x0003
-kGraphicsExportCanUseCompressorSelect = 0x0004
-kGraphicsExportDoUseCompressorSelect = 0x0005
-kGraphicsExportDoStandaloneExportSelect = 0x0006
-kGraphicsExportGetDefaultFileTypeAndCreatorSelect = 0x0007
-kGraphicsExportGetDefaultFileNameExtensionSelect = 0x0008
-kGraphicsExportGetMIMETypeListSelect = 0x0009
-kGraphicsExportRequestSettingsSelect = 0x000B
-kGraphicsExportSetSettingsFromAtomContainerSelect = 0x000C
-kGraphicsExportGetSettingsAsAtomContainerSelect = 0x000D
-kGraphicsExportGetSettingsAsTextSelect = 0x000E
-kGraphicsExportSetDontRecompressSelect = 0x000F
-kGraphicsExportGetDontRecompressSelect = 0x0010
-kGraphicsExportSetInterlaceStyleSelect = 0x0011
-kGraphicsExportGetInterlaceStyleSelect = 0x0012
-kGraphicsExportSetMetaDataSelect = 0x0013
-kGraphicsExportGetMetaDataSelect = 0x0014
-kGraphicsExportSetTargetDataSizeSelect = 0x0015
-kGraphicsExportGetTargetDataSizeSelect = 0x0016
-kGraphicsExportSetCompressionMethodSelect = 0x0017
-kGraphicsExportGetCompressionMethodSelect = 0x0018
-kGraphicsExportSetCompressionQualitySelect = 0x0019
-kGraphicsExportGetCompressionQualitySelect = 0x001A
-kGraphicsExportSetResolutionSelect = 0x001B
-kGraphicsExportGetResolutionSelect = 0x001C
-kGraphicsExportSetDepthSelect = 0x001D
-kGraphicsExportGetDepthSelect = 0x001E
-kGraphicsExportSetColorSyncProfileSelect = 0x0021
-kGraphicsExportGetColorSyncProfileSelect = 0x0022
-kGraphicsExportSetProgressProcSelect = 0x0023
-kGraphicsExportGetProgressProcSelect = 0x0024
-kGraphicsExportSetInputDataReferenceSelect = 0x0025
-kGraphicsExportGetInputDataReferenceSelect = 0x0026
-kGraphicsExportSetInputFileSelect = 0x0027
-kGraphicsExportGetInputFileSelect = 0x0028
-kGraphicsExportSetInputHandleSelect = 0x0029
-kGraphicsExportGetInputHandleSelect = 0x002A
-kGraphicsExportSetInputPtrSelect = 0x002B
-kGraphicsExportGetInputPtrSelect = 0x002C
-kGraphicsExportSetInputGraphicsImporterSelect = 0x002D
-kGraphicsExportGetInputGraphicsImporterSelect = 0x002E
-kGraphicsExportSetInputPictureSelect = 0x002F
-kGraphicsExportGetInputPictureSelect = 0x0030
-kGraphicsExportSetInputGWorldSelect = 0x0031
-kGraphicsExportGetInputGWorldSelect = 0x0032
-kGraphicsExportSetInputPixmapSelect = 0x0033
-kGraphicsExportGetInputPixmapSelect = 0x0034
-kGraphicsExportSetInputOffsetAndLimitSelect = 0x0035
-kGraphicsExportGetInputOffsetAndLimitSelect = 0x0036
-kGraphicsExportMayExporterReadInputDataSelect = 0x0037
-kGraphicsExportGetInputDataSizeSelect = 0x0038
-kGraphicsExportReadInputDataSelect = 0x0039
-kGraphicsExportGetInputImageDescriptionSelect = 0x003A
-kGraphicsExportGetInputImageDimensionsSelect = 0x003B
-kGraphicsExportGetInputImageDepthSelect = 0x003C
-kGraphicsExportDrawInputImageSelect = 0x003D
-kGraphicsExportSetOutputDataReferenceSelect = 0x003E
-kGraphicsExportGetOutputDataReferenceSelect = 0x003F
-kGraphicsExportSetOutputFileSelect = 0x0040
-kGraphicsExportGetOutputFileSelect = 0x0041
-kGraphicsExportSetOutputHandleSelect = 0x0042
-kGraphicsExportGetOutputHandleSelect = 0x0043
-kGraphicsExportSetOutputOffsetAndMaxSizeSelect = 0x0044
-kGraphicsExportGetOutputOffsetAndMaxSizeSelect = 0x0045
-kGraphicsExportSetOutputFileTypeAndCreatorSelect = 0x0046
-kGraphicsExportGetOutputFileTypeAndCreatorSelect = 0x0047
-kGraphicsExportWriteOutputDataSelect = 0x0048
-kGraphicsExportSetOutputMarkSelect = 0x0049
-kGraphicsExportGetOutputMarkSelect = 0x004A
-kGraphicsExportReadOutputDataSelect = 0x004B
-kGraphicsExportSetThumbnailEnabledSelect = 0x004C
-kGraphicsExportGetThumbnailEnabledSelect = 0x004D
-kGraphicsExportSetExifEnabledSelect = 0x004E
-kGraphicsExportGetExifEnabledSelect = 0x004F
-kImageTranscoderBeginSequenceSelect = 0x0001
-kImageTranscoderConvertSelect = 0x0002
-kImageTranscoderDisposeDataSelect = 0x0003
-kImageTranscoderEndSequenceSelect = 0x0004
-clockComponentType = FOUR_CHAR_CODE('clok')
-systemTickClock = FOUR_CHAR_CODE('tick')
-systemSecondClock = FOUR_CHAR_CODE('seco')
-systemMillisecondClock = FOUR_CHAR_CODE('mill')
-systemMicrosecondClock = FOUR_CHAR_CODE('micr')
-kClockRateIsLinear = 1
-kClockImplementsCallBacks = 2
-kClockCanHandleIntermittentSound = 4
-StandardCompressionType = FOUR_CHAR_CODE('scdi')
-StandardCompressionSubType = FOUR_CHAR_CODE('imag')
-StandardCompressionSubTypeSound = FOUR_CHAR_CODE('soun')
-scListEveryCodec = 1 << 1
-scAllowZeroFrameRate = 1 << 2
-scAllowZeroKeyFrameRate = 1 << 3
-scShowBestDepth = 1 << 4
-scUseMovableModal = 1 << 5
-scDisableFrameRateItem = 1 << 6
-scShowDataRateAsKilobits = 1 << 7
-scPreferCropping = 1 << 0
-scPreferScaling = 1 << 1
-scPreferScalingAndCropping = scPreferScaling | scPreferCropping
-scDontDetermineSettingsFromTestImage = 1 << 2
-scTestImageWidth = 80
-scTestImageHeight = 80
-scOKItem = 1
-scCancelItem = 2
-scCustomItem = 3
-scUserCancelled = 1
-scPositionRect = 2
-scPositionDialog = 3
-scSetTestImagePictHandle = 4
-scSetTestImagePictFile = 5
-scSetTestImagePixMap = 6
-scGetBestDeviceRect = 7
-scRequestImageSettings = 10
-scCompressImage = 11
-scCompressPicture = 12
-scCompressPictureFile = 13
-scRequestSequenceSettings = 14
-scCompressSequenceBegin = 15
-scCompressSequenceFrame = 16
-scCompressSequenceEnd = 17
-scDefaultPictHandleSettings = 18
-scDefaultPictFileSettings = 19
-scDefaultPixMapSettings = 20
-scGetInfo = 21
-scSetInfo = 22
-scNewGWorld = 23
-scSpatialSettingsType = FOUR_CHAR_CODE('sptl')
-scTemporalSettingsType = FOUR_CHAR_CODE('tprl')
-scDataRateSettingsType = FOUR_CHAR_CODE('drat')
-scColorTableType = FOUR_CHAR_CODE('clut')
-scProgressProcType = FOUR_CHAR_CODE('prog')
-scExtendedProcsType = FOUR_CHAR_CODE('xprc')
-scPreferenceFlagsType = FOUR_CHAR_CODE('pref')
-scSettingsStateType = FOUR_CHAR_CODE('ssta')
-scSequenceIDType = FOUR_CHAR_CODE('sequ')
-scWindowPositionType = FOUR_CHAR_CODE('wndw')
-scCodecFlagsType = FOUR_CHAR_CODE('cflg')
-scCodecSettingsType = FOUR_CHAR_CODE('cdec')
-scForceKeyValueType = FOUR_CHAR_CODE('ksim')
-scSoundSampleRateType = FOUR_CHAR_CODE('ssrt')
-scSoundSampleSizeType = FOUR_CHAR_CODE('ssss')
-scSoundChannelCountType = FOUR_CHAR_CODE('sscc')
-scSoundCompressionType = FOUR_CHAR_CODE('ssct')
-scCompressionListType = FOUR_CHAR_CODE('ctyl')
-scCodecManufacturerType = FOUR_CHAR_CODE('cmfr')
-scSoundVBRCompressionOK = FOUR_CHAR_CODE('cvbr')
-scSoundInputSampleRateType = FOUR_CHAR_CODE('ssir')
-scSoundSampleRateChangeOK = FOUR_CHAR_CODE('rcok')
-scAvailableCompressionListType = FOUR_CHAR_CODE('avai')
-scGetCompression = 1
-scShowMotionSettings = 1 << 0
-scSettingsChangedItem = -1
-scCompressFlagIgnoreIdenticalFrames = 1
-kQTSettingsVideo = FOUR_CHAR_CODE('vide')
-kQTSettingsSound = FOUR_CHAR_CODE('soun')
-kQTSettingsComponentVersion = FOUR_CHAR_CODE('vers')
-TweenComponentType = FOUR_CHAR_CODE('twen')
-TCSourceRefNameType = FOUR_CHAR_CODE('name')
-tcDropFrame = 1 << 0
-tc24HourMax = 1 << 1
-tcNegTimesOK = 1 << 2
-tcCounter = 1 << 3
-tctNegFlag = 0x80
-tcdfShowTimeCode = 1 << 0
-MovieImportType = FOUR_CHAR_CODE('eat ')
-MovieExportType = FOUR_CHAR_CODE('spit')
-canMovieImportHandles = 1 << 0
-canMovieImportFiles = 1 << 1
-hasMovieImportUserInterface = 1 << 2
-canMovieExportHandles = 1 << 3
-canMovieExportFiles = 1 << 4
-hasMovieExportUserInterface = 1 << 5
-movieImporterIsXMLBased = 1 << 5
-dontAutoFileMovieImport = 1 << 6
-canMovieExportAuxDataHandle = 1 << 7
-canMovieImportValidateHandles = 1 << 8
-canMovieImportValidateFile = 1 << 9
-dontRegisterWithEasyOpen = 1 << 10
-canMovieImportInPlace = 1 << 11
-movieImportSubTypeIsFileExtension = 1 << 12
-canMovieImportPartial = 1 << 13
-hasMovieImportMIMEList = 1 << 14
-canMovieImportAvoidBlocking = 1 << 15
-canMovieExportFromProcedures = 1 << 15
-canMovieExportValidateMovie = 1 << 16
-movieImportMustGetDestinationMediaType = 1 << 16
-movieExportNeedsResourceFork = 1 << 17
-canMovieImportDataReferences = 1 << 18
-movieExportMustGetSourceMediaType = 1 << 19
-canMovieImportWithIdle = 1 << 20
-canMovieImportValidateDataReferences = 1 << 21
-reservedForUseByGraphicsImporters = 1 << 23
-movieImportCreateTrack = 1
-movieImportInParallel = 2
-movieImportMustUseTrack = 4
-movieImportWithIdle = 16
-movieImportResultUsedMultipleTracks = 8
-movieImportResultNeedIdles = 32
-movieImportResultComplete = 64
-kMovieExportTextOnly = 0
-kMovieExportAbsoluteTime = 1
-kMovieExportRelativeTime = 2
-kMIDIImportSilenceBefore = 1 << 0
-kMIDIImportSilenceAfter = 1 << 1
-kMIDIImport20Playable = 1 << 2
-kMIDIImportWantLyrics = 1 << 3
-kQTMediaConfigResourceType = FOUR_CHAR_CODE('mcfg')
-kQTMediaConfigResourceVersion = 2
-kQTMediaGroupResourceType = FOUR_CHAR_CODE('mgrp')
-kQTMediaGroupResourceVersion = 1
-kQTBrowserInfoResourceType = FOUR_CHAR_CODE('brws')
-kQTBrowserInfoResourceVersion = 1
-kQTMediaMIMEInfoHasChanged = (1 << 1)
-kQTMediaFileInfoHasChanged = (1 << 2)
-kQTMediaConfigCanUseApp = (1 << 18)
-kQTMediaConfigCanUsePlugin = (1 << 19)
-kQTMediaConfigUNUSED = (1 << 20)
-kQTMediaConfigBinaryFile = (1 << 23)
-kQTMediaConfigTextFile = 0
-kQTMediaConfigMacintoshFile = (1 << 24)
-kQTMediaConfigAssociateByDefault = (1 << 27)
-kQTMediaConfigUseAppByDefault = (1 << 28)
-kQTMediaConfigUsePluginByDefault = (1 << 29)
-kQTMediaConfigDefaultsMask = (kQTMediaConfigUseAppByDefault | kQTMediaConfigUsePluginByDefault)
-kQTMediaConfigDefaultsShift = 12
-kQTMediaConfigHasFileHasQTAtoms = (1 << 30)
-kQTMediaConfigStreamGroupID = FOUR_CHAR_CODE('strm')
-kQTMediaConfigInteractiveGroupID = FOUR_CHAR_CODE('intr')
-kQTMediaConfigVideoGroupID = FOUR_CHAR_CODE('eyes')
-kQTMediaConfigAudioGroupID = FOUR_CHAR_CODE('ears')
-kQTMediaConfigMPEGGroupID = FOUR_CHAR_CODE('mpeg')
-kQTMediaConfigMP3GroupID = FOUR_CHAR_CODE('mp3 ')
-kQTMediaConfigImageGroupID = FOUR_CHAR_CODE('ogle')
-kQTMediaConfigMiscGroupID = FOUR_CHAR_CODE('misc')
-kQTMediaInfoNetGroup = FOUR_CHAR_CODE('net ')
-kQTMediaInfoWinGroup = FOUR_CHAR_CODE('win ')
-kQTMediaInfoMacGroup = FOUR_CHAR_CODE('mac ')
-kQTMediaInfoMiscGroup = 0x3F3F3F3F
-kMimeInfoMimeTypeTag = FOUR_CHAR_CODE('mime')
-kMimeInfoFileExtensionTag = FOUR_CHAR_CODE('ext ')
-kMimeInfoDescriptionTag = FOUR_CHAR_CODE('desc')
-kMimeInfoGroupTag = FOUR_CHAR_CODE('grop')
-kMimeInfoDoNotOverrideExistingFileTypeAssociation = FOUR_CHAR_CODE('nofa')
-kQTFileTypeAIFF = FOUR_CHAR_CODE('AIFF')
-kQTFileTypeAIFC = FOUR_CHAR_CODE('AIFC')
-kQTFileTypeDVC = FOUR_CHAR_CODE('dvc!')
-kQTFileTypeMIDI = FOUR_CHAR_CODE('Midi')
-kQTFileTypePicture = FOUR_CHAR_CODE('PICT')
-kQTFileTypeMovie = FOUR_CHAR_CODE('MooV')
-kQTFileTypeText = FOUR_CHAR_CODE('TEXT')
-kQTFileTypeWave = FOUR_CHAR_CODE('WAVE')
-kQTFileTypeSystemSevenSound = FOUR_CHAR_CODE('sfil')
-kQTFileTypeMuLaw = FOUR_CHAR_CODE('ULAW')
-kQTFileTypeAVI = FOUR_CHAR_CODE('VfW ')
-kQTFileTypeSoundDesignerII = FOUR_CHAR_CODE('Sd2f')
-kQTFileTypeAudioCDTrack = FOUR_CHAR_CODE('trak')
-kQTFileTypePICS = FOUR_CHAR_CODE('PICS')
-kQTFileTypeGIF = FOUR_CHAR_CODE('GIFf')
-kQTFileTypePNG = FOUR_CHAR_CODE('PNGf')
-kQTFileTypeTIFF = FOUR_CHAR_CODE('TIFF')
-kQTFileTypePhotoShop = FOUR_CHAR_CODE('8BPS')
-kQTFileTypeSGIImage = FOUR_CHAR_CODE('.SGI')
-kQTFileTypeBMP = FOUR_CHAR_CODE('BMPf')
-kQTFileTypeJPEG = FOUR_CHAR_CODE('JPEG')
-kQTFileTypeJFIF = FOUR_CHAR_CODE('JPEG')
-kQTFileTypeMacPaint = FOUR_CHAR_CODE('PNTG')
-kQTFileTypeTargaImage = FOUR_CHAR_CODE('TPIC')
-kQTFileTypeQuickDrawGXPicture = FOUR_CHAR_CODE('qdgx')
-kQTFileTypeQuickTimeImage = FOUR_CHAR_CODE('qtif')
-kQTFileType3DMF = FOUR_CHAR_CODE('3DMF')
-kQTFileTypeFLC = FOUR_CHAR_CODE('FLC ')
-kQTFileTypeFlash = FOUR_CHAR_CODE('SWFL')
-kQTFileTypeFlashPix = FOUR_CHAR_CODE('FPix')
-kQTFileTypeMP4 = FOUR_CHAR_CODE('mpg4')
-kQTSettingsDVExportNTSC = FOUR_CHAR_CODE('dvcv')
-kQTSettingsDVExportLockedAudio = FOUR_CHAR_CODE('lock')
-kQTSettingsEffect = FOUR_CHAR_CODE('effe')
-kQTSettingsGraphicsFileImportSequence = FOUR_CHAR_CODE('sequ')
-kQTSettingsGraphicsFileImportSequenceEnabled = FOUR_CHAR_CODE('enab')
-kQTSettingsMovieExportEnableVideo = FOUR_CHAR_CODE('envi')
-kQTSettingsMovieExportEnableSound = FOUR_CHAR_CODE('enso')
-kQTSettingsMovieExportSaveOptions = FOUR_CHAR_CODE('save')
-kQTSettingsMovieExportSaveForInternet = FOUR_CHAR_CODE('fast')
-kQTSettingsMovieExportSaveCompressedMovie = FOUR_CHAR_CODE('cmpm')
-kQTSettingsMIDI = FOUR_CHAR_CODE('MIDI')
-kQTSettingsMIDISettingFlags = FOUR_CHAR_CODE('sttg')
-kQTSettingsText = FOUR_CHAR_CODE('text')
-kQTSettingsTextDescription = FOUR_CHAR_CODE('desc')
-kQTSettingsTextSize = FOUR_CHAR_CODE('size')
-kQTSettingsTextSettingFlags = FOUR_CHAR_CODE('sttg')
-kQTSettingsTextTimeFraction = FOUR_CHAR_CODE('timf')
-kQTSettingsTime = FOUR_CHAR_CODE('time')
-kQTSettingsTimeDuration = FOUR_CHAR_CODE('dura')
-kQTSettingsAudioCDTrack = FOUR_CHAR_CODE('trak')
-kQTSettingsAudioCDTrackRateShift = FOUR_CHAR_CODE('rshf')
-kQTSettingsDVExportDVFormat = FOUR_CHAR_CODE('dvcf')
-kQTPresetsListResourceType = FOUR_CHAR_CODE('stg#')
-kQTPresetsPlatformListResourceType = FOUR_CHAR_CODE('stgp')
-kQTPresetInfoIsDivider = 1
-kQTMovieExportSourceInfoResourceType = FOUR_CHAR_CODE('src#')
-kQTMovieExportSourceInfoIsMediaType = 1 << 0
-kQTMovieExportSourceInfoIsMediaCharacteristic = 1 << 1
-kQTMovieExportSourceInfoIsSourceType = 1 << 2
-movieExportUseConfiguredSettings = FOUR_CHAR_CODE('ucfg')
-movieExportWidth = FOUR_CHAR_CODE('wdth')
-movieExportHeight = FOUR_CHAR_CODE('hegt')
-movieExportDuration = FOUR_CHAR_CODE('dura')
-movieExportVideoFilter = FOUR_CHAR_CODE('iflt')
-movieExportTimeScale = FOUR_CHAR_CODE('tmsc')
-kQTBrowserInfoCanUseSystemFolderPlugin = (1 << 0)
-kQTPreFlightOpenComponent = (1 << 1)
-pnotComponentWantsEvents = 1
-pnotComponentNeedsNoCache = 2
-ShowFilePreviewComponentType = FOUR_CHAR_CODE('pnot')
-CreateFilePreviewComponentType = FOUR_CHAR_CODE('pmak')
-DataCompressorComponentType = FOUR_CHAR_CODE('dcom')
-DataDecompressorComponentType = FOUR_CHAR_CODE('ddec')
-AppleDataCompressorSubType = FOUR_CHAR_CODE('adec')
-zlibDataCompressorSubType = FOUR_CHAR_CODE('zlib')
-kDataHCanRead = 1 << 0
-kDataHSpecialRead = 1 << 1
-kDataHSpecialReadFile = 1 << 2
-kDataHCanWrite = 1 << 3
-kDataHSpecialWrite = 1 << 4
-kDataHSpecialWriteFile = 1 << 5
-kDataHCanStreamingWrite = 1 << 6
-kDataHMustCheckDataRef = 1 << 7
-kDataRefExtensionChokeSpeed = FOUR_CHAR_CODE('chok')
-kDataRefExtensionFileName = FOUR_CHAR_CODE('fnam')
-kDataRefExtensionMIMEType = FOUR_CHAR_CODE('mime')
-kDataRefExtensionMacOSFileType = FOUR_CHAR_CODE('ftyp')
-kDataRefExtensionInitializationData = FOUR_CHAR_CODE('data')
-kDataRefExtensionQuickTimeMediaType = FOUR_CHAR_CODE('mtyp')
-kDataHChokeToMovieDataRate = 1 << 0
-kDataHChokeToParam = 1 << 1
-kDataHExtendedSchedule = FOUR_CHAR_CODE('xtnd')
-kDataHInfoFlagNeverStreams = 1 << 0
-kDataHInfoFlagCanUpdateDataRefs = 1 << 1
-kDataHInfoFlagNeedsNetworkBandwidth = 1 << 2
-kDataHFileTypeMacOSFileType = FOUR_CHAR_CODE('ftyp')
-kDataHFileTypeExtension = FOUR_CHAR_CODE('fext')
-kDataHFileTypeMIME = FOUR_CHAR_CODE('mime')
-kDataHCreateFileButDontCreateResFile = (1 << 0)
-kDataHMovieUsageDoAppendMDAT = 1 << 0
-kDataHTempUseSameDirectory = 1 << 0
-kDataHTempUseSameVolume = 1 << 1
-kDataHTempCreateFile = 1 << 2
-kDataHTempOpenFile = 1 << 3
-kDataHGetDataRateInfiniteRate = 0x7FFFFFFF
-kDataHSetTimeHintsSkipBandwidthRequest = 1 << 0
-videoDigitizerComponentType = FOUR_CHAR_CODE('vdig')
-vdigInterfaceRev = 2
-ntscIn = 0
-currentIn = 0
-palIn = 1
-secamIn = 2
-ntscReallyIn = 3
-compositeIn = 0
-sVideoIn = 1
-rgbComponentIn = 2
-rgbComponentSyncIn = 3
-yuvComponentIn = 4
-yuvComponentSyncIn = 5
-tvTunerIn = 6
-sdiIn = 7
-vdPlayThruOff = 0
-vdPlayThruOn = 1
-vdDigitizerBW = 0
-vdDigitizerRGB = 1
-vdBroadcastMode = 0
-vdVTRMode = 1
-vdUseAnyField = 0
-vdUseOddField = 1
-vdUseEvenField = 2
-vdTypeBasic = 0
-vdTypeAlpha = 1
-vdTypeMask = 2
-vdTypeKey = 3
-digiInDoesNTSC = 1 << 0
-digiInDoesPAL = 1 << 1
-digiInDoesSECAM = 1 << 2
-digiInDoesGenLock = 1 << 7
-digiInDoesComposite = 1 << 8
-digiInDoesSVideo = 1 << 9
-digiInDoesComponent = 1 << 10
-digiInVTR_Broadcast = 1 << 11
-digiInDoesColor = 1 << 12
-digiInDoesBW = 1 << 13
-digiInSignalLock = 1 << 31
-digiOutDoes1 = 1 << 0
-digiOutDoes2 = 1 << 1
-digiOutDoes4 = 1 << 2
-digiOutDoes8 = 1 << 3
-digiOutDoes16 = 1 << 4
-digiOutDoes32 = 1 << 5
-digiOutDoesDither = 1 << 6
-digiOutDoesStretch = 1 << 7
-digiOutDoesShrink = 1 << 8
-digiOutDoesMask = 1 << 9
-digiOutDoesDouble = 1 << 11
-digiOutDoesQuad = 1 << 12
-digiOutDoesQuarter = 1 << 13
-digiOutDoesSixteenth = 1 << 14
-digiOutDoesRotate = 1 << 15
-digiOutDoesHorizFlip = 1 << 16
-digiOutDoesVertFlip = 1 << 17
-digiOutDoesSkew = 1 << 18
-digiOutDoesBlend = 1 << 19
-digiOutDoesWarp = 1 << 20
-digiOutDoesHW_DMA = 1 << 21
-digiOutDoesHWPlayThru = 1 << 22
-digiOutDoesILUT = 1 << 23
-digiOutDoesKeyColor = 1 << 24
-digiOutDoesAsyncGrabs = 1 << 25
-digiOutDoesUnreadableScreenBits = 1 << 26
-digiOutDoesCompress = 1 << 27
-digiOutDoesCompressOnly = 1 << 28
-digiOutDoesPlayThruDuringCompress = 1 << 29
-digiOutDoesCompressPartiallyVisible = 1 << 30
-digiOutDoesNotNeedCopyOfCompressData = 1 << 31
-dmaDepth1 = 1
-dmaDepth2 = 2
-dmaDepth4 = 4
-dmaDepth8 = 8
-dmaDepth16 = 16
-dmaDepth32 = 32
-dmaDepth2Gray = 64
-dmaDepth4Gray = 128
-dmaDepth8Gray = 256
-kVDIGControlledFrameRate = -1
-vdDeviceFlagShowInputsAsDevices = (1 << 0)
-vdDeviceFlagHideDevice = (1 << 1)
-vdFlagCaptureStarting = (1 << 0)
-vdFlagCaptureStopping = (1 << 1)
-vdFlagCaptureIsForPreview = (1 << 2)
-vdFlagCaptureIsForRecord = (1 << 3)
-vdFlagCaptureLowLatency = (1 << 4)
-vdFlagCaptureAlwaysUseTimeBase = (1 << 5)
-vdFlagCaptureSetSettingsBegin = (1 << 6)
-vdFlagCaptureSetSettingsEnd = (1 << 7)
-xmlParseComponentType = FOUR_CHAR_CODE('pars')
-xmlParseComponentSubType = FOUR_CHAR_CODE('xml ')
-xmlIdentifierInvalid = 0
-# xmlIdentifierUnrecognized = (long)0xFFFFFFFF
-xmlContentTypeInvalid = 0
-xmlContentTypeElement = 1
-xmlContentTypeCharData = 2
-elementFlagAlwaysSelfContained = 1 << 0
-elementFlagPreserveWhiteSpace = 1 << 1
-xmlParseFlagAllowUppercase = 1 << 0
-xmlParseFlagAllowUnquotedAttributeValues = 1 << 1
-xmlParseFlagEventParseOnly = 1 << 2
-attributeValueKindCharString = 0
-attributeValueKindInteger = 1 << 0
-attributeValueKindPercent = 1 << 1
-attributeValueKindBoolean = 1 << 2
-attributeValueKindOnOff = 1 << 3
-attributeValueKindColor = 1 << 4
-attributeValueKindEnum = 1 << 5
-attributeValueKindCaseSensEnum = 1 << 6
-MAX_ATTRIBUTE_VALUE_KIND = attributeValueKindCaseSensEnum
-nameSpaceIDNone = 0
-element_xml = 1
-attr_src = 1
-SeqGrabComponentType = FOUR_CHAR_CODE('barg')
-SeqGrabChannelType = FOUR_CHAR_CODE('sgch')
-SeqGrabPanelType = FOUR_CHAR_CODE('sgpn')
-SeqGrabCompressionPanelType = FOUR_CHAR_CODE('cmpr')
-SeqGrabSourcePanelType = FOUR_CHAR_CODE('sour')
-seqGrabToDisk = 1
-seqGrabToMemory = 2
-seqGrabDontUseTempMemory = 4
-seqGrabAppendToFile = 8
-seqGrabDontAddMovieResource = 16
-seqGrabDontMakeMovie = 32
-seqGrabPreExtendFile = 64
-seqGrabDataProcIsInterruptSafe = 128
-seqGrabDataProcDoesOverlappingReads = 256
-seqGrabRecord = 1
-seqGrabPreview = 2
-seqGrabPlayDuringRecord = 4
-seqGrabLowLatencyCapture = 8
-seqGrabAlwaysUseTimeBase = 16
-seqGrabHasBounds = 1
-seqGrabHasVolume = 2
-seqGrabHasDiscreteSamples = 4
-seqGrabDoNotBufferizeData = 8
-seqGrabCanMoveWindowWhileRecording = 16
-grabPictOffScreen = 1
-grabPictIgnoreClip = 2
-grabPictCurrentImage = 4
-sgFlagControlledGrab = (1 << 0)
-sgFlagAllowNonRGBPixMaps = (1 << 1)
-sgDeviceInputNameFlagInputUnavailable = (1 << 0)
-sgDeviceNameFlagDeviceUnavailable = (1 << 0)
-sgDeviceNameFlagShowInputsAsDevices = (1 << 1)
-sgDeviceListWithIcons = (1 << 0)
-sgDeviceListDontCheckAvailability = (1 << 1)
-sgDeviceListIncludeInputs = (1 << 2)
-seqGrabWriteAppend = 0
-seqGrabWriteReserve = 1
-seqGrabWriteFill = 2
-seqGrabUnpause = 0
-seqGrabPause = 1
-seqGrabPauseForMenu = 3
-channelFlagDontOpenResFile = 2
-channelFlagHasDependency = 4
-sgPanelFlagForPanel = 1
-seqGrabSettingsPreviewOnly = 1
-channelPlayNormal = 0
-channelPlayFast = 1
-channelPlayHighQuality = 2
-channelPlayAllData = 4
-sgSetSettingsBegin = (1 << 0)
-sgSetSettingsEnd = (1 << 1)
-kSGSmallestDITLSize = -1
-kSGLargestDITLSize = -2
-sgChannelAtom = FOUR_CHAR_CODE('chan')
-sgChannelSettingsAtom = FOUR_CHAR_CODE('ctom')
-sgChannelDescription = FOUR_CHAR_CODE('cdsc')
-sgChannelSettings = FOUR_CHAR_CODE('cset')
-sgDeviceNameType = FOUR_CHAR_CODE('name')
-sgDeviceDisplayNameType = FOUR_CHAR_CODE('dnam')
-sgDeviceUIDType = FOUR_CHAR_CODE('duid')
-sgInputUIDType = FOUR_CHAR_CODE('iuid')
-sgUsageType = FOUR_CHAR_CODE('use ')
-sgPlayFlagsType = FOUR_CHAR_CODE('plyf')
-sgClipType = FOUR_CHAR_CODE('clip')
-sgMatrixType = FOUR_CHAR_CODE('mtrx')
-sgVolumeType = FOUR_CHAR_CODE('volu')
-sgPanelSettingsAtom = FOUR_CHAR_CODE('ptom')
-sgPanelDescription = FOUR_CHAR_CODE('pdsc')
-sgPanelSettings = FOUR_CHAR_CODE('pset')
-sgcSoundCompressionType = FOUR_CHAR_CODE('scmp')
-sgcSoundCodecSettingsType = FOUR_CHAR_CODE('cdec')
-sgcSoundSampleRateType = FOUR_CHAR_CODE('srat')
-sgcSoundChannelCountType = FOUR_CHAR_CODE('schn')
-sgcSoundSampleSizeType = FOUR_CHAR_CODE('ssiz')
-sgcSoundInputType = FOUR_CHAR_CODE('sinp')
-sgcSoundGainType = FOUR_CHAR_CODE('gain')
-sgcVideoHueType = FOUR_CHAR_CODE('hue ')
-sgcVideoSaturationType = FOUR_CHAR_CODE('satr')
-sgcVideoContrastType = FOUR_CHAR_CODE('trst')
-sgcVideoSharpnessType = FOUR_CHAR_CODE('shrp')
-sgcVideoBrigtnessType = FOUR_CHAR_CODE('brit')
-sgcVideoBlackLevelType = FOUR_CHAR_CODE('blkl')
-sgcVideoWhiteLevelType = FOUR_CHAR_CODE('whtl')
-sgcVideoInputType = FOUR_CHAR_CODE('vinp')
-sgcVideoFormatType = FOUR_CHAR_CODE('vstd')
-sgcVideoFilterType = FOUR_CHAR_CODE('vflt')
-sgcVideoRectType = FOUR_CHAR_CODE('vrct')
-sgcVideoDigitizerType = FOUR_CHAR_CODE('vdig')
-QTVideoOutputComponentType = FOUR_CHAR_CODE('vout')
-QTVideoOutputComponentBaseSubType = FOUR_CHAR_CODE('base')
-kQTVideoOutputDontDisplayToUser = 1 << 0
-kQTVODisplayModeItem = FOUR_CHAR_CODE('qdmi')
-kQTVODimensions = FOUR_CHAR_CODE('dimn')
-kQTVOResolution = FOUR_CHAR_CODE('resl')
-kQTVORefreshRate = FOUR_CHAR_CODE('refr')
-kQTVOPixelType = FOUR_CHAR_CODE('pixl')
-kQTVOName = FOUR_CHAR_CODE('name')
-kQTVODecompressors = FOUR_CHAR_CODE('deco')
-kQTVODecompressorType = FOUR_CHAR_CODE('dety')
-kQTVODecompressorContinuous = FOUR_CHAR_CODE('cont')
-kQTVODecompressorComponent = FOUR_CHAR_CODE('cmpt')
-kClockGetTimeSelect = 0x0001
-kClockNewCallBackSelect = 0x0002
-kClockDisposeCallBackSelect = 0x0003
-kClockCallMeWhenSelect = 0x0004
-kClockCancelCallBackSelect = 0x0005
-kClockRateChangedSelect = 0x0006
-kClockTimeChangedSelect = 0x0007
-kClockSetTimeBaseSelect = 0x0008
-kClockStartStopChangedSelect = 0x0009
-kClockGetRateSelect = 0x000A
-kSCGetCompressionExtendedSelect = 0x0001
-kSCPositionRectSelect = 0x0002
-kSCPositionDialogSelect = 0x0003
-kSCSetTestImagePictHandleSelect = 0x0004
-kSCSetTestImagePictFileSelect = 0x0005
-kSCSetTestImagePixMapSelect = 0x0006
-kSCGetBestDeviceRectSelect = 0x0007
-kSCRequestImageSettingsSelect = 0x000A
-kSCCompressImageSelect = 0x000B
-kSCCompressPictureSelect = 0x000C
-kSCCompressPictureFileSelect = 0x000D
-kSCRequestSequenceSettingsSelect = 0x000E
-kSCCompressSequenceBeginSelect = 0x000F
-kSCCompressSequenceFrameSelect = 0x0010
-kSCCompressSequenceEndSelect = 0x0011
-kSCDefaultPictHandleSettingsSelect = 0x0012
-kSCDefaultPictFileSettingsSelect = 0x0013
-kSCDefaultPixMapSettingsSelect = 0x0014
-kSCGetInfoSelect = 0x0015
-kSCSetInfoSelect = 0x0016
-kSCNewGWorldSelect = 0x0017
-kSCSetCompressFlagsSelect = 0x0018
-kSCGetCompressFlagsSelect = 0x0019
-kSCGetSettingsAsTextSelect = 0x001A
-kSCGetSettingsAsAtomContainerSelect = 0x001B
-kSCSetSettingsFromAtomContainerSelect = 0x001C
-kSCCompressSequenceFrameAsyncSelect = 0x001D
-kSCAsyncIdleSelect = 0x001E
-kTweenerInitializeSelect = 0x0001
-kTweenerDoTweenSelect = 0x0002
-kTweenerResetSelect = 0x0003
-kTCGetCurrentTimeCodeSelect = 0x0101
-kTCGetTimeCodeAtTimeSelect = 0x0102
-kTCTimeCodeToStringSelect = 0x0103
-kTCTimeCodeToFrameNumberSelect = 0x0104
-kTCFrameNumberToTimeCodeSelect = 0x0105
-kTCGetSourceRefSelect = 0x0106
-kTCSetSourceRefSelect = 0x0107
-kTCSetTimeCodeFlagsSelect = 0x0108
-kTCGetTimeCodeFlagsSelect = 0x0109
-kTCSetDisplayOptionsSelect = 0x010A
-kTCGetDisplayOptionsSelect = 0x010B
-kMovieImportHandleSelect = 0x0001
-kMovieImportFileSelect = 0x0002
-kMovieImportSetSampleDurationSelect = 0x0003
-kMovieImportSetSampleDescriptionSelect = 0x0004
-kMovieImportSetMediaFileSelect = 0x0005
-kMovieImportSetDimensionsSelect = 0x0006
-kMovieImportSetChunkSizeSelect = 0x0007
-kMovieImportSetProgressProcSelect = 0x0008
-kMovieImportSetAuxiliaryDataSelect = 0x0009
-kMovieImportSetFromScrapSelect = 0x000A
-kMovieImportDoUserDialogSelect = 0x000B
-kMovieImportSetDurationSelect = 0x000C
-kMovieImportGetAuxiliaryDataTypeSelect = 0x000D
-kMovieImportValidateSelect = 0x000E
-kMovieImportGetFileTypeSelect = 0x000F
-kMovieImportDataRefSelect = 0x0010
-kMovieImportGetSampleDescriptionSelect = 0x0011
-kMovieImportGetMIMETypeListSelect = 0x0012
-kMovieImportSetOffsetAndLimitSelect = 0x0013
-kMovieImportGetSettingsAsAtomContainerSelect = 0x0014
-kMovieImportSetSettingsFromAtomContainerSelect = 0x0015
-kMovieImportSetOffsetAndLimit64Select = 0x0016
-kMovieImportIdleSelect = 0x0017
-kMovieImportValidateDataRefSelect = 0x0018
-kMovieImportGetLoadStateSelect = 0x0019
-kMovieImportGetMaxLoadedTimeSelect = 0x001A
-kMovieImportEstimateCompletionTimeSelect = 0x001B
-kMovieImportSetDontBlockSelect = 0x001C
-kMovieImportGetDontBlockSelect = 0x001D
-kMovieImportSetIdleManagerSelect = 0x001E
-kMovieImportSetNewMovieFlagsSelect = 0x001F
-kMovieImportGetDestinationMediaTypeSelect = 0x0020
-kMovieExportToHandleSelect = 0x0080
-kMovieExportToFileSelect = 0x0081
-kMovieExportGetAuxiliaryDataSelect = 0x0083
-kMovieExportSetProgressProcSelect = 0x0084
-kMovieExportSetSampleDescriptionSelect = 0x0085
-kMovieExportDoUserDialogSelect = 0x0086
-kMovieExportGetCreatorTypeSelect = 0x0087
-kMovieExportToDataRefSelect = 0x0088
-kMovieExportFromProceduresToDataRefSelect = 0x0089
-kMovieExportAddDataSourceSelect = 0x008A
-kMovieExportValidateSelect = 0x008B
-kMovieExportGetSettingsAsAtomContainerSelect = 0x008C
-kMovieExportSetSettingsFromAtomContainerSelect = 0x008D
-kMovieExportGetFileNameExtensionSelect = 0x008E
-kMovieExportGetShortFileTypeStringSelect = 0x008F
-kMovieExportGetSourceMediaTypeSelect = 0x0090
-kMovieExportSetGetMoviePropertyProcSelect = 0x0091
-kTextExportGetDisplayDataSelect = 0x0100
-kTextExportGetTimeFractionSelect = 0x0101
-kTextExportSetTimeFractionSelect = 0x0102
-kTextExportGetSettingsSelect = 0x0103
-kTextExportSetSettingsSelect = 0x0104
-kMIDIImportGetSettingsSelect = 0x0100
-kMIDIImportSetSettingsSelect = 0x0101
-kMovieExportNewGetDataAndPropertiesProcsSelect = 0x0100
-kMovieExportDisposeGetDataAndPropertiesProcsSelect = 0x0101
-kGraphicsImageImportSetSequenceEnabledSelect = 0x0100
-kGraphicsImageImportGetSequenceEnabledSelect = 0x0101
-kPreviewShowDataSelect = 0x0001
-kPreviewMakePreviewSelect = 0x0002
-kPreviewMakePreviewReferenceSelect = 0x0003
-kPreviewEventSelect = 0x0004
-kDataCodecDecompressSelect = 0x0001
-kDataCodecGetCompressBufferSizeSelect = 0x0002
-kDataCodecCompressSelect = 0x0003
-kDataCodecBeginInterruptSafeSelect = 0x0004
-kDataCodecEndInterruptSafeSelect = 0x0005
-kDataCodecDecompressPartialSelect = 0x0006
-kDataCodecCompressPartialSelect = 0x0007
-kDataHGetDataSelect = 0x0002
-kDataHPutDataSelect = 0x0003
-kDataHFlushDataSelect = 0x0004
-kDataHOpenForWriteSelect = 0x0005
-kDataHCloseForWriteSelect = 0x0006
-kDataHOpenForReadSelect = 0x0008
-kDataHCloseForReadSelect = 0x0009
-kDataHSetDataRefSelect = 0x000A
-kDataHGetDataRefSelect = 0x000B
-kDataHCompareDataRefSelect = 0x000C
-kDataHTaskSelect = 0x000D
-kDataHScheduleDataSelect = 0x000E
-kDataHFinishDataSelect = 0x000F
-kDataHFlushCacheSelect = 0x0010
-kDataHResolveDataRefSelect = 0x0011
-kDataHGetFileSizeSelect = 0x0012
-kDataHCanUseDataRefSelect = 0x0013
-kDataHGetVolumeListSelect = 0x0014
-kDataHWriteSelect = 0x0015
-kDataHPreextendSelect = 0x0016
-kDataHSetFileSizeSelect = 0x0017
-kDataHGetFreeSpaceSelect = 0x0018
-kDataHCreateFileSelect = 0x0019
-kDataHGetPreferredBlockSizeSelect = 0x001A
-kDataHGetDeviceIndexSelect = 0x001B
-kDataHIsStreamingDataHandlerSelect = 0x001C
-kDataHGetDataInBufferSelect = 0x001D
-kDataHGetScheduleAheadTimeSelect = 0x001E
-kDataHSetCacheSizeLimitSelect = 0x001F
-kDataHGetCacheSizeLimitSelect = 0x0020
-kDataHGetMovieSelect = 0x0021
-kDataHAddMovieSelect = 0x0022
-kDataHUpdateMovieSelect = 0x0023
-kDataHDoesBufferSelect = 0x0024
-kDataHGetFileNameSelect = 0x0025
-kDataHGetAvailableFileSizeSelect = 0x0026
-kDataHGetMacOSFileTypeSelect = 0x0027
-kDataHGetMIMETypeSelect = 0x0028
-kDataHSetDataRefWithAnchorSelect = 0x0029
-kDataHGetDataRefWithAnchorSelect = 0x002A
-kDataHSetMacOSFileTypeSelect = 0x002B
-kDataHSetTimeBaseSelect = 0x002C
-kDataHGetInfoFlagsSelect = 0x002D
-kDataHScheduleData64Select = 0x002E
-kDataHWrite64Select = 0x002F
-kDataHGetFileSize64Select = 0x0030
-kDataHPreextend64Select = 0x0031
-kDataHSetFileSize64Select = 0x0032
-kDataHGetFreeSpace64Select = 0x0033
-kDataHAppend64Select = 0x0034
-kDataHReadAsyncSelect = 0x0035
-kDataHPollReadSelect = 0x0036
-kDataHGetDataAvailabilitySelect = 0x0037
-kDataHGetFileSizeAsyncSelect = 0x003A
-kDataHGetDataRefAsTypeSelect = 0x003B
-kDataHSetDataRefExtensionSelect = 0x003C
-kDataHGetDataRefExtensionSelect = 0x003D
-kDataHGetMovieWithFlagsSelect = 0x003E
-kDataHGetFileTypeOrderingSelect = 0x0040
-kDataHCreateFileWithFlagsSelect = 0x0041
-kDataHGetMIMETypeAsyncSelect = 0x0042
-kDataHGetInfoSelect = 0x0043
-kDataHSetIdleManagerSelect = 0x0044
-kDataHDeleteFileSelect = 0x0045
-kDataHSetMovieUsageFlagsSelect = 0x0046
-kDataHUseTemporaryDataRefSelect = 0x0047
-kDataHGetTemporaryDataRefCapabilitiesSelect = 0x0048
-kDataHRenameFileSelect = 0x0049
-kDataHPlaybackHintsSelect = 0x0103
-kDataHPlaybackHints64Select = 0x010E
-kDataHGetDataRateSelect = 0x0110
-kDataHSetTimeHintsSelect = 0x0111
-kVDGetMaxSrcRectSelect = 0x0001
-kVDGetActiveSrcRectSelect = 0x0002
-kVDSetDigitizerRectSelect = 0x0003
-kVDGetDigitizerRectSelect = 0x0004
-kVDGetVBlankRectSelect = 0x0005
-kVDGetMaskPixMapSelect = 0x0006
-kVDGetPlayThruDestinationSelect = 0x0008
-kVDUseThisCLUTSelect = 0x0009
-kVDSetInputGammaValueSelect = 0x000A
-kVDGetInputGammaValueSelect = 0x000B
-kVDSetBrightnessSelect = 0x000C
-kVDGetBrightnessSelect = 0x000D
-kVDSetContrastSelect = 0x000E
-kVDSetHueSelect = 0x000F
-kVDSetSharpnessSelect = 0x0010
-kVDSetSaturationSelect = 0x0011
-kVDGetContrastSelect = 0x0012
-kVDGetHueSelect = 0x0013
-kVDGetSharpnessSelect = 0x0014
-kVDGetSaturationSelect = 0x0015
-kVDGrabOneFrameSelect = 0x0016
-kVDGetMaxAuxBufferSelect = 0x0017
-kVDGetDigitizerInfoSelect = 0x0019
-kVDGetCurrentFlagsSelect = 0x001A
-kVDSetKeyColorSelect = 0x001B
-kVDGetKeyColorSelect = 0x001C
-kVDAddKeyColorSelect = 0x001D
-kVDGetNextKeyColorSelect = 0x001E
-kVDSetKeyColorRangeSelect = 0x001F
-kVDGetKeyColorRangeSelect = 0x0020
-kVDSetDigitizerUserInterruptSelect = 0x0021
-kVDSetInputColorSpaceModeSelect = 0x0022
-kVDGetInputColorSpaceModeSelect = 0x0023
-kVDSetClipStateSelect = 0x0024
-kVDGetClipStateSelect = 0x0025
-kVDSetClipRgnSelect = 0x0026
-kVDClearClipRgnSelect = 0x0027
-kVDGetCLUTInUseSelect = 0x0028
-kVDSetPLLFilterTypeSelect = 0x0029
-kVDGetPLLFilterTypeSelect = 0x002A
-kVDGetMaskandValueSelect = 0x002B
-kVDSetMasterBlendLevelSelect = 0x002C
-kVDSetPlayThruDestinationSelect = 0x002D
-kVDSetPlayThruOnOffSelect = 0x002E
-kVDSetFieldPreferenceSelect = 0x002F
-kVDGetFieldPreferenceSelect = 0x0030
-kVDPreflightDestinationSelect = 0x0032
-kVDPreflightGlobalRectSelect = 0x0033
-kVDSetPlayThruGlobalRectSelect = 0x0034
-kVDSetInputGammaRecordSelect = 0x0035
-kVDGetInputGammaRecordSelect = 0x0036
-kVDSetBlackLevelValueSelect = 0x0037
-kVDGetBlackLevelValueSelect = 0x0038
-kVDSetWhiteLevelValueSelect = 0x0039
-kVDGetWhiteLevelValueSelect = 0x003A
-kVDGetVideoDefaultsSelect = 0x003B
-kVDGetNumberOfInputsSelect = 0x003C
-kVDGetInputFormatSelect = 0x003D
-kVDSetInputSelect = 0x003E
-kVDGetInputSelect = 0x003F
-kVDSetInputStandardSelect = 0x0040
-kVDSetupBuffersSelect = 0x0041
-kVDGrabOneFrameAsyncSelect = 0x0042
-kVDDoneSelect = 0x0043
-kVDSetCompressionSelect = 0x0044
-kVDCompressOneFrameAsyncSelect = 0x0045
-kVDCompressDoneSelect = 0x0046
-kVDReleaseCompressBufferSelect = 0x0047
-kVDGetImageDescriptionSelect = 0x0048
-kVDResetCompressSequenceSelect = 0x0049
-kVDSetCompressionOnOffSelect = 0x004A
-kVDGetCompressionTypesSelect = 0x004B
-kVDSetTimeBaseSelect = 0x004C
-kVDSetFrameRateSelect = 0x004D
-kVDGetDataRateSelect = 0x004E
-kVDGetSoundInputDriverSelect = 0x004F
-kVDGetDMADepthsSelect = 0x0050
-kVDGetPreferredTimeScaleSelect = 0x0051
-kVDReleaseAsyncBuffersSelect = 0x0052
-kVDSetDataRateSelect = 0x0054
-kVDGetTimeCodeSelect = 0x0055
-kVDUseSafeBuffersSelect = 0x0056
-kVDGetSoundInputSourceSelect = 0x0057
-kVDGetCompressionTimeSelect = 0x0058
-kVDSetPreferredPacketSizeSelect = 0x0059
-kVDSetPreferredImageDimensionsSelect = 0x005A
-kVDGetPreferredImageDimensionsSelect = 0x005B
-kVDGetInputNameSelect = 0x005C
-kVDSetDestinationPortSelect = 0x005D
-kVDGetDeviceNameAndFlagsSelect = 0x005E
-kVDCaptureStateChangingSelect = 0x005F
-kVDGetUniqueIDsSelect = 0x0060
-kVDSelectUniqueIDsSelect = 0x0061
-kXMLParseDataRefSelect = 0x0001
-kXMLParseFileSelect = 0x0002
-kXMLParseDisposeXMLDocSelect = 0x0003
-kXMLParseGetDetailedParseErrorSelect = 0x0004
-kXMLParseAddElementSelect = 0x0005
-kXMLParseAddAttributeSelect = 0x0006
-kXMLParseAddMultipleAttributesSelect = 0x0007
-kXMLParseAddAttributeAndValueSelect = 0x0008
-kXMLParseAddMultipleAttributesAndValuesSelect = 0x0009
-kXMLParseAddAttributeValueKindSelect = 0x000A
-kXMLParseAddNameSpaceSelect = 0x000B
-kXMLParseSetOffsetAndLimitSelect = 0x000C
-kXMLParseSetEventParseRefConSelect = 0x000D
-kXMLParseSetStartDocumentHandlerSelect = 0x000E
-kXMLParseSetEndDocumentHandlerSelect = 0x000F
-kXMLParseSetStartElementHandlerSelect = 0x0010
-kXMLParseSetEndElementHandlerSelect = 0x0011
-kXMLParseSetCharDataHandlerSelect = 0x0012
-kXMLParseSetPreprocessInstructionHandlerSelect = 0x0013
-kXMLParseSetCommentHandlerSelect = 0x0014
-kXMLParseSetCDataHandlerSelect = 0x0015
-kSGInitializeSelect = 0x0001
-kSGSetDataOutputSelect = 0x0002
-kSGGetDataOutputSelect = 0x0003
-kSGSetGWorldSelect = 0x0004
-kSGGetGWorldSelect = 0x0005
-kSGNewChannelSelect = 0x0006
-kSGDisposeChannelSelect = 0x0007
-kSGStartPreviewSelect = 0x0010
-kSGStartRecordSelect = 0x0011
-kSGIdleSelect = 0x0012
-kSGStopSelect = 0x0013
-kSGPauseSelect = 0x0014
-kSGPrepareSelect = 0x0015
-kSGReleaseSelect = 0x0016
-kSGGetMovieSelect = 0x0017
-kSGSetMaximumRecordTimeSelect = 0x0018
-kSGGetMaximumRecordTimeSelect = 0x0019
-kSGGetStorageSpaceRemainingSelect = 0x001A
-kSGGetTimeRemainingSelect = 0x001B
-kSGGrabPictSelect = 0x001C
-kSGGetLastMovieResIDSelect = 0x001D
-kSGSetFlagsSelect = 0x001E
-kSGGetFlagsSelect = 0x001F
-kSGSetDataProcSelect = 0x0020
-kSGNewChannelFromComponentSelect = 0x0021
-kSGDisposeDeviceListSelect = 0x0022
-kSGAppendDeviceListToMenuSelect = 0x0023
-kSGSetSettingsSelect = 0x0024
-kSGGetSettingsSelect = 0x0025
-kSGGetIndChannelSelect = 0x0026
-kSGUpdateSelect = 0x0027
-kSGGetPauseSelect = 0x0028
-kSGSettingsDialogSelect = 0x0029
-kSGGetAlignmentProcSelect = 0x002A
-kSGSetChannelSettingsSelect = 0x002B
-kSGGetChannelSettingsSelect = 0x002C
-kSGGetModeSelect = 0x002D
-kSGSetDataRefSelect = 0x002E
-kSGGetDataRefSelect = 0x002F
-kSGNewOutputSelect = 0x0030
-kSGDisposeOutputSelect = 0x0031
-kSGSetOutputFlagsSelect = 0x0032
-kSGSetChannelOutputSelect = 0x0033
-kSGGetDataOutputStorageSpaceRemainingSelect = 0x0034
-kSGHandleUpdateEventSelect = 0x0035
-kSGSetOutputNextOutputSelect = 0x0036
-kSGGetOutputNextOutputSelect = 0x0037
-kSGSetOutputMaximumOffsetSelect = 0x0038
-kSGGetOutputMaximumOffsetSelect = 0x0039
-kSGGetOutputDataReferenceSelect = 0x003A
-kSGWriteExtendedMovieDataSelect = 0x003B
-kSGGetStorageSpaceRemaining64Select = 0x003C
-kSGGetDataOutputStorageSpaceRemaining64Select = 0x003D
-kSGWriteMovieDataSelect = 0x0100
-kSGAddFrameReferenceSelect = 0x0101
-kSGGetNextFrameReferenceSelect = 0x0102
-kSGGetTimeBaseSelect = 0x0103
-kSGSortDeviceListSelect = 0x0104
-kSGAddMovieDataSelect = 0x0105
-kSGChangedSourceSelect = 0x0106
-kSGAddExtendedFrameReferenceSelect = 0x0107
-kSGGetNextExtendedFrameReferenceSelect = 0x0108
-kSGAddExtendedMovieDataSelect = 0x0109
-kSGAddOutputDataRefToMediaSelect = 0x010A
-kSGSetSettingsSummarySelect = 0x010B
-kSGSetChannelUsageSelect = 0x0080
-kSGGetChannelUsageSelect = 0x0081
-kSGSetChannelBoundsSelect = 0x0082
-kSGGetChannelBoundsSelect = 0x0083
-kSGSetChannelVolumeSelect = 0x0084
-kSGGetChannelVolumeSelect = 0x0085
-kSGGetChannelInfoSelect = 0x0086
-kSGSetChannelPlayFlagsSelect = 0x0087
-kSGGetChannelPlayFlagsSelect = 0x0088
-kSGSetChannelMaxFramesSelect = 0x0089
-kSGGetChannelMaxFramesSelect = 0x008A
-kSGSetChannelRefConSelect = 0x008B
-kSGSetChannelClipSelect = 0x008C
-kSGGetChannelClipSelect = 0x008D
-kSGGetChannelSampleDescriptionSelect = 0x008E
-kSGGetChannelDeviceListSelect = 0x008F
-kSGSetChannelDeviceSelect = 0x0090
-kSGSetChannelMatrixSelect = 0x0091
-kSGGetChannelMatrixSelect = 0x0092
-kSGGetChannelTimeScaleSelect = 0x0093
-kSGChannelPutPictureSelect = 0x0094
-kSGChannelSetRequestedDataRateSelect = 0x0095
-kSGChannelGetRequestedDataRateSelect = 0x0096
-kSGChannelSetDataSourceNameSelect = 0x0097
-kSGChannelGetDataSourceNameSelect = 0x0098
-kSGChannelSetCodecSettingsSelect = 0x0099
-kSGChannelGetCodecSettingsSelect = 0x009A
-kSGGetChannelTimeBaseSelect = 0x009B
-kSGGetChannelRefConSelect = 0x009C
-kSGGetChannelDeviceAndInputNamesSelect = 0x009D
-kSGSetChannelDeviceInputSelect = 0x009E
-kSGSetChannelSettingsStateChangingSelect = 0x009F
-kSGInitChannelSelect = 0x0180
-kSGWriteSamplesSelect = 0x0181
-kSGGetDataRateSelect = 0x0182
-kSGAlignChannelRectSelect = 0x0183
-kSGPanelGetDitlSelect = 0x0200
-kSGPanelGetTitleSelect = 0x0201
-kSGPanelCanRunSelect = 0x0202
-kSGPanelInstallSelect = 0x0203
-kSGPanelEventSelect = 0x0204
-kSGPanelItemSelect = 0x0205
-kSGPanelRemoveSelect = 0x0206
-kSGPanelSetGrabberSelect = 0x0207
-kSGPanelSetResFileSelect = 0x0208
-kSGPanelGetSettingsSelect = 0x0209
-kSGPanelSetSettingsSelect = 0x020A
-kSGPanelValidateInputSelect = 0x020B
-kSGPanelSetEventFilterSelect = 0x020C
-kSGPanelGetDITLForSizeSelect = 0x020D
-kSGGetSrcVideoBoundsSelect = 0x0100
-kSGSetVideoRectSelect = 0x0101
-kSGGetVideoRectSelect = 0x0102
-kSGGetVideoCompressorTypeSelect = 0x0103
-kSGSetVideoCompressorTypeSelect = 0x0104
-kSGSetVideoCompressorSelect = 0x0105
-kSGGetVideoCompressorSelect = 0x0106
-kSGGetVideoDigitizerComponentSelect = 0x0107
-kSGSetVideoDigitizerComponentSelect = 0x0108
-kSGVideoDigitizerChangedSelect = 0x0109
-kSGSetVideoBottlenecksSelect = 0x010A
-kSGGetVideoBottlenecksSelect = 0x010B
-kSGGrabFrameSelect = 0x010C
-kSGGrabFrameCompleteSelect = 0x010D
-kSGDisplayFrameSelect = 0x010E
-kSGCompressFrameSelect = 0x010F
-kSGCompressFrameCompleteSelect = 0x0110
-kSGAddFrameSelect = 0x0111
-kSGTransferFrameForCompressSelect = 0x0112
-kSGSetCompressBufferSelect = 0x0113
-kSGGetCompressBufferSelect = 0x0114
-kSGGetBufferInfoSelect = 0x0115
-kSGSetUseScreenBufferSelect = 0x0116
-kSGGetUseScreenBufferSelect = 0x0117
-kSGGrabCompressCompleteSelect = 0x0118
-kSGDisplayCompressSelect = 0x0119
-kSGSetFrameRateSelect = 0x011A
-kSGGetFrameRateSelect = 0x011B
-kSGSetPreferredPacketSizeSelect = 0x0121
-kSGGetPreferredPacketSizeSelect = 0x0122
-kSGSetUserVideoCompressorListSelect = 0x0123
-kSGGetUserVideoCompressorListSelect = 0x0124
-kSGSetSoundInputDriverSelect = 0x0100
-kSGGetSoundInputDriverSelect = 0x0101
-kSGSoundInputDriverChangedSelect = 0x0102
-kSGSetSoundRecordChunkSizeSelect = 0x0103
-kSGGetSoundRecordChunkSizeSelect = 0x0104
-kSGSetSoundInputRateSelect = 0x0105
-kSGGetSoundInputRateSelect = 0x0106
-kSGSetSoundInputParametersSelect = 0x0107
-kSGGetSoundInputParametersSelect = 0x0108
-kSGSetAdditionalSoundRatesSelect = 0x0109
-kSGGetAdditionalSoundRatesSelect = 0x010A
-kSGSetFontNameSelect = 0x0100
-kSGSetFontSizeSelect = 0x0101
-kSGSetTextForeColorSelect = 0x0102
-kSGSetTextBackColorSelect = 0x0103
-kSGSetJustificationSelect = 0x0104
-kSGGetTextReturnToSpaceValueSelect = 0x0105
-kSGSetTextReturnToSpaceValueSelect = 0x0106
-kSGGetInstrumentSelect = 0x0100
-kSGSetInstrumentSelect = 0x0101
-kQTVideoOutputGetDisplayModeListSelect = 0x0001
-kQTVideoOutputGetCurrentClientNameSelect = 0x0002
-kQTVideoOutputSetClientNameSelect = 0x0003
-kQTVideoOutputGetClientNameSelect = 0x0004
-kQTVideoOutputBeginSelect = 0x0005
-kQTVideoOutputEndSelect = 0x0006
-kQTVideoOutputSetDisplayModeSelect = 0x0007
-kQTVideoOutputGetDisplayModeSelect = 0x0008
-kQTVideoOutputCustomConfigureDisplaySelect = 0x0009
-kQTVideoOutputSaveStateSelect = 0x000A
-kQTVideoOutputRestoreStateSelect = 0x000B
-kQTVideoOutputGetGWorldSelect = 0x000C
-kQTVideoOutputGetGWorldParametersSelect = 0x000D
-kQTVideoOutputGetIndSoundOutputSelect = 0x000E
-kQTVideoOutputGetClockSelect = 0x000F
-kQTVideoOutputSetEchoPortSelect = 0x0010
-kQTVideoOutputGetIndImageDecompressorSelect = 0x0011
-kQTVideoOutputBaseSetEchoPortSelect = 0x0012
-handlerHasSpatial = 1 << 0
-handlerCanClip = 1 << 1
-handlerCanMatte = 1 << 2
-handlerCanTransferMode = 1 << 3
-handlerNeedsBuffer = 1 << 4
-handlerNoIdle = 1 << 5
-handlerNoScheduler = 1 << 6
-handlerWantsTime = 1 << 7
-handlerCGrafPortOnly = 1 << 8
-handlerCanSend = 1 << 9
-handlerCanHandleComplexMatrix = 1 << 10
-handlerWantsDestinationPixels = 1 << 11
-handlerCanSendImageData = 1 << 12
-handlerCanPicSave = 1 << 13
-mMustDraw = 1 << 3
-mAtEnd = 1 << 4
-mPreflightDraw = 1 << 5
-mSyncDrawing = 1 << 6
-mPrecompositeOnly = 1 << 9
-mSoundOnly = 1 << 10
-mDoIdleActionsBeforeDraws = 1 << 11
-mDisableIdleActions = 1 << 12
-mDidDraw = 1 << 0
-mNeedsToDraw = 1 << 2
-mDrawAgain = 1 << 3
-mPartialDraw = 1 << 4
-mWantIdleActions = 1 << 5
-forceUpdateRedraw = 1 << 0
-forceUpdateNewBuffer = 1 << 1
-mHitTestBounds = 1 << 0
-mHitTestImage = 1 << 1
-mHitTestInvisible = 1 << 2
-mHitTestIsClick = 1 << 3
-mOpaque = 1 << 0
-mInvisible = 1 << 1
-kMediaQTIdleFrequencySelector = FOUR_CHAR_CODE('idfq')
-kMediaVideoParamBrightness = 1
-kMediaVideoParamContrast = 2
-kMediaVideoParamHue = 3
-kMediaVideoParamSharpness = 4
-kMediaVideoParamSaturation = 5
-kMediaVideoParamBlackLevel = 6
-kMediaVideoParamWhiteLevel = 7
-kMHInfoEncodedFrameRate = FOUR_CHAR_CODE('orat')
-kEmptyPurgableChunksOverAllowance = 1
-kCallComponentExecuteWiredActionSelect = -9
-kMediaSetChunkManagementFlagsSelect = 0x0415
-kMediaGetChunkManagementFlagsSelect = 0x0416
-kMediaSetPurgeableChunkMemoryAllowanceSelect = 0x0417
-kMediaGetPurgeableChunkMemoryAllowanceSelect = 0x0418
-kMediaEmptyAllPurgeableChunksSelect = 0x0419
-kMediaInitializeSelect = 0x0501
-kMediaSetHandlerCapabilitiesSelect = 0x0502
-kMediaIdleSelect = 0x0503
-kMediaGetMediaInfoSelect = 0x0504
-kMediaPutMediaInfoSelect = 0x0505
-kMediaSetActiveSelect = 0x0506
-kMediaSetRateSelect = 0x0507
-kMediaGGetStatusSelect = 0x0508
-kMediaTrackEditedSelect = 0x0509
-kMediaSetMediaTimeScaleSelect = 0x050A
-kMediaSetMovieTimeScaleSelect = 0x050B
-kMediaSetGWorldSelect = 0x050C
-kMediaSetDimensionsSelect = 0x050D
-kMediaSetClipSelect = 0x050E
-kMediaSetMatrixSelect = 0x050F
-kMediaGetTrackOpaqueSelect = 0x0510
-kMediaSetGraphicsModeSelect = 0x0511
-kMediaGetGraphicsModeSelect = 0x0512
-kMediaGSetVolumeSelect = 0x0513
-kMediaSetSoundBalanceSelect = 0x0514
-kMediaGetSoundBalanceSelect = 0x0515
-kMediaGetNextBoundsChangeSelect = 0x0516
-kMediaGetSrcRgnSelect = 0x0517
-kMediaPrerollSelect = 0x0518
-kMediaSampleDescriptionChangedSelect = 0x0519
-kMediaHasCharacteristicSelect = 0x051A
-kMediaGetOffscreenBufferSizeSelect = 0x051B
-kMediaSetHintsSelect = 0x051C
-kMediaGetNameSelect = 0x051D
-kMediaForceUpdateSelect = 0x051E
-kMediaGetDrawingRgnSelect = 0x051F
-kMediaGSetActiveSegmentSelect = 0x0520
-kMediaInvalidateRegionSelect = 0x0521
-kMediaGetNextStepTimeSelect = 0x0522
-kMediaSetNonPrimarySourceDataSelect = 0x0523
-kMediaChangedNonPrimarySourceSelect = 0x0524
-kMediaTrackReferencesChangedSelect = 0x0525
-kMediaGetSampleDataPointerSelect = 0x0526
-kMediaReleaseSampleDataPointerSelect = 0x0527
-kMediaTrackPropertyAtomChangedSelect = 0x0528
-kMediaSetTrackInputMapReferenceSelect = 0x0529
-kMediaSetVideoParamSelect = 0x052B
-kMediaGetVideoParamSelect = 0x052C
-kMediaCompareSelect = 0x052D
-kMediaGetClockSelect = 0x052E
-kMediaSetSoundOutputComponentSelect = 0x052F
-kMediaGetSoundOutputComponentSelect = 0x0530
-kMediaSetSoundLocalizationDataSelect = 0x0531
-kMediaGetInvalidRegionSelect = 0x053C
-kMediaSampleDescriptionB2NSelect = 0x053E
-kMediaSampleDescriptionN2BSelect = 0x053F
-kMediaQueueNonPrimarySourceDataSelect = 0x0540
-kMediaFlushNonPrimarySourceDataSelect = 0x0541
-kMediaGetURLLinkSelect = 0x0543
-kMediaMakeMediaTimeTableSelect = 0x0545
-kMediaHitTestForTargetRefConSelect = 0x0546
-kMediaHitTestTargetRefConSelect = 0x0547
-kMediaGetActionsForQTEventSelect = 0x0548
-kMediaDisposeTargetRefConSelect = 0x0549
-kMediaTargetRefConsEqualSelect = 0x054A
-kMediaSetActionsCallbackSelect = 0x054B
-kMediaPrePrerollBeginSelect = 0x054C
-kMediaPrePrerollCancelSelect = 0x054D
-kMediaEnterEmptyEditSelect = 0x054F
-kMediaCurrentMediaQueuedDataSelect = 0x0550
-kMediaGetEffectiveVolumeSelect = 0x0551
-kMediaResolveTargetRefConSelect = 0x0552
-kMediaGetSoundLevelMeteringEnabledSelect = 0x0553
-kMediaSetSoundLevelMeteringEnabledSelect = 0x0554
-kMediaGetSoundLevelMeterInfoSelect = 0x0555
-kMediaGetEffectiveSoundBalanceSelect = 0x0556
-kMediaSetScreenLockSelect = 0x0557
-kMediaSetDoMCActionCallbackSelect = 0x0558
-kMediaGetErrorStringSelect = 0x0559
-kMediaGetSoundEqualizerBandsSelect = 0x055A
-kMediaSetSoundEqualizerBandsSelect = 0x055B
-kMediaGetSoundEqualizerBandLevelsSelect = 0x055C
-kMediaDoIdleActionsSelect = 0x055D
-kMediaSetSoundBassAndTrebleSelect = 0x055E
-kMediaGetSoundBassAndTrebleSelect = 0x055F
-kMediaTimeBaseChangedSelect = 0x0560
-kMediaMCIsPlayerEventSelect = 0x0561
-kMediaGetMediaLoadStateSelect = 0x0562
-kMediaVideoOutputChangedSelect = 0x0563
-kMediaEmptySampleCacheSelect = 0x0564
-kMediaGetPublicInfoSelect = 0x0565
-kMediaSetPublicInfoSelect = 0x0566
-kMediaGetUserPreferredCodecsSelect = 0x0567
-kMediaSetUserPreferredCodecsSelect = 0x0568
-kMediaRefConSetPropertySelect = 0x0569
-kMediaRefConGetPropertySelect = 0x056A
-kMediaNavigateTargetRefConSelect = 0x056B
-kMediaGGetIdleManagerSelect = 0x056C
-kMediaGSetIdleManagerSelect = 0x056D
-kaiToneDescType = FOUR_CHAR_CODE('tone')
-kaiNoteRequestInfoType = FOUR_CHAR_CODE('ntrq')
-kaiKnobListType = FOUR_CHAR_CODE('knbl')
-kaiKeyRangeInfoType = FOUR_CHAR_CODE('sinf')
-kaiSampleDescType = FOUR_CHAR_CODE('sdsc')
-kaiSampleInfoType = FOUR_CHAR_CODE('smin')
-kaiSampleDataType = FOUR_CHAR_CODE('sdat')
-kaiSampleDataQUIDType = FOUR_CHAR_CODE('quid')
-kaiInstInfoType = FOUR_CHAR_CODE('iinf')
-kaiPictType = FOUR_CHAR_CODE('pict')
-kaiWriterType = FOUR_CHAR_CODE('\xa9wrt')
-kaiCopyrightType = FOUR_CHAR_CODE('\xa9cpy')
-kaiOtherStrType = FOUR_CHAR_CODE('str ')
-kaiInstrumentRefType = FOUR_CHAR_CODE('iref')
-kaiInstGMQualityType = FOUR_CHAR_CODE('qual')
-kaiLibraryInfoType = FOUR_CHAR_CODE('linf')
-kaiLibraryDescType = FOUR_CHAR_CODE('ldsc')
-kInstKnobMissingUnknown = 0
-kInstKnobMissingDefault = (1 << 0)
-kMusicLoopTypeNormal = 0
-kMusicLoopTypePalindrome = 1
-instSamplePreProcessFlag = 1 << 0
-kQTMIDIComponentType = FOUR_CHAR_CODE('midi')
-kOMSComponentSubType = FOUR_CHAR_CODE('OMS ')
-kFMSComponentSubType = FOUR_CHAR_CODE('FMS ')
-kMIDIManagerComponentSubType = FOUR_CHAR_CODE('mmgr')
-kOSXMIDIComponentSubType = FOUR_CHAR_CODE('osxm')
-kMusicPacketPortLost = 1
-kMusicPacketPortFound = 2
-kMusicPacketTimeGap = 3
-kAppleSysexID = 0x11
-kAppleSysexCmdSampleSize = 0x0001
-kAppleSysexCmdSampleBreak = 0x0002
-kAppleSysexCmdAtomicInstrument = 0x0010
-kAppleSysexCmdDeveloper = 0x7F00
-kSynthesizerConnectionFMS = 1
-kSynthesizerConnectionMMgr = 2
-kSynthesizerConnectionOMS = 4
-kSynthesizerConnectionQT = 8
-kSynthesizerConnectionOSXMIDI = 16
-kSynthesizerConnectionUnavailable = 256
-kMusicComponentType = FOUR_CHAR_CODE('musi')
-kInstrumentComponentType = FOUR_CHAR_CODE('inst')
-kSoftSynthComponentSubType = FOUR_CHAR_CODE('ss  ')
-kGMSynthComponentSubType = FOUR_CHAR_CODE('gm  ')
-kSynthesizerDynamicVoice = 1 << 0
-kSynthesizerUsesMIDIPort = 1 << 1
-kSynthesizerMicrotone = 1 << 2
-kSynthesizerHasSamples = 1 << 3
-kSynthesizerMixedDrums = 1 << 4
-kSynthesizerSoftware = 1 << 5
-kSynthesizerHardware = 1 << 6
-kSynthesizerDynamicChannel = 1 << 7
-kSynthesizerHogsSystemChannel = 1 << 8
-kSynthesizerHasSystemChannel = 1 << 9
-kSynthesizerSlowSetPart = 1 << 10
-kSynthesizerOffline = 1 << 12
-kSynthesizerGM = 1 << 14
-kSynthesizerDLS = 1 << 15
-kSynthesizerSoundLocalization = 1 << 16
-kControllerModulationWheel = 1
-kControllerBreath = 2
-kControllerFoot = 4
-kControllerPortamentoTime = 5
-kControllerVolume = 7
-kControllerBalance = 8
-kControllerPan = 10
-kControllerExpression = 11
-kControllerLever1 = 16
-kControllerLever2 = 17
-kControllerLever3 = 18
-kControllerLever4 = 19
-kControllerLever5 = 80
-kControllerLever6 = 81
-kControllerLever7 = 82
-kControllerLever8 = 83
-kControllerPitchBend = 32
-kControllerAfterTouch = 33
-kControllerPartTranspose = 40
-kControllerTuneTranspose = 41
-kControllerPartVolume = 42
-kControllerTuneVolume = 43
-kControllerSustain = 64
-kControllerPortamento = 65
-kControllerSostenuto = 66
-kControllerSoftPedal = 67
-kControllerReverb = 91
-kControllerTremolo = 92
-kControllerChorus = 93
-kControllerCeleste = 94
-kControllerPhaser = 95
-kControllerEditPart = 113
-kControllerMasterTune = 114
-kControllerMasterTranspose = 114
-kControllerMasterVolume = 115
-kControllerMasterCPULoad = 116
-kControllerMasterPolyphony = 117
-kControllerMasterFeatures = 118
-kQTMSKnobStartID = 0x02000000
-kQTMSKnobVolumeAttackTimeID = 0x02000001
-kQTMSKnobVolumeDecayTimeID = 0x02000002
-kQTMSKnobVolumeSustainLevelID = 0x02000003
-kQTMSKnobVolumeRelease1RateID = 0x02000004
-kQTMSKnobVolumeDecayKeyScalingID = 0x02000005
-kQTMSKnobVolumeReleaseTimeID = 0x02000006
-kQTMSKnobVolumeLFODelayID = 0x02000007
-kQTMSKnobVolumeLFORampTimeID = 0x02000008
-kQTMSKnobVolumeLFOPeriodID = 0x02000009
-kQTMSKnobVolumeLFOShapeID = 0x0200000A
-kQTMSKnobVolumeLFODepthID = 0x0200000B
-kQTMSKnobVolumeOverallID = 0x0200000C
-kQTMSKnobVolumeVelocity127ID = 0x0200000D
-kQTMSKnobVolumeVelocity96ID = 0x0200000E
-kQTMSKnobVolumeVelocity64ID = 0x0200000F
-kQTMSKnobVolumeVelocity32ID = 0x02000010
-kQTMSKnobVolumeVelocity16ID = 0x02000011
-kQTMSKnobPitchTransposeID = 0x02000012
-kQTMSKnobPitchLFODelayID = 0x02000013
-kQTMSKnobPitchLFORampTimeID = 0x02000014
-kQTMSKnobPitchLFOPeriodID = 0x02000015
-kQTMSKnobPitchLFOShapeID = 0x02000016
-kQTMSKnobPitchLFODepthID = 0x02000017
-kQTMSKnobPitchLFOQuantizeID = 0x02000018
-kQTMSKnobStereoDefaultPanID = 0x02000019
-kQTMSKnobStereoPositionKeyScalingID = 0x0200001A
-kQTMSKnobPitchLFOOffsetID = 0x0200001B
-kQTMSKnobExclusionGroupID = 0x0200001C
-kQTMSKnobSustainTimeID = 0x0200001D
-kQTMSKnobSustainInfiniteID = 0x0200001E
-kQTMSKnobVolumeLFOStereoID = 0x0200001F
-kQTMSKnobVelocityLowID = 0x02000020
-kQTMSKnobVelocityHighID = 0x02000021
-kQTMSKnobVelocitySensitivityID = 0x02000022
-kQTMSKnobPitchSensitivityID = 0x02000023
-kQTMSKnobVolumeLFODepthFromWheelID = 0x02000024
-kQTMSKnobPitchLFODepthFromWheelID = 0x02000025
-kQTMSKnobVolumeExpOptionsID = 0x02000026
-kQTMSKnobEnv1AttackTimeID = 0x02000027
-kQTMSKnobEnv1DecayTimeID = 0x02000028
-kQTMSKnobEnv1SustainLevelID = 0x02000029
-kQTMSKnobEnv1SustainTimeID = 0x0200002A
-kQTMSKnobEnv1SustainInfiniteID = 0x0200002B
-kQTMSKnobEnv1ReleaseTimeID = 0x0200002C
-kQTMSKnobEnv1ExpOptionsID = 0x0200002D
-kQTMSKnobEnv2AttackTimeID = 0x0200002E
-kQTMSKnobEnv2DecayTimeID = 0x0200002F
-kQTMSKnobEnv2SustainLevelID = 0x02000030
-kQTMSKnobEnv2SustainTimeID = 0x02000031
-kQTMSKnobEnv2SustainInfiniteID = 0x02000032
-kQTMSKnobEnv2ReleaseTimeID = 0x02000033
-kQTMSKnobEnv2ExpOptionsID = 0x02000034
-kQTMSKnobPitchEnvelopeID = 0x02000035
-kQTMSKnobPitchEnvelopeDepthID = 0x02000036
-kQTMSKnobFilterKeyFollowID = 0x02000037
-kQTMSKnobFilterTransposeID = 0x02000038
-kQTMSKnobFilterQID = 0x02000039
-kQTMSKnobFilterFrequencyEnvelopeID = 0x0200003A
-kQTMSKnobFilterFrequencyEnvelopeDepthID = 0x0200003B
-kQTMSKnobFilterQEnvelopeID = 0x0200003C
-kQTMSKnobFilterQEnvelopeDepthID = 0x0200003D
-kQTMSKnobReverbThresholdID = 0x0200003E
-kQTMSKnobVolumeAttackVelScalingID = 0x0200003F
-kQTMSKnobLastIDPlus1 = 0x02000040
-kControllerMaximum = 0x00007FFF
-# kControllerMinimum = (long)0xFFFF8000
-kVoiceCountDynamic = -1
-kFirstGMInstrument = 0x00000001
-kLastGMInstrument = 0x00000080
-kFirstGSInstrument = 0x00000081
-kLastGSInstrument = 0x00003FFF
-kFirstDrumkit = 0x00004000
-kLastDrumkit = 0x00004080
-kFirstROMInstrument = 0x00008000
-kLastROMInstrument = 0x0000FFFF
-kFirstUserInstrument = 0x00010000
-kLastUserInstrument = 0x0001FFFF
-kInstrumentMatchSynthesizerType = 1
-kInstrumentMatchSynthesizerName = 2
-kInstrumentMatchName = 4
-kInstrumentMatchNumber = 8
-kInstrumentMatchGMNumber = 16
-kInstrumentMatchGSNumber = 32
-kKnobBasic = 8
-kKnobReadOnly = 16
-kKnobInterruptUnsafe = 32
-kKnobKeyrangeOverride = 64
-kKnobGroupStart = 128
-kKnobFixedPoint8 = 1024
-kKnobFixedPoint16 = 2048
-kKnobTypeNumber = 0 << 12
-kKnobTypeGroupName = 1 << 12
-kKnobTypeBoolean = 2 << 12
-kKnobTypeNote = 3 << 12
-kKnobTypePan = 4 << 12
-kKnobTypeInstrument = 5 << 12
-kKnobTypeSetting = 6 << 12
-kKnobTypeMilliseconds = 7 << 12
-kKnobTypePercentage = 8 << 12
-kKnobTypeHertz = 9 << 12
-kKnobTypeButton = 10 << 12
-kUnknownKnobValue = 0x7FFFFFFF
-kDefaultKnobValue = 0x7FFFFFFE
-notImplementedMusicErr = (0x80000000 | (0xFFFF & (notImplementedMusicOSErr)))
-cantSendToSynthesizerErr = (0x80000000 | (0xFFFF & (cantSendToSynthesizerOSErr)))
-cantReceiveFromSynthesizerErr = (0x80000000 | (0xFFFF & (cantReceiveFromSynthesizerOSErr)))
-illegalVoiceAllocationErr = (0x80000000 | (0xFFFF & (illegalVoiceAllocationOSErr)))
-illegalPartErr = (0x80000000 | (0xFFFF & (illegalPartOSErr)))
-illegalChannelErr = (0x80000000 | (0xFFFF & (illegalChannelOSErr)))
-illegalKnobErr = (0x80000000 | (0xFFFF & (illegalKnobOSErr)))
-illegalKnobValueErr = (0x80000000 | (0xFFFF & (illegalKnobValueOSErr)))
-illegalInstrumentErr = (0x80000000 | (0xFFFF & (illegalInstrumentOSErr)))
-illegalControllerErr = (0x80000000 | (0xFFFF & (illegalControllerOSErr)))
-midiManagerAbsentErr = (0x80000000 | (0xFFFF & (midiManagerAbsentOSErr)))
-synthesizerNotRespondingErr = (0x80000000 | (0xFFFF & (synthesizerNotRespondingOSErr)))
-synthesizerErr = (0x80000000 | (0xFFFF & (synthesizerOSErr)))
-illegalNoteChannelErr = (0x80000000 | (0xFFFF & (illegalNoteChannelOSErr)))
-noteChannelNotAllocatedErr = (0x80000000 | (0xFFFF & (noteChannelNotAllocatedOSErr)))
-tunePlayerFullErr = (0x80000000 | (0xFFFF & (tunePlayerFullOSErr)))
-tuneParseErr = (0x80000000 | (0xFFFF & (tuneParseOSErr)))
-kGetAtomicInstNoExpandedSamples = 1 << 0
-kGetAtomicInstNoOriginalSamples = 1 << 1
-kGetAtomicInstNoSamples = kGetAtomicInstNoExpandedSamples | kGetAtomicInstNoOriginalSamples
-kGetAtomicInstNoKnobList = 1 << 2
-kGetAtomicInstNoInstrumentInfo = 1 << 3
-kGetAtomicInstOriginalKnobList = 1 << 4
-kGetAtomicInstAllKnobs = 1 << 5
-kSetAtomicInstKeepOriginalInstrument = 1 << 0
-kSetAtomicInstShareAcrossParts = 1 << 1
-kSetAtomicInstCallerTosses = 1 << 2
-kSetAtomicInstCallerGuarantees = 1 << 3
-kSetAtomicInstInterruptSafe = 1 << 4
-kSetAtomicInstDontPreprocess = 1 << 7
-kInstrumentNamesModifiable = 1
-kInstrumentNamesBoth = 2
-kGenericMusicComponentSubtype = FOUR_CHAR_CODE('gene')
-kGenericMusicKnob = 1
-kGenericMusicInstrumentKnob = 2
-kGenericMusicDrumKnob = 3
-kGenericMusicGlobalController = 4
-kGenericMusicResFirst = 0
-kGenericMusicResMiscStringList = 1
-kGenericMusicResMiscLongList = 2
-kGenericMusicResInstrumentList = 3
-kGenericMusicResDrumList = 4
-kGenericMusicResInstrumentKnobDescriptionList = 5
-kGenericMusicResDrumKnobDescriptionList = 6
-kGenericMusicResKnobDescriptionList = 7
-kGenericMusicResBitsLongList = 8
-kGenericMusicResModifiableInstrumentHW = 9
-kGenericMusicResGMTranslation = 10
-kGenericMusicResROMInstrumentData = 11
-kGenericMusicResAboutPICT = 12
-kGenericMusicResLast = 13
-kGenericMusicMiscLongFirst = 0
-kGenericMusicMiscLongVoiceCount = 1
-kGenericMusicMiscLongPartCount = 2
-kGenericMusicMiscLongModifiableInstrumentCount = 3
-kGenericMusicMiscLongChannelMask = 4
-kGenericMusicMiscLongDrumPartCount = 5
-kGenericMusicMiscLongModifiableDrumCount = 6
-kGenericMusicMiscLongDrumChannelMask = 7
-kGenericMusicMiscLongOutputCount = 8
-kGenericMusicMiscLongLatency = 9
-kGenericMusicMiscLongFlags = 10
-kGenericMusicMiscLongFirstGMHW = 11
-kGenericMusicMiscLongFirstGMDrumHW = 12
-kGenericMusicMiscLongFirstUserHW = 13
-kGenericMusicMiscLongLast = 14
-kMusicGenericRange = 0x0100
-kMusicDerivedRange = 0x0200
-kGenericMusicDoMIDI = 1 << 0
-kGenericMusicBank0 = 1 << 1
-kGenericMusicBank32 = 1 << 2
-kGenericMusicErsatzMIDI = 1 << 3
-kGenericMusicCallKnobs = 1 << 4
-kGenericMusicCallParts = 1 << 5
-kGenericMusicCallInstrument = 1 << 6
-kGenericMusicCallNumber = 1 << 7
-kGenericMusicCallROMInstrument = 1 << 8
-kGenericMusicAllDefaults = 1 << 9
-kGetInstrumentInfoNoBuiltIn = 1 << 0
-kGetInstrumentInfoMidiUserInst = 1 << 1
-kGetInstrumentInfoNoIText = 1 << 2
-kNoteRequestNoGM = 1
-kNoteRequestNoSynthType = 2
-kNoteRequestSynthMustMatch = 4
-kNoteRequestSpecifyMIDIChannel = 0x80
-kPickDontMix = 1
-kPickSameSynth = 2
-kPickUserInsts = 4
-kPickEditAllowEdit = 8
-kPickEditAllowPick = 16
-kPickEditSynthGlobal = 32
-kPickEditControllers = 64
-kNoteAllocatorComponentType = FOUR_CHAR_CODE('nota')
-kNADummyOneSelect = 29
-kNADummyTwoSelect = 30
-kTuneQueueDepth = 8
-kTunePlayerComponentType = FOUR_CHAR_CODE('tune')
-kTuneStartNow = 1
-kTuneDontClipNotes = 2
-kTuneExcludeEdgeNotes = 4
-kTuneQuickStart = 8
-kTuneLoopUntil = 16
-kTunePlayDifference = 32
-kTunePlayConcurrent = 64
-kTuneStartNewMaster = 16384
-kTuneStopFade = 1
-kTuneStopSustain = 2
-kTuneStopInstant = 4
-kTuneStopReleaseChannels = 8
-kTuneMixMute = 1
-kTuneMixSolo = 2
-kRestEventType = 0x00000000
-kNoteEventType = 0x00000001
-kControlEventType = 0x00000002
-kMarkerEventType = 0x00000003
-kUndefined1EventType = 0x00000008
-kXNoteEventType = 0x00000009
-kXControlEventType = 0x0000000A
-kKnobEventType = 0x0000000B
-kUndefined2EventType = 0x0000000C
-kUndefined3EventType = 0x0000000D
-kUndefined4EventType = 0x0000000E
-kGeneralEventType = 0x0000000F
-kXEventLengthBits = 0x00000002
-kGeneralEventLengthBits = 0x00000003
-kEventLen = 1
-kXEventLen = 2
-kRestEventLen = kEventLen
-kNoteEventLen = kEventLen
-kControlEventLen = kEventLen
-kMarkerEventLen = kEventLen
-kXNoteEventLen = kXEventLen
-kXControlEventLen = kXEventLen
-kGeneralEventLen = kXEventLen
-kEventLengthFieldPos = 30
-kEventLengthFieldWidth = 2
-kEventTypeFieldPos = 29
-kEventTypeFieldWidth = 3
-kXEventTypeFieldPos = 28
-kXEventTypeFieldWidth = 4
-kEventPartFieldPos = 24
-kEventPartFieldWidth = 5
-kXEventPartFieldPos = 16
-kXEventPartFieldWidth = 12
-kRestEventDurationFieldPos = 0
-kRestEventDurationFieldWidth = 24
-kRestEventDurationMax = ((1 << kRestEventDurationFieldWidth) - 1)
-kNoteEventPitchFieldPos = 18
-kNoteEventPitchFieldWidth = 6
-kNoteEventPitchOffset = 32
-kNoteEventVolumeFieldPos = 11
-kNoteEventVolumeFieldWidth = 7
-kNoteEventVolumeOffset = 0
-kNoteEventDurationFieldPos = 0
-kNoteEventDurationFieldWidth = 11
-kNoteEventDurationMax = ((1 << kNoteEventDurationFieldWidth) - 1)
-kXNoteEventPitchFieldPos = 0
-kXNoteEventPitchFieldWidth = 16
-kXNoteEventDurationFieldPos = 0
-kXNoteEventDurationFieldWidth = 22
-kXNoteEventDurationMax = ((1 << kXNoteEventDurationFieldWidth) - 1)
-kXNoteEventVolumeFieldPos = 22
-kXNoteEventVolumeFieldWidth = 7
-kControlEventControllerFieldPos = 16
-kControlEventControllerFieldWidth = 8
-kControlEventValueFieldPos = 0
-kControlEventValueFieldWidth = 16
-kXControlEventControllerFieldPos = 0
-kXControlEventControllerFieldWidth = 16
-kXControlEventValueFieldPos = 0
-kXControlEventValueFieldWidth = 16
-kKnobEventValueHighFieldPos = 0
-kKnobEventValueHighFieldWidth = 16
-kKnobEventKnobFieldPos = 16
-kKnobEventKnobFieldWidth = 14
-kKnobEventValueLowFieldPos = 0
-kKnobEventValueLowFieldWidth = 16
-kMarkerEventSubtypeFieldPos = 16
-kMarkerEventSubtypeFieldWidth = 8
-kMarkerEventValueFieldPos = 0
-kMarkerEventValueFieldWidth = 16
-kGeneralEventSubtypeFieldPos = 16
-kGeneralEventSubtypeFieldWidth = 14
-kGeneralEventLengthFieldPos = 0
-kGeneralEventLengthFieldWidth = 16
-kEndMarkerValue = 0x00000060
-kEndMarkerValue = 0x60000000
-# _ext = qtma_EXT(*lP
-# ulen = (_ext < 2) ? 1 : 2
-# ulen = (unsigned short)qtma_EXT(*lP
-# ulen = lP[1]
-# _ext = qtma_EXT(*lP
-# ulen = (_ext < 2) ? 1 : 2
-# ulen = (unsigned short)qtma_EXT(*lP
-# ulen = lP[-1]
-# x = (kRestEventType << kEventTypeFieldPos)   \
-# x = EndianU32_NtoB(x) )
-# x = (kNoteEventType << kEventTypeFieldPos)  \
-# x = EndianU32_NtoB(x) )
-# x = (kControlEventType << kEventTypeFieldPos)           \
-# x = EndianU32_NtoB(x) )
-# x = (kMarkerEventType << kEventTypeFieldPos)    \
-# x = EndianU32_NtoB(x) )
-# w1 = (kXNoteEventType << kXEventTypeFieldPos)            \
-# w1 = EndianU32_NtoB(w1)
-# w2 = (kXEventLengthBits << kEventLengthFieldPos)        \
-# w2 = EndianU32_NtoB(w2) )
-# w1 = (kXControlEventType << kXEventTypeFieldPos)             \
-# w1 = EndianU32_NtoB(w1)
-# w2 = (kXEventLengthBits << kEventLengthFieldPos)             \
-# w2 = EndianU32_NtoB(w2) )
-# w1 = (kKnobEventType << kXEventTypeFieldPos)                 \
-# w1 = EndianU32_NtoB(w1)
-# w2 = (kXEventLengthBits << kEventLengthFieldPos)             \
-# w2 = EndianU32_NtoB(w2) )
-# w1 = (kGeneralEventType << kXEventTypeFieldPos)              \
-# w1 = EndianU32_NtoB(w1)
-# w2 = (kGeneralEventLengthBits << kEventLengthFieldPos)          \
-# w2 = EndianU32_NtoB(w2) )
-kGeneralEventNoteRequest = 1
-kGeneralEventPartKey = 4
-kGeneralEventTuneDifference = 5
-kGeneralEventAtomicInstrument = 6
-kGeneralEventKnob = 7
-kGeneralEventMIDIChannel = 8
-kGeneralEventPartChange = 9
-kGeneralEventNoOp = 10
-kGeneralEventUsedNotes = 11
-kGeneralEventPartMix = 12
-kMarkerEventEnd = 0
-kMarkerEventBeat = 1
-kMarkerEventTempo = 2
-kCurrentlyNativeEndian = 1
-kCurrentlyNotNativeEndian = 2
-kQTMIDIGetMIDIPortsSelect = 0x0001
-kQTMIDIUseSendPortSelect = 0x0002
-kQTMIDISendMIDISelect = 0x0003
-kMusicGetDescriptionSelect = 0x0001
-kMusicGetPartSelect = 0x0002
-kMusicSetPartSelect = 0x0003
-kMusicSetPartInstrumentNumberSelect = 0x0004
-kMusicGetPartInstrumentNumberSelect = 0x0005
-kMusicStorePartInstrumentSelect = 0x0006
-kMusicGetPartAtomicInstrumentSelect = 0x0009
-kMusicSetPartAtomicInstrumentSelect = 0x000A
-kMusicGetPartKnobSelect = 0x0010
-kMusicSetPartKnobSelect = 0x0011
-kMusicGetKnobSelect = 0x0012
-kMusicSetKnobSelect = 0x0013
-kMusicGetPartNameSelect = 0x0014
-kMusicSetPartNameSelect = 0x0015
-kMusicFindToneSelect = 0x0016
-kMusicPlayNoteSelect = 0x0017
-kMusicResetPartSelect = 0x0018
-kMusicSetPartControllerSelect = 0x0019
-kMusicGetPartControllerSelect = 0x001A
-kMusicGetMIDIProcSelect = 0x001B
-kMusicSetMIDIProcSelect = 0x001C
-kMusicGetInstrumentNamesSelect = 0x001D
-kMusicGetDrumNamesSelect = 0x001E
-kMusicGetMasterTuneSelect = 0x001F
-kMusicSetMasterTuneSelect = 0x0020
-kMusicGetInstrumentAboutInfoSelect = 0x0022
-kMusicGetDeviceConnectionSelect = 0x0023
-kMusicUseDeviceConnectionSelect = 0x0024
-kMusicGetKnobSettingStringsSelect = 0x0025
-kMusicGetMIDIPortsSelect = 0x0026
-kMusicSendMIDISelect = 0x0027
-kMusicStartOfflineSelect = 0x0029
-kMusicSetOfflineTimeToSelect = 0x002A
-kMusicGetInstrumentKnobDescriptionSelect = 0x002B
-kMusicGetDrumKnobDescriptionSelect = 0x002C
-kMusicGetKnobDescriptionSelect = 0x002D
-kMusicGetInfoTextSelect = 0x002E
-kMusicGetInstrumentInfoSelect = 0x002F
-kMusicTaskSelect = 0x0031
-kMusicSetPartInstrumentNumberInterruptSafeSelect = 0x0032
-kMusicSetPartSoundLocalizationSelect = 0x0033
-kMusicGenericConfigureSelect = 0x0100
-kMusicGenericGetPartSelect = 0x0101
-kMusicGenericGetKnobListSelect = 0x0102
-kMusicGenericSetResourceNumbersSelect = 0x0103
-kMusicDerivedMIDISendSelect = 0x0200
-kMusicDerivedSetKnobSelect = 0x0201
-kMusicDerivedSetPartSelect = 0x0202
-kMusicDerivedSetInstrumentSelect = 0x0203
-kMusicDerivedSetPartInstrumentNumberSelect = 0x0204
-kMusicDerivedSetMIDISelect = 0x0205
-kMusicDerivedStorePartInstrumentSelect = 0x0206
-kMusicDerivedOpenResFileSelect = 0x0207
-kMusicDerivedCloseResFileSelect = 0x0208
-kNARegisterMusicDeviceSelect = 0x0000
-kNAUnregisterMusicDeviceSelect = 0x0001
-kNAGetRegisteredMusicDeviceSelect = 0x0002
-kNASaveMusicConfigurationSelect = 0x0003
-kNANewNoteChannelSelect = 0x0004
-kNADisposeNoteChannelSelect = 0x0005
-kNAGetNoteChannelInfoSelect = 0x0006
-kNAPrerollNoteChannelSelect = 0x0007
-kNAUnrollNoteChannelSelect = 0x0008
-kNASetNoteChannelVolumeSelect = 0x000B
-kNAResetNoteChannelSelect = 0x000C
-kNAPlayNoteSelect = 0x000D
-kNASetControllerSelect = 0x000E
-kNASetKnobSelect = 0x000F
-kNAFindNoteChannelToneSelect = 0x0010
-kNASetInstrumentNumberSelect = 0x0011
-kNAPickInstrumentSelect = 0x0012
-kNAPickArrangementSelect = 0x0013
-kNAStuffToneDescriptionSelect = 0x001B
-kNACopyrightDialogSelect = 0x001C
-kNAGetIndNoteChannelSelect = 0x001F
-kNAGetMIDIPortsSelect = 0x0021
-kNAGetNoteRequestSelect = 0x0022
-kNASendMIDISelect = 0x0023
-kNAPickEditInstrumentSelect = 0x0024
-kNANewNoteChannelFromAtomicInstrumentSelect = 0x0025
-kNASetAtomicInstrumentSelect = 0x0026
-kNAGetKnobSelect = 0x0028
-kNATaskSelect = 0x0029
-kNASetNoteChannelBalanceSelect = 0x002A
-kNASetInstrumentNumberInterruptSafeSelect = 0x002B
-kNASetNoteChannelSoundLocalizationSelect = 0x002C
-kNAGetControllerSelect = 0x002D
-kTuneSetHeaderSelect = 0x0004
-kTuneGetTimeBaseSelect = 0x0005
-kTuneSetTimeScaleSelect = 0x0006
-kTuneGetTimeScaleSelect = 0x0007
-kTuneGetIndexedNoteChannelSelect = 0x0008
-kTuneQueueSelect = 0x000A
-kTuneInstantSelect = 0x000B
-kTuneGetStatusSelect = 0x000C
-kTuneStopSelect = 0x000D
-kTuneSetVolumeSelect = 0x0010
-kTuneGetVolumeSelect = 0x0011
-kTunePrerollSelect = 0x0012
-kTuneUnrollSelect = 0x0013
-kTuneSetNoteChannelsSelect = 0x0014
-kTuneSetPartTransposeSelect = 0x0015
-kTuneGetNoteAllocatorSelect = 0x0017
-kTuneSetSofterSelect = 0x0018
-kTuneTaskSelect = 0x0019
-kTuneSetBalanceSelect = 0x001A
-kTuneSetSoundLocalizationSelect = 0x001B
-kTuneSetHeaderWithSizeSelect = 0x001C
-kTuneSetPartMixSelect = 0x001D
-kTuneGetPartMixSelect = 0x001E
diff --git a/Lib/plat-mac/Carbon/Res.py b/Lib/plat-mac/Carbon/Res.py
deleted file mode 100644 (file)
index 8f45d09..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-try:
-    from OverrideFrom23._Res import *
-except ImportError:
-    from _Res import *
diff --git a/Lib/plat-mac/Carbon/Resources.py b/Lib/plat-mac/Carbon/Resources.py
deleted file mode 100644 (file)
index 2cd8761..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Generated from 'Resources.h'
-
-resSysHeap = 64
-resPurgeable = 32
-resLocked = 16
-resProtected = 8
-resPreload = 4
-resChanged = 2
-mapReadOnly = 128
-mapCompact = 64
-mapChanged = 32
-resSysRefBit = 7
-resSysHeapBit = 6
-resPurgeableBit = 5
-resLockedBit = 4
-resProtectedBit = 3
-resPreloadBit = 2
-resChangedBit = 1
-mapReadOnlyBit = 7
-mapCompactBit = 6
-mapChangedBit = 5
-kResFileNotOpened = -1
-kSystemResFile = 0
-kRsrcChainBelowSystemMap = 0
-kRsrcChainBelowApplicationMap = 1
-kRsrcChainAboveApplicationMap = 2
-kRsrcChainAboveAllMaps = 4
diff --git a/Lib/plat-mac/Carbon/Scrap.py b/Lib/plat-mac/Carbon/Scrap.py
deleted file mode 100644 (file)
index 0dcbd37..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Scrap import *
diff --git a/Lib/plat-mac/Carbon/Snd.py b/Lib/plat-mac/Carbon/Snd.py
deleted file mode 100644 (file)
index 679f10b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Snd import *
diff --git a/Lib/plat-mac/Carbon/Sndihooks.py b/Lib/plat-mac/Carbon/Sndihooks.py
deleted file mode 100644 (file)
index 73a3d28..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Sndihooks import *
diff --git a/Lib/plat-mac/Carbon/Sound.py b/Lib/plat-mac/Carbon/Sound.py
deleted file mode 100644 (file)
index cbdb4ae..0000000
+++ /dev/null
@@ -1,400 +0,0 @@
-# Generated from 'Sound.h'
-
-def FOUR_CHAR_CODE(x): return x
-soundListRsrc = FOUR_CHAR_CODE('snd ')
-kSimpleBeepID = 1
-# rate48khz = (long)0xBB800000
-# rate44khz = (long)0xAC440000
-rate32khz = 0x7D000000
-rate22050hz = 0x56220000
-rate22khz = 0x56EE8BA3
-rate16khz = 0x3E800000
-rate11khz = 0x2B7745D1
-rate11025hz = 0x2B110000
-rate8khz = 0x1F400000
-sampledSynth = 5
-squareWaveSynth = 1
-waveTableSynth = 3
-MACE3snthID = 11
-MACE6snthID = 13
-kMiddleC = 60
-kNoVolume = 0
-kFullVolume = 0x0100
-stdQLength = 128
-dataOffsetFlag = 0x8000
-kUseOptionalOutputDevice = -1
-notCompressed = 0
-fixedCompression = -1
-variableCompression = -2
-twoToOne = 1
-eightToThree = 2
-threeToOne = 3
-sixToOne = 4
-sixToOnePacketSize = 8
-threeToOnePacketSize = 16
-stateBlockSize = 64
-leftOverBlockSize = 32
-firstSoundFormat = 0x0001
-secondSoundFormat = 0x0002
-dbBufferReady = 0x00000001
-dbLastBuffer = 0x00000004
-sysBeepDisable = 0x0000
-sysBeepEnable = (1 << 0)
-sysBeepSynchronous = (1 << 1)
-unitTypeNoSelection = 0xFFFF
-unitTypeSeconds = 0x0000
-stdSH = 0x00
-extSH = 0xFF
-cmpSH = 0xFE
-nullCmd = 0
-quietCmd = 3
-flushCmd = 4
-reInitCmd = 5
-waitCmd = 10
-pauseCmd = 11
-resumeCmd = 12
-callBackCmd = 13
-syncCmd = 14
-availableCmd = 24
-versionCmd = 25
-volumeCmd = 46
-getVolumeCmd = 47
-clockComponentCmd = 50
-getClockComponentCmd = 51
-scheduledSoundCmd = 52
-linkSoundComponentsCmd = 53
-soundCmd = 80
-bufferCmd = 81
-rateMultiplierCmd = 86
-getRateMultiplierCmd = 87
-initCmd = 1
-freeCmd = 2
-totalLoadCmd = 26
-loadCmd = 27
-freqDurationCmd = 40
-restCmd = 41
-freqCmd = 42
-ampCmd = 43
-timbreCmd = 44
-getAmpCmd = 45
-waveTableCmd = 60
-phaseCmd = 61
-rateCmd = 82
-continueCmd = 83
-doubleBufferCmd = 84
-getRateCmd = 85
-sizeCmd = 90
-convertCmd = 91
-waveInitChannelMask = 0x07
-waveInitChannel0 = 0x04
-waveInitChannel1 = 0x05
-waveInitChannel2 = 0x06
-waveInitChannel3 = 0x07
-initChan0 = waveInitChannel0
-initChan1 = waveInitChannel1
-initChan2 = waveInitChannel2
-initChan3 = waveInitChannel3
-outsideCmpSH = 0
-insideCmpSH = 1
-aceSuccess = 0
-aceMemFull = 1
-aceNilBlock = 2
-aceBadComp = 3
-aceBadEncode = 4
-aceBadDest = 5
-aceBadCmd = 6
-initChanLeft = 0x0002
-initChanRight = 0x0003
-initNoInterp = 0x0004
-initNoDrop = 0x0008
-initMono = 0x0080
-initStereo = 0x00C0
-initMACE3 = 0x0300
-initMACE6 = 0x0400
-initPanMask = 0x0003
-initSRateMask = 0x0030
-initStereoMask = 0x00C0
-initCompMask = 0xFF00
-siActiveChannels = FOUR_CHAR_CODE('chac')
-siActiveLevels = FOUR_CHAR_CODE('lmac')
-siAGCOnOff = FOUR_CHAR_CODE('agc ')
-siAsync = FOUR_CHAR_CODE('asyn')
-siAVDisplayBehavior = FOUR_CHAR_CODE('avdb')
-siChannelAvailable = FOUR_CHAR_CODE('chav')
-siCompressionAvailable = FOUR_CHAR_CODE('cmav')
-siCompressionChannels = FOUR_CHAR_CODE('cpct')
-siCompressionFactor = FOUR_CHAR_CODE('cmfa')
-siCompressionHeader = FOUR_CHAR_CODE('cmhd')
-siCompressionNames = FOUR_CHAR_CODE('cnam')
-siCompressionParams = FOUR_CHAR_CODE('evaw')
-siCompressionSampleRate = FOUR_CHAR_CODE('cprt')
-siCompressionType = FOUR_CHAR_CODE('comp')
-siContinuous = FOUR_CHAR_CODE('cont')
-siDecompressionParams = FOUR_CHAR_CODE('wave')
-siDeviceBufferInfo = FOUR_CHAR_CODE('dbin')
-siDeviceConnected = FOUR_CHAR_CODE('dcon')
-siDeviceIcon = FOUR_CHAR_CODE('icon')
-siDeviceName = FOUR_CHAR_CODE('name')
-siEQSpectrumBands = FOUR_CHAR_CODE('eqsb')
-siEQSpectrumLevels = FOUR_CHAR_CODE('eqlv')
-siEQSpectrumOnOff = FOUR_CHAR_CODE('eqlo')
-siEQSpectrumResolution = FOUR_CHAR_CODE('eqrs')
-siEQToneControlGain = FOUR_CHAR_CODE('eqtg')
-siEQToneControlOnOff = FOUR_CHAR_CODE('eqtc')
-siHardwareBalance = FOUR_CHAR_CODE('hbal')
-siHardwareBalanceSteps = FOUR_CHAR_CODE('hbls')
-siHardwareBass = FOUR_CHAR_CODE('hbas')
-siHardwareBassSteps = FOUR_CHAR_CODE('hbst')
-siHardwareBusy = FOUR_CHAR_CODE('hwbs')
-siHardwareFormat = FOUR_CHAR_CODE('hwfm')
-siHardwareMute = FOUR_CHAR_CODE('hmut')
-siHardwareMuteNoPrefs = FOUR_CHAR_CODE('hmnp')
-siHardwareTreble = FOUR_CHAR_CODE('htrb')
-siHardwareTrebleSteps = FOUR_CHAR_CODE('hwts')
-siHardwareVolume = FOUR_CHAR_CODE('hvol')
-siHardwareVolumeSteps = FOUR_CHAR_CODE('hstp')
-siHeadphoneMute = FOUR_CHAR_CODE('pmut')
-siHeadphoneVolume = FOUR_CHAR_CODE('pvol')
-siHeadphoneVolumeSteps = FOUR_CHAR_CODE('hdst')
-siInputAvailable = FOUR_CHAR_CODE('inav')
-siInputGain = FOUR_CHAR_CODE('gain')
-siInputSource = FOUR_CHAR_CODE('sour')
-siInputSourceNames = FOUR_CHAR_CODE('snam')
-siLevelMeterOnOff = FOUR_CHAR_CODE('lmet')
-siModemGain = FOUR_CHAR_CODE('mgai')
-siMonitorAvailable = FOUR_CHAR_CODE('mnav')
-siMonitorSource = FOUR_CHAR_CODE('mons')
-siNumberChannels = FOUR_CHAR_CODE('chan')
-siOptionsDialog = FOUR_CHAR_CODE('optd')
-siOSTypeInputSource = FOUR_CHAR_CODE('inpt')
-siOSTypeInputAvailable = FOUR_CHAR_CODE('inav')
-siOutputDeviceName = FOUR_CHAR_CODE('onam')
-siPlayThruOnOff = FOUR_CHAR_CODE('plth')
-siPostMixerSoundComponent = FOUR_CHAR_CODE('psmx')
-siPreMixerSoundComponent = FOUR_CHAR_CODE('prmx')
-siQuality = FOUR_CHAR_CODE('qual')
-siRateMultiplier = FOUR_CHAR_CODE('rmul')
-siRecordingQuality = FOUR_CHAR_CODE('qual')
-siSampleRate = FOUR_CHAR_CODE('srat')
-siSampleRateAvailable = FOUR_CHAR_CODE('srav')
-siSampleSize = FOUR_CHAR_CODE('ssiz')
-siSampleSizeAvailable = FOUR_CHAR_CODE('ssav')
-siSetupCDAudio = FOUR_CHAR_CODE('sucd')
-siSetupModemAudio = FOUR_CHAR_CODE('sumd')
-siSlopeAndIntercept = FOUR_CHAR_CODE('flap')
-siSoundClock = FOUR_CHAR_CODE('sclk')
-siUseThisSoundClock = FOUR_CHAR_CODE('sclc')
-siSpeakerMute = FOUR_CHAR_CODE('smut')
-siSpeakerVolume = FOUR_CHAR_CODE('svol')
-siSSpCPULoadLimit = FOUR_CHAR_CODE('3dll')
-siSSpLocalization = FOUR_CHAR_CODE('3dif')
-siSSpSpeakerSetup = FOUR_CHAR_CODE('3dst')
-siStereoInputGain = FOUR_CHAR_CODE('sgai')
-siSubwooferMute = FOUR_CHAR_CODE('bmut')
-siTerminalType = FOUR_CHAR_CODE('ttyp')
-siTwosComplementOnOff = FOUR_CHAR_CODE('twos')
-siVendorProduct = FOUR_CHAR_CODE('vpro')
-siVolume = FOUR_CHAR_CODE('volu')
-siVoxRecordInfo = FOUR_CHAR_CODE('voxr')
-siVoxStopInfo = FOUR_CHAR_CODE('voxs')
-siWideStereo = FOUR_CHAR_CODE('wide')
-siSupportedExtendedFlags = FOUR_CHAR_CODE('exfl')
-siRateConverterRollOffSlope = FOUR_CHAR_CODE('rcdb')
-siOutputLatency = FOUR_CHAR_CODE('olte')
-siCloseDriver = FOUR_CHAR_CODE('clos')
-siInitializeDriver = FOUR_CHAR_CODE('init')
-siPauseRecording = FOUR_CHAR_CODE('paus')
-siUserInterruptProc = FOUR_CHAR_CODE('user')
-# kInvalidSource = (long)0xFFFFFFFF
-kNoSource = FOUR_CHAR_CODE('none')
-kCDSource = FOUR_CHAR_CODE('cd  ')
-kExtMicSource = FOUR_CHAR_CODE('emic')
-kSoundInSource = FOUR_CHAR_CODE('sinj')
-kRCAInSource = FOUR_CHAR_CODE('irca')
-kTVFMTunerSource = FOUR_CHAR_CODE('tvfm')
-kDAVInSource = FOUR_CHAR_CODE('idav')
-kIntMicSource = FOUR_CHAR_CODE('imic')
-kMediaBaySource = FOUR_CHAR_CODE('mbay')
-kModemSource = FOUR_CHAR_CODE('modm')
-kPCCardSource = FOUR_CHAR_CODE('pcm ')
-kZoomVideoSource = FOUR_CHAR_CODE('zvpc')
-kDVDSource = FOUR_CHAR_CODE('dvda')
-kMicrophoneArray = FOUR_CHAR_CODE('mica')
-kNoSoundComponentType = FOUR_CHAR_CODE('****')
-kSoundComponentType = FOUR_CHAR_CODE('sift')
-kSoundComponentPPCType = FOUR_CHAR_CODE('nift')
-kRate8SubType = FOUR_CHAR_CODE('ratb')
-kRate16SubType = FOUR_CHAR_CODE('ratw')
-kConverterSubType = FOUR_CHAR_CODE('conv')
-kSndSourceSubType = FOUR_CHAR_CODE('sour')
-kMixerType = FOUR_CHAR_CODE('mixr')
-kMixer8SubType = FOUR_CHAR_CODE('mixb')
-kMixer16SubType = FOUR_CHAR_CODE('mixw')
-kSoundInputDeviceType = FOUR_CHAR_CODE('sinp')
-kWaveInSubType = FOUR_CHAR_CODE('wavi')
-kWaveInSnifferSubType = FOUR_CHAR_CODE('wisn')
-kSoundOutputDeviceType = FOUR_CHAR_CODE('sdev')
-kClassicSubType = FOUR_CHAR_CODE('clas')
-kASCSubType = FOUR_CHAR_CODE('asc ')
-kDSPSubType = FOUR_CHAR_CODE('dsp ')
-kAwacsSubType = FOUR_CHAR_CODE('awac')
-kGCAwacsSubType = FOUR_CHAR_CODE('awgc')
-kSingerSubType = FOUR_CHAR_CODE('sing')
-kSinger2SubType = FOUR_CHAR_CODE('sng2')
-kWhitSubType = FOUR_CHAR_CODE('whit')
-kSoundBlasterSubType = FOUR_CHAR_CODE('sbls')
-kWaveOutSubType = FOUR_CHAR_CODE('wavo')
-kWaveOutSnifferSubType = FOUR_CHAR_CODE('wosn')
-kDirectSoundSubType = FOUR_CHAR_CODE('dsnd')
-kDirectSoundSnifferSubType = FOUR_CHAR_CODE('dssn')
-kUNIXsdevSubType = FOUR_CHAR_CODE('un1x')
-kUSBSubType = FOUR_CHAR_CODE('usb ')
-kBlueBoxSubType = FOUR_CHAR_CODE('bsnd')
-kSoundCompressor = FOUR_CHAR_CODE('scom')
-kSoundDecompressor = FOUR_CHAR_CODE('sdec')
-kAudioComponentType = FOUR_CHAR_CODE('adio')
-kAwacsPhoneSubType = FOUR_CHAR_CODE('hphn')
-kAudioVisionSpeakerSubType = FOUR_CHAR_CODE('telc')
-kAudioVisionHeadphoneSubType = FOUR_CHAR_CODE('telh')
-kPhilipsFaderSubType = FOUR_CHAR_CODE('tvav')
-kSGSToneSubType = FOUR_CHAR_CODE('sgs0')
-kSoundEffectsType = FOUR_CHAR_CODE('snfx')
-kEqualizerSubType = FOUR_CHAR_CODE('eqal')
-kSSpLocalizationSubType = FOUR_CHAR_CODE('snd3')
-kSoundNotCompressed = FOUR_CHAR_CODE('NONE')
-k8BitOffsetBinaryFormat = FOUR_CHAR_CODE('raw ')
-k16BitBigEndianFormat = FOUR_CHAR_CODE('twos')
-k16BitLittleEndianFormat = FOUR_CHAR_CODE('sowt')
-kFloat32Format = FOUR_CHAR_CODE('fl32')
-kFloat64Format = FOUR_CHAR_CODE('fl64')
-k24BitFormat = FOUR_CHAR_CODE('in24')
-k32BitFormat = FOUR_CHAR_CODE('in32')
-k32BitLittleEndianFormat = FOUR_CHAR_CODE('23ni')
-kMACE3Compression = FOUR_CHAR_CODE('MAC3')
-kMACE6Compression = FOUR_CHAR_CODE('MAC6')
-kCDXA4Compression = FOUR_CHAR_CODE('cdx4')
-kCDXA2Compression = FOUR_CHAR_CODE('cdx2')
-kIMACompression = FOUR_CHAR_CODE('ima4')
-kULawCompression = FOUR_CHAR_CODE('ulaw')
-kALawCompression = FOUR_CHAR_CODE('alaw')
-kMicrosoftADPCMFormat = 0x6D730002
-kDVIIntelIMAFormat = 0x6D730011
-kDVAudioFormat = FOUR_CHAR_CODE('dvca')
-kQDesignCompression = FOUR_CHAR_CODE('QDMC')
-kQDesign2Compression = FOUR_CHAR_CODE('QDM2')
-kQUALCOMMCompression = FOUR_CHAR_CODE('Qclp')
-kOffsetBinary = k8BitOffsetBinaryFormat
-kTwosComplement = k16BitBigEndianFormat
-kLittleEndianFormat = k16BitLittleEndianFormat
-kMPEGLayer3Format = 0x6D730055
-kFullMPEGLay3Format = FOUR_CHAR_CODE('.mp3')
-k16BitNativeEndianFormat = k16BitLittleEndianFormat
-k16BitNonNativeEndianFormat = k16BitBigEndianFormat
-k16BitNativeEndianFormat = k16BitBigEndianFormat
-k16BitNonNativeEndianFormat = k16BitLittleEndianFormat
-k8BitRawIn = (1 << 0)
-k8BitTwosIn = (1 << 1)
-k16BitIn = (1 << 2)
-kStereoIn = (1 << 3)
-k8BitRawOut = (1 << 8)
-k8BitTwosOut = (1 << 9)
-k16BitOut = (1 << 10)
-kStereoOut = (1 << 11)
-kReverse = (1 << 16)
-kRateConvert = (1 << 17)
-kCreateSoundSource = (1 << 18)
-kVMAwareness = (1 << 21)
-kHighQuality = (1 << 22)
-kNonRealTime = (1 << 23)
-kSourcePaused = (1 << 0)
-kPassThrough = (1 << 16)
-kNoSoundComponentChain = (1 << 17)
-kNoMixing = (1 << 0)
-kNoSampleRateConversion = (1 << 1)
-kNoSampleSizeConversion = (1 << 2)
-kNoSampleFormatConversion = (1 << 3)
-kNoChannelConversion = (1 << 4)
-kNoDecompression = (1 << 5)
-kNoVolumeConversion = (1 << 6)
-kNoRealtimeProcessing = (1 << 7)
-kScheduledSource = (1 << 8)
-kNonInterleavedBuffer = (1 << 9)
-kNonPagingMixer = (1 << 10)
-kSoundConverterMixer = (1 << 11)
-kPagingMixer = (1 << 12)
-kVMAwareMixer = (1 << 13)
-kExtendedSoundData = (1 << 14)
-kBestQuality = (1 << 0)
-kInputMask = 0x000000FF
-kOutputMask = 0x0000FF00
-kOutputShift = 8
-kActionMask = 0x00FF0000
-kSoundComponentBits = 0x00FFFFFF
-kAudioFormatAtomType = FOUR_CHAR_CODE('frma')
-kAudioEndianAtomType = FOUR_CHAR_CODE('enda')
-kAudioVBRAtomType = FOUR_CHAR_CODE('vbra')
-kAudioTerminatorAtomType = 0
-kAVDisplayHeadphoneRemove = 0
-kAVDisplayHeadphoneInsert = 1
-kAVDisplayPlainTalkRemove = 2
-kAVDisplayPlainTalkInsert = 3
-audioAllChannels = 0
-audioLeftChannel = 1
-audioRightChannel = 2
-audioUnmuted = 0
-audioMuted = 1
-audioDoesMono = (1 << 0)
-audioDoesStereo = (1 << 1)
-audioDoesIndependentChannels = (1 << 2)
-siCDQuality = FOUR_CHAR_CODE('cd  ')
-siBestQuality = FOUR_CHAR_CODE('best')
-siBetterQuality = FOUR_CHAR_CODE('betr')
-siGoodQuality = FOUR_CHAR_CODE('good')
-siNoneQuality = FOUR_CHAR_CODE('none')
-siDeviceIsConnected = 1
-siDeviceNotConnected = 0
-siDontKnowIfConnected = -1
-siReadPermission = 0
-siWritePermission = 1
-kSoundConverterDidntFillBuffer = (1 << 0)
-kSoundConverterHasLeftOverData = (1 << 1)
-kExtendedSoundSampleCountNotValid = 1 << 0
-kExtendedSoundBufferSizeValid = 1 << 1
-kScheduledSoundDoScheduled = 1 << 0
-kScheduledSoundDoCallBack = 1 << 1
-kScheduledSoundExtendedHdr = 1 << 2
-kSoundComponentInitOutputDeviceSelect = 0x0001
-kSoundComponentSetSourceSelect = 0x0002
-kSoundComponentGetSourceSelect = 0x0003
-kSoundComponentGetSourceDataSelect = 0x0004
-kSoundComponentSetOutputSelect = 0x0005
-kSoundComponentAddSourceSelect = 0x0101
-kSoundComponentRemoveSourceSelect = 0x0102
-kSoundComponentGetInfoSelect = 0x0103
-kSoundComponentSetInfoSelect = 0x0104
-kSoundComponentStartSourceSelect = 0x0105
-kSoundComponentStopSourceSelect = 0x0106
-kSoundComponentPauseSourceSelect = 0x0107
-kSoundComponentPlaySourceBufferSelect = 0x0108
-kAudioGetVolumeSelect = 0x0000
-kAudioSetVolumeSelect = 0x0001
-kAudioGetMuteSelect = 0x0002
-kAudioSetMuteSelect = 0x0003
-kAudioSetToDefaultsSelect = 0x0004
-kAudioGetInfoSelect = 0x0005
-kAudioGetBassSelect = 0x0006
-kAudioSetBassSelect = 0x0007
-kAudioGetTrebleSelect = 0x0008
-kAudioSetTrebleSelect = 0x0009
-kAudioGetOutputDeviceSelect = 0x000A
-kAudioMuteOnEventSelect = 0x0081
-kDelegatedSoundComponentSelectors = 0x0100
-kSndInputReadAsyncSelect = 0x0001
-kSndInputReadSyncSelect = 0x0002
-kSndInputPauseRecordingSelect = 0x0003
-kSndInputResumeRecordingSelect = 0x0004
-kSndInputStopRecordingSelect = 0x0005
-kSndInputGetStatusSelect = 0x0006
-kSndInputGetDeviceInfoSelect = 0x0007
-kSndInputSetDeviceInfoSelect = 0x0008
-kSndInputInitHardwareSelect = 0x0009
diff --git a/Lib/plat-mac/Carbon/TE.py b/Lib/plat-mac/Carbon/TE.py
deleted file mode 100644 (file)
index 4351d7a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _TE import *
diff --git a/Lib/plat-mac/Carbon/TextEdit.py b/Lib/plat-mac/Carbon/TextEdit.py
deleted file mode 100644 (file)
index 176795a..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-# Generated from 'TextEdit.h'
-
-teJustLeft = 0
-teJustCenter = 1
-teJustRight = -1
-teForceLeft = -2
-teFlushDefault = 0
-teCenter = 1
-teFlushRight = -1
-teFlushLeft = -2
-fontBit = 0
-faceBit = 1
-sizeBit = 2
-clrBit = 3
-addSizeBit = 4
-toggleBit = 5
-doFont = 1
-doFace = 2
-doSize = 4
-doColor = 8
-doAll = 15
-addSize = 16
-doToggle = 32
-EOLHook = 0
-DRAWHook = 4
-WIDTHHook = 8
-HITTESTHook = 12
-nWIDTHHook = 24
-TextWidthHook = 28
-intEOLHook = 0
-intDrawHook = 1
-intWidthHook = 2
-intHitTestHook = 3
-intNWidthHook = 6
-intTextWidthHook = 7
-intInlineInputTSMTEPreUpdateHook = 8
-intInlineInputTSMTEPostUpdateHook = 9
-teFAutoScroll = 0
-teFTextBuffering = 1
-teFOutlineHilite = 2
-teFInlineInput = 3
-teFUseWhiteBackground = 4
-teFUseInlineInput = 5
-teFInlineInputAutoScroll = 6
-teFIdleWithEventLoopTimer = 7
-teBitClear = 0
-teBitSet = 1
-teBitTest = -1
-teWordSelect = 4
-teWordDrag = 8
-teFromFind = 12
-teFromRecal = 16
-teFind = 0
-teHighlight = 1
-teDraw = -1
-teCaret = -2
-teFUseTextServices = 4
diff --git a/Lib/plat-mac/Carbon/Win.py b/Lib/plat-mac/Carbon/Win.py
deleted file mode 100644 (file)
index 2805772..0000000
+++ /dev/null
@@ -1 +0,0 @@
-from _Win import *
diff --git a/Lib/plat-mac/Carbon/Windows.py b/Lib/plat-mac/Carbon/Windows.py
deleted file mode 100644 (file)
index 9654226..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-# Generated from 'MacWindows.h'
-
-def FOUR_CHAR_CODE(x): return x
-false = 0
-true = 1
-kWindowNoConstrainAttribute = 0x80000000
-kAlertWindowClass = 1
-kMovableAlertWindowClass = 2
-kModalWindowClass = 3
-kMovableModalWindowClass = 4
-kFloatingWindowClass = 5
-kDocumentWindowClass = 6
-kUtilityWindowClass = 8
-kHelpWindowClass = 10
-kSheetWindowClass = 11
-kToolbarWindowClass = 12
-kPlainWindowClass = 13
-kOverlayWindowClass = 14
-kSheetAlertWindowClass = 15
-kAltPlainWindowClass = 16
-kDrawerWindowClass = 20
-# kAllWindowClasses = (unsigned long)0xFFFFFFFF
-kWindowNoAttributes = 0
-kWindowCloseBoxAttribute = (1 << 0)
-kWindowHorizontalZoomAttribute = (1 << 1)
-kWindowVerticalZoomAttribute = (1 << 2)
-kWindowFullZoomAttribute = (kWindowVerticalZoomAttribute | kWindowHorizontalZoomAttribute)
-kWindowCollapseBoxAttribute = (1 << 3)
-kWindowResizableAttribute = (1 << 4)
-kWindowSideTitlebarAttribute = (1 << 5)
-kWindowToolbarButtonAttribute = (1 << 6)
-kWindowNoUpdatesAttribute = (1 << 16)
-kWindowNoActivatesAttribute = (1 << 17)
-kWindowOpaqueForEventsAttribute = (1 << 18)
-kWindowNoShadowAttribute = (1 << 21)
-kWindowHideOnSuspendAttribute = (1 << 24)
-kWindowStandardHandlerAttribute = (1 << 25)
-kWindowHideOnFullScreenAttribute = (1 << 26)
-kWindowInWindowMenuAttribute = (1 << 27)
-kWindowLiveResizeAttribute = (1 << 28)
-# kWindowNoConstrainAttribute = (unsigned long)((1L << 31))
-kWindowStandardDocumentAttributes = (kWindowCloseBoxAttribute | kWindowFullZoomAttribute | kWindowCollapseBoxAttribute | kWindowResizableAttribute)
-kWindowStandardFloatingAttributes = (kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute)
-kWindowDefProcType = FOUR_CHAR_CODE('WDEF')
-kStandardWindowDefinition = 0
-kRoundWindowDefinition = 1
-kFloatingWindowDefinition = 124
-kDocumentWindowVariantCode = 0
-kModalDialogVariantCode = 1
-kPlainDialogVariantCode = 2
-kShadowDialogVariantCode = 3
-kMovableModalDialogVariantCode = 5
-kAlertVariantCode = 7
-kMovableAlertVariantCode = 9
-kSideFloaterVariantCode = 8
-documentProc = 0
-dBoxProc = 1
-plainDBox = 2
-altDBoxProc = 3
-noGrowDocProc = 4
-movableDBoxProc = 5
-zoomDocProc = 8
-zoomNoGrow = 12
-floatProc = 1985
-floatGrowProc = 1987
-floatZoomProc = 1989
-floatZoomGrowProc = 1991
-floatSideProc = 1993
-floatSideGrowProc = 1995
-floatSideZoomProc = 1997
-floatSideZoomGrowProc = 1999
-rDocProc = 16
-kWindowDocumentDefProcResID = 64
-kWindowDialogDefProcResID = 65
-kWindowUtilityDefProcResID = 66
-kWindowUtilitySideTitleDefProcResID = 67
-kWindowSheetDefProcResID = 68
-kWindowSimpleDefProcResID = 69
-kWindowSheetAlertDefProcResID = 70
-kWindowDocumentProc = 1024
-kWindowGrowDocumentProc = 1025
-kWindowVertZoomDocumentProc = 1026
-kWindowVertZoomGrowDocumentProc = 1027
-kWindowHorizZoomDocumentProc = 1028
-kWindowHorizZoomGrowDocumentProc = 1029
-kWindowFullZoomDocumentProc = 1030
-kWindowFullZoomGrowDocumentProc = 1031
-kWindowPlainDialogProc = 1040
-kWindowShadowDialogProc = 1041
-kWindowModalDialogProc = 1042
-kWindowMovableModalDialogProc = 1043
-kWindowAlertProc = 1044
-kWindowMovableAlertProc = 1045
-kWindowMovableModalGrowProc = 1046
-kWindowFloatProc = 1057
-kWindowFloatGrowProc = 1059
-kWindowFloatVertZoomProc = 1061
-kWindowFloatVertZoomGrowProc = 1063
-kWindowFloatHorizZoomProc = 1065
-kWindowFloatHorizZoomGrowProc = 1067
-kWindowFloatFullZoomProc = 1069
-kWindowFloatFullZoomGrowProc = 1071
-kWindowFloatSideProc = 1073
-kWindowFloatSideGrowProc = 1075
-kWindowFloatSideVertZoomProc = 1077
-kWindowFloatSideVertZoomGrowProc = 1079
-kWindowFloatSideHorizZoomProc = 1081
-kWindowFloatSideHorizZoomGrowProc = 1083
-kWindowFloatSideFullZoomProc = 1085
-kWindowFloatSideFullZoomGrowProc = 1087
-kWindowSheetProc = 1088
-kWindowSheetAlertProc = 1120
-kWindowSimpleProc = 1104
-kWindowSimpleFrameProc = 1105
-kWindowNoPosition = 0x0000
-kWindowDefaultPosition = 0x0000
-kWindowCenterMainScreen = 0x280A
-kWindowAlertPositionMainScreen = 0x300A
-kWindowStaggerMainScreen = 0x380A
-kWindowCenterParentWindow = 0xA80A
-kWindowAlertPositionParentWindow = 0xB00A
-kWindowStaggerParentWindow = 0xB80A
-kWindowCenterParentWindowScreen = 0x680A
-kWindowAlertPositionParentWindowScreen = 0x700A
-kWindowStaggerParentWindowScreen = 0x780A
-kWindowCenterOnMainScreen = 1
-kWindowCenterOnParentWindow = 2
-kWindowCenterOnParentWindowScreen = 3
-kWindowCascadeOnMainScreen = 4
-kWindowCascadeOnParentWindow = 5
-kWindowCascadeOnParentWindowScreen = 6
-kWindowCascadeStartAtParentWindowScreen = 10
-kWindowAlertPositionOnMainScreen = 7
-kWindowAlertPositionOnParentWindow = 8
-kWindowAlertPositionOnParentWindowScreen = 9
-kWindowTitleBarRgn = 0
-kWindowTitleTextRgn = 1
-kWindowCloseBoxRgn = 2
-kWindowZoomBoxRgn = 3
-kWindowDragRgn = 5
-kWindowGrowRgn = 6
-kWindowCollapseBoxRgn = 7
-kWindowTitleProxyIconRgn = 8
-kWindowStructureRgn = 32
-kWindowContentRgn = 33
-kWindowUpdateRgn = 34
-kWindowOpaqueRgn = 35
-kWindowGlobalPortRgn = 40
-dialogKind = 2
-userKind = 8
-kDialogWindowKind = 2
-kApplicationWindowKind = 8
-inDesk = 0
-inNoWindow = 0
-inMenuBar = 1
-inSysWindow = 2
-inContent = 3
-inDrag = 4
-inGrow = 5
-inGoAway = 6
-inZoomIn = 7
-inZoomOut = 8
-inCollapseBox = 11
-inProxyIcon = 12
-inToolbarButton = 13
-inStructure = 15
-wNoHit = 0
-wInContent = 1
-wInDrag = 2
-wInGrow = 3
-wInGoAway = 4
-wInZoomIn = 5
-wInZoomOut = 6
-wInCollapseBox = 9
-wInProxyIcon = 10
-wInToolbarButton = 11
-wInStructure = 13
-kWindowMsgDraw = 0
-kWindowMsgHitTest = 1
-kWindowMsgCalculateShape = 2
-kWindowMsgInitialize = 3
-kWindowMsgCleanUp = 4
-kWindowMsgDrawGrowOutline = 5
-kWindowMsgDrawGrowBox = 6
-kWindowMsgGetFeatures = 7
-kWindowMsgGetRegion = 8
-kWindowMsgDragHilite = 9
-kWindowMsgModified = 10
-kWindowMsgDrawInCurrentPort = 11
-kWindowMsgSetupProxyDragImage = 12
-kWindowMsgStateChanged = 13
-kWindowMsgMeasureTitle = 14
-kWindowMsgGetGrowImageRegion = 19
-wDraw = 0
-wHit = 1
-wCalcRgns = 2
-wNew = 3
-wDispose = 4
-wGrow = 5
-wDrawGIcon = 6
-kWindowStateTitleChanged = (1 << 0)
-kWindowCanGrow = (1 << 0)
-kWindowCanZoom = (1 << 1)
-kWindowCanCollapse = (1 << 2)
-kWindowIsModal = (1 << 3)
-kWindowCanGetWindowRegion = (1 << 4)
-kWindowIsAlert = (1 << 5)
-kWindowHasTitleBar = (1 << 6)
-kWindowSupportsDragHilite = (1 << 7)
-kWindowSupportsModifiedBit = (1 << 8)
-kWindowCanDrawInCurrentPort = (1 << 9)
-kWindowCanSetupProxyDragImage = (1 << 10)
-kWindowCanMeasureTitle = (1 << 11)
-kWindowWantsDisposeAtProcessDeath = (1 << 12)
-kWindowSupportsGetGrowImageRegion = (1 << 13)
-kWindowDefSupportsColorGrafPort = 0x40000002
-kWindowIsOpaque = (1 << 14)
-kWindowSupportsSetGrowImageRegion = (1 << 13)
-deskPatID = 16
-wContentColor = 0
-wFrameColor = 1
-wTextColor = 2
-wHiliteColor = 3
-wTitleBarColor = 4
-# kMouseUpOutOfSlop = (long)0x80008000
-kWindowDefinitionVersionOne = 1
-kWindowDefinitionVersionTwo = 2
-kWindowIsCollapsedState = (1 << 0)
-kStoredWindowSystemTag = FOUR_CHAR_CODE('appl')
-kStoredBasicWindowDescriptionID = FOUR_CHAR_CODE('sbas')
-kStoredWindowPascalTitleID = FOUR_CHAR_CODE('s255')
-kWindowDefProcPtr = 0
-kWindowDefObjectClass = 1
-kWindowDefProcID = 2
-kWindowModalityNone = 0
-kWindowModalitySystemModal = 1
-kWindowModalityAppModal = 2
-kWindowModalityWindowModal = 3
-kWindowGroupAttrSelectAsLayer = 1 << 0
-kWindowGroupAttrMoveTogether = 1 << 1
-kWindowGroupAttrLayerTogether = 1 << 2
-kWindowGroupAttrSharedActivation = 1 << 3
-kWindowGroupAttrHideOnCollapse = 1 << 4
-kWindowActivationScopeNone = 0
-kWindowActivationScopeIndependent = 1
-kWindowActivationScopeAll = 2
-kNextWindowGroup = true
-kPreviousWindowGroup = false
-kWindowGroupContentsReturnWindows = 1 << 0
-kWindowGroupContentsRecurse = 1 << 1
-kWindowGroupContentsVisible = 1 << 2
-kWindowPaintProcOptionsNone = 0
-kScrollWindowNoOptions = 0
-kScrollWindowInvalidate = (1 << 0)
-kScrollWindowEraseToPortBackground = (1 << 1)
-kWindowMenuIncludeRotate = 1 << 0
-kWindowZoomTransitionEffect = 1
-kWindowSheetTransitionEffect = 2
-kWindowSlideTransitionEffect = 3
-kWindowShowTransitionAction = 1
-kWindowHideTransitionAction = 2
-kWindowMoveTransitionAction = 3
-kWindowResizeTransitionAction = 4
-kWindowConstrainMayResize = (1 << 0)
-kWindowConstrainMoveRegardlessOfFit = (1 << 1)
-kWindowConstrainAllowPartial = (1 << 2)
-kWindowConstrainCalcOnly = (1 << 3)
-kWindowConstrainUseTransitionWindow = (1 << 4)
-kWindowConstrainStandardOptions = kWindowConstrainMoveRegardlessOfFit
-kWindowLatentVisibleFloater = 1 << 0
-kWindowLatentVisibleSuspend = 1 << 1
-kWindowLatentVisibleFullScreen = 1 << 2
-kWindowLatentVisibleAppHidden = 1 << 3
-kWindowLatentVisibleCollapsedOwner = 1 << 4
-kWindowLatentVisibleCollapsedGroup = 1 << 5
-kWindowPropertyPersistent = 0x00000001
-kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer
-kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether
-kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether
diff --git a/Lib/plat-mac/Carbon/__init__.py b/Lib/plat-mac/Carbon/__init__.py
deleted file mode 100644 (file)
index 8018c18..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Filter out warnings about signed/unsigned constants
-import warnings
-warnings.filterwarnings("ignore", "", FutureWarning, ".*Controls")
-warnings.filterwarnings("ignore", "", FutureWarning, ".*MacTextEditor")
diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py
deleted file mode 100644 (file)
index f697417..0000000
+++ /dev/null
@@ -1,837 +0,0 @@
-"""Easy to use dialogs.
-
-Message(msg) -- display a message and an OK button.
-AskString(prompt, default) -- ask for a string, display OK and Cancel buttons.
-AskPassword(prompt, default) -- like AskString(), but shows text as bullets.
-AskYesNoCancel(question, default) -- display a question and Yes, No and Cancel buttons.
-GetArgv(optionlist, commandlist) -- fill a sys.argv-like list using a dialog
-AskFileForOpen(...) -- Ask the user for an existing file
-AskFileForSave(...) -- Ask the user for an output file
-AskFolder(...) -- Ask the user to select a folder
-bar = Progress(label, maxvalue) -- Display a progress bar
-bar.set(value) -- Set value
-bar.inc( *amount ) -- increment value by amount (default=1)
-bar.label( *newlabel ) -- get or set text label.
-
-More documentation in each function.
-This module uses DLOG resources 260 and on.
-Based upon STDWIN dialogs with the same names and functions.
-"""
-
-from Carbon.Dlg import GetNewDialog, SetDialogItemText, GetDialogItemText, ModalDialog
-from Carbon import Qd
-from Carbon import QuickDraw
-from Carbon import Dialogs
-from Carbon import Windows
-from Carbon import Dlg,Win,Evt,Events # sdm7g
-from Carbon import Ctl
-from Carbon import Controls
-from Carbon import Menu
-from Carbon import AE
-import Nav
-import MacOS
-from Carbon.ControlAccessor import *    # Also import Controls constants
-import Carbon.File
-import macresource
-import os
-import sys
-
-__all__ = ['Message', 'AskString', 'AskPassword', 'AskYesNoCancel',
-    'GetArgv', 'AskFileForOpen', 'AskFileForSave', 'AskFolder',
-    'ProgressBar']
-
-_initialized = 0
-
-def _initialize():
-    global _initialized
-    if _initialized: return
-    macresource.need("DLOG", 260, "dialogs.rsrc", __name__)
-
-def _interact():
-    """Make sure the application is in the foreground"""
-    AE.AEInteractWithUser(50000000)
-
-def cr2lf(text):
-    if '\r' in text:
-        text = '\n'.join(text.split('\r'))
-    return text
-
-def lf2cr(text):
-    if '\n' in text:
-        text = '\r'.join(text.split('\n'))
-    if len(text) > 253:
-        text = text[:253] + '\311'
-    return text
-
-def Message(msg, id=260, ok=None):
-    """Display a MESSAGE string.
-
-    Return when the user clicks the OK button or presses Return.
-
-    The MESSAGE string can be at most 255 characters long.
-    """
-    _initialize()
-    _interact()
-    d = GetNewDialog(id, -1)
-    if not d:
-        print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
-        return
-    h = d.GetDialogItemAsControl(2)
-    SetDialogItemText(h, lf2cr(msg))
-    if ok is not None:
-        h = d.GetDialogItemAsControl(1)
-        h.SetControlTitle(ok)
-    d.SetDialogDefaultItem(1)
-    d.AutoSizeDialog()
-    d.GetDialogWindow().ShowWindow()
-    while 1:
-        n = ModalDialog(None)
-        if n == 1:
-            return
-
-
-def AskString(prompt, default = "", id=261, ok=None, cancel=None):
-    """Display a PROMPT string and a text entry field with a DEFAULT string.
-
-    Return the contents of the text entry field when the user clicks the
-    OK button or presses Return.
-    Return None when the user clicks the Cancel button.
-
-    If omitted, DEFAULT is empty.
-
-    The PROMPT and DEFAULT strings, as well as the return value,
-    can be at most 255 characters long.
-    """
-
-    _initialize()
-    _interact()
-    d = GetNewDialog(id, -1)
-    if not d:
-        print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
-        return
-    h = d.GetDialogItemAsControl(3)
-    SetDialogItemText(h, lf2cr(prompt))
-    h = d.GetDialogItemAsControl(4)
-    SetDialogItemText(h, lf2cr(default))
-    d.SelectDialogItemText(4, 0, 999)
-#       d.SetDialogItem(4, 0, 255)
-    if ok is not None:
-        h = d.GetDialogItemAsControl(1)
-        h.SetControlTitle(ok)
-    if cancel is not None:
-        h = d.GetDialogItemAsControl(2)
-        h.SetControlTitle(cancel)
-    d.SetDialogDefaultItem(1)
-    d.SetDialogCancelItem(2)
-    d.AutoSizeDialog()
-    d.GetDialogWindow().ShowWindow()
-    while 1:
-        n = ModalDialog(None)
-        if n == 1:
-            h = d.GetDialogItemAsControl(4)
-            return cr2lf(GetDialogItemText(h))
-        if n == 2: return None
-
-def AskPassword(prompt,  default='', id=264, ok=None, cancel=None):
-    """Display a PROMPT string and a text entry field with a DEFAULT string.
-    The string is displayed as bullets only.
-
-    Return the contents of the text entry field when the user clicks the
-    OK button or presses Return.
-    Return None when the user clicks the Cancel button.
-
-    If omitted, DEFAULT is empty.
-
-    The PROMPT and DEFAULT strings, as well as the return value,
-    can be at most 255 characters long.
-    """
-    _initialize()
-    _interact()
-    d = GetNewDialog(id, -1)
-    if not d:
-        print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
-        return
-    h = d.GetDialogItemAsControl(3)
-    SetDialogItemText(h, lf2cr(prompt))
-    pwd = d.GetDialogItemAsControl(4)
-    bullets = '\245'*len(default)
-##      SetControlData(pwd, kControlEditTextPart, kControlEditTextTextTag, bullets)
-    SetControlData(pwd, kControlEditTextPart, kControlEditTextPasswordTag, default)
-    d.SelectDialogItemText(4, 0, 999)
-    Ctl.SetKeyboardFocus(d.GetDialogWindow(), pwd, kControlEditTextPart)
-    if ok is not None:
-        h = d.GetDialogItemAsControl(1)
-        h.SetControlTitle(ok)
-    if cancel is not None:
-        h = d.GetDialogItemAsControl(2)
-        h.SetControlTitle(cancel)
-    d.SetDialogDefaultItem(Dialogs.ok)
-    d.SetDialogCancelItem(Dialogs.cancel)
-    d.AutoSizeDialog()
-    d.GetDialogWindow().ShowWindow()
-    while 1:
-        n = ModalDialog(None)
-        if n == 1:
-            h = d.GetDialogItemAsControl(4)
-            return cr2lf(GetControlData(pwd, kControlEditTextPart, kControlEditTextPasswordTag))
-        if n == 2: return None
-
-def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262):
-    """Display a QUESTION string which can be answered with Yes or No.
-
-    Return 1 when the user clicks the Yes button.
-    Return 0 when the user clicks the No button.
-    Return -1 when the user clicks the Cancel button.
-
-    When the user presses Return, the DEFAULT value is returned.
-    If omitted, this is 0 (No).
-
-    The QUESTION string can be at most 255 characters.
-    """
-
-    _initialize()
-    _interact()
-    d = GetNewDialog(id, -1)
-    if not d:
-        print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
-        return
-    # Button assignments:
-    # 1 = default (invisible)
-    # 2 = Yes
-    # 3 = No
-    # 4 = Cancel
-    # The question string is item 5
-    h = d.GetDialogItemAsControl(5)
-    SetDialogItemText(h, lf2cr(question))
-    if yes is not None:
-        if yes == '':
-            d.HideDialogItem(2)
-        else:
-            h = d.GetDialogItemAsControl(2)
-            h.SetControlTitle(yes)
-    if no is not None:
-        if no == '':
-            d.HideDialogItem(3)
-        else:
-            h = d.GetDialogItemAsControl(3)
-            h.SetControlTitle(no)
-    if cancel is not None:
-        if cancel == '':
-            d.HideDialogItem(4)
-        else:
-            h = d.GetDialogItemAsControl(4)
-            h.SetControlTitle(cancel)
-    d.SetDialogCancelItem(4)
-    if default == 1:
-        d.SetDialogDefaultItem(2)
-    elif default == 0:
-        d.SetDialogDefaultItem(3)
-    elif default == -1:
-        d.SetDialogDefaultItem(4)
-    d.AutoSizeDialog()
-    d.GetDialogWindow().ShowWindow()
-    while 1:
-        n = ModalDialog(None)
-        if n == 1: return default
-        if n == 2: return 1
-        if n == 3: return 0
-        if n == 4: return -1
-
-
-
-
-screenbounds = Qd.GetQDGlobalsScreenBits().bounds
-screenbounds = screenbounds[0]+4, screenbounds[1]+4, \
-    screenbounds[2]-4, screenbounds[3]-4
-
-kControlProgressBarIndeterminateTag = 'inde'    # from Controls.py
-
-
-class ProgressBar:
-    def __init__(self, title="Working...", maxval=0, label="", id=263):
-        self.w = None
-        self.d = None
-        _initialize()
-        self.d = GetNewDialog(id, -1)
-        self.w = self.d.GetDialogWindow()
-        self.label(label)
-        self.title(title)
-        self.set(0, maxval)
-        self.d.AutoSizeDialog()
-        self.w.ShowWindow()
-        self.d.DrawDialog()
-
-    def __del__(self):
-        if self.w:
-            self.w.BringToFront()
-            self.w.HideWindow()
-        del self.w
-        del self.d
-
-    def title(self, newstr=""):
-        """title(text) - Set title of progress window"""
-        self.w.BringToFront()
-        self.w.SetWTitle(newstr)
-
-    def label(self, *newstr):
-        """label(text) - Set text in progress box"""
-        self.w.BringToFront()
-        if newstr:
-            self._label = lf2cr(newstr[0])
-        text_h = self.d.GetDialogItemAsControl(2)
-        SetDialogItemText(text_h, self._label)
-
-    def _update(self, value):
-        maxval = self.maxval
-        if maxval == 0:     # an indeterminate bar
-            Ctl.IdleControls(self.w)    # spin the barber pole
-        else:               # a determinate bar
-            if maxval > 32767:
-                value = int(value/(maxval/32767.0))
-                maxval = 32767
-            maxval = int(maxval)
-            value = int(value)
-            progbar = self.d.GetDialogItemAsControl(3)
-            progbar.SetControlMaximum(maxval)
-            progbar.SetControlValue(value)  # set the bar length
-
-        # Test for cancel button
-        ready, ev = Evt.WaitNextEvent( Events.mDownMask, 1  )
-        if ready :
-            what,msg,when,where,mod = ev
-            part = Win.FindWindow(where)[0]
-            if Dlg.IsDialogEvent(ev):
-                ds = Dlg.DialogSelect(ev)
-                if ds[0] and ds[1] == self.d and ds[-1] == 1:
-                    self.w.HideWindow()
-                    self.w = None
-                    self.d = None
-                    raise KeyboardInterrupt(ev)
-            else:
-                if part == 4:   # inDrag
-                    self.w.DragWindow(where, screenbounds)
-                else:
-                    MacOS.HandleEvent(ev)
-
-
-    def set(self, value, max=None):
-        """set(value) - Set progress bar position"""
-        if max is not None:
-            self.maxval = max
-            bar = self.d.GetDialogItemAsControl(3)
-            if max <= 0:    # indeterminate bar
-                bar.SetControlData(0,kControlProgressBarIndeterminateTag,'\x01')
-            else:           # determinate bar
-                bar.SetControlData(0,kControlProgressBarIndeterminateTag,'\x00')
-        if value < 0:
-            value = 0
-        elif value > self.maxval:
-            value = self.maxval
-        self.curval = value
-        self._update(value)
-
-    def inc(self, n=1):
-        """inc(amt) - Increment progress bar position"""
-        self.set(self.curval + n)
-
-ARGV_ID=265
-ARGV_ITEM_OK=1
-ARGV_ITEM_CANCEL=2
-ARGV_OPTION_GROUP=3
-ARGV_OPTION_EXPLAIN=4
-ARGV_OPTION_VALUE=5
-ARGV_OPTION_ADD=6
-ARGV_COMMAND_GROUP=7
-ARGV_COMMAND_EXPLAIN=8
-ARGV_COMMAND_ADD=9
-ARGV_ADD_OLDFILE=10
-ARGV_ADD_NEWFILE=11
-ARGV_ADD_FOLDER=12
-ARGV_CMDLINE_GROUP=13
-ARGV_CMDLINE_DATA=14
-
-##def _myModalDialog(d):
-##      while 1:
-##          ready, ev = Evt.WaitNextEvent(0xffff, -1)
-##          print 'DBG: WNE', ready, ev
-##          if ready :
-##              what,msg,when,where,mod = ev
-##              part, window = Win.FindWindow(where)
-##              if Dlg.IsDialogEvent(ev):
-##                  didit, dlgdone, itemdone = Dlg.DialogSelect(ev)
-##                  print 'DBG: DialogSelect', didit, dlgdone, itemdone, d
-##                  if didit and dlgdone == d:
-##                      return itemdone
-##              elif window == d.GetDialogWindow():
-##                  d.GetDialogWindow().SelectWindow()
-##                  if part == 4:   # inDrag
-##                          d.DragWindow(where, screenbounds)
-##                  else:
-##                      MacOS.HandleEvent(ev)
-##              else:
-##                  MacOS.HandleEvent(ev)
-##
-def _setmenu(control, items):
-    mhandle = control.GetControlData_Handle(Controls.kControlMenuPart,
-            Controls.kControlPopupButtonMenuHandleTag)
-    menu = Menu.as_Menu(mhandle)
-    for item in items:
-        if type(item) == type(()):
-            label = item[0]
-        else:
-            label = item
-        if label[-1] == '=' or label[-1] == ':':
-            label = label[:-1]
-        menu.AppendMenu(label)
-##          mhandle, mid = menu.getpopupinfo()
-##          control.SetControlData_Handle(Controls.kControlMenuPart,
-##                  Controls.kControlPopupButtonMenuHandleTag, mhandle)
-    control.SetControlMinimum(1)
-    control.SetControlMaximum(len(items)+1)
-
-def _selectoption(d, optionlist, idx):
-    if idx < 0 or idx >= len(optionlist):
-        MacOS.SysBeep()
-        return
-    option = optionlist[idx]
-    if type(option) == type(()):
-        if len(option) == 4:
-            help = option[2]
-        elif len(option) > 1:
-            help = option[-1]
-        else:
-            help = ''
-    else:
-        help = ''
-    h = d.GetDialogItemAsControl(ARGV_OPTION_EXPLAIN)
-    if help and len(help) > 250:
-        help = help[:250] + '...'
-    Dlg.SetDialogItemText(h, help)
-    hasvalue = 0
-    if type(option) == type(()):
-        label = option[0]
-    else:
-        label = option
-    if label[-1] == '=' or label[-1] == ':':
-        hasvalue = 1
-    h = d.GetDialogItemAsControl(ARGV_OPTION_VALUE)
-    Dlg.SetDialogItemText(h, '')
-    if hasvalue:
-        d.ShowDialogItem(ARGV_OPTION_VALUE)
-        d.SelectDialogItemText(ARGV_OPTION_VALUE, 0, 0)
-    else:
-        d.HideDialogItem(ARGV_OPTION_VALUE)
-
-
-def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfolder=1, id=ARGV_ID):
-    _initialize()
-    _interact()
-    d = GetNewDialog(id, -1)
-    if not d:
-        print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
-        return
-#       h = d.GetDialogItemAsControl(3)
-#       SetDialogItemText(h, lf2cr(prompt))
-#       h = d.GetDialogItemAsControl(4)
-#       SetDialogItemText(h, lf2cr(default))
-#       d.SelectDialogItemText(4, 0, 999)
-#       d.SetDialogItem(4, 0, 255)
-    if optionlist:
-        _setmenu(d.GetDialogItemAsControl(ARGV_OPTION_GROUP), optionlist)
-        _selectoption(d, optionlist, 0)
-    else:
-        d.GetDialogItemAsControl(ARGV_OPTION_GROUP).DeactivateControl()
-    if commandlist:
-        _setmenu(d.GetDialogItemAsControl(ARGV_COMMAND_GROUP), commandlist)
-        if type(commandlist[0]) == type(()) and len(commandlist[0]) > 1:
-            help = commandlist[0][-1]
-            h = d.GetDialogItemAsControl(ARGV_COMMAND_EXPLAIN)
-            Dlg.SetDialogItemText(h, help)
-    else:
-        d.GetDialogItemAsControl(ARGV_COMMAND_GROUP).DeactivateControl()
-    if not addoldfile:
-        d.GetDialogItemAsControl(ARGV_ADD_OLDFILE).DeactivateControl()
-    if not addnewfile:
-        d.GetDialogItemAsControl(ARGV_ADD_NEWFILE).DeactivateControl()
-    if not addfolder:
-        d.GetDialogItemAsControl(ARGV_ADD_FOLDER).DeactivateControl()
-    d.SetDialogDefaultItem(ARGV_ITEM_OK)
-    d.SetDialogCancelItem(ARGV_ITEM_CANCEL)
-    d.GetDialogWindow().ShowWindow()
-    d.DrawDialog()
-    if hasattr(MacOS, 'SchedParams'):
-        appsw = MacOS.SchedParams(1, 0)
-    try:
-        while 1:
-            stringstoadd = []
-            n = ModalDialog(None)
-            if n == ARGV_ITEM_OK:
-                break
-            elif n == ARGV_ITEM_CANCEL:
-                raise SystemExit
-            elif n == ARGV_OPTION_GROUP:
-                idx = d.GetDialogItemAsControl(ARGV_OPTION_GROUP).GetControlValue()-1
-                _selectoption(d, optionlist, idx)
-            elif n == ARGV_OPTION_VALUE:
-                pass
-            elif n == ARGV_OPTION_ADD:
-                idx = d.GetDialogItemAsControl(ARGV_OPTION_GROUP).GetControlValue()-1
-                if 0 <= idx < len(optionlist):
-                    option = optionlist[idx]
-                    if type(option) == type(()):
-                        option = option[0]
-                    if option[-1] == '=' or option[-1] == ':':
-                        option = option[:-1]
-                        h = d.GetDialogItemAsControl(ARGV_OPTION_VALUE)
-                        value = Dlg.GetDialogItemText(h)
-                    else:
-                        value = ''
-                    if len(option) == 1:
-                        stringtoadd = '-' + option
-                    else:
-                        stringtoadd = '--' + option
-                    stringstoadd = [stringtoadd]
-                    if value:
-                        stringstoadd.append(value)
-                else:
-                    MacOS.SysBeep()
-            elif n == ARGV_COMMAND_GROUP:
-                idx = d.GetDialogItemAsControl(ARGV_COMMAND_GROUP).GetControlValue()-1
-                if 0 <= idx < len(commandlist) and type(commandlist[idx]) == type(()) and \
-                        len(commandlist[idx]) > 1:
-                    help = commandlist[idx][-1]
-                    h = d.GetDialogItemAsControl(ARGV_COMMAND_EXPLAIN)
-                    Dlg.SetDialogItemText(h, help)
-            elif n == ARGV_COMMAND_ADD:
-                idx = d.GetDialogItemAsControl(ARGV_COMMAND_GROUP).GetControlValue()-1
-                if 0 <= idx < len(commandlist):
-                    command = commandlist[idx]
-                    if type(command) == type(()):
-                        command = command[0]
-                    stringstoadd = [command]
-                else:
-                    MacOS.SysBeep()
-            elif n == ARGV_ADD_OLDFILE:
-                pathname = AskFileForOpen()
-                if pathname:
-                    stringstoadd = [pathname]
-            elif n == ARGV_ADD_NEWFILE:
-                pathname = AskFileForSave()
-                if pathname:
-                    stringstoadd = [pathname]
-            elif n == ARGV_ADD_FOLDER:
-                pathname = AskFolder()
-                if pathname:
-                    stringstoadd = [pathname]
-            elif n == ARGV_CMDLINE_DATA:
-                pass # Nothing to do
-            else:
-                raise RuntimeError("Unknown dialog item %d"%n)
-
-            for stringtoadd in stringstoadd:
-                if '"' in stringtoadd or "'" in stringtoadd or " " in stringtoadd:
-                    stringtoadd = repr(stringtoadd)
-                h = d.GetDialogItemAsControl(ARGV_CMDLINE_DATA)
-                oldstr = GetDialogItemText(h)
-                if oldstr and oldstr[-1] != ' ':
-                    oldstr = oldstr + ' '
-                oldstr = oldstr + stringtoadd
-                if oldstr[-1] != ' ':
-                    oldstr = oldstr + ' '
-                SetDialogItemText(h, oldstr)
-                d.SelectDialogItemText(ARGV_CMDLINE_DATA, 0x7fff, 0x7fff)
-        h = d.GetDialogItemAsControl(ARGV_CMDLINE_DATA)
-        oldstr = GetDialogItemText(h)
-        tmplist = oldstr.split()
-        newlist = []
-        while tmplist:
-            item = tmplist[0]
-            del tmplist[0]
-            if item[0] == '"':
-                while item[-1] != '"':
-                    if not tmplist:
-                        raise RuntimeError("Unterminated quoted argument")
-                    item = item + ' ' + tmplist[0]
-                    del tmplist[0]
-                item = item[1:-1]
-            if item[0] == "'":
-                while item[-1] != "'":
-                    if not tmplist:
-                        raise RuntimeError("Unterminated quoted argument")
-                    item = item + ' ' + tmplist[0]
-                    del tmplist[0]
-                item = item[1:-1]
-            newlist.append(item)
-        return newlist
-    finally:
-        if hasattr(MacOS, 'SchedParams'):
-            MacOS.SchedParams(*appsw)
-        del d
-
-def _process_Nav_args(dftflags, **args):
-    import aepack
-    import Carbon.AE
-    import Carbon.File
-    for k in args.keys():
-        if args[k] is None:
-            del args[k]
-    # Set some defaults, and modify some arguments
-    if 'dialogOptionFlags' not in args:
-        args['dialogOptionFlags'] = dftflags
-    if 'defaultLocation' in args and \
-            not isinstance(args['defaultLocation'], Carbon.AE.AEDesc):
-        defaultLocation = args['defaultLocation']
-        if isinstance(defaultLocation, (Carbon.File.FSSpec, Carbon.File.FSRef)):
-            args['defaultLocation'] = aepack.pack(defaultLocation)
-        else:
-            defaultLocation = Carbon.File.FSRef(defaultLocation)
-            args['defaultLocation'] = aepack.pack(defaultLocation)
-    if 'typeList' in args and not isinstance(args['typeList'], Carbon.Res.ResourceType):
-        typeList = args['typeList'][:]
-        # Workaround for OSX typeless files:
-        if 'TEXT' in typeList and not '\0\0\0\0' in typeList:
-            typeList = typeList + ('\0\0\0\0',)
-        data = 'Pyth' + struct.pack("hh", 0, len(typeList))
-        for type in typeList:
-            data = data+type
-        args['typeList'] = Carbon.Res.Handle(data)
-    tpwanted = str
-    if 'wanted' in args:
-        tpwanted = args['wanted']
-        del args['wanted']
-    return args, tpwanted
-
-def _dummy_Nav_eventproc(msg, data):
-    pass
-
-_default_Nav_eventproc = _dummy_Nav_eventproc
-
-def SetDefaultEventProc(proc):
-    global _default_Nav_eventproc
-    rv = _default_Nav_eventproc
-    if proc is None:
-        proc = _dummy_Nav_eventproc
-    _default_Nav_eventproc = proc
-    return rv
-
-def AskFileForOpen(
-        message=None,
-        typeList=None,
-        # From here on the order is not documented
-        version=None,
-        defaultLocation=None,
-        dialogOptionFlags=None,
-        location=None,
-        clientName=None,
-        windowTitle=None,
-        actionButtonLabel=None,
-        cancelButtonLabel=None,
-        preferenceKey=None,
-        popupExtension=None,
-        eventProc=_dummy_Nav_eventproc,
-        previewProc=None,
-        filterProc=None,
-        wanted=None,
-        multiple=None):
-    """Display a dialog asking the user for a file to open.
-
-    wanted is the return type wanted: FSSpec, FSRef, unicode or string (default)
-    the other arguments can be looked up in Apple's Navigation Services documentation"""
-
-    default_flags = 0x56 # Or 0xe4?
-    args, tpwanted = _process_Nav_args(default_flags, version=version,
-        defaultLocation=defaultLocation, dialogOptionFlags=dialogOptionFlags,
-        location=location,clientName=clientName,windowTitle=windowTitle,
-        actionButtonLabel=actionButtonLabel,cancelButtonLabel=cancelButtonLabel,
-        message=message,preferenceKey=preferenceKey,
-        popupExtension=popupExtension,eventProc=eventProc,previewProc=previewProc,
-        filterProc=filterProc,typeList=typeList,wanted=wanted,multiple=multiple)
-    _interact()
-    try:
-        rr = Nav.NavChooseFile(args)
-        good = 1
-    except Nav.error as arg:
-        if arg.args[0] != -128: # userCancelledErr
-            raise Nav.error(arg)
-        return None
-    if not rr.validRecord or not rr.selection:
-        return None
-    if issubclass(tpwanted, Carbon.File.FSRef):
-        return tpwanted(rr.selection_fsr[0])
-    if issubclass(tpwanted, Carbon.File.FSSpec):
-        return tpwanted(rr.selection[0])
-    if issubclass(tpwanted, str):
-        return tpwanted(rr.selection_fsr[0].as_pathname())
-    if issubclass(tpwanted, str):
-        return tpwanted(rr.selection_fsr[0].as_pathname(), 'utf8')
-    raise TypeError("Unknown value for argument 'wanted': %s" % repr(tpwanted))
-
-def AskFileForSave(
-        message=None,
-        savedFileName=None,
-        # From here on the order is not documented
-        version=None,
-        defaultLocation=None,
-        dialogOptionFlags=None,
-        location=None,
-        clientName=None,
-        windowTitle=None,
-        actionButtonLabel=None,
-        cancelButtonLabel=None,
-        preferenceKey=None,
-        popupExtension=None,
-        eventProc=_dummy_Nav_eventproc,
-        fileType=None,
-        fileCreator=None,
-        wanted=None,
-        multiple=None):
-    """Display a dialog asking the user for a filename to save to.
-
-    wanted is the return type wanted: FSSpec, FSRef, unicode or string (default)
-    the other arguments can be looked up in Apple's Navigation Services documentation"""
-
-
-    default_flags = 0x07
-    args, tpwanted = _process_Nav_args(default_flags, version=version,
-        defaultLocation=defaultLocation, dialogOptionFlags=dialogOptionFlags,
-        location=location,clientName=clientName,windowTitle=windowTitle,
-        actionButtonLabel=actionButtonLabel,cancelButtonLabel=cancelButtonLabel,
-        savedFileName=savedFileName,message=message,preferenceKey=preferenceKey,
-        popupExtension=popupExtension,eventProc=eventProc,fileType=fileType,
-        fileCreator=fileCreator,wanted=wanted,multiple=multiple)
-    _interact()
-    try:
-        rr = Nav.NavPutFile(args)
-        good = 1
-    except Nav.error as arg:
-        if arg.args[0] != -128: # userCancelledErr
-            raise Nav.error(arg)
-        return None
-    if not rr.validRecord or not rr.selection:
-        return None
-    if issubclass(tpwanted, Carbon.File.FSRef):
-        raise TypeError("Cannot pass wanted=FSRef to AskFileForSave")
-    if issubclass(tpwanted, Carbon.File.FSSpec):
-        return tpwanted(rr.selection[0])
-    if issubclass(tpwanted, str):
-        if sys.platform == 'mac':
-            fullpath = rr.selection[0].as_pathname()
-        else:
-            # This is gross, and probably incorrect too
-            vrefnum, dirid, name = rr.selection[0].as_tuple()
-            pardir_fss = Carbon.File.FSSpec((vrefnum, dirid, ''))
-            pardir_fsr = Carbon.File.FSRef(pardir_fss)
-            pardir_path = pardir_fsr.FSRefMakePath()  # This is utf-8
-            name_utf8 = str(name, 'macroman').encode('utf8')
-            fullpath = os.path.join(pardir_path, name_utf8)
-        if issubclass(tpwanted, str):
-            return str(fullpath, 'utf8')
-        return tpwanted(fullpath)
-    raise TypeError("Unknown value for argument 'wanted': %s" % repr(tpwanted))
-
-def AskFolder(
-        message=None,
-        # From here on the order is not documented
-        version=None,
-        defaultLocation=None,
-        dialogOptionFlags=None,
-        location=None,
-        clientName=None,
-        windowTitle=None,
-        actionButtonLabel=None,
-        cancelButtonLabel=None,
-        preferenceKey=None,
-        popupExtension=None,
-        eventProc=_dummy_Nav_eventproc,
-        filterProc=None,
-        wanted=None,
-        multiple=None):
-    """Display a dialog asking the user for select a folder.
-
-    wanted is the return type wanted: FSSpec, FSRef, unicode or string (default)
-    the other arguments can be looked up in Apple's Navigation Services documentation"""
-
-    default_flags = 0x17
-    args, tpwanted = _process_Nav_args(default_flags, version=version,
-        defaultLocation=defaultLocation, dialogOptionFlags=dialogOptionFlags,
-        location=location,clientName=clientName,windowTitle=windowTitle,
-        actionButtonLabel=actionButtonLabel,cancelButtonLabel=cancelButtonLabel,
-        message=message,preferenceKey=preferenceKey,
-        popupExtension=popupExtension,eventProc=eventProc,filterProc=filterProc,
-        wanted=wanted,multiple=multiple)
-    _interact()
-    try:
-        rr = Nav.NavChooseFolder(args)
-        good = 1
-    except Nav.error as arg:
-        if arg.args[0] != -128: # userCancelledErr
-            raise Nav.error(arg)
-        return None
-    if not rr.validRecord or not rr.selection:
-        return None
-    if issubclass(tpwanted, Carbon.File.FSRef):
-        return tpwanted(rr.selection_fsr[0])
-    if issubclass(tpwanted, Carbon.File.FSSpec):
-        return tpwanted(rr.selection[0])
-    if issubclass(tpwanted, str):
-        return tpwanted(rr.selection_fsr[0].as_pathname())
-    if issubclass(tpwanted, str):
-        return tpwanted(rr.selection_fsr[0].as_pathname(), 'utf8')
-    raise TypeError("Unknown value for argument 'wanted': %s" % repr(tpwanted))
-
-
-def test():
-    import time
-
-    Message("Testing EasyDialogs.")
-    optionlist = (('v', 'Verbose'), ('verbose', 'Verbose as long option'),
-                ('flags=', 'Valued option'), ('f:', 'Short valued option'))
-    commandlist = (('start', 'Start something'), ('stop', 'Stop something'))
-    argv = GetArgv(optionlist=optionlist, commandlist=commandlist, addoldfile=0)
-    Message("Command line: %s"%' '.join(argv))
-    for i in range(len(argv)):
-        print('arg[%d] = %r' % (i, argv[i]))
-    ok = AskYesNoCancel("Do you want to proceed?")
-    ok = AskYesNoCancel("Do you want to identify?", yes="Identify", no="No")
-    if ok > 0:
-        s = AskString("Enter your first name", "Joe")
-        s2 = AskPassword("Okay %s, tell us your nickname"%s, s, cancel="None")
-        if not s2:
-            Message("%s has no secret nickname"%s)
-        else:
-            Message("Hello everybody!!\nThe secret nickname of %s is %s!!!"%(s, s2))
-    else:
-        s = 'Anonymous'
-    rv = AskFileForOpen(message="Gimme a file, %s"%s, wanted=Carbon.File.FSSpec)
-    Message("rv: %s"%rv)
-    rv = AskFileForSave(wanted=Carbon.File.FSRef, savedFileName="%s.txt"%s)
-    Message("rv.as_pathname: %s"%rv.as_pathname())
-    rv = AskFolder()
-    Message("Folder name: %s"%rv)
-    text = ( "Working Hard...", "Hardly Working..." ,
-            "So far, so good!", "Keep on truckin'" )
-    bar = ProgressBar("Progress, progress...", 0, label="Ramping up...")
-    try:
-        if hasattr(MacOS, 'SchedParams'):
-            appsw = MacOS.SchedParams(1, 0)
-        for i in range(20):
-            bar.inc()
-            time.sleep(0.05)
-        bar.set(0,100)
-        for i in range(100):
-            bar.set(i)
-            time.sleep(0.05)
-            if i % 10 == 0:
-                bar.label(text[(i/10) % 4])
-        bar.label("Done.")
-        time.sleep(1.0)     # give'em a chance to see "Done."
-    finally:
-        del bar
-        if hasattr(MacOS, 'SchedParams'):
-            MacOS.SchedParams(*appsw)
-
-if __name__ == '__main__':
-    try:
-        test()
-    except KeyboardInterrupt:
-        Message("Operation Canceled.")
diff --git a/Lib/plat-mac/FrameWork.py b/Lib/plat-mac/FrameWork.py
deleted file mode 100644 (file)
index fabd97e..0000000
+++ /dev/null
@@ -1,1123 +0,0 @@
-"A sort of application framework for the Mac"
-
-DEBUG=0
-
-import MacOS
-import traceback
-
-from Carbon.AE import *
-from Carbon.AppleEvents import *
-from Carbon.Ctl import *
-from Carbon.Controls import *
-from Carbon.Dlg import *
-from Carbon.Dialogs import *
-from Carbon.Evt import *
-from Carbon.Events import *
-from Carbon.Help import *
-from Carbon.Menu import *
-from Carbon.Menus import *
-from Carbon.Qd import *
-from Carbon.QuickDraw import *
-#from Carbon.Res import *
-#from Carbon.Resources import *
-#from Carbon.Snd import *
-#from Carbon.Sound import *
-from Carbon.Win import *
-from Carbon.Windows import *
-import types
-
-import EasyDialogs
-
-try:
-    MyFrontWindow = FrontNonFloatingWindow
-except NameError:
-    MyFrontWindow = FrontWindow
-
-kHighLevelEvent = 23    # Don't know what header file this should come from
-SCROLLBARWIDTH = 16         # Again, not a clue...
-
-# Trick to forestall a set of SIOUX menus being added to our menubar
-SIOUX_APPLEMENU_ID=32000
-
-
-# Map event 'what' field to strings
-eventname = {}
-eventname[1] = 'mouseDown'
-eventname[2] = 'mouseUp'
-eventname[3] = 'keyDown'
-eventname[4] = 'keyUp'
-eventname[5] = 'autoKey'
-eventname[6] = 'updateEvt'
-eventname[7] = 'diskEvt'
-eventname[8] = 'activateEvt'
-eventname[15] = 'osEvt'
-eventname[23] = 'kHighLevelEvent'
-
-# Map part codes returned by WhichWindow() to strings
-partname = {}
-partname[0] = 'inDesk'
-partname[1] = 'inMenuBar'
-partname[2] = 'inSysWindow'
-partname[3] = 'inContent'
-partname[4] = 'inDrag'
-partname[5] = 'inGrow'
-partname[6] = 'inGoAway'
-partname[7] = 'inZoomIn'
-partname[8] = 'inZoomOut'
-
-#
-# The useable portion of the screen
-#       ## but what happens with multiple screens? jvr
-screenbounds = GetQDGlobalsScreenBits().bounds
-screenbounds = screenbounds[0]+4, screenbounds[1]+4, \
-    screenbounds[2]-4, screenbounds[3]-4
-
-next_window_x = 16          # jvr
-next_window_y = 44          # jvr
-
-def windowbounds(width, height):
-    "Return sensible window bounds"
-    global next_window_x, next_window_y
-    r, b = next_window_x+width, next_window_y+height
-    if r > screenbounds[2]:
-        next_window_x = 16
-    if b > screenbounds[3]:
-        next_window_y = 44
-    l, t = next_window_x, next_window_y
-    r, b = next_window_x+width, next_window_y+height
-    next_window_x, next_window_y = next_window_x + 8, next_window_y + 20    # jvr
-    return l, t, r, b
-
-_watch = None
-def setwatchcursor():
-    global _watch
-
-    if _watch is None:
-        _watch = GetCursor(4).data
-    SetCursor(_watch)
-
-def setarrowcursor():
-    SetCursor(GetQDGlobalsArrow())
-
-class Application:
-
-    "Application framework -- your application should be a derived class"
-
-    def __init__(self, nomenubar=0):
-        self._doing_asyncevents = 0
-        self.quitting = 0
-        self.needmenubarredraw = 0
-        self._windows = {}
-        self._helpmenu = None
-        if nomenubar:
-            self.menubar = None
-        else:
-            self.makemenubar()
-
-    def __del__(self):
-        if self._doing_asyncevents:
-            self._doing_asyncevents = 0
-            MacOS.SetEventHandler()
-
-    def makemenubar(self):
-        self.menubar = MenuBar(self)
-        AppleMenu(self.menubar, self.getabouttext(), self.do_about)
-        self.makeusermenus()
-
-    def makeusermenus(self):
-        self.filemenu = m = Menu(self.menubar, "File")
-        self._quititem = MenuItem(m, "Quit", "Q", self._quit)
-
-    def gethelpmenu(self):
-        if self._helpmenu is None:
-            self._helpmenu = HelpMenu(self.menubar)
-        return self._helpmenu
-
-    def _quit(self, *args):
-        self.quitting = 1
-
-    def cleanup(self):
-        for w in self._windows.values():
-            w.do_close()
-        return self._windows == {}
-
-    def appendwindow(self, wid, window):
-        self._windows[wid] = window
-
-    def removewindow(self, wid):
-        del self._windows[wid]
-
-    def getabouttext(self):
-        return "About %s..." % self.__class__.__name__
-
-    def do_about(self, id, item, window, event):
-        EasyDialogs.Message("Hello, world!" + "\015(%s)" % self.__class__.__name__)
-
-    # The main event loop is broken up in several simple steps.
-    # This is done so you can override each individual part,
-    # if you have a need to do extra processing independent of the
-    # event type.
-    # Normally, however, you'd just define handlers for individual
-    # events.
-
-    schedparams = (0, 0)    # By default disable Python's event handling
-    default_wait = None         # By default we wait GetCaretTime in WaitNextEvent
-
-    def mainloop(self, mask = everyEvent, wait = None):
-        self.quitting = 0
-        if hasattr(MacOS, 'SchedParams'):
-            saveparams = MacOS.SchedParams(*self.schedparams)
-        try:
-            while not self.quitting:
-                try:
-                    self.do1event(mask, wait)
-                except (Application, SystemExit):
-                    # Note: the raising of "self" is old-fashioned idiom to
-                    # exit the mainloop. Calling _quit() is better for new
-                    # applications.
-                    break
-        finally:
-            if hasattr(MacOS, 'SchedParams'):
-                MacOS.SchedParams(*saveparams)
-
-    def dopendingevents(self, mask = everyEvent):
-        """dopendingevents - Handle all pending events"""
-        while self.do1event(mask, wait=0):
-            pass
-
-    def do1event(self, mask = everyEvent, wait = None):
-        ok, event = self.getevent(mask, wait)
-        if IsDialogEvent(event):
-            if self.do_dialogevent(event):
-                return
-        if ok:
-            self.dispatch(event)
-        else:
-            self.idle(event)
-
-    def idle(self, event):
-        pass
-
-    def getevent(self, mask = everyEvent, wait = None):
-        if self.needmenubarredraw:
-            DrawMenuBar()
-            self.needmenubarredraw = 0
-        if wait is None:
-            wait = self.default_wait
-            if wait is None:
-                wait = GetCaretTime()
-        ok, event = WaitNextEvent(mask, wait)
-        return ok, event
-
-    def dispatch(self, event):
-        # The following appears to be double work (already done in do1event)
-        # but we need it for asynchronous event handling
-        if IsDialogEvent(event):
-            if self.do_dialogevent(event):
-                return
-        (what, message, when, where, modifiers) = event
-        if what in eventname:
-            name = "do_" + eventname[what]
-        else:
-            name = "do_%d" % what
-        try:
-            handler = getattr(self, name)
-        except AttributeError:
-            handler = self.do_unknownevent
-        handler(event)
-
-    def asyncevents(self, onoff):
-        """asyncevents - Set asynchronous event handling on or off"""
-        if MacOS.runtimemodel == 'macho':
-            raise NotImplementedError('Unsupported in MachoPython')
-        old = self._doing_asyncevents
-        if old:
-            MacOS.SetEventHandler()
-            MacOS.SchedParams(*self.schedparams)
-        if onoff:
-            MacOS.SetEventHandler(self.dispatch)
-            doint, dummymask, benice, howoften, bgyield = \
-                   self.schedparams
-            MacOS.SchedParams(doint, everyEvent, benice,
-                      howoften, bgyield)
-        self._doing_asyncevents = onoff
-        return old
-
-    def do_dialogevent(self, event):
-        gotone, dlg, item = DialogSelect(event)
-        if gotone:
-            window = dlg.GetDialogWindow()
-            if window in self._windows:
-                self._windows[window].do_itemhit(item, event)
-            else:
-                print('Dialog event for unknown dialog')
-            return 1
-        return 0
-
-    def do_mouseDown(self, event):
-        (what, message, when, where, modifiers) = event
-        partcode, wid = FindWindow(where)
-
-        #
-        # Find the correct name.
-        #
-        if partcode in partname:
-            name = "do_" + partname[partcode]
-        else:
-            name = "do_%d" % partcode
-
-        if wid is None:
-            # No window, or a non-python window
-            try:
-                handler = getattr(self, name)
-            except AttributeError:
-                # Not menubar or something, so assume someone
-                # else's window
-                if hasattr(MacOS, 'HandleEvent'):
-                    MacOS.HandleEvent(event)
-                return
-        elif wid in self._windows:
-            # It is a window. Hand off to correct window.
-            window = self._windows[wid]
-            try:
-                handler = getattr(window, name)
-            except AttributeError:
-                handler = self.do_unknownpartcode
-        else:
-            # It is a python-toolbox window, but not ours.
-            handler = self.do_unknownwindow
-        handler(partcode, wid, event)
-
-    def do_inSysWindow(self, partcode, window, event):
-        if hasattr(MacOS, 'HandleEvent'):
-            MacOS.HandleEvent(event)
-
-    def do_inDesk(self, partcode, window, event):
-        if hasattr(MacOS, 'HandleEvent'):
-            MacOS.HandleEvent(event)
-
-    def do_inMenuBar(self, partcode, window, event):
-        if not self.menubar:
-            if hasattr(MacOS, 'HandleEvent'):
-                MacOS.HandleEvent(event)
-            return
-        (what, message, when, where, modifiers) = event
-        result = MenuSelect(where)
-        id = (result>>16) & 0xffff      # Hi word
-        if id >= 0x8000:
-            id = -65536 + id
-        item = result & 0xffff      # Lo word
-        self.do_rawmenu(id, item, window, event)
-
-    def do_rawmenu(self, id, item, window, event):
-        try:
-            self.do_menu(id, item, window, event)
-        finally:
-            HiliteMenu(0)
-
-    def do_menu(self, id, item, window, event):
-        if hasattr(MacOS, 'OutputSeen'):
-            MacOS.OutputSeen()
-        self.menubar.dispatch(id, item, window, event)
-
-
-    def do_unknownpartcode(self, partcode, window, event):
-        (what, message, when, where, modifiers) = event
-        if DEBUG: print("Mouse down at global:", where)
-        if DEBUG: print("\tUnknown part code:", partcode)
-        if DEBUG: print("\tEvent:", self.printevent(event))
-        if hasattr(MacOS, 'HandleEvent'):
-            MacOS.HandleEvent(event)
-
-    def do_unknownwindow(self, partcode, window, event):
-        if DEBUG: print('Unknown window:', window)
-        if hasattr(MacOS, 'HandleEvent'):
-            MacOS.HandleEvent(event)
-
-    def do_keyDown(self, event):
-        self.do_key(event)
-
-    def do_autoKey(self, event):
-        if not event[-1] & cmdKey:
-            self.do_key(event)
-
-    def do_key(self, event):
-        (what, message, when, where, modifiers) = event
-        c = chr(message & charCodeMask)
-        if self.menubar:
-            result = MenuEvent(event)
-            id = (result>>16) & 0xffff      # Hi word
-            item = result & 0xffff      # Lo word
-            if id:
-                self.do_rawmenu(id, item, None, event)
-                return
-            # Otherwise we fall-through
-        if modifiers & cmdKey:
-            if c == '.':
-                raise self
-            else:
-                if not self.menubar:
-                    if hasattr(MacOS, 'HandleEvent'):
-                        MacOS.HandleEvent(event)
-                return
-        else:
-            # See whether the front window wants it
-            w = MyFrontWindow()
-            if w and w in self._windows:
-                window = self._windows[w]
-                try:
-                    do_char = window.do_char
-                except AttributeError:
-                    do_char = self.do_char
-                do_char(c, event)
-            # else it wasn't for us, sigh...
-
-    def do_char(self, c, event):
-        if DEBUG: print("Character", repr(c))
-
-    def do_updateEvt(self, event):
-        (what, message, when, where, modifiers) = event
-        wid = WhichWindow(message)
-        if wid and wid in self._windows:
-            window = self._windows[wid]
-            window.do_rawupdate(wid, event)
-        else:
-            if hasattr(MacOS, 'HandleEvent'):
-                MacOS.HandleEvent(event)
-
-    def do_activateEvt(self, event):
-        (what, message, when, where, modifiers) = event
-        wid = WhichWindow(message)
-        if wid and wid in self._windows:
-            window = self._windows[wid]
-            window.do_activate(modifiers & 1, event)
-        else:
-            if hasattr(MacOS, 'HandleEvent'):
-                MacOS.HandleEvent(event)
-
-    def do_osEvt(self, event):
-        (what, message, when, where, modifiers) = event
-        which = (message >> 24) & 0xff
-        if which == 1:  # suspend/resume
-            self.do_suspendresume(event)
-        else:
-            if DEBUG:
-                print('unknown osEvt:', end=' ')
-                self.printevent(event)
-
-    def do_suspendresume(self, event):
-        (what, message, when, where, modifiers) = event
-        wid = MyFrontWindow()
-        if wid and wid in self._windows:
-            window = self._windows[wid]
-            window.do_activate(message & 1, event)
-
-    def do_kHighLevelEvent(self, event):
-        (what, message, when, where, modifiers) = event
-        if DEBUG:
-            print("High Level Event:", end=' ')
-            self.printevent(event)
-        try:
-            AEProcessAppleEvent(event)
-        except:
-            pass
-            #print "AEProcessAppleEvent error:"
-            #traceback.print_exc()
-
-    def do_unknownevent(self, event):
-        if DEBUG:
-            print("Unhandled event:", end=' ')
-            self.printevent(event)
-
-    def printevent(self, event):
-        (what, message, when, where, modifiers) = event
-        nicewhat = repr(what)
-        if what in eventname:
-            nicewhat = eventname[what]
-        print(nicewhat, end=' ')
-        if what == kHighLevelEvent:
-            h, v = where
-            print(repr(ostypecode(message)), hex(when), repr(ostypecode(h | (v<<16))), end=' ')
-        else:
-            print(hex(message), hex(when), where, end=' ')
-        print(hex(modifiers))
-
-
-class MenuBar:
-    """Represent a set of menus in a menu bar.
-
-    Interface:
-
-    - (constructor)
-    - (destructor)
-    - addmenu
-    - addpopup (normally used internally)
-    - dispatch (called from Application)
-    """
-
-    nextid = 1      # Necessarily a class variable
-
-    def getnextid(self):
-        id = MenuBar.nextid
-        MenuBar.nextid = id+1
-        return id
-
-    def __init__(self, parent=None):
-        self.parent = parent
-        ClearMenuBar()
-        self.bar = GetMenuBar()
-        self.menus = {}
-
-    # XXX necessary?
-    def close(self):
-        self.parent = None
-        self.bar = None
-        self.menus = None
-
-    def addmenu(self, title, after = 0, id=None):
-        if id is None:
-            id = self.getnextid()
-        if DEBUG: print('Newmenu', title, id) # XXXX
-        m = NewMenu(id, title)
-        m.InsertMenu(after)
-        if after >= 0:
-            if self.parent:
-                self.parent.needmenubarredraw = 1
-            else:
-                DrawMenuBar()
-        return id, m
-
-    def delmenu(self, id):
-        if DEBUG: print('Delmenu', id) # XXXX
-        DeleteMenu(id)
-
-    def addpopup(self, title = ''):
-        return self.addmenu(title, -1)
-
-# Useless:
-#       def install(self):
-#           if not self.bar: return
-#           SetMenuBar(self.bar)
-#           if self.parent:
-#               self.parent.needmenubarredraw = 1
-#           else:
-#               DrawMenuBar()
-
-    def fixmenudimstate(self):
-        for m in self.menus.keys():
-            menu = self.menus[m]
-            if menu.__class__ == FrameWork.AppleMenu:
-                continue
-            for i in range(len(menu.items)):
-                label, shortcut, callback, kind = menu.items[i]
-                if type(callback) == types.StringType:
-                    wid = MyFrontWindow()
-                    if wid and wid in self.parent._windows:
-                        window = self.parent._windows[wid]
-                        if hasattr(window, "domenu_" + callback):
-                            menu.menu.EnableMenuItem(i + 1)
-                        elif hasattr(self.parent, "domenu_" + callback):
-                            menu.menu.EnableMenuItem(i + 1)
-                        else:
-                            menu.menu.DisableMenuItem(i + 1)
-                    elif hasattr(self.parent, "domenu_" + callback):
-                        menu.menu.EnableMenuItem(i + 1)
-                    else:
-                        menu.menu.DisableMenuItem(i + 1)
-                elif callback:
-                    pass
-
-    def dispatch(self, id, item, window, event):
-        if id in self.menus:
-            self.menus[id].dispatch(id, item, window, event)
-        else:
-            if DEBUG: print("MenuBar.dispatch(%d, %d, %s, %s)" % \
-                (id, item, window, event))
-
-
-# XXX Need a way to get menus as resources and bind them to callbacks
-
-class Menu:
-    "One menu."
-
-    def __init__(self, bar, title, after=0, id=None):
-        self.bar = bar
-        self.id, self.menu = self.bar.addmenu(title, after, id)
-        bar.menus[self.id] = self
-        self.items = []
-        self._parent = None
-
-    def delete(self):
-        self.bar.delmenu(self.id)
-        del self.bar.menus[self.id]
-        self.menu.DisposeMenu()
-        del self.bar
-        del self.items
-        del self.menu
-        del self.id
-        del self._parent
-
-    def additem(self, label, shortcut=None, callback=None, kind=None):
-        self.menu.AppendMenu('x')           # add a dummy string
-        self.items.append((label, shortcut, callback, kind))
-        item = len(self.items)
-        if isinstance(label, str):
-            self.menu.SetMenuItemTextWithCFString(item, label)
-        else:
-            self.menu.SetMenuItemText(item, label)
-        if shortcut and type(shortcut) == type(()):
-            modifiers, char = shortcut[:2]
-            self.menu.SetItemCmd(item, ord(char))
-            self.menu.SetMenuItemModifiers(item, modifiers)
-            if len(shortcut) > 2:
-                self.menu.SetMenuItemKeyGlyph(item, shortcut[2])
-        elif shortcut:
-            self.menu.SetItemCmd(item, ord(shortcut))
-        return item
-
-    def delitem(self, item):
-        if item != len(self.items):
-            raise ValueError('Can only delete last item of a menu')
-        self.menu.DeleteMenuItem(item)
-        del self.items[item-1]
-
-    def addcheck(self, label, shortcut=None, callback=None):
-        return self.additem(label, shortcut, callback, 'check')
-
-    def addradio(self, label, shortcut=None, callback=None):
-        return self.additem(label, shortcut, callback, 'radio')
-
-    def addseparator(self):
-        self.menu.AppendMenu('(-')
-        self.items.append(('', None, None, 'separator'))
-
-    def addsubmenu(self, label, title=''):
-        sub = Menu(self.bar, title, -1)
-        item = self.additem(label, '\x1B', None, 'submenu')
-        self.menu.SetItemMark(item, sub.id)
-        sub._parent = self
-        sub._parent_item = item
-        return sub
-
-    def dispatch(self, id, item, window, event):
-        title, shortcut, callback, mtype = self.items[item-1]
-        if callback:
-            if not self.bar.parent or not isinstance(callback, str):
-                menuhandler = callback
-            else:
-                # callback is string
-                wid = MyFrontWindow()
-                if wid and wid in self.bar.parent._windows:
-                    window = self.bar.parent._windows[wid]
-                    if hasattr(window, "domenu_" + callback):
-                        menuhandler = getattr(window, "domenu_" + callback)
-                    elif hasattr(self.bar.parent, "domenu_" + callback):
-                        menuhandler = getattr(self.bar.parent, "domenu_" + callback)
-                    else:
-                        # nothing we can do. we shouldn't have come this far
-                        # since the menu item should have been disabled...
-                        return
-                elif hasattr(self.bar.parent, "domenu_" + callback):
-                    menuhandler = getattr(self.bar.parent, "domenu_" + callback)
-                else:
-                    # nothing we can do. we shouldn't have come this far
-                    # since the menu item should have been disabled...
-                    return
-            menuhandler(id, item, window, event)
-
-    def enable(self, onoff):
-        if onoff:
-            self.menu.EnableMenuItem(0)
-            if self._parent:
-                self._parent.menu.EnableMenuItem(self._parent_item)
-        else:
-            self.menu.DisableMenuItem(0)
-            if self._parent:
-                self._parent.menu.DisableMenuItem(self._parent_item)
-        if self.bar and self.bar.parent:
-            self.bar.parent.needmenubarredraw = 1
-
-class PopupMenu(Menu):
-    def __init__(self, bar):
-        Menu.__init__(self, bar, '(popup)', -1)
-
-    def popup(self, x, y, event, default=1, window=None):
-        # NOTE that x and y are global coordinates, and they should probably
-        # be topleft of the button the user clicked (not mouse-coordinates),
-        # so the popup nicely overlaps.
-        reply = self.menu.PopUpMenuSelect(x, y, default)
-        if not reply:
-            return
-        id = (reply >> 16) & 0xffff
-        item = reply & 0xffff
-        if not window:
-            wid = MyFrontWindow()
-            try:
-                window = self.bar.parent._windows[wid]
-            except:
-                pass # If we can't find the window we pass None
-        self.dispatch(id, item, window, event)
-
-class MenuItem:
-    def __init__(self, menu, title, shortcut=None, callback=None, kind=None):
-        self.item = menu.additem(title, shortcut, callback)
-        self.menu = menu
-
-    def delete(self):
-        self.menu.delitem(self.item)
-        del self.menu
-        del self.item
-
-    def check(self, onoff):
-        self.menu.menu.CheckMenuItem(self.item, onoff)
-
-    def enable(self, onoff):
-        if onoff:
-            self.menu.menu.EnableMenuItem(self.item)
-        else:
-            self.menu.menu.DisableMenuItem(self.item)
-
-    def settext(self, text):
-        self.menu.menu.SetMenuItemText(self.item, text)
-
-    def setstyle(self, style):
-        self.menu.menu.SetItemStyle(self.item, style)
-
-    def seticon(self, icon):
-        self.menu.menu.SetItemIcon(self.item, icon)
-
-    def setcmd(self, cmd):
-        self.menu.menu.SetItemCmd(self.item, cmd)
-
-    def setmark(self, cmd):
-        self.menu.menu.SetItemMark(self.item, cmd)
-
-
-class RadioItem(MenuItem):
-    def __init__(self, menu, title, shortcut=None, callback=None):
-        MenuItem.__init__(self, menu, title, shortcut, callback, 'radio')
-
-class CheckItem(MenuItem):
-    def __init__(self, menu, title, shortcut=None, callback=None):
-        MenuItem.__init__(self, menu, title, shortcut, callback, 'check')
-
-def Separator(menu):
-    menu.addseparator()
-
-def SubMenu(menu, label, title=''):
-    return menu.addsubmenu(label, title)
-
-
-class AppleMenu(Menu):
-
-    def __init__(self, bar, abouttext="About me...", aboutcallback=None):
-        Menu.__init__(self, bar, "\024", id=SIOUX_APPLEMENU_ID)
-        if MacOS.runtimemodel == 'ppc':
-            self.additem(abouttext, None, aboutcallback)
-            self.addseparator()
-            self.menu.AppendResMenu('DRVR')
-        else:
-            # Additem()'s tricks do not work for "apple" menu under Carbon
-            self.menu.InsertMenuItem(abouttext, 0)
-            self.items.append((abouttext, None, aboutcallback, None))
-
-    def dispatch(self, id, item, window, event):
-        if item == 1:
-            Menu.dispatch(self, id, item, window, event)
-        elif MacOS.runtimemodel == 'ppc':
-            name = self.menu.GetMenuItemText(item)
-            OpenDeskAcc(name)
-
-class HelpMenu(Menu):
-    def __init__(self, bar):
-        # Note we don't call Menu.__init__, we do the necessary things by hand
-        self.bar = bar
-        self.menu, index = HMGetHelpMenu()
-        self.id = self.menu.GetMenuID()
-        bar.menus[self.id] = self
-        # The next line caters for the entries the system already handles for us
-        self.items = [None]*(index-1)
-        self._parent = None
-
-
-class Window:
-    """A single window belonging to an application"""
-
-    def __init__(self, parent):
-        self.wid = None
-        self.parent = parent
-
-    def open(self, bounds=(40, 40, 400, 400), resid=None):
-        if resid is not None:
-            self.wid = GetNewWindow(resid, -1)
-        else:
-            self.wid = NewWindow(bounds, self.__class__.__name__, 1,
-                8, -1, 1, 0)    # changed to proc id 8 to include zoom box. jvr
-        self.do_postopen()
-
-    def do_postopen(self):
-        """Tell our parent we exist"""
-        self.parent.appendwindow(self.wid, self)
-
-    def close(self):
-        self.do_postclose()
-
-    def do_postclose(self):
-        self.parent.removewindow(self.wid)
-        self.parent = None
-        self.wid = None
-
-    def SetPort(self):
-        # Convinience method
-        SetPort(self.wid)
-
-    def GetWindow(self):
-        return self.wid
-
-    def do_inDrag(self, partcode, window, event):
-        where = event[3]
-        window.DragWindow(where, self.draglimit)
-
-    draglimit = screenbounds
-
-    def do_inGoAway(self, partcode, window, event):
-        where = event[3]
-        if window.TrackGoAway(where):
-            self.close()
-
-    def do_inZoom(self, partcode, window, event):
-        (what, message, when, where, modifiers) = event
-        if window.TrackBox(where, partcode):
-            window.ZoomWindow(partcode, 1)
-            rect = window.GetWindowUserState()                  # so that zoom really works... jvr
-            self.do_postresize(rect[2] - rect[0], rect[3] - rect[1], window)    # jvr
-
-    def do_inZoomIn(self, partcode, window, event):
-        SetPort(window) # !!!
-        self.do_inZoom(partcode, window, event)
-
-    def do_inZoomOut(self, partcode, window, event):
-        SetPort(window) # !!!
-        self.do_inZoom(partcode, window, event)
-
-    def do_inGrow(self, partcode, window, event):
-        (what, message, when, where, modifiers) = event
-        result = window.GrowWindow(where, self.growlimit)
-        if result:
-            height = (result>>16) & 0xffff  # Hi word
-            width = result & 0xffff     # Lo word
-            self.do_resize(width, height, window)
-
-    growlimit = (50, 50, screenbounds[2] - screenbounds[0], screenbounds[3] - screenbounds[1])      # jvr
-
-    def do_resize(self, width, height, window):
-        l, t, r, b = self.wid.GetWindowPort().GetPortBounds()           # jvr, forGrowIcon
-        self.SetPort()                          # jvr
-        self.wid.InvalWindowRect((r - SCROLLBARWIDTH + 1, b - SCROLLBARWIDTH + 1, r, b))    # jvr
-        window.SizeWindow(width, height, 1)         # changed updateFlag to true jvr
-        self.do_postresize(width, height, window)
-
-    def do_postresize(self, width, height, window):
-        SetPort(window)
-        self.wid.InvalWindowRect(window.GetWindowPort().GetPortBounds())
-
-    def do_inContent(self, partcode, window, event):
-        #
-        # If we're not frontmost, select ourselves and wait for
-        # the activate event.
-        #
-        if MyFrontWindow() != window:
-            window.SelectWindow()
-            return
-        # We are. Handle the event.
-        (what, message, when, where, modifiers) = event
-        SetPort(window)
-        local = GlobalToLocal(where)
-        self.do_contentclick(local, modifiers, event)
-
-    def do_contentclick(self, local, modifiers, event):
-        if DEBUG:
-            print('Click in contents at %s, modifiers %s'%(local, modifiers))
-
-    def do_rawupdate(self, window, event):
-        if DEBUG: print("raw update for", window)
-        SetPort(window)
-        window.BeginUpdate()
-        self.do_update(window, event)
-        window.EndUpdate()
-
-    def do_update(self, window, event):
-        if DEBUG:
-            import time
-            for i in range(8):
-                time.sleep(0.1)
-                InvertRgn(window.GetWindowPort().visRgn)
-            FillRgn(window.GetWindowPort().visRgn, GetQDGlobalsGray())
-        else:
-            EraseRgn(window.GetWindowPort().visRgn)
-
-    def do_activate(self, activate, event):
-        if DEBUG: print('Activate %d for %s'%(activate, self.wid))
-
-class ControlsWindow(Window):
-
-    def do_rawupdate(self, window, event):
-        if DEBUG: print("raw update for", window)
-        SetPort(window)
-        window.BeginUpdate()
-        self.do_update(window, event)
-        #DrawControls(window)                   # jvr
-        UpdateControls(window, window.GetWindowPort().visRgn)   # jvr
-        window.DrawGrowIcon()
-        window.EndUpdate()
-
-    def do_controlhit(self, window, control, pcode, event):
-        if DEBUG: print("control hit in", window, "on", control, "; pcode =", pcode)
-
-    def do_inContent(self, partcode, window, event):
-        if MyFrontWindow() != window:
-            window.SelectWindow()
-            return
-        (what, message, when, where, modifiers) = event
-        SetPort(window)  # XXXX Needed?
-        local = GlobalToLocal(where)
-        pcode, control = FindControl(local, window)
-        if pcode and control:
-            self.do_rawcontrolhit(window, control, pcode, local, event)
-        else:
-            if DEBUG: print("FindControl(%s, %s) -> (%s, %s)" % \
-                (local, window, pcode, control))
-            self.do_contentclick(local, modifiers, event)
-
-    def do_rawcontrolhit(self, window, control, pcode, local, event):
-        pcode = control.TrackControl(local)
-        if pcode:
-            self.do_controlhit(window, control, pcode, event)
-
-class ScrolledWindow(ControlsWindow):
-    def __init__(self, parent):
-        self.barx = self.bary = None
-        self.barx_enabled = self.bary_enabled = 1
-        self.activated = 1
-        ControlsWindow.__init__(self, parent)
-
-    def scrollbars(self, wantx=1, wanty=1):
-        SetPort(self.wid)
-        self.barx = self.bary = None
-        self.barx_enabled = self.bary_enabled = 1
-        x0, y0, x1, y1 = self.wid.GetWindowPort().GetPortBounds()
-        vx, vy = self.getscrollbarvalues()
-        if vx is None: self.barx_enabled, vx = 0, 0
-        if vy is None: self.bary_enabled, vy = 0, 0
-        if wantx:
-            rect = x0-1, y1-(SCROLLBARWIDTH-1), x1-(SCROLLBARWIDTH-2), y1+1
-            self.barx = NewControl(self.wid, rect, "", 1, vx, 0, 32767, 16, 0)
-            if not self.barx_enabled: self.barx.HiliteControl(255)
-##              self.wid.InvalWindowRect(rect)
-        if wanty:
-            rect = x1-(SCROLLBARWIDTH-1), y0-1, x1+1, y1-(SCROLLBARWIDTH-2)
-            self.bary = NewControl(self.wid, rect, "", 1, vy, 0, 32767, 16, 0)
-            if not self.bary_enabled: self.bary.HiliteControl(255)
-##              self.wid.InvalWindowRect(rect)
-
-    def do_postclose(self):
-        self.barx = self.bary = None
-        ControlsWindow.do_postclose(self)
-
-    def do_activate(self, onoff, event):
-        self.activated = onoff
-        if onoff:
-            if self.barx and self.barx_enabled:
-                self.barx.ShowControl() # jvr
-            if self.bary and self.bary_enabled:
-                self.bary.ShowControl() # jvr
-        else:
-            if self.barx:
-                self.barx.HideControl() # jvr; An inactive window should have *hidden*
-                            # scrollbars, not just dimmed (no matter what
-                            # BBEdit does... look at the Finder)
-            if self.bary:
-                self.bary.HideControl() # jvr
-        self.wid.DrawGrowIcon()         # jvr
-
-    def do_postresize(self, width, height, window):
-        l, t, r, b = self.wid.GetWindowPort().GetPortBounds()
-        self.SetPort()
-        if self.barx:
-            self.barx.HideControl()     # jvr
-            self.barx.MoveControl(l-1, b-(SCROLLBARWIDTH-1))
-            self.barx.SizeControl((r-l)-(SCROLLBARWIDTH-3), SCROLLBARWIDTH) # jvr
-        if self.bary:
-            self.bary.HideControl()     # jvr
-            self.bary.MoveControl(r-(SCROLLBARWIDTH-1), t-1)
-            self.bary.SizeControl(SCROLLBARWIDTH, (b-t)-(SCROLLBARWIDTH-3)) # jvr
-        if self.barx:
-            self.barx.ShowControl()     # jvr
-            self.wid.ValidWindowRect((l, b - SCROLLBARWIDTH + 1, r - SCROLLBARWIDTH + 2, b))    # jvr
-        if self.bary:
-            self.bary.ShowControl()     # jvr
-            self.wid.ValidWindowRect((r - SCROLLBARWIDTH + 1, t, r, b - SCROLLBARWIDTH + 2))    # jvr
-        self.wid.InvalWindowRect((r - SCROLLBARWIDTH + 1, b - SCROLLBARWIDTH + 1, r, b))    # jvr, growicon
-
-
-    def do_rawcontrolhit(self, window, control, pcode, local, event):
-        if control == self.barx:
-            which = 'x'
-        elif control == self.bary:
-            which = 'y'
-        else:
-            return 0
-        if pcode in (inUpButton, inDownButton, inPageUp, inPageDown):
-            # We do the work for the buttons and grey area in the tracker
-            dummy = control.TrackControl(local, self.do_controltrack)
-        else:
-            # but the thumb is handled here
-            pcode = control.TrackControl(local)
-            if pcode == inThumb:
-                value = control.GetControlValue()
-                print('setbars', which, value) #DBG
-                self.scrollbar_callback(which, 'set', value)
-                self.updatescrollbars()
-            else:
-                print('funny part', pcode) #DBG
-        return 1
-
-    def do_controltrack(self, control, pcode):
-        if control == self.barx:
-            which = 'x'
-        elif control == self.bary:
-            which = 'y'
-        else:
-            return
-
-        if pcode == inUpButton:
-            what = '-'
-        elif pcode == inDownButton:
-            what = '+'
-        elif pcode == inPageUp:
-            what = '--'
-        elif pcode == inPageDown:
-            what = '++'
-        else:
-            return
-        self.scrollbar_callback(which, what, None)
-        self.updatescrollbars()
-
-    def updatescrollbars(self):
-        SetPort(self.wid)
-        vx, vy = self.getscrollbarvalues()
-        if self.barx:
-            if vx is None:
-                self.barx.HiliteControl(255)
-                self.barx_enabled = 0
-            else:
-                if not self.barx_enabled:
-                    self.barx_enabled = 1
-                    if self.activated:
-                        self.barx.HiliteControl(0)
-                self.barx.SetControlValue(vx)
-        if self.bary:
-            if vy is None:
-                self.bary.HiliteControl(255)
-                self.bary_enabled = 0
-            else:
-                if not self.bary_enabled:
-                    self.bary_enabled = 1
-                    if self.activated:
-                        self.bary.HiliteControl(0)
-                self.bary.SetControlValue(vy)
-
-    # Auxiliary function: convert standard text/image/etc coordinate
-    # to something palatable as getscrollbarvalues() return
-    def scalebarvalue(self, absmin, absmax, curmin, curmax):
-        if curmin <= absmin and curmax >= absmax:
-            return None
-        if curmin <= absmin:
-            return 0
-        if curmax >= absmax:
-            return 32767
-        perc = float(curmin-absmin)/float(absmax-absmin)
-        return int(perc*32767)
-
-    # To be overridden:
-
-    def getscrollbarvalues(self):
-        return 0, 0
-
-    def scrollbar_callback(self, which, what, value):
-        print('scroll', which, what, value)
-
-class DialogWindow(Window):
-    """A modeless dialog window"""
-
-    def open(self, resid):
-        self.dlg = GetNewDialog(resid, -1)
-        self.wid = self.dlg.GetDialogWindow()
-        self.do_postopen()
-
-    def close(self):
-        self.do_postclose()
-
-    def do_postclose(self):
-        self.dlg = None
-        Window.do_postclose(self)
-
-    def do_itemhit(self, item, event):
-        print('Dialog %s, item %d hit'%(self.dlg, item))
-
-    def do_rawupdate(self, window, event):
-        pass
-
-def ostypecode(x):
-    "Convert a long int to the 4-character code it really is"
-    s = ''
-    for i in range(4):
-        x, c = divmod(x, 256)
-        s = chr(c) + s
-    return s
-
-
-class TestApp(Application):
-
-    "This class is used by the test() function"
-
-    def makeusermenus(self):
-        self.filemenu = m = Menu(self.menubar, "File")
-        self.saveitem = MenuItem(m, "Save", "S", self.save)
-        Separator(m)
-        self.optionsmenu = mm = SubMenu(m, "Options")
-        self.opt1 = CheckItem(mm, "Arguments", "A")
-        self.opt2 = CheckItem(mm, "Being hit on the head lessons", (kMenuOptionModifier, "A"))
-        self.opt3 = CheckItem(mm, "Complaints", (kMenuOptionModifier|kMenuNoCommandModifier, "A"))
-        Separator(m)
-        self.itemeh = MenuItem(m, "Enable Help", None, self.enablehelp)
-        self.itemdbg = MenuItem(m, "Debug", None, self.debug)
-        Separator(m)
-        self.quititem = MenuItem(m, "Quit", "Q", self.quit)
-
-    def save(self, *args):
-        print("Save")
-
-    def quit(self, *args):
-        raise self
-
-    def enablehelp(self, *args):
-        hm = self.gethelpmenu()
-        self.nohelpitem = MenuItem(hm, "There isn't any", None, self.nohelp)
-
-    def nohelp(self, *args):
-        print("I told you there isn't any!")
-
-    def debug(self, *args):
-        import pdb
-        pdb.set_trace()
-
-
-def test():
-    "Test program"
-    app = TestApp()
-    app.mainloop()
-
-
-if __name__ == '__main__':
-    test()
diff --git a/Lib/plat-mac/MiniAEFrame.py b/Lib/plat-mac/MiniAEFrame.py
deleted file mode 100644 (file)
index 16f44d9..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-"""MiniAEFrame - A minimal AppleEvent Application framework.
-
-There are two classes:
-    AEServer -- a mixin class offering nice AE handling.
-    MiniApplication -- a very minimal alternative to FrameWork.py,
-        only suitable for the simplest of AppleEvent servers.
-"""
-
-import traceback
-import MacOS
-from Carbon import AE
-from Carbon.AppleEvents import *
-from Carbon import Evt
-from Carbon.Events import *
-from Carbon import Menu
-from Carbon import Win
-from Carbon.Windows import *
-from Carbon import Qd
-
-import aetools
-import EasyDialogs
-
-kHighLevelEvent = 23                # Not defined anywhere for Python yet?
-
-
-class MiniApplication:
-
-    """A minimal FrameWork.Application-like class"""
-
-    def __init__(self):
-        self.quitting = 0
-        # Initialize menu
-        self.appleid = 1
-        self.quitid = 2
-        Menu.ClearMenuBar()
-        self.applemenu = applemenu = Menu.NewMenu(self.appleid, "\024")
-        applemenu.AppendMenu("%s;(-" % self.getaboutmenutext())
-        if MacOS.runtimemodel == 'ppc':
-            applemenu.AppendResMenu('DRVR')
-        applemenu.InsertMenu(0)
-        self.quitmenu = Menu.NewMenu(self.quitid, "File")
-        self.quitmenu.AppendMenu("Quit")
-        self.quitmenu.SetItemCmd(1, ord("Q"))
-        self.quitmenu.InsertMenu(0)
-        Menu.DrawMenuBar()
-
-    def __del__(self):
-        self.close()
-
-    def close(self):
-        pass
-
-    def mainloop(self, mask = everyEvent, timeout = 60*60):
-        while not self.quitting:
-            self.dooneevent(mask, timeout)
-
-    def _quit(self):
-        self.quitting = 1
-
-    def dooneevent(self, mask = everyEvent, timeout = 60*60):
-        got, event = Evt.WaitNextEvent(mask, timeout)
-        if got:
-            self.lowlevelhandler(event)
-
-    def lowlevelhandler(self, event):
-        what, message, when, where, modifiers = event
-        h, v = where
-        if what == kHighLevelEvent:
-            msg = "High Level Event: %r %r" % (code(message), code(h | (v<<16)))
-            try:
-                AE.AEProcessAppleEvent(event)
-            except AE.Error as err:
-                print('AE error: ', err)
-                print('in', msg)
-                traceback.print_exc()
-            return
-        elif what == keyDown:
-            c = chr(message & charCodeMask)
-            if modifiers & cmdKey:
-                if c == '.':
-                    raise KeyboardInterrupt("Command-period")
-                if c == 'q':
-                    if hasattr(MacOS, 'OutputSeen'):
-                        MacOS.OutputSeen()
-                    self.quitting = 1
-                    return
-        elif what == mouseDown:
-            partcode, window = Win.FindWindow(where)
-            if partcode == inMenuBar:
-                result = Menu.MenuSelect(where)
-                id = (result>>16) & 0xffff      # Hi word
-                item = result & 0xffff      # Lo word
-                if id == self.appleid:
-                    if item == 1:
-                        EasyDialogs.Message(self.getabouttext())
-                    elif item > 1 and hasattr(Menu, 'OpenDeskAcc'):
-                        name = self.applemenu.GetMenuItemText(item)
-                        Menu.OpenDeskAcc(name)
-                elif id == self.quitid and item == 1:
-                    if hasattr(MacOS, 'OutputSeen'):
-                        MacOS.OutputSeen()
-                    self.quitting = 1
-                Menu.HiliteMenu(0)
-                return
-        # Anything not handled is passed to Python/SIOUX
-        if hasattr(MacOS, 'HandleEvent'):
-            MacOS.HandleEvent(event)
-        else:
-            print("Unhandled event:", event)
-
-    def getabouttext(self):
-        return self.__class__.__name__
-
-    def getaboutmenutext(self):
-        return "About %s\311" % self.__class__.__name__
-
-
-class AEServer:
-
-    def __init__(self):
-        self.ae_handlers = {}
-
-    def installaehandler(self, classe, type, callback):
-        AE.AEInstallEventHandler(classe, type, self.callback_wrapper)
-        self.ae_handlers[(classe, type)] = callback
-
-    def close(self):
-        for classe, type in self.ae_handlers.keys():
-            AE.AERemoveEventHandler(classe, type)
-
-    def callback_wrapper(self, _request, _reply):
-        _parameters, _attributes = aetools.unpackevent(_request)
-        _class = _attributes['evcl'].type
-        _type = _attributes['evid'].type
-
-        if (_class, _type) in self.ae_handlers:
-            _function = self.ae_handlers[(_class, _type)]
-        elif (_class, '****') in self.ae_handlers:
-            _function = self.ae_handlers[(_class, '****')]
-        elif ('****', '****') in self.ae_handlers:
-            _function = self.ae_handlers[('****', '****')]
-        else:
-            raise RuntimeError('AE callback without handler: '
-                               + str((_class, _type)))
-
-        # XXXX Do key-to-name mapping here
-
-        _parameters['_attributes'] = _attributes
-        _parameters['_class'] = _class
-        _parameters['_type'] = _type
-        if '----' in _parameters:
-            _object = _parameters['----']
-            del _parameters['----']
-            # The try/except that used to be here can mask programmer errors.
-            # Let the program crash, the programmer can always add a **args
-            # to the formal parameter list.
-            rv = _function(_object, **_parameters)
-        else:
-            #Same try/except comment as above
-            rv = _function(**_parameters)
-
-        if rv is None:
-            aetools.packevent(_reply, {})
-        else:
-            aetools.packevent(_reply, {'----':rv})
-
-
-def code(x):
-    "Convert a long int to the 4-character code it really is"
-    s = ''
-    for i in range(4):
-        x, c = divmod(x, 256)
-        s = chr(c) + s
-    return s
-
-class _Test(AEServer, MiniApplication):
-    """Mini test application, handles required events"""
-
-    def __init__(self):
-        MiniApplication.__init__(self)
-        AEServer.__init__(self)
-        self.installaehandler('aevt', 'oapp', self.open_app)
-        self.installaehandler('aevt', 'quit', self.quit)
-        self.installaehandler('****', '****', self.other)
-        self.mainloop()
-
-    def quit(self, **args):
-        self._quit()
-
-    def open_app(self, **args):
-        pass
-
-    def other(self, _object=None, _class=None, _type=None, **args):
-        print('AppleEvent', (_class, _type), 'for', _object, 'Other args:', args)
-
-
-if __name__ == '__main__':
-    _Test()
diff --git a/Lib/plat-mac/PixMapWrapper.py b/Lib/plat-mac/PixMapWrapper.py
deleted file mode 100644 (file)
index 98abb4a..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-"""PixMapWrapper - defines the PixMapWrapper class, which wraps an opaque
-QuickDraw PixMap data structure in a handy Python class.  Also provides
-methods to convert to/from pixel data (from, e.g., the img module) or a
-Python Imaging Library Image object.
-
-J. Strout <joe@strout.net>  February 1999"""
-
-from Carbon import Qd
-from Carbon import QuickDraw
-import struct
-import MacOS
-import img
-import imgformat
-
-# PixMap data structure element format (as used with struct)
-_pmElemFormat = {
-    'baseAddr':'l',     # address of pixel data
-    'rowBytes':'H',     # bytes per row, plus 0x8000
-    'bounds':'hhhh',    # coordinates imposed over pixel data
-        'top':'h',
-        'left':'h',
-        'bottom':'h',
-        'right':'h',
-    'pmVersion':'h',    # flags for Color QuickDraw
-    'packType':'h',     # format of compression algorithm
-    'packSize':'l',     # size after compression
-    'hRes':'l',         # horizontal pixels per inch
-    'vRes':'l',         # vertical pixels per inch
-    'pixelType':'h',    # pixel format
-    'pixelSize':'h',    # bits per pixel
-    'cmpCount':'h',     # color components per pixel
-    'cmpSize':'h',      # bits per component
-    'planeBytes':'l',   # offset in bytes to next plane
-    'pmTable':'l',      # handle to color table
-    'pmReserved':'l'    # reserved for future use
-}
-
-# PixMap data structure element offset
-_pmElemOffset = {
-    'baseAddr':0,
-    'rowBytes':4,
-    'bounds':6,
-        'top':6,
-        'left':8,
-        'bottom':10,
-        'right':12,
-    'pmVersion':14,
-    'packType':16,
-    'packSize':18,
-    'hRes':22,
-    'vRes':26,
-    'pixelType':30,
-    'pixelSize':32,
-    'cmpCount':34,
-    'cmpSize':36,
-    'planeBytes':38,
-    'pmTable':42,
-    'pmReserved':46
-}
-
-class PixMapWrapper:
-    """PixMapWrapper -- wraps the QD PixMap object in a Python class,
-    with methods to easily get/set various pixmap fields.  Note: Use the
-    PixMap() method when passing to QD calls."""
-
-    def __init__(self):
-        self.__dict__['data'] = ''
-        self._header = struct.pack("lhhhhhhhlllhhhhlll",
-            id(self.data)+MacOS.string_id_to_buffer,
-            0,                      # rowBytes
-            0, 0, 0, 0,             # bounds
-            0,                      # pmVersion
-            0, 0,                   # packType, packSize
-            72<<16, 72<<16,         # hRes, vRes
-            QuickDraw.RGBDirect,    # pixelType
-            16,                     # pixelSize
-            2, 5,                   # cmpCount, cmpSize,
-            0, 0, 0)                # planeBytes, pmTable, pmReserved
-        self.__dict__['_pm'] = Qd.RawBitMap(self._header)
-
-    def _stuff(self, element, bytes):
-        offset = _pmElemOffset[element]
-        fmt = _pmElemFormat[element]
-        self._header = self._header[:offset] \
-            + struct.pack(fmt, bytes) \
-            + self._header[offset + struct.calcsize(fmt):]
-        self.__dict__['_pm'] = None
-
-    def _unstuff(self, element):
-        offset = _pmElemOffset[element]
-        fmt = _pmElemFormat[element]
-        return struct.unpack(fmt, self._header[offset:offset+struct.calcsize(fmt)])[0]
-
-    def __setattr__(self, attr, val):
-        if attr == 'baseAddr':
-            raise RuntimeError("don't assign to .baseAddr "
-                               "-- assign to .data instead")
-        elif attr == 'data':
-            self.__dict__['data'] = val
-            self._stuff('baseAddr', id(self.data) + MacOS.string_id_to_buffer)
-        elif attr == 'rowBytes':
-            # high bit is always set for some odd reason
-            self._stuff('rowBytes', val | 0x8000)
-        elif attr == 'bounds':
-            # assume val is in official Left, Top, Right, Bottom order!
-            self._stuff('left',val[0])
-            self._stuff('top',val[1])
-            self._stuff('right',val[2])
-            self._stuff('bottom',val[3])
-        elif attr == 'hRes' or attr == 'vRes':
-            # 16.16 fixed format, so just shift 16 bits
-            self._stuff(attr, int(val) << 16)
-        elif attr in _pmElemFormat.keys():
-            # any other pm attribute -- just stuff
-            self._stuff(attr, val)
-        else:
-            self.__dict__[attr] = val
-
-    def __getattr__(self, attr):
-        if attr == 'rowBytes':
-            # high bit is always set for some odd reason
-            return self._unstuff('rowBytes') & 0x7FFF
-        elif attr == 'bounds':
-            # return bounds in official Left, Top, Right, Bottom order!
-            return (
-                self._unstuff('left'),
-                self._unstuff('top'),
-                self._unstuff('right'),
-                self._unstuff('bottom') )
-        elif attr == 'hRes' or attr == 'vRes':
-            # 16.16 fixed format, so just shift 16 bits
-            return self._unstuff(attr) >> 16
-        elif attr in _pmElemFormat.keys():
-            # any other pm attribute -- just unstuff
-            return self._unstuff(attr)
-        else:
-            return self.__dict__[attr]
-
-
-    def PixMap(self):
-        "Return a QuickDraw PixMap corresponding to this data."
-        if not self.__dict__['_pm']:
-            self.__dict__['_pm'] = Qd.RawBitMap(self._header)
-        return self.__dict__['_pm']
-
-    def blit(self, x1=0,y1=0,x2=None,y2=None, port=None):
-        """Draw this pixmap into the given (default current) grafport."""
-        src = self.bounds
-        dest = [x1,y1,x2,y2]
-        if x2 is None:
-            dest[2] = x1 + src[2]-src[0]
-        if y2 is None:
-            dest[3] = y1 + src[3]-src[1]
-        if not port: port = Qd.GetPort()
-        Qd.CopyBits(self.PixMap(), port.GetPortBitMapForCopyBits(), src, tuple(dest),
-                QuickDraw.srcCopy, None)
-
-    def fromstring(self,s,width,height,format=imgformat.macrgb):
-        """Stuff this pixmap with raw pixel data from a string.
-        Supply width, height, and one of the imgformat specifiers."""
-        # we only support 16- and 32-bit mac rgb...
-        # so convert if necessary
-        if format != imgformat.macrgb and format != imgformat.macrgb16:
-            # (LATER!)
-            raise NotImplementedError("conversion to macrgb or macrgb16")
-        self.data = s
-        self.bounds = (0,0,width,height)
-        self.cmpCount = 3
-        self.pixelType = QuickDraw.RGBDirect
-        if format == imgformat.macrgb:
-            self.pixelSize = 32
-            self.cmpSize = 8
-        else:
-            self.pixelSize = 16
-            self.cmpSize = 5
-        self.rowBytes = width*self.pixelSize/8
-
-    def tostring(self, format=imgformat.macrgb):
-        """Return raw data as a string in the specified format."""
-        # is the native format requested?  if so, just return data
-        if (format == imgformat.macrgb and self.pixelSize == 32) or \
-           (format == imgformat.macrgb16 and self.pixelsize == 16):
-            return self.data
-        # otherwise, convert to the requested format
-        # (LATER!)
-            raise NotImplementedError("data format conversion")
-
-    def fromImage(self,im):
-        """Initialize this PixMap from a PIL Image object."""
-        # We need data in ARGB format; PIL can't currently do that,
-        # but it can do RGBA, which we can use by inserting one null
-        # up frontpm =
-        if im.mode != 'RGBA': im = im.convert('RGBA')
-        data = chr(0) + im.tostring()
-        self.fromstring(data, im.size[0], im.size[1])
-
-    def toImage(self):
-        """Return the contents of this PixMap as a PIL Image object."""
-        import Image
-        # our tostring() method returns data in ARGB format,
-        # whereas Image uses RGBA; a bit of slicing fixes this...
-        data = self.tostring()[1:] + chr(0)
-        bounds = self.bounds
-        return Image.fromstring('RGBA',(bounds[2]-bounds[0],bounds[3]-bounds[1]),data)
-
-def test():
-    import MacOS
-    import EasyDialogs
-    import Image
-    path = EasyDialogs.AskFileForOpen("Image File:")
-    if not path: return
-    pm = PixMapWrapper()
-    pm.fromImage( Image.open(path) )
-    pm.blit(20,20)
-    return pm
diff --git a/Lib/plat-mac/aepack.py b/Lib/plat-mac/aepack.py
deleted file mode 100644 (file)
index c082b1d..0000000
+++ /dev/null
@@ -1,375 +0,0 @@
-"""Tools for use in AppleEvent clients and servers:
-conversion between AE types and python types
-
-pack(x) converts a Python object to an AEDesc object
-unpack(desc) does the reverse
-coerce(x, wanted_sample) coerces a python object to another python object
-"""
-
-#
-# This code was originally written by Guido, and modified/extended by Jack
-# to include the various types that were missing. The reference used is
-# Apple Event Registry, chapter 9.
-#
-
-import struct
-from Carbon import AE
-from Carbon.AppleEvents import *
-import MacOS
-import Carbon.File
-import io
-import aetypes
-from aetypes import mkenum, ObjectSpecifier
-
-# These ones seem to be missing from AppleEvents
-# (they're in AERegistry.h)
-
-#typeColorTable = b'clrt'
-#typeDrawingArea = b'cdrw'
-#typePixelMap = b'cpix'
-#typePixelMapMinus = b'tpmm'
-#typeRotation = b'trot'
-#typeTextStyles = b'tsty'
-#typeStyledText = b'STXT'
-#typeAEText = b'tTXT'
-#typeEnumeration = b'enum'
-
-def b2i(byte_string):
-    result = 0
-    for byte in byte_string:
-        result <<= 8
-        result += byte
-    return result
-#
-# Some AE types are immedeately coerced into something
-# we like better (and which is equivalent)
-#
-unpacker_coercions = {
-    b2i(typeComp) : typeFloat,
-    b2i(typeColorTable) : typeAEList,
-    b2i(typeDrawingArea) : typeAERecord,
-    b2i(typeFixed) : typeFloat,
-    b2i(typeExtended) : typeFloat,
-    b2i(typePixelMap) : typeAERecord,
-    b2i(typeRotation) : typeAERecord,
-    b2i(typeStyledText) : typeAERecord,
-    b2i(typeTextStyles) : typeAERecord,
-};
-
-#
-# Some python types we need in the packer:
-#
-AEDescType = AE.AEDescType
-FSSType = Carbon.File.FSSpecType
-FSRefType = Carbon.File.FSRefType
-AliasType = Carbon.File.AliasType
-
-def packkey(ae, key, value):
-    if hasattr(key, 'which'):
-        keystr = key.which
-    elif hasattr(key, 'want'):
-        keystr = key.want
-    else:
-        keystr = key
-    ae.AEPutParamDesc(keystr, pack(value))
-
-def pack(x, forcetype = None):
-    """Pack a python object into an AE descriptor"""
-
-    if forcetype:
-        if isinstance(x, bytes):
-            return AE.AECreateDesc(forcetype, x)
-        else:
-            return pack(x).AECoerceDesc(forcetype)
-
-    if x is None:
-        return AE.AECreateDesc(b'null', '')
-
-    if isinstance(x, AEDescType):
-        return x
-    if isinstance(x, FSSType):
-        return AE.AECreateDesc(b'fss ', x.data)
-    if isinstance(x, FSRefType):
-        return AE.AECreateDesc(b'fsrf', x.data)
-    if isinstance(x, AliasType):
-        return AE.AECreateDesc(b'alis', x.data)
-    if isinstance(x, int):
-        return AE.AECreateDesc(b'long', struct.pack('l', x))
-    if isinstance(x, float):
-        return AE.AECreateDesc(b'doub', struct.pack('d', x))
-    if isinstance(x, (bytes, bytearray)):
-        return AE.AECreateDesc(b'TEXT', x)
-    if isinstance(x, str):
-        # See http://developer.apple.com/documentation/Carbon/Reference/Apple_Event_Manager/Reference/reference.html#//apple_ref/doc/constant_group/typeUnicodeText
-        # for the possible encodings.
-        data = x.encode('utf16')
-        if data[:2] == b'\xfe\xff':
-            data = data[2:]
-        return AE.AECreateDesc(b'utxt', data)
-    if isinstance(x, list):
-        lst = AE.AECreateList('', 0)
-        for item in x:
-            lst.AEPutDesc(0, pack(item))
-        return lst
-    if isinstance(x, dict):
-        record = AE.AECreateList('', 1)
-        for key, value in x.items():
-            packkey(record, key, value)
-            #record.AEPutParamDesc(key, pack(value))
-        return record
-    if isinstance(x, type) and issubclass(x, ObjectSpecifier):
-        # Note: we are getting a class object here, not an instance
-        return AE.AECreateDesc(b'type', x.want)
-    if hasattr(x, '__aepack__'):
-        return x.__aepack__()
-    if hasattr(x, 'which'):
-        return AE.AECreateDesc(b'TEXT', x.which)
-    if hasattr(x, 'want'):
-        return AE.AECreateDesc(b'TEXT', x.want)
-    return AE.AECreateDesc(b'TEXT', repr(x)) # Copout
-
-def unpack(desc, formodulename=""):
-    """Unpack an AE descriptor to a python object"""
-    t = desc.type
-
-    if b2i(t) in unpacker_coercions:
-        desc = desc.AECoerceDesc(unpacker_coercions[b2i(t)])
-        t = desc.type # This is a guess by Jack....
-
-    if t == typeAEList:
-        l = []
-        for i in range(desc.AECountItems()):
-            keyword, item = desc.AEGetNthDesc(i+1, b'****')
-            l.append(unpack(item, formodulename))
-        return l
-    if t == typeAERecord:
-        d = {}
-        for i in range(desc.AECountItems()):
-            keyword, item = desc.AEGetNthDesc(i+1, b'****')
-            d[b2i(keyword)] = unpack(item, formodulename)
-        return d
-    if t == typeAEText:
-        record = desc.AECoerceDesc(b'reco')
-        return mkaetext(unpack(record, formodulename))
-    if t == typeAlias:
-        return Carbon.File.Alias(rawdata=desc.data)
-    # typeAppleEvent returned as unknown
-    if t == typeBoolean:
-        return struct.unpack('b', desc.data)[0]
-    if t == typeChar:
-        return desc.data
-    if t == typeUnicodeText:
-        return str(desc.data, 'utf16')
-    # typeColorTable coerced to typeAEList
-    # typeComp coerced to extended
-    # typeData returned as unknown
-    # typeDrawingArea coerced to typeAERecord
-    if t == typeEnumeration:
-        return mkenum(desc.data)
-    # typeEPS returned as unknown
-    if t == typeFalse:
-        return 0
-    if t == typeFloat:
-        data = desc.data
-        return struct.unpack('d', data)[0]
-    if t == typeFSS:
-        return Carbon.File.FSSpec(rawdata=desc.data)
-    if t == typeFSRef:
-        return Carbon.File.FSRef(rawdata=desc.data)
-    if t == typeInsertionLoc:
-        record = desc.AECoerceDesc(b'reco')
-        return mkinsertionloc(unpack(record, formodulename))
-    # typeInteger equal to typeLongInteger
-    if t == typeIntlText:
-        script, language = struct.unpack('hh', desc.data[:4])
-        return aetypes.IntlText(script, language, desc.data[4:])
-    if t == typeIntlWritingCode:
-        script, language = struct.unpack('hh', desc.data)
-        return aetypes.IntlWritingCode(script, language)
-    if t == typeKeyword:
-        return mkkeyword(desc.data)
-    if t == typeLongInteger:
-        return struct.unpack('l', desc.data)[0]
-    if t == typeLongDateTime:
-        a, b = struct.unpack('lL', desc.data)
-        return (int(a) << 32) + b
-    if t == typeNull:
-        return None
-    if t == typeMagnitude:
-        v = struct.unpack('l', desc.data)
-        if v < 0:
-            v = 0x100000000 + v
-        return v
-    if t == typeObjectSpecifier:
-        record = desc.AECoerceDesc(b'reco')
-        # If we have been told the name of the module we are unpacking aedescs for,
-        # we can attempt to create the right type of python object from that module.
-        if formodulename:
-            return mkobjectfrommodule(unpack(record, formodulename), formodulename)
-        return mkobject(unpack(record, formodulename))
-    # typePict returned as unknown
-    # typePixelMap coerced to typeAERecord
-    # typePixelMapMinus returned as unknown
-    # typeProcessSerialNumber returned as unknown
-    if t == typeQDPoint:
-        v, h = struct.unpack('hh', desc.data)
-        return aetypes.QDPoint(v, h)
-    if t == typeQDRectangle:
-        v0, h0, v1, h1 = struct.unpack('hhhh', desc.data)
-        return aetypes.QDRectangle(v0, h0, v1, h1)
-    if t == typeRGBColor:
-        r, g, b = struct.unpack('hhh', desc.data)
-        return aetypes.RGBColor(r, g, b)
-    # typeRotation coerced to typeAERecord
-    # typeScrapStyles returned as unknown
-    # typeSessionID returned as unknown
-    if t == typeShortFloat:
-        return struct.unpack('f', desc.data)[0]
-    if t == typeShortInteger:
-        return struct.unpack('h', desc.data)[0]
-    # typeSMFloat identical to typeShortFloat
-    # typeSMInt indetical to typeShortInt
-    # typeStyledText coerced to typeAERecord
-    if t == typeTargetID:
-        return mktargetid(desc.data)
-    # typeTextStyles coerced to typeAERecord
-    # typeTIFF returned as unknown
-    if t == typeTrue:
-        return 1
-    if t == typeType:
-        return mktype(desc.data, formodulename)
-    #
-    # The following are special
-    #
-    if t == b'rang':
-        record = desc.AECoerceDesc(b'reco')
-        return mkrange(unpack(record, formodulename))
-    if t == b'cmpd':
-        record = desc.AECoerceDesc(b'reco')
-        return mkcomparison(unpack(record, formodulename))
-    if t == b'logi':
-        record = desc.AECoerceDesc(b'reco')
-        return mklogical(unpack(record, formodulename))
-    return mkunknown(desc.type, desc.data)
-
-def coerce(data, egdata):
-    """Coerce a python object to another type using the AE coercers"""
-    pdata = pack(data)
-    pegdata = pack(egdata)
-    pdata = pdata.AECoerceDesc(pegdata.type)
-    return unpack(pdata)
-
-#
-# Helper routines for unpack
-#
-def mktargetid(data):
-    sessionID = getlong(data[:4])
-    name = mkppcportrec(data[4:4+72])
-    location = mklocationnamerec(data[76:76+36])
-    rcvrName = mkppcportrec(data[112:112+72])
-    return sessionID, name, location, rcvrName
-
-def mkppcportrec(rec):
-    namescript = getword(rec[:2])
-    name = getpstr(rec[2:2+33])
-    portkind = getword(rec[36:38])
-    if portkind == 1:
-        ctor = rec[38:42]
-        type = rec[42:46]
-        identity = (ctor, type)
-    else:
-        identity = getpstr(rec[38:38+33])
-    return namescript, name, portkind, identity
-
-def mklocationnamerec(rec):
-    kind = getword(rec[:2])
-    stuff = rec[2:]
-    if kind == 0: stuff = None
-    if kind == 2: stuff = getpstr(stuff)
-    return kind, stuff
-
-def mkunknown(type, data):
-    return aetypes.Unknown(type, data)
-
-def getpstr(s):
-    return s[1:1+ord(s[0])]
-
-def getlong(s):
-    return (ord(s[0])<<24) | (ord(s[1])<<16) | (ord(s[2])<<8) | ord(s[3])
-
-def getword(s):
-    return (ord(s[0])<<8) | (ord(s[1])<<0)
-
-def mkkeyword(keyword):
-    return aetypes.Keyword(keyword)
-
-def mkrange(dict):
-    return aetypes.Range(dict[b2i(b'star')], dict[b2i(b'stop')])
-
-def mkcomparison(dict):
-    return aetypes.Comparison(dict[b2i(b'obj1')],
-                              dict[b2i(b'relo')].enum,
-                              dict[b2i(b'obj2')])
-
-def mklogical(dict):
-    return aetypes.Logical(dict[b2i(b'logc')], dict[b2i(b'term')])
-
-def mkstyledtext(dict):
-    return aetypes.StyledText(dict[b2i(b'ksty')], dict[b2i(b'ktxt')])
-
-def mkaetext(dict):
-    return aetypes.AEText(dict[b2i(keyAEScriptTag)],
-                          dict[b2i(keyAEStyles)],
-                          dict[b2i(keyAEText)])
-
-def mkinsertionloc(dict):
-    return aetypes.InsertionLoc(dict[b2i(keyAEObject)],
-                                dict[b2i(keyAEPosition)])
-
-def mkobject(dict):
-    want = dict[b2i(b'want')].type
-    form = dict[b2i(b'form')].enum
-    seld = dict[b2i(b'seld')]
-    fr   = dict[b2i(b'from')]
-    if form in (b'name', b'indx', b'rang', b'test'):
-        if want == b'text': return aetypes.Text(seld, fr)
-        if want == b'cha ': return aetypes.Character(seld, fr)
-        if want == b'cwor': return aetypes.Word(seld, fr)
-        if want == b'clin': return aetypes.Line(seld, fr)
-        if want == b'cpar': return aetypes.Paragraph(seld, fr)
-        if want == b'cwin': return aetypes.Window(seld, fr)
-        if want == b'docu': return aetypes.Document(seld, fr)
-        if want == b'file': return aetypes.File(seld, fr)
-        if want == b'cins': return aetypes.InsertionPoint(seld, fr)
-    if want == b'prop' and form == b'prop' and aetypes.IsType(seld):
-        return aetypes.Property(seld.type, fr)
-    return aetypes.ObjectSpecifier(want, form, seld, fr)
-
-# Note by Jack: I'm not 100% sure of the following code. This was
-# provided by Donovan Preston, but I wonder whether the assignment
-# to __class__ is safe. Moreover, shouldn't there be a better
-# initializer for the classes in the suites?
-def mkobjectfrommodule(dict, modulename):
-    if (isinstance(dict[b2i(b'want')], type) and
-        issubclass(dict[b2i(b'want')], ObjectSpecifier)):
-        # The type has already been converted to Python. Convert back:-(
-        classtype = dict[b2i(b'want')]
-        dict[b2i(b'want')] = aetypes.mktype(classtype.want)
-    want = dict[b2i(b'want')].type
-    module = __import__(modulename)
-    codenamemapper = module._classdeclarations
-    classtype = codenamemapper.get(b2i(want), None)
-    newobj = mkobject(dict)
-    if classtype:
-        assert issubclass(classtype, ObjectSpecifier)
-        newobj.__class__ = classtype
-    return newobj
-
-def mktype(typecode, modulename=None):
-    if modulename:
-        module = __import__(modulename)
-        codenamemapper = module._classdeclarations
-        classtype = codenamemapper.get(b2i(typecode), None)
-        if classtype:
-            return classtype
-    return aetypes.mktype(typecode)
diff --git a/Lib/plat-mac/aetools.py b/Lib/plat-mac/aetools.py
deleted file mode 100644 (file)
index 7ba5074..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-"""Tools for use in AppleEvent clients and servers.
-
-pack(x) converts a Python object to an AEDesc object
-unpack(desc) does the reverse
-
-packevent(event, parameters, attributes) sets params and attrs in an AEAppleEvent record
-unpackevent(event) returns the parameters and attributes from an AEAppleEvent record
-
-Plus...  Lots of classes and routines that help representing AE objects,
-ranges, conditionals, logicals, etc., so you can write, e.g.:
-
-    x = Character(1, Document("foobar"))
-
-and pack(x) will create an AE object reference equivalent to AppleScript's
-
-    character 1 of document "foobar"
-
-Some of the stuff that appears to be exported from this module comes from other
-files: the pack stuff from aepack, the objects from aetypes.
-
-"""
-
-
-from Carbon import AE
-from Carbon import Evt
-from Carbon import AppleEvents
-import MacOS
-import sys
-import time
-
-from aetypes import *
-from aepack import packkey, pack, unpack, coerce, AEDescType
-
-Error = 'aetools.Error'
-
-# Amount of time to wait for program to be launched
-LAUNCH_MAX_WAIT_TIME=10
-
-# Special code to unpack an AppleEvent (which is *not* a disguised record!)
-# Note by Jack: No??!? If I read the docs correctly it *is*....
-
-aekeywords = [
-    'tran',
-    'rtid',
-    'evcl',
-    'evid',
-    'addr',
-    'optk',
-    'timo',
-    'inte', # this attribute is read only - will be set in AESend
-    'esrc', # this attribute is read only
-    'miss', # this attribute is read only
-    'from'  # new in 1.0.1
-]
-
-def missed(ae):
-    try:
-        desc = ae.AEGetAttributeDesc('miss', 'keyw')
-    except AE.Error as msg:
-        return None
-    return desc.data
-
-def unpackevent(ae, formodulename=""):
-    parameters = {}
-    try:
-        dirobj = ae.AEGetParamDesc('----', '****')
-    except AE.Error:
-        pass
-    else:
-        parameters['----'] = unpack(dirobj, formodulename)
-        del dirobj
-    # Workaround for what I feel is a bug in OSX 10.2: 'errn' won't show up in missed...
-    try:
-        dirobj = ae.AEGetParamDesc('errn', '****')
-    except AE.Error:
-        pass
-    else:
-        parameters['errn'] = unpack(dirobj, formodulename)
-        del dirobj
-    while 1:
-        key = missed(ae)
-        if not key: break
-        parameters[key] = unpack(ae.AEGetParamDesc(key, '****'), formodulename)
-    attributes = {}
-    for key in aekeywords:
-        try:
-            desc = ae.AEGetAttributeDesc(key, '****')
-        except (AE.Error, MacOS.Error) as msg:
-            if msg.args[0] not in (-1701, -1704):
-                raise
-            continue
-        attributes[key] = unpack(desc, formodulename)
-    return parameters, attributes
-
-def packevent(ae, parameters = {}, attributes = {}):
-    for key, value in parameters.items():
-        packkey(ae, key, value)
-    for key, value in attributes.items():
-        ae.AEPutAttributeDesc(key, pack(value))
-
-#
-# Support routine for automatically generated Suite interfaces
-# These routines are also useable for the reverse function.
-#
-def keysubst(arguments, keydict):
-    """Replace long name keys by their 4-char counterparts, and check"""
-    ok = keydict.values()
-    for k in arguments.keys():
-        if k in keydict:
-            v = arguments[k]
-            del arguments[k]
-            arguments[keydict[k]] = v
-        elif k != '----' and k not in ok:
-            raise TypeError('Unknown keyword argument: %s'%k)
-
-def enumsubst(arguments, key, edict):
-    """Substitute a single enum keyword argument, if it occurs"""
-    if key not in arguments or edict is None:
-        return
-    v = arguments[key]
-    ok = edict.values()
-    if v in edict:
-        arguments[key] = Enum(edict[v])
-    elif not v in ok:
-        raise TypeError('Unknown enumerator: %s'%v)
-
-def decodeerror(arguments):
-    """Create the 'best' argument for a raise MacOS.Error"""
-    errn = arguments['errn']
-    err_a1 = errn
-    if 'errs' in arguments:
-        err_a2 = arguments['errs']
-    else:
-        err_a2 = MacOS.GetErrorString(errn)
-    if 'erob' in arguments:
-        err_a3 = arguments['erob']
-    else:
-        err_a3 = None
-
-    return (err_a1, err_a2, err_a3)
-
-class TalkTo:
-    """An AE connection to an application"""
-    _signature = None   # Can be overridden by subclasses
-    _moduleName = None  # Can be overridden by subclasses
-    _elemdict = {}      # Can be overridden by subclasses
-    _propdict = {}      # Can be overridden by subclasses
-
-    __eventloop_initialized = 0
-    def __ensure_WMAvailable(klass):
-        if klass.__eventloop_initialized: return 1
-        if not MacOS.WMAvailable(): return 0
-        # Workaround for a but in MacOSX 10.2: we must have an event
-        # loop before we can call AESend.
-        Evt.WaitNextEvent(0,0)
-        return 1
-    __ensure_WMAvailable = classmethod(__ensure_WMAvailable)
-
-    def __init__(self, signature=None, start=0, timeout=0):
-        """Create a communication channel with a particular application.
-
-        Addressing the application is done by specifying either a
-        4-byte signature, an AEDesc or an object that will __aepack__
-        to an AEDesc.
-        """
-        self.target_signature = None
-        if signature is None:
-            signature = self._signature
-        if isinstance(signature, AEDescType):
-            self.target = signature
-        elif hasattr(signature, '__aepack__'):
-            self.target = signature.__aepack__()
-        elif isinstance(signature, str) and len(signature) == 4:
-            self.target = AE.AECreateDesc(AppleEvents.typeApplSignature, signature)
-            self.target_signature = signature
-        else:
-            raise TypeError("signature should be 4-char string or AEDesc")
-        self.send_flags = AppleEvents.kAEWaitReply
-        self.send_priority = AppleEvents.kAENormalPriority
-        if timeout:
-            self.send_timeout = timeout
-        else:
-            self.send_timeout = AppleEvents.kAEDefaultTimeout
-        if start:
-            self._start()
-
-    def _start(self):
-        """Start the application, if it is not running yet"""
-        try:
-            self.send('ascr', 'noop')
-        except AE.Error:
-            _launch(self.target_signature)
-            for i in range(LAUNCH_MAX_WAIT_TIME):
-                try:
-                    self.send('ascr', 'noop')
-                except AE.Error:
-                    pass
-                else:
-                    break
-                time.sleep(1)
-
-    def start(self):
-        """Deprecated, used _start()"""
-        self._start()
-
-    def newevent(self, code, subcode, parameters = {}, attributes = {}):
-        """Create a complete structure for an apple event"""
-
-        event = AE.AECreateAppleEvent(code, subcode, self.target,
-                  AppleEvents.kAutoGenerateReturnID, AppleEvents.kAnyTransactionID)
-        packevent(event, parameters, attributes)
-        return event
-
-    def sendevent(self, event):
-        """Send a pre-created appleevent, await the reply and unpack it"""
-        if not self.__ensure_WMAvailable():
-            raise RuntimeError("No window manager access, cannot send AppleEvent")
-        reply = event.AESend(self.send_flags, self.send_priority,
-                                  self.send_timeout)
-        parameters, attributes = unpackevent(reply, self._moduleName)
-        return reply, parameters, attributes
-
-    def send(self, code, subcode, parameters = {}, attributes = {}):
-        """Send an appleevent given code/subcode/pars/attrs and unpack the reply"""
-        return self.sendevent(self.newevent(code, subcode, parameters, attributes))
-
-    #
-    # The following events are somehow "standard" and don't seem to appear in any
-    # suite...
-    #
-    def activate(self):
-        """Send 'activate' command"""
-        self.send('misc', 'actv')
-
-    def _get(self, _object, asfile=None, _attributes={}):
-        """_get: get data from an object
-        Required argument: the object
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the data
-        """
-        _code = 'core'
-        _subcode = 'getd'
-
-        _arguments = {'----':_object}
-        if asfile:
-            _arguments['rtyp'] = mktype(asfile)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if 'errn' in _arguments:
-            raise Error(decodeerror(_arguments))
-
-        if '----' in _arguments:
-            return _arguments['----']
-            if asfile:
-                item.__class__ = asfile
-            return item
-
-    get = _get
-
-    _argmap_set = {
-        'to' : 'data',
-    }
-
-    def _set(self, _object, _attributes={}, **_arguments):
-        """set: Set an object's data.
-        Required argument: the object for the command
-        Keyword argument to: The new value.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'setd'
-
-        keysubst(_arguments, self._argmap_set)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise Error(decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if '----' in _arguments:
-            return _arguments['----']
-
-    set = _set
-
-    # Magic glue to allow suite-generated classes to function somewhat
-    # like the "application" class in OSA.
-
-    def __getattr__(self, name):
-        if name in self._elemdict:
-            cls = self._elemdict[name]
-            return DelayedComponentItem(cls, None)
-        if name in self._propdict:
-            cls = self._propdict[name]
-            return cls()
-        raise AttributeError(name)
-
-# Tiny Finder class, for local use only
-
-class _miniFinder(TalkTo):
-    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 'errn' in _arguments:
-            raise Error(decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if '----' in _arguments:
-            return _arguments['----']
-#pass
-
-_finder = _miniFinder('MACS')
-
-def _launch(appfile):
-    """Open a file thru the finder. Specify file by name or fsspec"""
-    _finder.open(_application_file(('ID  ', appfile)))
-
-
-class _application_file(ComponentItem):
-    """application file - An application's file on disk"""
-    want = 'appf'
-
-_application_file._propdict = {
-}
-_application_file._elemdict = {
-}
-
-# Test program
-# XXXX Should test more, really...
-
-def test():
-    def raw_input(prompt):
-        sys.stdout.write(prompt)
-        sys.stdout.flush()
-        return sys.stdin.readline()
-
-    target = AE.AECreateDesc('sign', 'quil')
-    ae = AE.AECreateAppleEvent('aevt', 'oapp', target, -1, 0)
-    print(unpackevent(ae))
-    raw_input(":")
-    ae = AE.AECreateAppleEvent('core', 'getd', target, -1, 0)
-    obj = Character(2, Word(1, Document(1)))
-    print(obj)
-    print(repr(obj))
-    packevent(ae, {'----': obj})
-    params, attrs = unpackevent(ae)
-    print(params['----'])
-    raw_input(":")
-
-if __name__ == '__main__':
-    test()
-    sys.exit(1)
diff --git a/Lib/plat-mac/aetypes.py b/Lib/plat-mac/aetypes.py
deleted file mode 100644 (file)
index 6c031a1..0000000
+++ /dev/null
@@ -1,584 +0,0 @@
-"""aetypes - Python objects representing various AE types."""
-
-from Carbon.AppleEvents import *
-import struct
-
-#
-# convoluted, since there are cyclic dependencies between this file and
-# aetools_convert.
-#
-def pack(*args, **kwargs):
-    from aepack import pack
-    return pack( *args, **kwargs)
-
-def nice(s):
-    """'nice' representation of an object"""
-    if isinstance(s, str): return repr(s)
-    else: return str(s)
-
-def _four_char_code(four_chars):
-    """Convert a str or bytes object into a 4-byte array.
-
-    four_chars must contain only ASCII characters.
-
-    """
-    if isinstance(four_chars, (bytes, bytearray)):
-        b = bytes(four_chars[:4])
-        n = len(b)
-        if n < 4:
-            b += b' ' * (4 - n)
-        return b
-    else:
-        s = str(four_chars)[:4]
-        n = len(s)
-        if n < 4:
-            s += ' ' * (4 - n)
-        return bytes(s, "latin-1")  # MacRoman?
-
-class Unknown:
-    """An uninterpreted AE object"""
-
-    def __init__(self, type, data):
-        self.type = type
-        self.data = data
-
-    def __repr__(self):
-        return "Unknown(%r, %r)" % (self.type, self.data)
-
-    def __aepack__(self):
-        return pack(self.data, self.type)
-
-class Enum:
-    """An AE enumeration value"""
-
-    def __init__(self, enum):
-        self.enum = _four_char_code(enum)
-
-    def __repr__(self):
-        return "Enum(%r)" % (self.enum,)
-
-    def __str__(self):
-        return self.enum.decode("latin-1").strip(" ")
-
-    def __aepack__(self):
-        return pack(self.enum, typeEnumeration)
-
-def IsEnum(x):
-    return isinstance(x, Enum)
-
-def mkenum(enum):
-    if IsEnum(enum): return enum
-    return Enum(enum)
-
-# Jack changed the way this is done
-class InsertionLoc:
-    def __init__(self, of, pos):
-        self.of = of
-        self.pos = pos
-
-    def __repr__(self):
-        return "InsertionLoc(%r, %r)" % (self.of, self.pos)
-
-    def __aepack__(self):
-        rec = {'kobj': self.of, 'kpos': self.pos}
-        return pack(rec, forcetype='insl')
-
-# Convenience functions for dsp:
-def beginning(of):
-    return InsertionLoc(of, Enum('bgng'))
-
-def end(of):
-    return InsertionLoc(of, Enum('end '))
-
-class Boolean:
-    """An AE boolean value"""
-
-    def __init__(self, bool):
-        self.bool = (not not bool)
-
-    def __repr__(self):
-        return "Boolean(%r)" % (self.bool,)
-
-    def __str__(self):
-        if self.bool:
-            return "True"
-        else:
-            return "False"
-
-    def __aepack__(self):
-        return pack(struct.pack('b', self.bool), 'bool')
-
-def IsBoolean(x):
-    return isinstance(x, Boolean)
-
-def mkboolean(bool):
-    if IsBoolean(bool): return bool
-    return Boolean(bool)
-
-class Type:
-    """An AE 4-char typename object"""
-
-    def __init__(self, type):
-        self.type = _four_char_code(type)
-
-    def __repr__(self):
-        return "Type(%r)" % (self.type,)
-
-    def __str__(self):
-        return self.type.strip()
-
-    def __aepack__(self):
-        return pack(self.type, typeType)
-
-def IsType(x):
-    return isinstance(x, Type)
-
-def mktype(type):
-    if IsType(type): return type
-    return Type(type)
-
-
-class Keyword:
-    """An AE 4-char keyword object"""
-
-    def __init__(self, keyword):
-        self.keyword = _four_char_code(keyword)
-
-    def __repr__(self):
-        return "Keyword(%r)" % self.keyword
-
-    def __str__(self):
-        return self.keyword.strip()
-
-    def __aepack__(self):
-        return pack(self.keyword, typeKeyword)
-
-def IsKeyword(x):
-    return isinstance(x, Keyword)
-
-class Range:
-    """An AE range object"""
-
-    def __init__(self, start, stop):
-        self.start = start
-        self.stop = stop
-
-    def __repr__(self):
-        return "Range(%r, %r)" % (self.start, self.stop)
-
-    def __str__(self):
-        return "%s thru %s" % (nice(self.start), nice(self.stop))
-
-    def __aepack__(self):
-        return pack({'star': self.start, 'stop': self.stop}, 'rang')
-
-def IsRange(x):
-    return isinstance(x, Range)
-
-class Comparison:
-    """An AE Comparison"""
-
-    def __init__(self, obj1, relo, obj2):
-        self.obj1 = obj1
-        self.relo = _four_char_code(relo)
-        self.obj2 = obj2
-
-    def __repr__(self):
-        return "Comparison(%r, %r, %r)" % (self.obj1, self.relo, self.obj2)
-
-    def __str__(self):
-        return "%s %s %s" % (nice(self.obj1), self.relo.strip(), nice(self.obj2))
-
-    def __aepack__(self):
-        return pack({'obj1': self.obj1,
-                 'relo': mkenum(self.relo),
-                 'obj2': self.obj2},
-                'cmpd')
-
-def IsComparison(x):
-    return isinstance(x, Comparison)
-
-class NComparison(Comparison):
-    # The class attribute 'relo' must be set in a subclass
-
-    def __init__(self, obj1, obj2):
-        Comparison.__init__(obj1, self.relo, obj2)
-
-class Ordinal:
-    """An AE Ordinal"""
-
-    def __init__(self, abso):
-#       self.obj1 = obj1
-        self.abso = _four_char_code(abso)
-
-    def __repr__(self):
-        return "Ordinal(%r)" % (self.abso,)
-
-    def __str__(self):
-        return "%s" % (self.abso.strip())
-
-    def __aepack__(self):
-        return pack(self.abso, 'abso')
-
-def IsOrdinal(x):
-    return isinstance(x, Ordinal)
-
-class NOrdinal(Ordinal):
-    # The class attribute 'abso' must be set in a subclass
-
-    def __init__(self):
-        Ordinal.__init__(self, self.abso)
-
-class Logical:
-    """An AE logical expression object"""
-
-    def __init__(self, logc, term):
-        self.logc = _four_char_code(logc)
-        self.term = term
-
-    def __repr__(self):
-        return "Logical(%r, %r)" % (self.logc, self.term)
-
-    def __str__(self):
-        if isinstance(self.term, list) and len(self.term) == 2:
-            return "%s %s %s" % (nice(self.term[0]),
-                                 self.logc.strip(),
-                                 nice(self.term[1]))
-        else:
-            return "%s(%s)" % (self.logc.strip(), nice(self.term))
-
-    def __aepack__(self):
-        return pack({'logc': mkenum(self.logc), 'term': self.term}, 'logi')
-
-def IsLogical(x):
-    return isinstance(x, Logical)
-
-class StyledText:
-    """An AE object respresenting text in a certain style"""
-
-    def __init__(self, style, text):
-        self.style = style
-        self.text = text
-
-    def __repr__(self):
-        return "StyledText(%r, %r)" % (self.style, self.text)
-
-    def __str__(self):
-        return self.text
-
-    def __aepack__(self):
-        return pack({'ksty': self.style, 'ktxt': self.text}, 'STXT')
-
-def IsStyledText(x):
-    return isinstance(x, StyledText)
-
-class AEText:
-    """An AE text object with style, script and language specified"""
-
-    def __init__(self, script, style, text):
-        self.script = script
-        self.style = style
-        self.text = text
-
-    def __repr__(self):
-        return "AEText(%r, %r, %r)" % (self.script, self.style, self.text)
-
-    def __str__(self):
-        return self.text
-
-    def __aepack__(self):
-        return pack({keyAEScriptTag: self.script, keyAEStyles: self.style,
-                 keyAEText: self.text}, typeAEText)
-
-def IsAEText(x):
-    return isinstance(x, AEText)
-
-class IntlText:
-    """A text object with script and language specified"""
-
-    def __init__(self, script, language, text):
-        self.script = script
-        self.language = language
-        self.text = text
-
-    def __repr__(self):
-        return "IntlText(%r, %r, %r)" % (self.script, self.language, self.text)
-
-    def __str__(self):
-        return self.text
-
-    def __aepack__(self):
-        return pack(struct.pack('hh', self.script, self.language)+self.text,
-            typeIntlText)
-
-def IsIntlText(x):
-    return isinstance(x, IntlText)
-
-class IntlWritingCode:
-    """An object representing script and language"""
-
-    def __init__(self, script, language):
-        self.script = script
-        self.language = language
-
-    def __repr__(self):
-        return "IntlWritingCode(%r, %r)" % (self.script, self.language)
-
-    def __str__(self):
-        return "script system %d, language %d"%(self.script, self.language)
-
-    def __aepack__(self):
-        return pack(struct.pack('hh', self.script, self.language),
-            typeIntlWritingCode)
-
-def IsIntlWritingCode(x):
-    return isinstance(x, IntlWritingCode)
-
-class QDPoint:
-    """A point"""
-
-    def __init__(self, v, h):
-        self.v = v
-        self.h = h
-
-    def __repr__(self):
-        return "QDPoint(%r, %r)" % (self.v, self.h)
-
-    def __str__(self):
-        return "(%d, %d)"%(self.v, self.h)
-
-    def __aepack__(self):
-        return pack(struct.pack('hh', self.v, self.h),
-            typeQDPoint)
-
-def IsQDPoint(x):
-    return isinstance(x, QDPoint)
-
-class QDRectangle:
-    """A rectangle"""
-
-    def __init__(self, v0, h0, v1, h1):
-        self.v0 = v0
-        self.h0 = h0
-        self.v1 = v1
-        self.h1 = h1
-
-    def __repr__(self):
-        return "QDRectangle(%r, %r, %r, %r)" % (self.v0, self.h0, self.v1, self.h1)
-
-    def __str__(self):
-        return "(%d, %d)-(%d, %d)"%(self.v0, self.h0, self.v1, self.h1)
-
-    def __aepack__(self):
-        return pack(struct.pack('hhhh', self.v0, self.h0, self.v1, self.h1),
-            typeQDRectangle)
-
-def IsQDRectangle(x):
-    return isinstance(x, QDRectangle)
-
-class RGBColor:
-    """An RGB color"""
-
-    def __init__(self, r, g, b):
-        self.r = r
-        self.g = g
-        self.b = b
-
-    def __repr__(self):
-        return "RGBColor(%r, %r, %r)" % (self.r, self.g, self.b)
-
-    def __str__(self):
-        return "0x%x red, 0x%x green, 0x%x blue"% (self.r, self.g, self.b)
-
-    def __aepack__(self):
-        return pack(struct.pack('hhh', self.r, self.g, self.b),
-            typeRGBColor)
-
-def IsRGBColor(x):
-    return isinstance(x, RGBColor)
-
-class ObjectSpecifier:
-
-    """A class for constructing and manipulation AE object specifiers in python.
-
-    An object specifier is actually a record with four fields:
-
-    key type    description
-    --- ----    -----------
-
-    'want'  type    4-char class code of thing we want,
-            e.g. word, paragraph or property
-
-    'form'  enum    how we specify which 'want' thing(s) we want,
-            e.g. by index, by range, by name, or by property specifier
-
-    'seld'  any which thing(s) we want,
-            e.g. its index, its name, or its property specifier
-
-    'from'  object  the object in which it is contained,
-            or null, meaning look for it in the application
-
-    Note that we don't call this class plain "Object", since that name
-    is likely to be used by the application.
-    """
-
-    def __init__(self, want, form, seld, fr = None):
-        self.want = want
-        self.form = form
-        self.seld = seld
-        self.fr = fr
-
-    def __repr__(self):
-        s = "ObjectSpecifier(%r, %r, %r" % (self.want, self.form, self.seld)
-        if self.fr:
-            s = s + ", %r)" % (self.fr,)
-        else:
-            s = s + ")"
-        return s
-
-    def __aepack__(self):
-        return pack({'want': mktype(self.want),
-                 'form': mkenum(self.form),
-                 'seld': self.seld,
-                 'from': self.fr},
-                'obj ')
-
-def IsObjectSpecifier(x):
-    return isinstance(x, ObjectSpecifier)
-
-
-# Backwards compatibility, sigh...
-class Property(ObjectSpecifier):
-
-    def __init__(self, which, fr = None, want='prop'):
-        ObjectSpecifier.__init__(self, want, 'prop', mktype(which), fr)
-
-    def __repr__(self):
-        if self.fr:
-            return "Property(%r, %r)" % (self.seld.type, self.fr)
-        else:
-            return "Property(%r)" % (self.seld.type,)
-
-    def __str__(self):
-        if self.fr:
-            return "Property %s of %s" % (str(self.seld), str(self.fr))
-        else:
-            return "Property %s" % str(self.seld)
-
-
-class NProperty(ObjectSpecifier):
-    # Subclasses *must* self baseclass attributes:
-    # want is the type of this property
-    # which is the property name of this property
-
-    def __init__(self, fr = None):
-        #try:
-        #   dummy = self.want
-        #except:
-        #   self.want = 'prop'
-        self.want = 'prop'
-        ObjectSpecifier.__init__(self, self.want, 'prop',
-                    mktype(self.which), fr)
-
-    def __repr__(self):
-        rv = "Property(%r" % (self.seld.type,)
-        if self.fr:
-            rv = rv + ", fr=%r" % (self.fr,)
-        if self.want != 'prop':
-            rv = rv + ", want=%r" % (self.want,)
-        return rv + ")"
-
-    def __str__(self):
-        if self.fr:
-            return "Property %s of %s" % (str(self.seld), str(self.fr))
-        else:
-            return "Property %s" % str(self.seld)
-
-
-class SelectableItem(ObjectSpecifier):
-
-    def __init__(self, want, seld, fr = None):
-        t = type(seld)
-        if isinstance(t, str):
-            form = 'name'
-        elif IsRange(seld):
-            form = 'rang'
-        elif IsComparison(seld) or IsLogical(seld):
-            form = 'test'
-        elif isinstance(t, tuple):
-            # Breakout: specify both form and seld in a tuple
-            # (if you want ID or rele or somesuch)
-            form, seld = seld
-        else:
-            form = 'indx'
-        ObjectSpecifier.__init__(self, want, form, seld, fr)
-
-
-class ComponentItem(SelectableItem):
-    # Derived classes *must* set the *class attribute* 'want' to some constant
-    # Also, dictionaries _propdict and _elemdict must be set to map property
-    # and element names to the correct classes
-
-    _propdict = {}
-    _elemdict = {}
-    def __init__(self, which, fr = None):
-        SelectableItem.__init__(self, self.want, which, fr)
-
-    def __repr__(self):
-        if not self.fr:
-            return "%s(%r)" % (self.__class__.__name__, self.seld)
-        return "%s(%r, %r)" % (self.__class__.__name__, self.seld, self.fr)
-
-    def __str__(self):
-        seld = self.seld
-        if isinstance(seld, str):
-            ss = repr(seld)
-        elif IsRange(seld):
-            start, stop = seld.start, seld.stop
-            if type(start) == type(stop) == type(self):
-                ss = str(start.seld) + " thru " + str(stop.seld)
-            else:
-                ss = str(seld)
-        else:
-            ss = str(seld)
-        s = "%s %s" % (self.__class__.__name__, ss)
-        if self.fr: s = s + " of %s" % str(self.fr)
-        return s
-
-    def __getattr__(self, name):
-        if name in self._elemdict:
-            cls = self._elemdict[name]
-            return DelayedComponentItem(cls, self)
-        if name in self._propdict:
-            cls = self._propdict[name]
-            return cls(self)
-        raise AttributeError(name)
-
-
-class DelayedComponentItem:
-    def __init__(self, compclass, fr):
-        self.compclass = compclass
-        self.fr = fr
-
-    def __call__(self, which):
-        return self.compclass(which, self.fr)
-
-    def __repr__(self):
-        return "%s(???, %r)" % (self.__class__.__name__, self.fr)
-
-    def __str__(self):
-        return "selector for element %s of %s"%(self.__class__.__name__, str(self.fr))
-
-template = """
-class %s(ComponentItem): want = %r
-"""
-
-exec(template % ("Text", b'text'))
-exec(template % ("Character", b'cha '))
-exec(template % ("Word", b'cwor'))
-exec(template % ("Line", b'clin'))
-exec(template % ("paragraph", b'cpar'))
-exec(template % ("Window", b'cwin'))
-exec(template % ("Document", b'docu'))
-exec(template % ("File", b'file'))
-exec(template % ("InsertionPoint", b'cins'))
diff --git a/Lib/plat-mac/applesingle.py b/Lib/plat-mac/applesingle.py
deleted file mode 100644 (file)
index a055497..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-r"""Routines to decode AppleSingle files
-"""
-import struct
-import sys
-try:
-    import MacOS
-    import Carbon.File
-except:
-    class MacOS:
-        def openrf(path, mode):
-            return open(path + '.rsrc', mode)
-        openrf = classmethod(openrf)
-    class Carbon:
-        class File:
-            class FSSpec:
-                pass
-            class FSRef:
-                pass
-            class Alias:
-                pass
-
-# all of the errors in this module are really errors in the input
-# so I think it should test positive against ValueError.
-class Error(ValueError):
-    pass
-
-# File header format: magic, version, unused, number of entries
-AS_HEADER_FORMAT=">LL16sh"
-AS_HEADER_LENGTH=26
-# The flag words for AppleSingle
-AS_MAGIC=0x00051600
-AS_VERSION=0x00020000
-
-# Entry header format: id, offset, length
-AS_ENTRY_FORMAT=">lll"
-AS_ENTRY_LENGTH=12
-
-# The id values
-AS_DATAFORK=1
-AS_RESOURCEFORK=2
-AS_IGNORE=(3,4,5,6,8,9,10,11,12,13,14,15)
-
-class AppleSingle(object):
-    datafork = None
-    resourcefork = None
-
-    def __init__(self, fileobj, verbose=False):
-        header = fileobj.read(AS_HEADER_LENGTH)
-        try:
-            magic, version, ig, nentry = struct.unpack(AS_HEADER_FORMAT, header)
-        except ValueError as arg:
-            raise Error("Unpack header error: %s" % (arg,))
-        if verbose:
-            print('Magic:   0x%8.8x' % (magic,))
-            print('Version: 0x%8.8x' % (version,))
-            print('Entries: %d' % (nentry,))
-        if magic != AS_MAGIC:
-            raise Error("Unknown AppleSingle magic number 0x%8.8x" % (magic,))
-        if version != AS_VERSION:
-            raise Error("Unknown AppleSingle version number 0x%8.8x" % (version,))
-        if nentry <= 0:
-            raise Error("AppleSingle file contains no forks")
-        headers = [fileobj.read(AS_ENTRY_LENGTH) for i in range(nentry)]
-        self.forks = []
-        for hdr in headers:
-            try:
-                restype, offset, length = struct.unpack(AS_ENTRY_FORMAT, hdr)
-            except ValueError as arg:
-                raise Error("Unpack entry error: %s" % (arg,))
-            if verbose:
-                print("Fork %d, offset %d, length %d" % (restype, offset, length))
-            fileobj.seek(offset)
-            data = fileobj.read(length)
-            if len(data) != length:
-                raise Error("Short read: expected %d bytes got %d" % (length, len(data)))
-            self.forks.append((restype, data))
-            if restype == AS_DATAFORK:
-                self.datafork = data
-            elif restype == AS_RESOURCEFORK:
-                self.resourcefork = data
-
-    def tofile(self, path, resonly=False):
-        outfile = open(path, 'wb')
-        data = False
-        if resonly:
-            if self.resourcefork is None:
-                raise Error("No resource fork found")
-            fp = open(path, 'wb')
-            fp.write(self.resourcefork)
-            fp.close()
-        elif (self.resourcefork is None and self.datafork is None):
-            raise Error("No useful forks found")
-        else:
-            if self.datafork is not None:
-                fp = open(path, 'wb')
-                fp.write(self.datafork)
-                fp.close()
-            if self.resourcefork is not None:
-                fp = MacOS.openrf(path, '*wb')
-                fp.write(self.resourcefork)
-                fp.close()
-
-def decode(infile, outpath, resonly=False, verbose=False):
-    """decode(infile, outpath [, resonly=False, verbose=False])
-
-    Creates a decoded file from an AppleSingle encoded file.
-    If resonly is True, then it will create a regular file at
-    outpath containing only the resource fork from infile.
-    Otherwise it will create an AppleDouble file at outpath
-    with the data and resource forks from infile.  On platforms
-    without the MacOS module, it will create inpath and inpath+'.rsrc'
-    with the data and resource forks respectively.
-
-    """
-    if not hasattr(infile, 'read'):
-        if isinstance(infile, Carbon.File.Alias):
-            infile = infile.ResolveAlias()[0]
-        if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)):
-            infile = infile.as_pathname()
-        infile = open(infile, 'rb')
-
-    asfile = AppleSingle(infile, verbose=verbose)
-    asfile.tofile(outpath, resonly=resonly)
-
-def _test():
-    if len(sys.argv) < 3 or sys.argv[1] == '-r' and len(sys.argv) != 4:
-        print('Usage: applesingle.py [-r] applesinglefile decodedfile')
-        sys.exit(1)
-    if sys.argv[1] == '-r':
-        resonly = True
-        del sys.argv[1]
-    else:
-        resonly = False
-    decode(sys.argv[1], sys.argv[2], resonly=resonly)
-
-if __name__ == '__main__':
-    _test()
diff --git a/Lib/plat-mac/appletrawmain.py b/Lib/plat-mac/appletrawmain.py
deleted file mode 100644 (file)
index 5c09e2d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# Emulate sys.argv and run __main__.py or __main__.pyc in an environment that
-# is as close to "normal" as possible.
-#
-# This script is put into __rawmain__.pyc for applets that need argv
-# emulation, by BuildApplet and friends.
-#
-import argvemulator
-import os
-import sys
-import marshal
-
-#
-# Make sure we have an argv[0], and make _dir point to the Resources
-# directory.
-#
-if not sys.argv or sys.argv[0][:1] == '-':
-    # Insert our (guessed) name.
-    _dir = os.path.split(sys.executable)[0] # removes "python"
-    _dir = os.path.split(_dir)[0] # Removes "MacOS"
-    _dir = os.path.join(_dir, 'Resources')
-    sys.argv.insert(0, '__rawmain__')
-else:
-    _dir = os.path.split(sys.argv[0])[0]
-#
-# Add the Resources directory to the path. This is where files installed
-# by BuildApplet.py with the --extra option show up, and if those files are
-# modules this sys.path modification is necessary to be able to import them.
-#
-sys.path.insert(0, _dir)
-#
-# Create sys.argv
-#
-argvemulator.ArgvCollector().mainloop()
-#
-# Find the real main program to run
-#
-__file__ = os.path.join(_dir, '__main__.py')
-if os.path.exists(__file__):
-    #
-    # Setup something resembling a normal environment and go.
-    #
-    sys.argv[0] = __file__
-    del argvemulator, os, sys, _dir
-    exec(open(__file__).read())
-else:
-    __file__ = os.path.join(_dir, '__main__.pyc')
-    if os.path.exists(__file__):
-        #
-        # If we have only a .pyc file we read the code object from that
-        #
-        sys.argv[0] = __file__
-        _fp = open(__file__, 'rb')
-        _fp.read(8)
-        __code__ = marshal.load(_fp)
-        #
-        # Again, we create an almost-normal environment (only __code__ is
-        # funny) and go.
-        #
-        del argvemulator, os, sys, marshal, _dir, _fp
-        exec(__code__)
-    else:
-        sys.stderr.write("%s: neither __main__.py nor __main__.pyc found\n"%sys.argv[0])
-        sys.exit(1)
diff --git a/Lib/plat-mac/appletrunner.py b/Lib/plat-mac/appletrunner.py
deleted file mode 100755 (executable)
index 8d46c2a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env python
-# This file is meant as an executable script for running applets.
-# BuildApplet will use it as the main executable in the .app bundle if
-# we are not running in a framework build.
-
-import os
-import sys
-for name in ["__rawmain__.py", "__rawmain__.pyc", "__main__.py", "__main__.pyc"]:
-    realmain = os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])),
-                      "Resources", name)
-    if os.path.exists(realmain):
-        break
-else:
-    sys.stderr.write("%s: cannot find applet main program\n" % sys.argv[0])
-    sys.exit(1)
-sys.argv.insert(1, realmain)
-os.execve(sys.executable, sys.argv, os.environ)
diff --git a/Lib/plat-mac/argvemulator.py b/Lib/plat-mac/argvemulator.py
deleted file mode 100644 (file)
index 676e80a..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-"""argvemulator - create sys.argv from OSA events. Used by applets that
-want unix-style arguments.
-"""
-
-import sys
-import traceback
-from Carbon import AE
-from Carbon.AppleEvents import *
-from Carbon import Evt
-from Carbon import File
-from Carbon.Events import *
-import aetools
-
-class ArgvCollector:
-
-    """A minimal FrameWork.Application-like class"""
-
-    def __init__(self):
-        self.quitting = 0
-        # Remove the funny -psn_xxx_xxx argument
-        if len(sys.argv) > 1 and sys.argv[1][:4] == '-psn':
-            del sys.argv[1]
-
-        AE.AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, self.__runapp)
-        AE.AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, self.__openfiles)
-
-    def close(self):
-        AE.AERemoveEventHandler(kCoreEventClass, kAEOpenApplication)
-        AE.AERemoveEventHandler(kCoreEventClass, kAEOpenDocuments)
-
-    def mainloop(self, mask = highLevelEventMask, timeout = 1*60):
-        # Note: this is not the right way to run an event loop in OSX or even
-        # "recent" versions of MacOS9. This is however code that has proven
-        # itself.
-        stoptime = Evt.TickCount() + timeout
-        while not self.quitting and Evt.TickCount() < stoptime:
-            self._dooneevent(mask, timeout)
-
-        if not self.quitting:
-            print("argvemulator: timeout waiting for arguments")
-
-        self.close()
-
-    def _dooneevent(self, mask = highLevelEventMask, timeout = 1*60):
-        got, event = Evt.WaitNextEvent(mask, timeout)
-        if got:
-            self._lowlevelhandler(event)
-
-    def _lowlevelhandler(self, event):
-        what, message, when, where, modifiers = event
-        h, v = where
-        if what == kHighLevelEvent:
-            try:
-                AE.AEProcessAppleEvent(event)
-            except AE.Error as err:
-                msg = "High Level Event: %r %r" % (hex(message), hex(h | (v<<16)))
-                print('AE error: ', err)
-                print('in', msg)
-                traceback.print_exc()
-            return
-        else:
-            print("Unhandled event:", event)
-
-
-    def _quit(self):
-        self.quitting = 1
-
-    def __runapp(self, requestevent, replyevent):
-        self._quit()
-
-    def __openfiles(self, requestevent, replyevent):
-        try:
-            listdesc = requestevent.AEGetParamDesc(keyDirectObject, typeAEList)
-            for i in range(listdesc.AECountItems()):
-                aliasdesc = listdesc.AEGetNthDesc(i+1, typeAlias)[1]
-                alias = File.Alias(rawdata=aliasdesc.data)
-                fsref = alias.FSResolveAlias(None)[0]
-                pathname = fsref.as_pathname()
-                sys.argv.append(pathname)
-        except  Exception as e:
-            print("argvemulator.py warning: can't unpack an open document event")
-            import traceback
-            traceback.print_exc()
-
-        self._quit()
-
-if __name__ == '__main__':
-    ArgvCollector().mainloop()
-    print("sys.argv=", sys.argv)
diff --git a/Lib/plat-mac/bgenlocations.py b/Lib/plat-mac/bgenlocations.py
deleted file mode 100644 (file)
index 88e8f67..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Local customizations for generating the Carbon interface modules.
-# Edit this file to reflect where things should be on your system.
-# Note that pathnames are unix-style for OSX MachoPython/unix-Python,
-# but mac-style for MacPython, whether running on OS9 or OSX.
-#
-
-import os
-
-Error = "bgenlocations.Error"
-#
-# Where bgen is. For unix-Python bgen isn't installed, so you have to refer to
-# the source tree here.
-BGENDIR="/Users/jack/src/python/Tools/bgen/bgen"
-
-#
-# Where to find the Universal Header include files. If you have CodeWarrior
-# installed you can use the Universal Headers from there, otherwise you can
-# download them from the Apple website. Bgen can handle both unix- and mac-style
-# end of lines, so don't worry about that.
-#
-INCLUDEDIR="/Users/jack/src/Universal/Interfaces/CIncludes"
-
-#
-# Where to put the python definitions files. Note that, on unix-Python,
-# if you want to commit your changes to the CVS repository this should refer to
-# your source directory, not your installed directory.
-#
-TOOLBOXDIR="/Users/jack/src/python/Lib/plat-mac/Carbon"
-
-# Creator for C files:
-CREATOR="CWIE"
-
-# The previous definitions can be overriden by creating a module
-# bgenlocationscustomize.py and putting it in site-packages (or anywere else
-# on sys.path, actually)
-try:
-    from bgenlocationscustomize import *
-except ImportError:
-    pass
-
-if not os.path.exists(BGENDIR):
-    raise Error("Please fix bgenlocations.py, BGENDIR does not exist: %s" % BGENDIR)
-if not os.path.exists(INCLUDEDIR):
-    raise Error("Please fix bgenlocations.py, INCLUDEDIR does not exist: %s" % INCLUDEDIR)
-if not os.path.exists(TOOLBOXDIR):
-    raise Error("Please fix bgenlocations.py, TOOLBOXDIR does not exist: %s" % TOOLBOXDIR)
-
-# Sigh, due to the way these are used make sure they end with : or /.
-if BGENDIR[-1] != os.sep:
-    BGENDIR = BGENDIR + os.sep
-if INCLUDEDIR[-1] != os.sep:
-    INCLUDEDIR = INCLUDEDIR + os.sep
-if TOOLBOXDIR[-1] != os.sep:
-    TOOLBOXDIR = TOOLBOXDIR + os.sep
diff --git a/Lib/plat-mac/buildtools.py b/Lib/plat-mac/buildtools.py
deleted file mode 100644 (file)
index 87a099e..0000000
+++ /dev/null
@@ -1,423 +0,0 @@
-"""tools for BuildApplet and BuildApplication"""
-
-import sys
-import os
-import imp
-import marshal
-from Carbon import Res
-import Carbon.Files
-import Carbon.File
-import MacOS
-import macostools
-import macresource
-import EasyDialogs
-import shutil
-
-import warnings
-warnings.warn("the buildtools module is deprecated", DeprecationWarning, 2)
-
-
-class BuildError(Exception):
-    pass
-
-# .pyc file (and 'PYC ' resource magic number)
-MAGIC = imp.get_magic()
-
-# Template file (searched on sys.path)
-TEMPLATE = "PythonInterpreter"
-
-# Specification of our resource
-RESTYPE = 'PYC '
-RESNAME = '__main__'
-
-# A resource with this name sets the "owner" (creator) of the destination
-# It should also have ID=0. Either of these alone is not enough.
-OWNERNAME = "owner resource"
-
-# Default applet creator code
-DEFAULT_APPLET_CREATOR="Pyta"
-
-# OpenResFile mode parameters
-READ = 1
-WRITE = 2
-
-# Parameter for FSOpenResourceFile
-RESOURCE_FORK_NAME=Carbon.File.FSGetResourceForkName()
-
-def findtemplate(template=None):
-    """Locate the applet template along sys.path"""
-    if MacOS.runtimemodel == 'macho':
-        return None
-    if not template:
-        template=TEMPLATE
-    for p in sys.path:
-        file = os.path.join(p, template)
-        try:
-            file, d1, d2 = Carbon.File.FSResolveAliasFile(file, 1)
-            break
-        except (Carbon.File.Error, ValueError):
-            continue
-    else:
-        raise BuildError("Template %r not found on sys.path" % (template,))
-    file = file.as_pathname()
-    return file
-
-def process(template, filename, destname, copy_codefragment=0,
-        rsrcname=None, others=[], raw=0, progress="default", destroot=""):
-
-    if progress == "default":
-        progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120)
-        progress.label("Compiling...")
-        progress.inc(0)
-    # check for the script name being longer than 32 chars. This may trigger a bug
-    # on OSX that can destroy your sourcefile.
-    if '#' in os.path.split(filename)[1]:
-        raise BuildError("BuildApplet could destroy your sourcefile on OSX, please rename: %s" % filename)
-    # Read the source and compile it
-    # (there's no point overwriting the destination if it has a syntax error)
-
-    fp = open(filename, 'rU')
-    text = fp.read()
-    fp.close()
-    try:
-        code = compile(text + '\n', filename, "exec")
-    except SyntaxError as arg:
-        raise BuildError("Syntax error in script %s: %s" % (filename, arg))
-    except EOFError:
-        raise BuildError("End-of-file in script %s" % (filename,))
-
-    # Set the destination file name. Note that basename
-    # does contain the whole filepath, only a .py is stripped.
-
-    if filename[-3:].lower() == ".py":
-        basename = filename[:-3]
-        if MacOS.runtimemodel != 'macho' and not destname:
-            destname = basename
-    else:
-        basename = filename
-
-    if not destname:
-        if MacOS.runtimemodel == 'macho':
-            destname = basename + '.app'
-        else:
-            destname = basename + '.applet'
-    if not rsrcname:
-        rsrcname = basename + '.rsrc'
-
-    # Try removing the output file. This fails in MachO, but it should
-    # do any harm.
-    try:
-        os.remove(destname)
-    except os.error:
-        pass
-    process_common(template, progress, code, rsrcname, destname, 0,
-        copy_codefragment, raw, others, filename, destroot)
-
-
-def update(template, filename, output):
-    if MacOS.runtimemodel == 'macho':
-        raise BuildError("No updating yet for MachO applets")
-    if progress:
-        progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120)
-    else:
-        progress = None
-    if not output:
-        output = filename + ' (updated)'
-
-    # Try removing the output file
-    try:
-        os.remove(output)
-    except os.error:
-        pass
-    process_common(template, progress, None, filename, output, 1, 1)
-
-
-def process_common(template, progress, code, rsrcname, destname, is_update,
-        copy_codefragment, raw=0, others=[], filename=None, destroot=""):
-    if MacOS.runtimemodel == 'macho':
-        return process_common_macho(template, progress, code, rsrcname, destname,
-            is_update, raw, others, filename, destroot)
-    if others:
-        raise BuildError("Extra files only allowed for MachoPython applets")
-    # Create FSSpecs for the various files
-    template_fsr, d1, d2 = Carbon.File.FSResolveAliasFile(template, 1)
-    template = template_fsr.as_pathname()
-
-    # Copy data (not resources, yet) from the template
-    if progress:
-        progress.label("Copy data fork...")
-        progress.set(10)
-
-    if copy_codefragment:
-        tmpl = open(template, "rb")
-        dest = open(destname, "wb")
-        data = tmpl.read()
-        if data:
-            dest.write(data)
-        dest.close()
-        tmpl.close()
-        del dest
-        del tmpl
-
-    # Open the output resource fork
-
-    if progress:
-        progress.label("Copy resources...")
-        progress.set(20)
-    try:
-        output = Res.FSOpenResourceFile(destname, RESOURCE_FORK_NAME, WRITE)
-    except MacOS.Error:
-        destdir, destfile = os.path.split(destname)
-        Res.FSCreateResourceFile(destdir, str(destfile), RESOURCE_FORK_NAME)
-        output = Res.FSOpenResourceFile(destname, RESOURCE_FORK_NAME, WRITE)
-
-    # Copy the resources from the target specific resource template, if any
-    typesfound, ownertype = [], None
-    try:
-        input = Res.FSOpenResourceFile(rsrcname, RESOURCE_FORK_NAME, READ)
-    except (MacOS.Error, ValueError):
-        pass
-        if progress:
-            progress.inc(50)
-    else:
-        if is_update:
-            skip_oldfile = ['cfrg']
-        else:
-            skip_oldfile = []
-        typesfound, ownertype = copyres(input, output, skip_oldfile, 0, progress)
-        Res.CloseResFile(input)
-
-    # Check which resource-types we should not copy from the template
-    skiptypes = []
-    if 'vers' in typesfound: skiptypes.append('vers')
-    if 'SIZE' in typesfound: skiptypes.append('SIZE')
-    if 'BNDL' in typesfound: skiptypes = skiptypes + ['BNDL', 'FREF', 'icl4',
-            'icl8', 'ics4', 'ics8', 'ICN#', 'ics#']
-    if not copy_codefragment:
-        skiptypes.append('cfrg')
-##  skipowner = (ownertype != None)
-
-    # Copy the resources from the template
-
-    input = Res.FSOpenResourceFile(template, RESOURCE_FORK_NAME, READ)
-    dummy, tmplowner = copyres(input, output, skiptypes, 1, progress)
-
-    Res.CloseResFile(input)
-##  if ownertype is None:
-##      raise BuildError, "No owner resource found in either resource file or template"
-    # Make sure we're manipulating the output resource file now
-
-    Res.UseResFile(output)
-
-    if ownertype is None:
-        # No owner resource in the template. We have skipped the
-        # Python owner resource, so we have to add our own. The relevant
-        # bundle stuff is already included in the interpret/applet template.
-        newres = Res.Resource('\0')
-        newres.AddResource(DEFAULT_APPLET_CREATOR, 0, "Owner resource")
-        ownertype = DEFAULT_APPLET_CREATOR
-
-    if code:
-        # Delete any existing 'PYC ' resource named __main__
-
-        try:
-            res = Res.Get1NamedResource(RESTYPE, RESNAME)
-            res.RemoveResource()
-        except Res.Error:
-            pass
-
-        # Create the raw data for the resource from the code object
-        if progress:
-            progress.label("Write PYC resource...")
-            progress.set(120)
-
-        data = marshal.dumps(code)
-        del code
-        data = (MAGIC + '\0\0\0\0') + data
-
-        # Create the resource and write it
-
-        id = 0
-        while id < 128:
-            id = Res.Unique1ID(RESTYPE)
-        res = Res.Resource(data)
-        res.AddResource(RESTYPE, id, RESNAME)
-        attrs = res.GetResAttrs()
-        attrs = attrs | 0x04    # set preload
-        res.SetResAttrs(attrs)
-        res.WriteResource()
-        res.ReleaseResource()
-
-    # Close the output file
-
-    Res.CloseResFile(output)
-
-    # Now set the creator, type and bundle bit of the destination.
-    # Done with FSSpec's, FSRef FInfo isn't good enough yet (2.3a1+)
-    dest_fss = Carbon.File.FSSpec(destname)
-    dest_finfo = dest_fss.FSpGetFInfo()
-    dest_finfo.Creator = ownertype
-    dest_finfo.Type = 'APPL'
-    dest_finfo.Flags = dest_finfo.Flags | Carbon.Files.kHasBundle | Carbon.Files.kIsShared
-    dest_finfo.Flags = dest_finfo.Flags & ~Carbon.Files.kHasBeenInited
-    dest_fss.FSpSetFInfo(dest_finfo)
-
-    macostools.touched(destname)
-    if progress:
-        progress.label("Done.")
-        progress.inc(0)
-
-def process_common_macho(template, progress, code, rsrcname, destname, is_update,
-        raw=0, others=[], filename=None, destroot=""):
-    # Check that we have a filename
-    if filename is None:
-        raise BuildError("Need source filename on MacOSX")
-    # First make sure the name ends in ".app"
-    if destname[-4:] != '.app':
-        destname = destname + '.app'
-    # Now deduce the short name
-    destdir, shortname = os.path.split(destname)
-    if shortname[-4:] == '.app':
-        # Strip the .app suffix
-        shortname = shortname[:-4]
-    # And deduce the .plist and .icns names
-    plistname = None
-    icnsname = None
-    if rsrcname and rsrcname[-5:] == '.rsrc':
-        tmp = rsrcname[:-5]
-        plistname = tmp + '.plist'
-        if os.path.exists(plistname):
-            icnsname = tmp + '.icns'
-            if not os.path.exists(icnsname):
-                icnsname = None
-        else:
-            plistname = None
-    if not icnsname:
-        dft_icnsname = os.path.join(sys.prefix, 'Resources/Python.app/Contents/Resources/PythonApplet.icns')
-        if os.path.exists(dft_icnsname):
-            icnsname = dft_icnsname
-    if not os.path.exists(rsrcname):
-        rsrcname = None
-    if progress:
-        progress.label('Creating bundle...')
-    import bundlebuilder
-    builder = bundlebuilder.AppBuilder(verbosity=0)
-    builder.mainprogram = filename
-    builder.builddir = destdir
-    builder.name = shortname
-    builder.destroot = destroot
-    if rsrcname:
-        realrsrcname = macresource.resource_pathname(rsrcname)
-        builder.files.append((realrsrcname,
-            os.path.join('Contents/Resources', os.path.basename(rsrcname))))
-    for o in others:
-        if type(o) == str:
-            builder.resources.append(o)
-        else:
-            builder.files.append(o)
-    if plistname:
-        import plistlib
-        builder.plist = plistlib.Plist.fromFile(plistname)
-    if icnsname:
-        builder.iconfile = icnsname
-    if not raw:
-        builder.argv_emulation = 1
-    builder.setup()
-    builder.build()
-    if progress:
-        progress.label('Done.')
-        progress.inc(0)
-
-##  macostools.touched(dest_fss)
-
-# Copy resources between two resource file descriptors.
-# skip a resource named '__main__' or (if skipowner is set) with ID zero.
-# Also skip resources with a type listed in skiptypes.
-#
-def copyres(input, output, skiptypes, skipowner, progress=None):
-    ctor = None
-    alltypes = []
-    Res.UseResFile(input)
-    ntypes = Res.Count1Types()
-    progress_type_inc = 50/ntypes
-    for itype in range(1, 1+ntypes):
-        type = Res.Get1IndType(itype)
-        if type in skiptypes:
-            continue
-        alltypes.append(type)
-        nresources = Res.Count1Resources(type)
-        progress_cur_inc = progress_type_inc/nresources
-        for ires in range(1, 1+nresources):
-            res = Res.Get1IndResource(type, ires)
-            id, type, name = res.GetResInfo()
-            lcname = name.lower()
-
-            if lcname == OWNERNAME and id == 0:
-                if skipowner:
-                    continue # Skip this one
-                else:
-                    ctor = type
-            size = res.size
-            attrs = res.GetResAttrs()
-            if progress:
-                progress.label("Copy %s %d %s"%(type, id, name))
-                progress.inc(progress_cur_inc)
-            res.LoadResource()
-            res.DetachResource()
-            Res.UseResFile(output)
-            try:
-                res2 = Res.Get1Resource(type, id)
-            except MacOS.Error:
-                res2 = None
-            if res2:
-                if progress:
-                    progress.label("Overwrite %s %d %s"%(type, id, name))
-                    progress.inc(0)
-                res2.RemoveResource()
-            res.AddResource(type, id, name)
-            res.WriteResource()
-            attrs = attrs | res.GetResAttrs()
-            res.SetResAttrs(attrs)
-            Res.UseResFile(input)
-    return alltypes, ctor
-
-def copyapptree(srctree, dsttree, exceptlist=[], progress=None):
-    names = []
-    if os.path.exists(dsttree):
-        shutil.rmtree(dsttree)
-    os.mkdir(dsttree)
-    todo = os.listdir(srctree)
-    while todo:
-        this, todo = todo[0], todo[1:]
-        if this in exceptlist:
-            continue
-        thispath = os.path.join(srctree, this)
-        if os.path.isdir(thispath):
-            thiscontent = os.listdir(thispath)
-            for t in thiscontent:
-                todo.append(os.path.join(this, t))
-        names.append(this)
-    for this in names:
-        srcpath = os.path.join(srctree, this)
-        dstpath = os.path.join(dsttree, this)
-        if os.path.isdir(srcpath):
-            os.mkdir(dstpath)
-        elif os.path.islink(srcpath):
-            endpoint = os.readlink(srcpath)
-            os.symlink(endpoint, dstpath)
-        else:
-            if progress:
-                progress.label('Copy '+this)
-                progress.inc(0)
-            shutil.copy2(srcpath, dstpath)
-
-def writepycfile(codeobject, cfile):
-    import marshal
-    fc = open(cfile, 'wb')
-    fc.write('\0\0\0\0') # MAGIC placeholder, written later
-    fc.write('\0\0\0\0') # Timestap placeholder, not needed
-    marshal.dump(codeobject, fc)
-    fc.flush()
-    fc.seek(0, 0)
-    fc.write(MAGIC)
-    fc.close()
diff --git a/Lib/plat-mac/bundlebuilder.py b/Lib/plat-mac/bundlebuilder.py
deleted file mode 100755 (executable)
index bb40653..0000000
+++ /dev/null
@@ -1,939 +0,0 @@
-#! /usr/bin/env python
-
-"""\
-bundlebuilder.py -- Tools to assemble MacOS X (application) bundles.
-
-This module contains two classes to build so called "bundles" for
-MacOS X. BundleBuilder is a general tool, AppBuilder is a subclass
-specialized in building application bundles.
-
-[Bundle|App]Builder objects are instantiated with a bunch of keyword
-arguments, and have a build() method that will do all the work. See
-the class doc strings for a description of the constructor arguments.
-
-The module contains a main program that can be used in two ways:
-
-  % python bundlebuilder.py [options] build
-  % python buildapp.py [options] build
-
-Where "buildapp.py" is a user-supplied setup.py-like script following
-this model:
-
-  from bundlebuilder import buildapp
-  buildapp(<lots-of-keyword-args>)
-
-"""
-
-
-__all__ = ["BundleBuilder", "BundleBuilderError", "AppBuilder", "buildapp"]
-
-
-import sys
-import os, errno, shutil
-import imp, marshal
-import re
-from copy import deepcopy
-import getopt
-from plistlib import Plist
-from types import FunctionType as function
-
-class BundleBuilderError(Exception): pass
-
-
-class Defaults:
-
-    """Class attributes that don't start with an underscore and are
-    not functions or classmethods are (deep)copied to self.__dict__.
-    This allows for mutable default values.
-    """
-
-    def __init__(self, **kwargs):
-        defaults = self._getDefaults()
-        defaults.update(kwargs)
-        self.__dict__.update(defaults)
-
-    def _getDefaults(cls):
-        defaults = {}
-        for base in cls.__bases__:
-            if hasattr(base, "_getDefaults"):
-                defaults.update(base._getDefaults())
-        for name, value in cls.__dict__.items():
-            if name[0] != "_" and not isinstance(value,
-                    (function, classmethod)):
-                defaults[name] = deepcopy(value)
-        return defaults
-    _getDefaults = classmethod(_getDefaults)
-
-
-class BundleBuilder(Defaults):
-
-    """BundleBuilder is a barebones class for assembling bundles. It
-    knows nothing about executables or icons, it only copies files
-    and creates the PkgInfo and Info.plist files.
-    """
-
-    # (Note that Defaults.__init__ (deep)copies these values to
-    # instance variables. Mutable defaults are therefore safe.)
-
-    # Name of the bundle, with or without extension.
-    name = None
-
-    # The property list ("plist")
-    plist = Plist(CFBundleDevelopmentRegion = "English",
-                  CFBundleInfoDictionaryVersion = "6.0")
-
-    # The type of the bundle.
-    type = "BNDL"
-    # The creator code of the bundle.
-    creator = None
-
-    # the CFBundleIdentifier (this is used for the preferences file name)
-    bundle_id = None
-
-    # List of files that have to be copied to <bundle>/Contents/Resources.
-    resources = []
-
-    # List of (src, dest) tuples; dest should be a path relative to the bundle
-    # (eg. "Contents/Resources/MyStuff/SomeFile.ext).
-    files = []
-
-    # List of shared libraries (dylibs, Frameworks) to bundle with the app
-    # will be placed in Contents/Frameworks
-    libs = []
-
-    # Directory where the bundle will be assembled.
-    builddir = "build"
-
-    # Make symlinks instead copying files. This is handy during debugging, but
-    # makes the bundle non-distributable.
-    symlink = 0
-
-    # Verbosity level.
-    verbosity = 1
-
-    # Destination root directory
-    destroot = ""
-
-    def setup(self):
-        # XXX rethink self.name munging, this is brittle.
-        self.name, ext = os.path.splitext(self.name)
-        if not ext:
-            ext = ".bundle"
-        bundleextension = ext
-        # misc (derived) attributes
-        self.bundlepath = pathjoin(self.builddir, self.name + bundleextension)
-
-        plist = self.plist
-        plist.CFBundleName = self.name
-        plist.CFBundlePackageType = self.type
-        if self.creator is None:
-            if hasattr(plist, "CFBundleSignature"):
-                self.creator = plist.CFBundleSignature
-            else:
-                self.creator = "????"
-        plist.CFBundleSignature = self.creator
-        if self.bundle_id:
-            plist.CFBundleIdentifier = self.bundle_id
-        elif not hasattr(plist, "CFBundleIdentifier"):
-            plist.CFBundleIdentifier = self.name
-
-    def build(self):
-        """Build the bundle."""
-        builddir = self.builddir
-        if builddir and not os.path.exists(builddir):
-            os.mkdir(builddir)
-        self.message("Building %s" % repr(self.bundlepath), 1)
-        if os.path.exists(self.bundlepath):
-            shutil.rmtree(self.bundlepath)
-        if os.path.exists(self.bundlepath + '~'):
-            shutil.rmtree(self.bundlepath + '~')
-        bp = self.bundlepath
-
-        # Create the app bundle in a temporary location and then
-        # rename the completed bundle. This way the Finder will
-        # never see an incomplete bundle (where it might pick up
-        # and cache the wrong meta data)
-        self.bundlepath = bp + '~'
-        try:
-            os.mkdir(self.bundlepath)
-            self.preProcess()
-            self._copyFiles()
-            self._addMetaFiles()
-            self.postProcess()
-            os.rename(self.bundlepath, bp)
-        finally:
-            self.bundlepath = bp
-        self.message("Done.", 1)
-
-    def preProcess(self):
-        """Hook for subclasses."""
-        pass
-    def postProcess(self):
-        """Hook for subclasses."""
-        pass
-
-    def _addMetaFiles(self):
-        contents = pathjoin(self.bundlepath, "Contents")
-        makedirs(contents)
-        #
-        # Write Contents/PkgInfo
-        assert len(self.type) == len(self.creator) == 4, \
-                "type and creator must be 4-byte strings."
-        pkginfo = pathjoin(contents, "PkgInfo")
-        f = open(pkginfo, "w")
-        f.write(self.type + self.creator)
-        f.close()
-        #
-        # Write Contents/Info.plist
-        infoplist = pathjoin(contents, "Info.plist")
-        self.plist.write(infoplist)
-
-    def _copyFiles(self):
-        files = self.files[:]
-        for path in self.resources:
-            files.append((path, pathjoin("Contents", "Resources",
-                os.path.basename(path))))
-        for path in self.libs:
-            files.append((path, pathjoin("Contents", "Frameworks",
-                os.path.basename(path))))
-        if self.symlink:
-            self.message("Making symbolic links", 1)
-            msg = "Making symlink from"
-        else:
-            self.message("Copying files", 1)
-            msg = "Copying"
-        files.sort()
-        for src, dst in files:
-            if os.path.isdir(src):
-                self.message("%s %s/ to %s/" % (msg, src, dst), 2)
-            else:
-                self.message("%s %s to %s" % (msg, src, dst), 2)
-            dst = pathjoin(self.bundlepath, dst)
-            if self.symlink:
-                symlink(src, dst, mkdirs=1)
-            else:
-                copy(src, dst, mkdirs=1)
-
-    def message(self, msg, level=0):
-        if level <= self.verbosity:
-            indent = ""
-            if level > 1:
-                indent = (level - 1) * "  "
-            sys.stderr.write(indent + msg + "\n")
-
-    def report(self):
-        # XXX something decent
-        pass
-
-
-if __debug__:
-    PYC_EXT = ".pyc"
-else:
-    PYC_EXT = ".pyo"
-
-MAGIC = imp.get_magic()
-USE_ZIPIMPORT = "zipimport" in sys.builtin_module_names
-
-# For standalone apps, we have our own minimal site.py. We don't need
-# all the cruft of the real site.py.
-SITE_PY = """\
-import sys
-if not %(semi_standalone)s:
-    del sys.path[1:]  # sys.path[0] is Contents/Resources/
-"""
-
-if USE_ZIPIMPORT:
-    ZIP_ARCHIVE = "Modules.zip"
-    SITE_PY += "sys.path.append(sys.path[0] + '/%s')\n" % ZIP_ARCHIVE
-    def getPycData(fullname, code, ispkg):
-        if ispkg:
-            fullname += ".__init__"
-        path = fullname.replace(".", os.sep) + PYC_EXT
-        return path, MAGIC + '\0\0\0\0' + marshal.dumps(code)
-
-#
-# Extension modules can't be in the modules zip archive, so a placeholder
-# is added instead, that loads the extension from a specified location.
-#
-EXT_LOADER = """\
-def __load():
-    import imp, sys, os
-    for p in sys.path:
-        path = os.path.join(p, "%(filename)s")
-        if os.path.exists(path):
-            break
-    else:
-        assert 0, "file not found: %(filename)s"
-    mod = imp.load_dynamic("%(name)s", path)
-
-__load()
-del __load
-"""
-
-MAYMISS_MODULES = ['mac', 'os2', 'nt', 'ntpath', 'dos', 'dospath',
-    'win32api', 'ce', '_winreg', 'nturl2path', 'sitecustomize',
-    'org.python.core'
-]
-
-STRIP_EXEC = "/usr/bin/strip"
-
-#
-# We're using a stock interpreter to run the app, yet we need
-# a way to pass the Python main program to the interpreter. The
-# bootstrapping script fires up the interpreter with the right
-# arguments. os.execve() is used as OSX doesn't like us to
-# start a real new process. Also, the executable name must match
-# the CFBundleExecutable value in the Info.plist, so we lie
-# deliberately with argv[0]. The actual Python executable is
-# passed in an environment variable so we can "repair"
-# sys.executable later.
-#
-BOOTSTRAP_SCRIPT = """\
-#!%(hashbang)s
-
-import sys, os
-execdir = os.path.dirname(sys.argv[0])
-executable = os.path.join(execdir, "%(executable)s")
-resdir = os.path.join(os.path.dirname(execdir), "Resources")
-libdir = os.path.join(os.path.dirname(execdir), "Frameworks")
-mainprogram = os.path.join(resdir, "%(mainprogram)s")
-
-sys.argv.insert(1, mainprogram)
-if %(standalone)s or %(semi_standalone)s:
-    os.environ["PYTHONPATH"] = resdir
-    if %(standalone)s:
-        os.environ["PYTHONHOME"] = resdir
-else:
-    pypath = os.getenv("PYTHONPATH", "")
-    if pypath:
-        pypath = ":" + pypath
-    os.environ["PYTHONPATH"] = resdir + pypath
-os.environ["PYTHONEXECUTABLE"] = executable
-os.environ["DYLD_LIBRARY_PATH"] = libdir
-os.environ["DYLD_FRAMEWORK_PATH"] = libdir
-os.execve(executable, sys.argv, os.environ)
-"""
-
-
-#
-# Optional wrapper that converts "dropped files" into sys.argv values.
-#
-ARGV_EMULATOR = """\
-import argvemulator, os
-
-argvemulator.ArgvCollector().mainloop()
-fp = os.path.join(os.path.split(__file__)[0], "%(realmainprogram)s")
-try:
-    script = fp.read()
-finally:
-    fp.close()
-exec(script)
-"""
-
-#
-# When building a standalone app with Python.framework, we need to copy
-# a subset from Python.framework to the bundle. The following list
-# specifies exactly what items we'll copy.
-#
-PYTHONFRAMEWORKGOODIES = [
-    "Python",  # the Python core library
-    "Resources/English.lproj",
-    "Resources/Info.plist",
-    "Resources/version.plist",
-]
-
-def isFramework():
-    return sys.exec_prefix.find("Python.framework") > 0
-
-
-LIB = os.path.join(sys.prefix, "lib", "python" + sys.version[:3])
-SITE_PACKAGES = os.path.join(LIB, "site-packages")
-
-
-class AppBuilder(BundleBuilder):
-
-    # Override type of the bundle.
-    type = "APPL"
-
-    # platform, name of the subfolder of Contents that contains the executable.
-    platform = "MacOS"
-
-    # A Python main program. If this argument is given, the main
-    # executable in the bundle will be a small wrapper that invokes
-    # the main program. (XXX Discuss why.)
-    mainprogram = None
-
-    # The main executable. If a Python main program is specified
-    # the executable will be copied to Resources and be invoked
-    # by the wrapper program mentioned above. Otherwise it will
-    # simply be used as the main executable.
-    executable = None
-
-    # The name of the main nib, for Cocoa apps. *Must* be specified
-    # when building a Cocoa app.
-    nibname = None
-
-    # The name of the icon file to be copied to Resources and used for
-    # the Finder icon.
-    iconfile = None
-
-    # Symlink the executable instead of copying it.
-    symlink_exec = 0
-
-    # If True, build standalone app.
-    standalone = 0
-
-    # If True, build semi-standalone app (only includes third-party modules).
-    semi_standalone = 0
-
-    # If set, use this for #! lines in stead of sys.executable
-    python = None
-
-    # If True, add a real main program that emulates sys.argv before calling
-    # mainprogram
-    argv_emulation = 0
-
-    # The following attributes are only used when building a standalone app.
-
-    # Exclude these modules.
-    excludeModules = []
-
-    # Include these modules.
-    includeModules = []
-
-    # Include these packages.
-    includePackages = []
-
-    # Strip binaries from debug info.
-    strip = 0
-
-    # Found Python modules: [(name, codeobject, ispkg), ...]
-    pymodules = []
-
-    # Modules that modulefinder couldn't find:
-    missingModules = []
-    maybeMissingModules = []
-
-    def setup(self):
-        if ((self.standalone or self.semi_standalone)
-            and self.mainprogram is None):
-            raise BundleBuilderError("must specify 'mainprogram' when "
-                    "building a standalone application.")
-        if self.mainprogram is None and self.executable is None:
-            raise BundleBuilderError("must specify either or both of "
-                    "'executable' and 'mainprogram'")
-
-        self.execdir = pathjoin("Contents", self.platform)
-
-        if self.name is not None:
-            pass
-        elif self.mainprogram is not None:
-            self.name = os.path.splitext(os.path.basename(self.mainprogram))[0]
-        elif executable is not None:
-            self.name = os.path.splitext(os.path.basename(self.executable))[0]
-        if self.name[-4:] != ".app":
-            self.name += ".app"
-
-        if self.executable is None:
-            if not self.standalone and not isFramework():
-                self.symlink_exec = 1
-            if self.python:
-                self.executable = self.python
-            else:
-                self.executable = sys.executable
-
-        if self.nibname:
-            self.plist.NSMainNibFile = self.nibname
-            if not hasattr(self.plist, "NSPrincipalClass"):
-                self.plist.NSPrincipalClass = "NSApplication"
-
-        if self.standalone and isFramework():
-            self.addPythonFramework()
-
-        BundleBuilder.setup(self)
-
-        self.plist.CFBundleExecutable = self.name
-
-        if self.standalone or self.semi_standalone:
-            self.findDependencies()
-
-    def preProcess(self):
-        resdir = "Contents/Resources"
-        if self.executable is not None:
-            if self.mainprogram is None:
-                execname = self.name
-            else:
-                execname = os.path.basename(self.executable)
-            execpath = pathjoin(self.execdir, execname)
-            if not self.symlink_exec:
-                self.files.append((self.destroot + self.executable, execpath))
-            self.execpath = execpath
-
-        if self.mainprogram is not None:
-            mainprogram = os.path.basename(self.mainprogram)
-            self.files.append((self.mainprogram, pathjoin(resdir, mainprogram)))
-            if self.argv_emulation:
-                # Change the main program, and create the helper main program (which
-                # does argv collection and then calls the real main).
-                # Also update the included modules (if we're creating a standalone
-                # program) and the plist
-                realmainprogram = mainprogram
-                mainprogram = '__argvemulator_' + mainprogram
-                resdirpath = pathjoin(self.bundlepath, resdir)
-                mainprogrampath = pathjoin(resdirpath, mainprogram)
-                makedirs(resdirpath)
-                open(mainprogrampath, "w").write(ARGV_EMULATOR % locals())
-                if self.standalone or self.semi_standalone:
-                    self.includeModules.append("argvemulator")
-                    self.includeModules.append("os")
-                if "CFBundleDocumentTypes" not in self.plist:
-                    self.plist["CFBundleDocumentTypes"] = [
-                        { "CFBundleTypeOSTypes" : [
-                            "****",
-                            "fold",
-                            "disk"],
-                          "CFBundleTypeRole": "Viewer"}]
-            # Write bootstrap script
-            executable = os.path.basename(self.executable)
-            execdir = pathjoin(self.bundlepath, self.execdir)
-            bootstrappath = pathjoin(execdir, self.name)
-            makedirs(execdir)
-            if self.standalone or self.semi_standalone:
-                # XXX we're screwed when the end user has deleted
-                # /usr/bin/python
-                hashbang = "/usr/bin/python"
-            elif self.python:
-                hashbang = self.python
-            else:
-                hashbang = os.path.realpath(sys.executable)
-            standalone = self.standalone
-            semi_standalone = self.semi_standalone
-            open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals())
-            os.chmod(bootstrappath, 0o775)
-
-        if self.iconfile is not None:
-            iconbase = os.path.basename(self.iconfile)
-            self.plist.CFBundleIconFile = iconbase
-            self.files.append((self.iconfile, pathjoin(resdir, iconbase)))
-
-    def postProcess(self):
-        if self.standalone or self.semi_standalone:
-            self.addPythonModules()
-        if self.strip and not self.symlink:
-            self.stripBinaries()
-
-        if self.symlink_exec and self.executable:
-            self.message("Symlinking executable %s to %s" % (self.executable,
-                    self.execpath), 2)
-            dst = pathjoin(self.bundlepath, self.execpath)
-            makedirs(os.path.dirname(dst))
-            os.symlink(os.path.abspath(self.executable), dst)
-
-        if self.missingModules or self.maybeMissingModules:
-            self.reportMissing()
-
-    def addPythonFramework(self):
-        # If we're building a standalone app with Python.framework,
-        # include a minimal subset of Python.framework, *unless*
-        # Python.framework was specified manually in self.libs.
-        for lib in self.libs:
-            if os.path.basename(lib) == "Python.framework":
-                # a Python.framework was specified as a library
-                return
-
-        frameworkpath = sys.exec_prefix[:sys.exec_prefix.find(
-            "Python.framework") + len("Python.framework")]
-
-        version = sys.version[:3]
-        frameworkpath = pathjoin(frameworkpath, "Versions", version)
-        destbase = pathjoin("Contents", "Frameworks", "Python.framework",
-                            "Versions", version)
-        for item in PYTHONFRAMEWORKGOODIES:
-            src = pathjoin(frameworkpath, item)
-            dst = pathjoin(destbase, item)
-            self.files.append((src, dst))
-
-    def _getSiteCode(self):
-        return compile(SITE_PY % {"semi_standalone": self.semi_standalone},
-                     "<-bundlebuilder.py->", "exec")
-
-    def addPythonModules(self):
-        self.message("Adding Python modules", 1)
-
-        if USE_ZIPIMPORT:
-            # Create a zip file containing all modules as pyc.
-            import zipfile
-            relpath = pathjoin("Contents", "Resources", ZIP_ARCHIVE)
-            abspath = pathjoin(self.bundlepath, relpath)
-            zf = zipfile.ZipFile(abspath, "w", zipfile.ZIP_DEFLATED)
-            for name, code, ispkg in self.pymodules:
-                self.message("Adding Python module %s" % name, 2)
-                path, pyc = getPycData(name, code, ispkg)
-                zf.writestr(path, pyc)
-            zf.close()
-            # add site.pyc
-            sitepath = pathjoin(self.bundlepath, "Contents", "Resources",
-                    "site" + PYC_EXT)
-            writePyc(self._getSiteCode(), sitepath)
-        else:
-            # Create individual .pyc files.
-            for name, code, ispkg in self.pymodules:
-                if ispkg:
-                    name += ".__init__"
-                path = name.split(".")
-                path = pathjoin("Contents", "Resources", *path) + PYC_EXT
-
-                if ispkg:
-                    self.message("Adding Python package %s" % path, 2)
-                else:
-                    self.message("Adding Python module %s" % path, 2)
-
-                abspath = pathjoin(self.bundlepath, path)
-                makedirs(os.path.dirname(abspath))
-                writePyc(code, abspath)
-
-    def stripBinaries(self):
-        if not os.path.exists(STRIP_EXEC):
-            self.message("Error: can't strip binaries: no strip program at "
-                "%s" % STRIP_EXEC, 0)
-        else:
-            import stat
-            self.message("Stripping binaries", 1)
-            def walk(top):
-                for name in os.listdir(top):
-                    path = pathjoin(top, name)
-                    if os.path.islink(path):
-                        continue
-                    if os.path.isdir(path):
-                        walk(path)
-                    else:
-                        mod = os.stat(path)[stat.ST_MODE]
-                        if not (mod & 0o100):
-                            continue
-                        relpath = path[len(self.bundlepath):]
-                        self.message("Stripping %s" % relpath, 2)
-                        inf, outf = os.popen4("%s -S \"%s\"" %
-                                              (STRIP_EXEC, path))
-                        output = outf.read().strip()
-                        if output:
-                            # usually not a real problem, like when we're
-                            # trying to strip a script
-                            self.message("Problem stripping %s:" % relpath, 3)
-                            self.message(output, 3)
-            walk(self.bundlepath)
-
-    def findDependencies(self):
-        self.message("Finding module dependencies", 1)
-        import modulefinder
-        mf = modulefinder.ModuleFinder(excludes=self.excludeModules)
-        if USE_ZIPIMPORT:
-            # zipimport imports zlib, must add it manually
-            mf.import_hook("zlib")
-        # manually add our own site.py
-        site = mf.add_module("site")
-        site.__code__ = self._getSiteCode()
-        mf.scan_code(site.__code__, site)
-
-        # warnings.py gets imported implicitly from C
-        mf.import_hook("warnings")
-
-        includeModules = self.includeModules[:]
-        for name in self.includePackages:
-            includeModules.extend(findPackageContents(name).keys())
-        for name in includeModules:
-            try:
-                mf.import_hook(name)
-            except ImportError:
-                self.missingModules.append(name)
-
-        mf.run_script(self.mainprogram)
-        modules = mf.modules.items()
-        modules.sort()
-        for name, mod in modules:
-            path = mod.__file__
-            if path and self.semi_standalone:
-                # skip the standard library
-                if path.startswith(LIB) and not path.startswith(SITE_PACKAGES):
-                    continue
-            if path and mod.__code__ is None:
-                # C extension
-                filename = os.path.basename(path)
-                pathitems = name.split(".")[:-1] + [filename]
-                dstpath = pathjoin(*pathitems)
-                if USE_ZIPIMPORT:
-                    if name != "zlib":
-                        # neatly pack all extension modules in a subdirectory,
-                        # except zlib, since it's neccesary for bootstrapping.
-                        dstpath = pathjoin("ExtensionModules", dstpath)
-                    # Python modules are stored in a Zip archive, but put
-                    # extensions in Contents/Resources/. Add a tiny "loader"
-                    # program in the Zip archive. Due to Thomas Heller.
-                    source = EXT_LOADER % {"name": name, "filename": dstpath}
-                    code = compile(source, "<dynloader for %s>" % name, "exec")
-                    mod.__code__ = code
-                self.files.append((path, pathjoin("Contents", "Resources", dstpath)))
-            if mod.__code__ is not None:
-                ispkg = mod.__path__ is not None
-                if not USE_ZIPIMPORT or name != "site":
-                    # Our site.py is doing the bootstrapping, so we must
-                    # include a real .pyc file if USE_ZIPIMPORT is True.
-                    self.pymodules.append((name, mod.__code__, ispkg))
-
-        if hasattr(mf, "any_missing_maybe"):
-            missing, maybe = mf.any_missing_maybe()
-        else:
-            missing = mf.any_missing()
-            maybe = []
-        self.missingModules.extend(missing)
-        self.maybeMissingModules.extend(maybe)
-
-    def reportMissing(self):
-        missing = [name for name in self.missingModules
-                if name not in MAYMISS_MODULES]
-        if self.maybeMissingModules:
-            maybe = self.maybeMissingModules
-        else:
-            maybe = [name for name in missing if "." in name]
-            missing = [name for name in missing if "." not in name]
-        missing.sort()
-        maybe.sort()
-        if maybe:
-            self.message("Warning: couldn't find the following submodules:", 1)
-            self.message("    (Note that these could be false alarms -- "
-                         "it's not always", 1)
-            self.message("    possible to distinguish between \"from package "
-                         "import submodule\" ", 1)
-            self.message("    and \"from package import name\")", 1)
-            for name in maybe:
-                self.message("  ? " + name, 1)
-        if missing:
-            self.message("Warning: couldn't find the following modules:", 1)
-            for name in missing:
-                self.message("  ? " + name, 1)
-
-    def report(self):
-        # XXX something decent
-        import pprint
-        pprint.pprint(self.__dict__)
-        if self.standalone or self.semi_standalone:
-            self.reportMissing()
-
-#
-# Utilities.
-#
-
-SUFFIXES = [_suf for _suf, _mode, _tp in imp.get_suffixes()]
-identifierRE = re.compile(r"[_a-zA-z][_a-zA-Z0-9]*$")
-
-def findPackageContents(name, searchpath=None):
-    head = name.split(".")[-1]
-    if identifierRE.match(head) is None:
-        return {}
-    try:
-        fp, path, (ext, mode, tp) = imp.find_module(head, searchpath)
-    except ImportError:
-        return {}
-    modules = {name: None}
-    if tp == imp.PKG_DIRECTORY and path:
-        files = os.listdir(path)
-        for sub in files:
-            sub, ext = os.path.splitext(sub)
-            fullname = name + "." + sub
-            if sub != "__init__" and fullname not in modules:
-                modules.update(findPackageContents(fullname, [path]))
-    return modules
-
-def writePyc(code, path):
-    f = open(path, "wb")
-    f.write(MAGIC)
-    f.write("\0" * 4)  # don't bother about a time stamp
-    marshal.dump(code, f)
-    f.close()
-
-def copy(src, dst, mkdirs=0):
-    """Copy a file or a directory."""
-    if mkdirs:
-        makedirs(os.path.dirname(dst))
-    if os.path.isdir(src):
-        shutil.copytree(src, dst, symlinks=1)
-    else:
-        shutil.copy2(src, dst)
-
-def copytodir(src, dstdir):
-    """Copy a file or a directory to an existing directory."""
-    dst = pathjoin(dstdir, os.path.basename(src))
-    copy(src, dst)
-
-def makedirs(dir):
-    """Make all directories leading up to 'dir' including the leaf
-    directory. Don't moan if any path element already exists."""
-    try:
-        os.makedirs(dir)
-    except OSError as why:
-        if why.errno != errno.EEXIST:
-            raise
-
-def symlink(src, dst, mkdirs=0):
-    """Copy a file or a directory."""
-    if not os.path.exists(src):
-        raise IOError("No such file or directory: '%s'" % src)
-    if mkdirs:
-        makedirs(os.path.dirname(dst))
-    os.symlink(os.path.abspath(src), dst)
-
-def pathjoin(*args):
-    """Safe wrapper for os.path.join: asserts that all but the first
-    argument are relative paths."""
-    for seg in args[1:]:
-        assert seg[0] != "/"
-    return os.path.join(*args)
-
-
-cmdline_doc = """\
-Usage:
-  python bundlebuilder.py [options] command
-  python mybuildscript.py [options] command
-
-Commands:
-  build      build the application
-  report     print a report
-
-Options:
-  -b, --builddir=DIR     the build directory; defaults to "build"
-  -n, --name=NAME        application name
-  -r, --resource=FILE    extra file or folder to be copied to Resources
-  -f, --file=SRC:DST     extra file or folder to be copied into the bundle;
-                         DST must be a path relative to the bundle root
-  -e, --executable=FILE  the executable to be used
-  -m, --mainprogram=FILE the Python main program
-  -a, --argv             add a wrapper main program to create sys.argv
-  -p, --plist=FILE       .plist file (default: generate one)
-      --nib=NAME         main nib name
-  -c, --creator=CCCC     4-char creator code (default: '????')
-      --iconfile=FILE    filename of the icon (an .icns file) to be used
-                         as the Finder icon
-      --bundle-id=ID     the CFBundleIdentifier, in reverse-dns format
-                         (eg. org.python.BuildApplet; this is used for
-                         the preferences file name)
-  -l, --link             symlink files/folder instead of copying them
-      --link-exec        symlink the executable instead of copying it
-      --standalone       build a standalone application, which is fully
-                         independent of a Python installation
-      --semi-standalone  build a standalone application, which depends on
-                         an installed Python, yet includes all third-party
-                         modules.
-      --python=FILE      Python to use in #! line in stead of current Python
-      --lib=FILE         shared library or framework to be copied into
-                         the bundle
-  -x, --exclude=MODULE   exclude module (with --(semi-)standalone)
-  -i, --include=MODULE   include module (with --(semi-)standalone)
-      --package=PACKAGE  include a whole package (with --(semi-)standalone)
-      --strip            strip binaries (remove debug info)
-  -v, --verbose          increase verbosity level
-  -q, --quiet            decrease verbosity level
-  -h, --help             print this message
-"""
-
-def usage(msg=None):
-    if msg:
-        print(msg)
-    print(cmdline_doc)
-    sys.exit(1)
-
-def main(builder=None):
-    if builder is None:
-        builder = AppBuilder(verbosity=1)
-
-    shortopts = "b:n:r:f:e:m:c:p:lx:i:hvqa"
-    longopts = ("builddir=", "name=", "resource=", "file=", "executable=",
-        "mainprogram=", "creator=", "nib=", "plist=", "link",
-        "link-exec", "help", "verbose", "quiet", "argv", "standalone",
-        "exclude=", "include=", "package=", "strip", "iconfile=",
-        "lib=", "python=", "semi-standalone", "bundle-id=", "destroot=")
-
-    try:
-        options, args = getopt.getopt(sys.argv[1:], shortopts, longopts)
-    except getopt.error:
-        usage()
-
-    for opt, arg in options:
-        if opt in ('-b', '--builddir'):
-            builder.builddir = arg
-        elif opt in ('-n', '--name'):
-            builder.name = arg
-        elif opt in ('-r', '--resource'):
-            builder.resources.append(os.path.normpath(arg))
-        elif opt in ('-f', '--file'):
-            srcdst = arg.split(':')
-            if len(srcdst) != 2:
-                usage("-f or --file argument must be two paths, "
-                      "separated by a colon")
-            builder.files.append(srcdst)
-        elif opt in ('-e', '--executable'):
-            builder.executable = arg
-        elif opt in ('-m', '--mainprogram'):
-            builder.mainprogram = arg
-        elif opt in ('-a', '--argv'):
-            builder.argv_emulation = 1
-        elif opt in ('-c', '--creator'):
-            builder.creator = arg
-        elif opt == '--bundle-id':
-            builder.bundle_id = arg
-        elif opt == '--iconfile':
-            builder.iconfile = arg
-        elif opt == "--lib":
-            builder.libs.append(os.path.normpath(arg))
-        elif opt == "--nib":
-            builder.nibname = arg
-        elif opt in ('-p', '--plist'):
-            builder.plist = Plist.fromFile(arg)
-        elif opt in ('-l', '--link'):
-            builder.symlink = 1
-        elif opt == '--link-exec':
-            builder.symlink_exec = 1
-        elif opt in ('-h', '--help'):
-            usage()
-        elif opt in ('-v', '--verbose'):
-            builder.verbosity += 1
-        elif opt in ('-q', '--quiet'):
-            builder.verbosity -= 1
-        elif opt == '--standalone':
-            builder.standalone = 1
-        elif opt == '--semi-standalone':
-            builder.semi_standalone = 1
-        elif opt == '--python':
-            builder.python = arg
-        elif opt in ('-x', '--exclude'):
-            builder.excludeModules.append(arg)
-        elif opt in ('-i', '--include'):
-            builder.includeModules.append(arg)
-        elif opt == '--package':
-            builder.includePackages.append(arg)
-        elif opt == '--strip':
-            builder.strip = 1
-        elif opt == '--destroot':
-            builder.destroot = arg
-
-    if len(args) != 1:
-        usage("Must specify one command ('build', 'report' or 'help')")
-    command = args[0]
-
-    if command == "build":
-        builder.setup()
-        builder.build()
-    elif command == "report":
-        builder.setup()
-        builder.report()
-    elif command == "help":
-        usage()
-    else:
-        usage("Unknown command '%s'" % command)
-
-
-def buildapp(**kwargs):
-    builder = AppBuilder(**kwargs)
-    main(builder)
-
-
-if __name__ == "__main__":
-    main()
diff --git a/Lib/plat-mac/dialogs.rsrc b/Lib/plat-mac/dialogs.rsrc
deleted file mode 100644 (file)
index 0107493..0000000
Binary files a/Lib/plat-mac/dialogs.rsrc and /dev/null differ
diff --git a/Lib/plat-mac/errors.rsrc b/Lib/plat-mac/errors.rsrc
deleted file mode 100644 (file)
index 61c487e..0000000
Binary files a/Lib/plat-mac/errors.rsrc and /dev/null differ
diff --git a/Lib/plat-mac/findertools.py b/Lib/plat-mac/findertools.py
deleted file mode 100644 (file)
index 9bb35e6..0000000
+++ /dev/null
@@ -1,833 +0,0 @@
-"""Utility routines depending on the finder,
-a combination of code by Jack Jansen and erik@letterror.com.
-
-Most events have been captured from
-Lasso Capture AE and than translated to python code.
-
-IMPORTANT
-Note that the processes() function returns different values
-depending on the OS version it is running on. On MacOS 9
-the Finder returns the process *names* which can then be
-used to find out more about them. On MacOS 8.6 and earlier
-the Finder returns a code which does not seem to work.
-So bottom line: the processes() stuff does not work on < MacOS9
-
-Mostly written by erik@letterror.com
-"""
-import Finder
-from Carbon import AppleEvents
-import aetools
-import MacOS
-import sys
-import Carbon.File
-import Carbon.Folder
-import aetypes
-
-__version__ = '1.1'
-Error = 'findertools.Error'
-
-_finder_talker = None
-
-def _getfinder():
-    """returns basic (recyclable) Finder AE interface object"""
-    global _finder_talker
-    if not _finder_talker:
-        _finder_talker = Finder.Finder()
-    _finder_talker.send_flags = ( _finder_talker.send_flags |
-        AppleEvents.kAECanInteract | AppleEvents.kAECanSwitchLayer)
-    return _finder_talker
-
-def launch(file):
-    """Open a file thru the finder. Specify file by name or fsspec"""
-    finder = _getfinder()
-    fss = Carbon.File.FSSpec(file)
-    return finder.open(fss)
-
-def Print(file):
-    """Print a file thru the finder. Specify file by name or fsspec"""
-    finder = _getfinder()
-    fss = Carbon.File.FSSpec(file)
-    return finder._print(fss)
-
-def copy(src, dstdir):
-    """Copy a file to a folder"""
-    finder = _getfinder()
-    if type(src) == type([]):
-        src_fss = []
-        for s in src:
-            src_fss.append(Carbon.File.FSSpec(s))
-    else:
-        src_fss = Carbon.File.FSSpec(src)
-    dst_fss = Carbon.File.FSSpec(dstdir)
-    return finder.duplicate(src_fss, to=dst_fss)
-
-def move(src, dstdir):
-    """Move a file to a folder"""
-    finder = _getfinder()
-    if type(src) == type([]):
-        src_fss = []
-        for s in src:
-            src_fss.append(Carbon.File.FSSpec(s))
-    else:
-        src_fss = Carbon.File.FSSpec(src)
-    dst_fss = Carbon.File.FSSpec(dstdir)
-    return finder.move(src_fss, to=dst_fss)
-
-def sleep():
-    """Put the mac to sleep"""
-    finder = _getfinder()
-    finder.sleep()
-
-def shutdown():
-    """Shut the mac down"""
-    finder = _getfinder()
-    finder.shut_down()
-
-def restart():
-    """Restart the mac"""
-    finder = _getfinder()
-    finder.restart()
-
-
-#---------------------------------------------------
-#   Additional findertools
-#
-
-def reveal(file):
-    """Reveal a file in the finder. Specify file by name, fsref or fsspec."""
-    finder = _getfinder()
-    fsr = Carbon.File.FSRef(file)
-    file_alias = fsr.FSNewAliasMinimal()
-    return finder.reveal(file_alias)
-
-def select(file):
-    """select a file in the finder. Specify file by name, fsref or fsspec."""
-    finder = _getfinder()
-    fsr = Carbon.File.FSRef(file)
-    file_alias = fsr.FSNewAliasMinimal()
-    return finder.select(file_alias)
-
-def update(file):
-    """Update the display of the specified object(s) to match
-    their on-disk representation. Specify file by name, fsref or fsspec."""
-    finder = _getfinder()
-    fsr = Carbon.File.FSRef(file)
-    file_alias = fsr.FSNewAliasMinimal()
-    return finder.update(file_alias)
-
-
-#---------------------------------------------------
-#   More findertools
-#
-
-def comment(object, comment=None):
-    """comment: get or set the Finder-comment of the item, displayed in the 'Get Info' window."""
-    object = Carbon.File.FSRef(object)
-    object_alias = object.FSNewAliasMonimal()
-    if comment is None:
-        return _getcomment(object_alias)
-    else:
-        return _setcomment(object_alias, comment)
-
-def _setcomment(object_alias, comment):
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('cobj'), form="alis", seld=object_alias, fr=None)
-    aeobj_01 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('comt'), fr=aeobj_00)
-    args['----'] = aeobj_01
-    args["data"] = comment
-    _reply, args, attrs = finder.send("core", "setd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def _getcomment(object_alias):
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('cobj'), form="alis", seld=object_alias, fr=None)
-    aeobj_01 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('comt'), fr=aeobj_00)
-    args['----'] = aeobj_01
-    _reply, args, attrs = finder.send("core", "getd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-
-#---------------------------------------------------
-#   Get information about current processes in the Finder.
-
-def processes():
-    """processes returns a list of all active processes running on this computer and their creators."""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    processnames = []
-    processnumbers = []
-    creators = []
-    partitions = []
-    used = []
-    ## get the processnames or else the processnumbers
-    args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prcs'), form="indx", seld=aetypes.Unknown('abso', "all "), fr=None)
-    _reply, args, attrs = finder.send('core', 'getd', args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    p = []
-    if '----' in args:
-        p =  args['----']
-        for proc in p:
-            if hasattr(proc, 'seld'):
-                # it has a real name
-                processnames.append(proc.seld)
-            elif hasattr(proc, 'type'):
-                if proc.type == "psn ":
-                    # it has a process number
-                    processnumbers.append(proc.data)
-    ## get the creators
-    args = {}
-    attrs = {}
-    aeobj_0 = aetypes.ObjectSpecifier(want=aetypes.Type('prcs'), form="indx", seld=aetypes.Unknown('abso', "all "), fr=None)
-    args['----'] =  aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('fcrt'), fr=aeobj_0)
-    _reply, args, attrs = finder.send('core', 'getd', args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(_arg))
-    if '----' in args:
-        p =  args['----']
-        creators = p[:]
-    ## concatenate in one dict
-    result = []
-    if len(processnames) > len(processnumbers):
-        data = processnames
-    else:
-        data = processnumbers
-    for i in range(len(creators)):
-        result.append((data[i], creators[i]))
-    return result
-
-class _process:
-    pass
-
-def isactiveprocess(processname):
-    """Check of processname is active. MacOS9"""
-    all = processes()
-    ok = 0
-    for n, c in all:
-        if n == processname:
-            return 1
-    return 0
-
-def processinfo(processname):
-    """Return an object with all process properties as attributes for processname. MacOS9"""
-    p = _process()
-
-    if processname == "Finder":
-        p.partition = None
-        p.used = None
-    else:
-        p.partition = _processproperty(processname, 'appt')
-        p.used = _processproperty(processname, 'pusd')
-    p.visible = _processproperty(processname, 'pvis')       #Is the process' layer visible?
-    p.frontmost = _processproperty(processname, 'pisf') #Is the process the frontmost process?
-    p.file = _processproperty(processname, 'file')          #the file from which the process was launched
-    p.filetype  = _processproperty(processname, 'asty')     #the OSType of the file type of the process
-    p.creatortype = _processproperty(processname, 'fcrt')   #the OSType of the creator of the process (the signature)
-    p.accepthighlevel = _processproperty(processname, 'revt')   #Is the process high-level event aware (accepts open application, open document, print document, and quit)?
-    p.hasscripting = _processproperty(processname, 'hscr')      #Does the process have a scripting terminology, i.e., can it be scripted?
-    return p
-
-def _processproperty(processname, property):
-    """return the partition size and memory used for processname"""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('prcs'), form="name", seld=processname, fr=None)
-    aeobj_01 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type(property), fr=aeobj_00)
-    args['----'] = aeobj_01
-    _reply, args, attrs = finder.send("core", "getd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-
-#---------------------------------------------------
-#   Mess around with Finder windows.
-
-def openwindow(object):
-    """Open a Finder window for object, Specify object by name or fsspec."""
-    finder = _getfinder()
-    object = Carbon.File.FSRef(object)
-    object_alias = object.FSNewAliasMinimal()
-    args = {}
-    attrs = {}
-    _code = 'aevt'
-    _subcode = 'odoc'
-    aeobj_0 = aetypes.ObjectSpecifier(want=aetypes.Type('cfol'), form="alis", seld=object_alias, fr=None)
-    args['----'] = aeobj_0
-    _reply, args, attrs = finder.send(_code, _subcode, args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-
-def closewindow(object):
-    """Close a Finder window for folder, Specify by path."""
-    finder = _getfinder()
-    object = Carbon.File.FSRef(object)
-    object_alias = object.FSNewAliasMinimal()
-    args = {}
-    attrs = {}
-    _code = 'core'
-    _subcode = 'clos'
-    aeobj_0 = aetypes.ObjectSpecifier(want=aetypes.Type('cfol'), form="alis", seld=object_alias, fr=None)
-    args['----'] = aeobj_0
-    _reply, args, attrs = finder.send(_code, _subcode, args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-
-def location(object, pos=None):
-    """Set the position of a Finder window for folder to pos=(w, h). Specify file by name or fsspec.
-    If pos=None, location will return the current position of the object."""
-    object = Carbon.File.FSRef(object)
-    object_alias = object.FSNewAliasMinimal()
-    if not pos:
-        return _getlocation(object_alias)
-    return _setlocation(object_alias, pos)
-
-def _setlocation(object_alias, location):
-    """_setlocation: Set the location of the icon for the object."""
-    x, y = location
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('cfol'), form="alis", seld=object_alias, fr=None)
-    aeobj_01 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('posn'), fr=aeobj_00)
-    args['----'] = aeobj_01
-    args["data"] = [x, y]
-    _reply, args, attrs = finder.send("core", "setd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    return (x,y)
-
-def _getlocation(object_alias):
-    """_getlocation: get the location of the icon for the object."""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('cfol'), form="alis", seld=object_alias, fr=None)
-    aeobj_01 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('posn'), fr=aeobj_00)
-    args['----'] = aeobj_01
-    _reply, args, attrs = finder.send("core", "getd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        pos = args['----']
-        return pos.h, pos.v
-
-def label(object, index=None):
-    """label: set or get the label of the item. Specify file by name or fsspec."""
-    object = Carbon.File.FSRef(object)
-    object_alias = object.FSNewAliasMinimal()
-    if index is None:
-        return _getlabel(object_alias)
-    if index < 0 or index > 7:
-        index = 0
-    return _setlabel(object_alias, index)
-
-def _getlabel(object_alias):
-    """label: Get the label for the object."""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('cobj'), form="alis", seld=object_alias, fr=None)
-    aeobj_01 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('labi'), fr=aeobj_00)
-    args['----'] = aeobj_01
-    _reply, args, attrs = finder.send("core", "getd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def _setlabel(object_alias, index):
-    """label: Set the label for the object."""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    _code = 'core'
-    _subcode = 'setd'
-    aeobj_0 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="alis", seld=object_alias, fr=None)
-    aeobj_1 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('labi'), fr=aeobj_0)
-    args['----'] = aeobj_1
-    args["data"] = index
-    _reply, args, attrs = finder.send(_code, _subcode, args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    return index
-
-def windowview(folder, view=None):
-    """windowview: Set the view of the window for the folder. Specify file by name or fsspec.
-    0 = by icon (default)
-    1 = by name
-    2 = by button
-    """
-    fsr = Carbon.File.FSRef(folder)
-    folder_alias = fsr.FSNewAliasMinimal()
-    if view is None:
-        return _getwindowview(folder_alias)
-    return _setwindowview(folder_alias, view)
-
-def _setwindowview(folder_alias, view=0):
-    """set the windowview"""
-    attrs = {}
-    args = {}
-    if view == 1:
-        _v = aetypes.Type('pnam')
-    elif view == 2:
-        _v = aetypes.Type('lgbu')
-    else:
-        _v = aetypes.Type('iimg')
-    finder = _getfinder()
-    aeobj_0 = aetypes.ObjectSpecifier(want = aetypes.Type('cfol'),
-            form = 'alis', seld = folder_alias, fr=None)
-    aeobj_1 = aetypes.ObjectSpecifier(want = aetypes.Type('prop'),
-            form = 'prop', seld = aetypes.Type('cwnd'), fr=aeobj_0)
-    aeobj_2 = aetypes.ObjectSpecifier(want = aetypes.Type('prop'),
-            form = 'prop', seld = aetypes.Type('pvew'), fr=aeobj_1)
-    aeobj_3 = aetypes.ObjectSpecifier(want = aetypes.Type('prop'),
-            form = 'prop', seld = _v, fr=None)
-    _code = 'core'
-    _subcode = 'setd'
-    args['----'] = aeobj_2
-    args['data'] = aeobj_3
-    _reply, args, attrs = finder.send(_code, _subcode, args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def _getwindowview(folder_alias):
-    """get the windowview"""
-    attrs = {}
-    args = {}
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('cfol'), form="alis", seld=folder_alias, fr=None)
-    aeobj_01 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('cwnd'), fr=aeobj_00)
-    aeobj_02 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('pvew'), fr=aeobj_01)
-    args['----'] = aeobj_02
-    _reply, args, attrs = finder.send("core", "getd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    views = {'iimg':0, 'pnam':1, 'lgbu':2}
-    if '----' in args:
-        return views[args['----'].enum]
-
-def windowsize(folder, size=None):
-    """Set the size of a Finder window for folder to size=(w, h), Specify by path.
-    If size=None, windowsize will return the current size of the window.
-    Specify file by name or fsspec.
-    """
-    fsr = Carbon.File.FSRef(folder)
-    folder_alias = fsr.FSNewAliasMinimal()
-    openwindow(fsr)
-    if not size:
-        return _getwindowsize(folder_alias)
-    return _setwindowsize(folder_alias, size)
-
-def _setwindowsize(folder_alias, size):
-    """Set the size of a Finder window for folder to (w, h)"""
-    w, h = size
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    _code = 'core'
-    _subcode = 'setd'
-    aevar00 = [w, h]
-    aeobj_0 = aetypes.ObjectSpecifier(want=aetypes.Type('cfol'),
-            form="alis", seld=folder_alias, fr=None)
-    aeobj_1 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('cwnd'), fr=aeobj_0)
-    aeobj_2 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('ptsz'), fr=aeobj_1)
-    args['----'] = aeobj_2
-    args["data"] = aevar00
-    _reply, args, attrs = finder.send(_code, _subcode, args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    return (w, h)
-
-def _getwindowsize(folder_alias):
-    """Set the size of a Finder window for folder to (w, h)"""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_0 = aetypes.ObjectSpecifier(want=aetypes.Type('cfol'),
-            form="alis", seld=folder_alias, fr=None)
-    aeobj_1 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('cwnd'), fr=aeobj_0)
-    aeobj_2 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('posn'), fr=aeobj_1)
-    args['----'] = aeobj_2
-    _reply, args, attrs = finder.send('core', 'getd', args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def windowposition(folder, pos=None):
-    """Set the position of a Finder window for folder to pos=(w, h)."""
-    fsr = Carbon.File.FSRef(folder)
-    folder_alias = fsr.FSNewAliasMinimal()
-    openwindow(fsr)
-    if not pos:
-        return _getwindowposition(folder_alias)
-    if aetypes.IsQDPoint(pos):
-        # QDPoint object as returned by _getwindowposition
-        pos = (pos.h, pos.v)
-    return _setwindowposition(folder_alias, pos)
-
-def _setwindowposition(folder_alias, position):
-    """Set the size of a Finder window for folder to (w, h)."""
-    x, y = position
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_0 = aetypes.ObjectSpecifier(want=aetypes.Type('cfol'),
-            form="alis", seld=folder_alias, fr=None)
-    aeobj_1 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('cwnd'), fr=aeobj_0)
-    aeobj_2 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('posn'), fr=aeobj_1)
-    args['----'] = aeobj_2
-    args["data"] = [x, y]
-    _reply, args, attrs = finder.send('core', 'setd', args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def _getwindowposition(folder_alias):
-    """Get the size of a Finder window for folder, Specify by path."""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_0 = aetypes.ObjectSpecifier(want=aetypes.Type('cfol'),
-            form="alis", seld=folder_alias, fr=None)
-    aeobj_1 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('cwnd'), fr=aeobj_0)
-    aeobj_2 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('ptsz'), fr=aeobj_1)
-    args['----'] = aeobj_2
-    _reply, args, attrs = finder.send('core', 'getd', args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def icon(object, icondata=None):
-    """icon sets the icon of object, if no icondata is given,
-    icon will return an AE object with binary data for the current icon.
-    If left untouched, this data can be used to paste the icon on another file.
-    Development opportunity: get and set the data as PICT."""
-    fsr = Carbon.File.FSRef(object)
-    object_alias = fsr.FSNewAliasMinimal()
-    if icondata is None:
-        return _geticon(object_alias)
-    return _seticon(object_alias, icondata)
-
-def _geticon(object_alias):
-    """get the icondata for object. Binary data of some sort."""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('cobj'),
-            form="alis", seld=object_alias, fr=None)
-    aeobj_01 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('iimg'), fr=aeobj_00)
-    args['----'] = aeobj_01
-    _reply, args, attrs = finder.send("core", "getd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def _seticon(object_alias, icondata):
-    """set the icondata for object, formatted as produced by _geticon()"""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('cobj'),
-            form="alis", seld=object_alias, fr=None)
-    aeobj_01 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'),
-            form="prop", seld=aetypes.Type('iimg'), fr=aeobj_00)
-    args['----'] = aeobj_01
-    args["data"] = icondata
-    _reply, args, attrs = finder.send("core", "setd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----'].data
-
-
-#---------------------------------------------------
-#   Volumes and servers.
-
-def mountvolume(volume, server=None, username=None, password=None):
-    """mount a volume, local or on a server on AppleTalk.
-    Note: mounting a ASIP server requires a different operation.
-    server is the name of the server where the volume belongs
-    username, password belong to a registered user of the volume."""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    if password:
-        args["PASS"] = password
-    if username:
-        args["USER"] = username
-    if server:
-        args["SRVR"] = server
-    args['----'] = volume
-    _reply, args, attrs = finder.send("aevt", "mvol", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def unmountvolume(volume):
-    """unmount a volume that's on the desktop"""
-    putaway(volume)
-
-def putaway(object):
-    """puth the object away, whereever it came from."""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('cdis'), form="name", seld=object, fr=None)
-    _reply, args, attrs = talker.send("fndr", "ptwy", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-
-#---------------------------------------------------
-#   Miscellaneous functions
-#
-
-def volumelevel(level):
-    """set the audio output level, parameter between 0 (silent) and 7 (full blast)"""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    if level < 0:
-        level = 0
-    elif level > 7:
-        level = 7
-    args['----'] = level
-    _reply, args, attrs = finder.send("aevt", "stvl", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def OSversion():
-    """return the version of the system software"""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    aeobj_00 = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('ver2'), fr=None)
-    args['----'] = aeobj_00
-    _reply, args, attrs = finder.send("core", "getd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        return args['----']
-
-def filesharing():
-    """return the current status of filesharing and whether it is starting up or not:
-        -1  file sharing is off and not starting up
-        0   file sharing is off and starting up
-        1   file sharing is on"""
-    status = -1
-    finder = _getfinder()
-    # see if it is on
-    args = {}
-    attrs = {}
-    args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('fshr'), fr=None)
-    _reply, args, attrs = finder.send("core", "getd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        if args['----'] == 0:
-            status = -1
-        else:
-            status = 1
-    # is it starting up perchance?
-    args = {}
-    attrs = {}
-    args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('fsup'), fr=None)
-    _reply, args, attrs = finder.send("core", "getd", args, attrs)
-    if 'errn' in args:
-        raise Error(aetools.decodeerror(args))
-    if '----' in args:
-        if args['----'] == 1:
-            status = 0
-    return status
-
-def movetotrash(path):
-    """move the object to the trash"""
-    fss = Carbon.File.FSSpec(path)
-    trashfolder = Carbon.Folder.FSFindFolder(fss.as_tuple()[0], 'trsh', 0)
-    move(path, trashfolder)
-
-def emptytrash():
-    """empty the trash"""
-    finder = _getfinder()
-    args = {}
-    attrs = {}
-    args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form="prop", seld=aetypes.Type('trsh'), fr=None)
-    _reply, args, attrs = finder.send("fndr", "empt", args, attrs)
-    if 'errn' in args:
-        raise aetools.Error(aetools.decodeerror(args))
-
-
-def _test():
-    import EasyDialogs
-    print('Original findertools functionality test...')
-    print('Testing launch...')
-    pathname = EasyDialogs.AskFileForOpen('File to launch:')
-    if pathname:
-        result = launch(pathname)
-        if result:
-            print('Result: ', result)
-        print('Press return-', end=' ')
-        sys.stdin.readline()
-    print('Testing print...')
-    pathname = EasyDialogs.AskFileForOpen('File to print:')
-    if pathname:
-        result = Print(pathname)
-        if result:
-            print('Result: ', result)
-        print('Press return-', end=' ')
-        sys.stdin.readline()
-    print('Testing copy...')
-    pathname = EasyDialogs.AskFileForOpen('File to copy:')
-    if pathname:
-        destdir = EasyDialogs.AskFolder('Destination:')
-        if destdir:
-            result = copy(pathname, destdir)
-            if result:
-                print('Result:', result)
-            print('Press return-', end=' ')
-            sys.stdin.readline()
-    print('Testing move...')
-    pathname = EasyDialogs.AskFileForOpen('File to move:')
-    if pathname:
-        destdir = EasyDialogs.AskFolder('Destination:')
-        if destdir:
-            result = move(pathname, destdir)
-            if result:
-                print('Result:', result)
-            print('Press return-', end=' ')
-            sys.stdin.readline()
-    print('Testing sleep...')
-    if EasyDialogs.AskYesNoCancel('Sleep?') > 0:
-        result = sleep()
-        if result:
-            print('Result:', result)
-        print('Press return-', end=' ')
-        sys.stdin.readline()
-    print('Testing shutdown...')
-    if EasyDialogs.AskYesNoCancel('Shut down?') > 0:
-        result = shutdown()
-        if result:
-            print('Result:', result)
-        print('Press return-', end=' ')
-        sys.stdin.readline()
-    print('Testing restart...')
-    if EasyDialogs.AskYesNoCancel('Restart?') > 0:
-        result = restart()
-        if result:
-            print('Result:', result)
-        print('Press return-', end=' ')
-        sys.stdin.readline()
-
-def _test2():
-    print('\nmorefindertools version %s\nTests coming up...' %__version__)
-    import os
-    import random
-
-    # miscellaneous
-    print('\tfilesharing on?',  filesharing())       # is file sharing on, off, starting up?
-    print('\tOS version',       OSversion())     # the version of the system software
-
-    # set the soundvolume in a simple way
-    print('\tSystem beep volume')
-    for i in range(0, 7):
-        volumelevel(i)
-        MacOS.SysBeep()
-
-    # Finder's windows, file location, file attributes
-    open("@findertoolstest", "w")
-    f = "@findertoolstest"
-    reveal(f)               # reveal this file in a Finder window
-    select(f)               # select this file
-
-    base, file = os.path.split(f)
-    closewindow(base)   # close the window this file is in  (opened by reveal)
-    openwindow(base)        # open it again
-    windowview(base, 1) # set the view by list
-
-    label(f, 2)             # set the label of this file to something orange
-    print('\tlabel', label(f))   # get the label of this file
-
-    # the file location only works in a window with icon view!
-    print('Random locations for an icon')
-    windowview(base, 0)     # set the view by icon
-    windowsize(base, (600, 600))
-    for i in range(50):
-        location(f, (random.randint(10, 590), random.randint(10, 590)))
-
-    windowsize(base, (200, 400))
-    windowview(base, 1)     # set the view by icon
-
-    orgpos = windowposition(base)
-    print('Animated window location')
-    for i in range(10):
-        pos = (100+i*10, 100+i*10)
-        windowposition(base, pos)
-        print('\twindow position', pos)
-    windowposition(base, orgpos)    # park it where it was before
-
-    print('Put a comment in file', f, ':')
-    print('\t', comment(f))      # print the Finder comment this file has
-    s = 'This is a comment no one reads!'
-    comment(f, s)           # set the Finder comment
-
-def _test3():
-    print('MacOS9 or better specific functions')
-    # processes
-    pr = processes()        # return a list of tuples with (active_processname, creatorcode)
-    print('Return a list of current active processes:')
-    for p in pr:
-        print('\t', p)
-
-    # get attributes of the first process in the list
-    print('Attributes of the first process in the list:')
-    pinfo = processinfo(pr[0][0])
-    print('\t', pr[0][0])
-    print('\t\tmemory partition', pinfo.partition)       # the memory allocated to this process
-    print('\t\tmemory used', pinfo.used)         # the memory actuall used by this process
-    print('\t\tis visible', pinfo.visible)           # is the process visible to the user
-    print('\t\tis frontmost', pinfo.frontmost)       # is the process the front most one?
-    print('\t\thas scripting', pinfo.hasscripting)       # is the process scriptable?
-    print('\t\taccepts high level events',  pinfo.accepthighlevel)   # does the process accept high level appleevents?
-
-if __name__ == '__main__':
-    _test()
-    _test2()
-    _test3()
diff --git a/Lib/plat-mac/gensuitemodule.py b/Lib/plat-mac/gensuitemodule.py
deleted file mode 100644 (file)
index c3b42e4..0000000
+++ /dev/null
@@ -1,1213 +0,0 @@
-"""
-gensuitemodule - Generate an AE suite module from an aete/aeut resource
-
-Based on aete.py.
-
-Reading and understanding this code is left as an exercise to the reader.
-"""
-
-import MacOS
-import EasyDialogs
-import os
-import string
-import sys
-import types
-import io
-import keyword
-import macresource
-import aetools
-import distutils.sysconfig
-import OSATerminology
-from Carbon.Res import *
-import Carbon.Folder
-import MacOS
-import getopt
-import plistlib
-
-_MAC_LIB_FOLDER=os.path.dirname(aetools.__file__)
-DEFAULT_STANDARD_PACKAGEFOLDER=os.path.join(_MAC_LIB_FOLDER, 'lib-scriptpackages')
-DEFAULT_USER_PACKAGEFOLDER=distutils.sysconfig.get_python_lib()
-
-def usage():
-    sys.stderr.write("Usage: %s [opts] application-or-resource-file\n" % sys.argv[0])
-    sys.stderr.write("""Options:
---output pkgdir  Pathname of the output package (short: -o)
---resource       Parse resource file in stead of launching application (-r)
---base package   Use another base package in stead of default StdSuites (-b)
---edit old=new   Edit suite names, use empty new to skip a suite (-e)
---creator code   Set creator code for package (-c)
---dump           Dump aete resource to stdout in stead of creating module (-d)
---verbose        Tell us what happens (-v)
-""")
-    sys.exit(1)
-
-def main():
-    if len(sys.argv) > 1:
-        SHORTOPTS = "rb:o:e:c:dv"
-        LONGOPTS = ("resource", "base=", "output=", "edit=", "creator=", "dump", "verbose")
-        try:
-            opts, args = getopt.getopt(sys.argv[1:], SHORTOPTS, LONGOPTS)
-        except getopt.GetoptError:
-            usage()
-
-        process_func = processfile
-        basepkgname = 'StdSuites'
-        output = None
-        edit_modnames = []
-        creatorsignature = None
-        dump = None
-        verbose = None
-
-        for o, a in opts:
-            if o in ('-r', '--resource'):
-                process_func = processfile_fromresource
-            if o in ('-b', '--base'):
-                basepkgname = a
-            if o in ('-o', '--output'):
-                output = a
-            if o in ('-e', '--edit'):
-                split = a.split('=')
-                if len(split) != 2:
-                    usage()
-                edit_modnames.append(split)
-            if o in ('-c', '--creator'):
-                if len(a) != 4:
-                    sys.stderr.write("creator must be 4-char string\n")
-                    sys.exit(1)
-                creatorsignature = a
-            if o in ('-d', '--dump'):
-                dump = sys.stdout
-            if o in ('-v', '--verbose'):
-                verbose = sys.stderr
-
-
-        if output and len(args) > 1:
-            sys.stderr.write("%s: cannot specify --output with multiple inputs\n" % sys.argv[0])
-            sys.exit(1)
-
-        for filename in args:
-            process_func(filename, output=output, basepkgname=basepkgname,
-                edit_modnames=edit_modnames, creatorsignature=creatorsignature,
-                dump=dump, verbose=verbose)
-    else:
-        main_interactive()
-
-def main_interactive(interact=0, basepkgname='StdSuites'):
-    if interact:
-        # Ask for save-filename for each module
-        edit_modnames = None
-    else:
-        # Use default filenames for each module
-        edit_modnames = []
-    appsfolder = Carbon.Folder.FSFindFolder(-32765, 'apps', 0)
-    filename = EasyDialogs.AskFileForOpen(
-        message='Select scriptable application',
-        dialogOptionFlags=0x1056,       # allow selection of .app bundles
-        defaultLocation=appsfolder)
-    if not filename:
-        return
-    if not is_scriptable(filename):
-        if EasyDialogs.AskYesNoCancel(
-                "Warning: application does not seem scriptable",
-                yes="Continue", default=2, no="") <= 0:
-            return
-    try:
-        processfile(filename, edit_modnames=edit_modnames, basepkgname=basepkgname,
-        verbose=sys.stderr)
-    except MacOS.Error as arg:
-        print("Error getting terminology:", arg)
-        print("Retry, manually parsing resources")
-        processfile_fromresource(filename, edit_modnames=edit_modnames,
-            basepkgname=basepkgname, verbose=sys.stderr)
-
-def is_scriptable(application):
-    """Return true if the application is scriptable"""
-    if os.path.isdir(application):
-        plistfile = os.path.join(application, 'Contents', 'Info.plist')
-        if not os.path.exists(plistfile):
-            return False
-        plist = plistlib.Plist.fromFile(plistfile)
-        return plist.get('NSAppleScriptEnabled', False)
-    # If it is a file test for an aete/aeut resource.
-    currf = CurResFile()
-    try:
-        refno = macresource.open_pathname(application)
-    except MacOS.Error:
-        return False
-    UseResFile(refno)
-    n_terminology = Count1Resources('aete') + Count1Resources('aeut') + \
-        Count1Resources('scsz') + Count1Resources('osiz')
-    CloseResFile(refno)
-    UseResFile(currf)
-    return n_terminology > 0
-
-def processfile_fromresource(fullname, output=None, basepkgname=None,
-        edit_modnames=None, creatorsignature=None, dump=None, verbose=None):
-    """Process all resources in a single file"""
-    if not is_scriptable(fullname) and verbose:
-        print("Warning: app does not seem scriptable: %s" % fullname, file=verbose)
-    cur = CurResFile()
-    if verbose:
-        print("Processing", fullname, file=verbose)
-    rf = macresource.open_pathname(fullname)
-    try:
-        UseResFile(rf)
-        resources = []
-        for i in range(Count1Resources('aete')):
-            res = Get1IndResource('aete', 1+i)
-            resources.append(res)
-        for i in range(Count1Resources('aeut')):
-            res = Get1IndResource('aeut', 1+i)
-            resources.append(res)
-        if verbose:
-            print("\nLISTING aete+aeut RESOURCES IN", repr(fullname), file=verbose)
-        aetelist = []
-        for res in resources:
-            if verbose:
-                print("decoding", res.GetResInfo(), "...", file=verbose)
-            data = res.data
-            aete = decode(data, verbose)
-            aetelist.append((aete, res.GetResInfo()))
-    finally:
-        if rf != cur:
-            CloseResFile(rf)
-            UseResFile(cur)
-    # switch back (needed for dialogs in Python)
-    UseResFile(cur)
-    if dump:
-        dumpaetelist(aetelist, dump)
-    compileaetelist(aetelist, fullname, output=output,
-        basepkgname=basepkgname, edit_modnames=edit_modnames,
-        creatorsignature=creatorsignature, verbose=verbose)
-
-def processfile(fullname, output=None, basepkgname=None,
-        edit_modnames=None, creatorsignature=None, dump=None,
-        verbose=None):
-    """Ask an application for its terminology and process that"""
-    if not is_scriptable(fullname) and verbose:
-        print("Warning: app does not seem scriptable: %s" % fullname, file=verbose)
-    if verbose:
-        print("\nASKING FOR aete DICTIONARY IN", repr(fullname), file=verbose)
-    try:
-        aedescobj, launched = OSATerminology.GetAppTerminology(fullname)
-    except MacOS.Error as arg:
-        if arg.args[0] in (-1701, -192): # errAEDescNotFound, resNotFound
-            if verbose:
-                print("GetAppTerminology failed with errAEDescNotFound/resNotFound, trying manually", file=verbose)
-            aedata, sig = getappterminology(fullname, verbose=verbose)
-            if not creatorsignature:
-                creatorsignature = sig
-        else:
-            raise
-    else:
-        if launched:
-            if verbose:
-                print("Launched", fullname, file=verbose)
-        raw = aetools.unpack(aedescobj)
-        if not raw:
-            if verbose:
-                print('Unpack returned empty value:', raw, file=verbose)
-            return
-        if not raw[0].data:
-            if verbose:
-                print('Unpack returned value without data:', raw, file=verbose)
-            return
-        aedata = raw[0]
-    aete = decode(aedata.data, verbose)
-    if dump:
-        dumpaetelist([aete], dump)
-        return
-    compileaete(aete, None, fullname, output=output, basepkgname=basepkgname,
-        creatorsignature=creatorsignature, edit_modnames=edit_modnames,
-        verbose=verbose)
-
-def getappterminology(fullname, verbose=None):
-    """Get application terminology by sending an AppleEvent"""
-    # First check that we actually can send AppleEvents
-    if not MacOS.WMAvailable():
-        raise RuntimeError("Cannot send AppleEvents, no access to window manager")
-    # Next, a workaround for a bug in MacOS 10.2: sending events will hang unless
-    # you have created an event loop first.
-    import Carbon.Evt
-    Carbon.Evt.WaitNextEvent(0,0)
-    if os.path.isdir(fullname):
-        # Now get the signature of the application, hoping it is a bundle
-        pkginfo = os.path.join(fullname, 'Contents', 'PkgInfo')
-        if not os.path.exists(pkginfo):
-            raise RuntimeError("No PkgInfo file found")
-        tp_cr = open(pkginfo, 'rb').read()
-        cr = tp_cr[4:8]
-    else:
-        # Assume it is a file
-        cr, tp = MacOS.GetCreatorAndType(fullname)
-    # Let's talk to it and ask for its AETE
-    talker = aetools.TalkTo(cr)
-    try:
-        talker._start()
-    except (MacOS.Error, aetools.Error) as arg:
-        if verbose:
-            print('Warning: start() failed, continuing anyway:', arg, file=verbose)
-    reply = talker.send("ascr", "gdte")
-    #reply2 = talker.send("ascr", "gdut")
-    # Now pick the bits out of the return that we need.
-    return reply[1]['----'], cr
-
-
-def compileaetelist(aetelist, fullname, output=None, basepkgname=None,
-            edit_modnames=None, creatorsignature=None, verbose=None):
-    for aete, resinfo in aetelist:
-        compileaete(aete, resinfo, fullname, output=output,
-            basepkgname=basepkgname, edit_modnames=edit_modnames,
-            creatorsignature=creatorsignature, verbose=verbose)
-
-def dumpaetelist(aetelist, output):
-    import pprint
-    pprint.pprint(aetelist, output)
-
-def decode(data, verbose=None):
-    """Decode a resource into a python data structure"""
-    f = io.StringIO(data)
-    aete = generic(getaete, f)
-    aete = simplify(aete)
-    processed = f.tell()
-    unprocessed = len(f.read())
-    total = f.tell()
-    if unprocessed and verbose:
-        verbose.write("%d processed + %d unprocessed = %d total\n" %
-                         (processed, unprocessed, total))
-    return aete
-
-def simplify(item):
-    """Recursively replace singleton tuples by their constituent item"""
-    if isinstance(item, list):
-        return map(simplify, item)
-    elif isinstance(item, tuple) and len(item) == 2:
-        return simplify(item[1])
-    else:
-        return item
-
-
-# Here follows the aete resource decoder.
-# It is presented bottom-up instead of top-down because there are  direct
-# references to the lower-level part-decoders from the high-level part-decoders.
-
-def getbyte(f, *args):
-    c = f.read(1)
-    if not c:
-        raise EOFError('in getbyte' + str(args))
-    return ord(c)
-
-def getword(f, *args):
-    getalign(f)
-    s = f.read(2)
-    if len(s) < 2:
-        raise EOFError('in getword' + str(args))
-    return (ord(s[0])<<8) | ord(s[1])
-
-def getlong(f, *args):
-    getalign(f)
-    s = f.read(4)
-    if len(s) < 4:
-        raise EOFError('in getlong' + str(args))
-    return (ord(s[0])<<24) | (ord(s[1])<<16) | (ord(s[2])<<8) | ord(s[3])
-
-def getostype(f, *args):
-    getalign(f)
-    s = f.read(4)
-    if len(s) < 4:
-        raise EOFError('in getostype' + str(args))
-    return s
-
-def getpstr(f, *args):
-    c = f.read(1)
-    if len(c) < 1:
-        raise EOFError('in getpstr[1]' + str(args))
-    nbytes = ord(c)
-    if nbytes == 0: return ''
-    s = f.read(nbytes)
-    if len(s) < nbytes:
-        raise EOFError('in getpstr[2]' + str(args))
-    return s
-
-def getalign(f):
-    if f.tell() & 1:
-        c = f.read(1)
-        ##if c != '\0':
-        ##  print align:', repr(c)
-
-def getlist(f, description, getitem):
-    count = getword(f)
-    list = []
-    for i in range(count):
-        list.append(generic(getitem, f))
-        getalign(f)
-    return list
-
-def alt_generic(what, f, *args):
-    print("generic", repr(what), args)
-    res = vageneric(what, f, args)
-    print('->', repr(res))
-    return res
-
-def generic(what, f, *args):
-    if type(what) == types.FunctionType:
-        return what(f, *args)
-    if isinstance(what, list):
-        record = []
-        for thing in what:
-            item = generic(thing[:1], f, *thing[1:])
-            record.append((thing[1], item))
-        return record
-    return "BAD GENERIC ARGS: %r" % (what,)
-
-getdata = [
-    (getostype, "type"),
-    (getpstr, "description"),
-    (getword, "flags")
-    ]
-getargument = [
-    (getpstr, "name"),
-    (getostype, "keyword"),
-    (getdata, "what")
-    ]
-getevent = [
-    (getpstr, "name"),
-    (getpstr, "description"),
-    (getostype, "suite code"),
-    (getostype, "event code"),
-    (getdata, "returns"),
-    (getdata, "accepts"),
-    (getlist, "optional arguments", getargument)
-    ]
-getproperty = [
-    (getpstr, "name"),
-    (getostype, "code"),
-    (getdata, "what")
-    ]
-getelement = [
-    (getostype, "type"),
-    (getlist, "keyform", getostype)
-    ]
-getclass = [
-    (getpstr, "name"),
-    (getostype, "class code"),
-    (getpstr, "description"),
-    (getlist, "properties", getproperty),
-    (getlist, "elements", getelement)
-    ]
-getcomparison = [
-    (getpstr, "operator name"),
-    (getostype, "operator ID"),
-    (getpstr, "operator comment"),
-    ]
-getenumerator = [
-    (getpstr, "enumerator name"),
-    (getostype, "enumerator ID"),
-    (getpstr, "enumerator comment")
-    ]
-getenumeration = [
-    (getostype, "enumeration ID"),
-    (getlist, "enumerator", getenumerator)
-    ]
-getsuite = [
-    (getpstr, "suite name"),
-    (getpstr, "suite description"),
-    (getostype, "suite ID"),
-    (getword, "suite level"),
-    (getword, "suite version"),
-    (getlist, "events", getevent),
-    (getlist, "classes", getclass),
-    (getlist, "comparisons", getcomparison),
-    (getlist, "enumerations", getenumeration)
-    ]
-getaete = [
-    (getword, "major/minor version in BCD"),
-    (getword, "language code"),
-    (getword, "script code"),
-    (getlist, "suites", getsuite)
-    ]
-
-def compileaete(aete, resinfo, fname, output=None, basepkgname=None,
-        edit_modnames=None, creatorsignature=None, verbose=None):
-    """Generate code for a full aete resource. fname passed for doc purposes"""
-    [version, language, script, suites] = aete
-    major, minor = divmod(version, 256)
-    if not creatorsignature:
-        creatorsignature, dummy = MacOS.GetCreatorAndType(fname)
-    packagename = identify(os.path.splitext(os.path.basename(fname))[0])
-    if language:
-        packagename = packagename+'_lang%d'%language
-    if script:
-        packagename = packagename+'_script%d'%script
-    if len(packagename) > 27:
-        packagename = packagename[:27]
-    if output:
-        # XXXX Put this in site-packages if it isn't a full pathname?
-        if not os.path.exists(output):
-            os.mkdir(output)
-        pathname = output
-    else:
-        pathname = EasyDialogs.AskFolder(message='Create and select package folder for %s'%packagename,
-            defaultLocation=DEFAULT_USER_PACKAGEFOLDER)
-        output = pathname
-    if not pathname:
-        return
-    packagename = os.path.split(os.path.normpath(pathname))[1]
-    if not basepkgname:
-        basepkgname = EasyDialogs.AskFolder(message='Package folder for base suite (usually StdSuites)',
-            defaultLocation=DEFAULT_STANDARD_PACKAGEFOLDER)
-    if basepkgname:
-        dirname, basepkgname = os.path.split(os.path.normpath(basepkgname))
-        if dirname and not dirname in sys.path:
-            sys.path.insert(0, dirname)
-        basepackage = __import__(basepkgname)
-    else:
-        basepackage = None
-    suitelist = []
-    allprecompinfo = []
-    allsuites = []
-    for suite in suites:
-        compiler = SuiteCompiler(suite, basepackage, output, edit_modnames, verbose)
-        code, modname, precompinfo = compiler.precompilesuite()
-        if not code:
-            continue
-        allprecompinfo = allprecompinfo + precompinfo
-        suiteinfo = suite, pathname, modname
-        suitelist.append((code, modname))
-        allsuites.append(compiler)
-    for compiler in allsuites:
-        compiler.compilesuite(major, minor, language, script, fname, allprecompinfo)
-    initfilename = os.path.join(output, '__init__.py')
-    fp = open(initfilename, 'w')
-    MacOS.SetCreatorAndType(initfilename, 'Pyth', 'TEXT')
-    fp.write('"""\n')
-    fp.write("Package generated from %s\n"%ascii(fname))
-    if resinfo:
-        fp.write("Resource %s resid %d %s\n"%(ascii(resinfo[1]), resinfo[0], ascii(resinfo[2])))
-    fp.write('"""\n')
-    fp.write('import aetools\n')
-    fp.write('Error = aetools.Error\n')
-    suitelist.sort()
-    for code, modname in suitelist:
-        fp.write("import %s\n" % modname)
-    fp.write("\n\n_code_to_module = {\n")
-    for code, modname in suitelist:
-        fp.write("    '%s' : %s,\n"%(ascii(code), modname))
-    fp.write("}\n\n")
-    fp.write("\n\n_code_to_fullname = {\n")
-    for code, modname in suitelist:
-        fp.write("    '%s' : ('%s.%s', '%s'),\n"%(ascii(code), packagename, modname, modname))
-    fp.write("}\n\n")
-    for code, modname in suitelist:
-        fp.write("from %s import *\n"%modname)
-
-    # Generate property dicts and element dicts for all types declared in this module
-    fp.write("\ndef getbaseclasses(v):\n")
-    fp.write("    if not getattr(v, '_propdict', None):\n")
-    fp.write("        v._propdict = {}\n")
-    fp.write("        v._elemdict = {}\n")
-    fp.write("        for superclassname in getattr(v, '_superclassnames', []):\n")
-    fp.write("            superclass = eval(superclassname)\n")
-    fp.write("            getbaseclasses(superclass)\n")
-    fp.write("            v._propdict.update(getattr(superclass, '_propdict', {}))\n")
-    fp.write("            v._elemdict.update(getattr(superclass, '_elemdict', {}))\n")
-    fp.write("        v._propdict.update(getattr(v, '_privpropdict', {}))\n")
-    fp.write("        v._elemdict.update(getattr(v, '_privelemdict', {}))\n")
-    fp.write("\n")
-    fp.write("import StdSuites\n")
-    allprecompinfo.sort()
-    if allprecompinfo:
-        fp.write("\n#\n# Set property and element dictionaries now that all classes have been defined\n#\n")
-        for codenamemapper in allprecompinfo:
-            for k, v in codenamemapper.getall('class'):
-                fp.write("getbaseclasses(%s)\n" % v)
-
-    # Generate a code-to-name mapper for all of the types (classes) declared in this module
-    application_class = None
-    if allprecompinfo:
-        fp.write("\n#\n# Indices of types declared in this module\n#\n")
-        fp.write("_classdeclarations = {\n")
-        for codenamemapper in allprecompinfo:
-            for k, v in codenamemapper.getall('class'):
-                fp.write("    %r : %s,\n" % (k, v))
-                if k == 'capp':
-                    application_class = v
-        fp.write("}\n")
-
-
-    if suitelist:
-        fp.write("\n\nclass %s(%s_Events"%(packagename, suitelist[0][1]))
-        for code, modname in suitelist[1:]:
-            fp.write(",\n        %s_Events"%modname)
-        fp.write(",\n        aetools.TalkTo):\n")
-        fp.write("    _signature = %r\n\n"%(creatorsignature,))
-        fp.write("    _moduleName = '%s'\n\n"%packagename)
-        if application_class:
-            fp.write("    _elemdict = %s._elemdict\n" % application_class)
-            fp.write("    _propdict = %s._propdict\n" % application_class)
-    fp.close()
-
-class SuiteCompiler:
-    def __init__(self, suite, basepackage, output, edit_modnames, verbose):
-        self.suite = suite
-        self.basepackage = basepackage
-        self.edit_modnames = edit_modnames
-        self.output = output
-        self.verbose = verbose
-
-        # Set by precompilesuite
-        self.pathname = None
-        self.modname = None
-
-        # Set by compilesuite
-        self.fp = None
-        self.basemodule = None
-        self.enumsneeded = {}
-
-    def precompilesuite(self):
-        """Parse a single suite without generating the output. This step is needed
-        so we can resolve recursive references by suites to enums/comps/etc declared
-        in other suites"""
-        [name, desc, code, level, version, events, classes, comps, enums] = self.suite
-
-        modname = identify(name)
-        if len(modname) > 28:
-            modname = modname[:27]
-        if self.edit_modnames is None:
-            self.pathname = EasyDialogs.AskFileForSave(message='Python output file',
-                savedFileName=modname+'.py')
-        else:
-            for old, new in self.edit_modnames:
-                if old == modname:
-                    modname = new
-            if modname:
-                self.pathname = os.path.join(self.output, modname + '.py')
-            else:
-                self.pathname = None
-        if not self.pathname:
-            return None, None, None
-
-        self.modname = os.path.splitext(os.path.split(self.pathname)[1])[0]
-
-        if self.basepackage and code in self.basepackage._code_to_module:
-            # We are an extension of a baseclass (usually an application extending
-            # Standard_Suite or so). Import everything from our base module
-            basemodule = self.basepackage._code_to_module[code]
-        else:
-            # We are not an extension.
-            basemodule = None
-
-        self.enumsneeded = {}
-        for event in events:
-            self.findenumsinevent(event)
-
-        objc = ObjectCompiler(None, self.modname, basemodule, interact=(self.edit_modnames is None),
-            verbose=self.verbose)
-        for cls in classes:
-            objc.compileclass(cls)
-        for cls in classes:
-            objc.fillclasspropsandelems(cls)
-        for comp in comps:
-            objc.compilecomparison(comp)
-        for enum in enums:
-            objc.compileenumeration(enum)
-
-        for enum in self.enumsneeded.keys():
-            objc.checkforenum(enum)
-
-        objc.dumpindex()
-
-        precompinfo = objc.getprecompinfo(self.modname)
-
-        return code, self.modname, precompinfo
-
-    def compilesuite(self, major, minor, language, script, fname, precompinfo):
-        """Generate code for a single suite"""
-        [name, desc, code, level, version, events, classes, comps, enums] = self.suite
-        # Sort various lists, so re-generated source is easier compared
-        def class_sorter(k1, k2):
-            """Sort classes by code, and make sure main class sorts before synonyms"""
-            # [name, code, desc, properties, elements] = cls
-            if k1[1] < k2[1]: return -1
-            if k1[1] > k2[1]: return 1
-            if not k2[3] or k2[3][0][1] == 'c@#!':
-                # This is a synonym, the other one is better
-                return -1
-            if not k1[3] or k1[3][0][1] == 'c@#!':
-                # This is a synonym, the other one is better
-                return 1
-            return 0
-
-        events.sort()
-        classes.sort(class_sorter)
-        comps.sort()
-        enums.sort()
-
-        self.fp = fp = open(self.pathname, 'w')
-        MacOS.SetCreatorAndType(self.pathname, 'Pyth', 'TEXT')
-
-        fp.write('"""Suite %s: %s\n' % (ascii(name), ascii(desc)))
-        fp.write("Level %d, version %d\n\n" % (level, version))
-        fp.write("Generated from %s\n"%ascii(fname))
-        fp.write("AETE/AEUT resource version %d/%d, language %d, script %d\n" % \
-            (major, minor, language, script))
-        fp.write('"""\n\n')
-
-        fp.write('import aetools\n')
-        fp.write('import MacOS\n\n')
-        fp.write("_code = %r\n\n"% (code,))
-        if self.basepackage and code in self.basepackage._code_to_module:
-            # We are an extension of a baseclass (usually an application extending
-            # Standard_Suite or so). Import everything from our base module
-            fp.write('from %s import *\n'%self.basepackage._code_to_fullname[code][0])
-            basemodule = self.basepackage._code_to_module[code]
-        elif self.basepackage and code.lower() in self.basepackage._code_to_module:
-            # This is needed by CodeWarrior and some others.
-            fp.write('from %s import *\n'%self.basepackage._code_to_fullname[code.lower()][0])
-            basemodule = self.basepackage._code_to_module[code.lower()]
-        else:
-            # We are not an extension.
-            basemodule = None
-        self.basemodule = basemodule
-        self.compileclassheader()
-
-        self.enumsneeded = {}
-        if events:
-            for event in events:
-                self.compileevent(event)
-        else:
-            fp.write("    pass\n\n")
-
-        objc = ObjectCompiler(fp, self.modname, basemodule, precompinfo, interact=(self.edit_modnames is None),
-            verbose=self.verbose)
-        for cls in classes:
-            objc.compileclass(cls)
-        for cls in classes:
-            objc.fillclasspropsandelems(cls)
-        for comp in comps:
-            objc.compilecomparison(comp)
-        for enum in enums:
-            objc.compileenumeration(enum)
-
-        for enum in self.enumsneeded.keys():
-            objc.checkforenum(enum)
-
-        objc.dumpindex()
-
-    def compileclassheader(self):
-        """Generate class boilerplate"""
-        classname = '%s_Events'%self.modname
-        if self.basemodule:
-            modshortname = self.basemodule.__name__.split('.')[-1]
-            baseclassname = '%s_Events'%modshortname
-            self.fp.write("class %s(%s):\n\n"%(classname, baseclassname))
-        else:
-            self.fp.write("class %s:\n\n"%classname)
-
-    def compileevent(self, event):
-        """Generate code for a single event"""
-        [name, desc, code, subcode, returns, accepts, arguments] = event
-        fp = self.fp
-        funcname = identify(name)
-        #
-        # generate name->keyword map
-        #
-        if arguments:
-            fp.write("    _argmap_%s = {\n"%funcname)
-            for a in arguments:
-                fp.write("        %r : %r,\n"%(identify(a[0]), a[1]))
-            fp.write("    }\n\n")
-
-        #
-        # Generate function header
-        #
-        has_arg = (not is_null(accepts))
-        opt_arg = (has_arg and is_optional(accepts))
-
-        fp.write("    def %s(self, "%funcname)
-        if has_arg:
-            if not opt_arg:
-                fp.write("_object, ")       # Include direct object, if it has one
-            else:
-                fp.write("_object=None, ")  # Also include if it is optional
-        else:
-            fp.write("_no_object=None, ")   # For argument checking
-        fp.write("_attributes={}, **_arguments):\n")    # include attribute dict and args
-        #
-        # Generate doc string (important, since it may be the only
-        # available documentation, due to our name-remaping)
-        #
-        fp.write('        """%s: %s\n'%(ascii(name), ascii(desc)))
-        if has_arg:
-            fp.write("        Required argument: %s\n"%getdatadoc(accepts))
-        elif opt_arg:
-            fp.write("        Optional argument: %s\n"%getdatadoc(accepts))
-        for arg in arguments:
-            fp.write("        Keyword argument %s: %s\n"%(identify(arg[0]),
-                    getdatadoc(arg[2])))
-        fp.write("        Keyword argument _attributes: AppleEvent attribute dictionary\n")
-        if not is_null(returns):
-            fp.write("        Returns: %s\n"%getdatadoc(returns))
-        fp.write('        """\n')
-        #
-        # Fiddle the args so everything ends up in 'arguments' dictionary
-        #
-        fp.write("        _code = %r\n"% (code,))
-        fp.write("        _subcode = %r\n\n"% (subcode,))
-        #
-        # Do keyword name substitution
-        #
-        if arguments:
-            fp.write("        aetools.keysubst(_arguments, self._argmap_%s)\n"%funcname)
-        else:
-            fp.write("        if _arguments: raise TypeError, 'No optional args expected'\n")
-        #
-        # Stuff required arg (if there is one) into arguments
-        #
-        if has_arg:
-            fp.write("        _arguments['----'] = _object\n")
-        elif opt_arg:
-            fp.write("        if _object:\n")
-            fp.write("            _arguments['----'] = _object\n")
-        else:
-            fp.write("        if _no_object is not None: raise TypeError, 'No direct arg expected'\n")
-        fp.write("\n")
-        #
-        # Do enum-name substitution
-        #
-        for a in arguments:
-            if is_enum(a[2]):
-                kname = a[1]
-                ename = a[2][0]
-                if ename != '****':
-                    fp.write("        aetools.enumsubst(_arguments, %r, _Enum_%s)\n" %
-                        (kname, identify(ename)))
-                    self.enumsneeded[ename] = 1
-        fp.write("\n")
-        #
-        # Do the transaction
-        #
-        fp.write("        _reply, _arguments, _attributes = self.send(_code, _subcode,\n")
-        fp.write("                _arguments, _attributes)\n")
-        #
-        # Error handling
-        #
-        fp.write("        if _arguments.get('errn', 0):\n")
-        fp.write("            raise aetools.Error, aetools.decodeerror(_arguments)\n")
-        fp.write("        # XXXX Optionally decode result\n")
-        #
-        # Decode result
-        #
-        fp.write("        if '----' in _arguments:\n")
-        if is_enum(returns):
-            fp.write("            # XXXX Should do enum remapping here...\n")
-        fp.write("            return _arguments['----']\n")
-        fp.write("\n")
-
-    def findenumsinevent(self, event):
-        """Find all enums for a single event"""
-        [name, desc, code, subcode, returns, accepts, arguments] = event
-        for a in arguments:
-            if is_enum(a[2]):
-                ename = a[2][0]
-                if ename != '****':
-                    self.enumsneeded[ename] = 1
-
-#
-# This class stores the code<->name translations for a single module. It is used
-# to keep the information while we're compiling the module, but we also keep these objects
-# around so if one suite refers to, say, an enum in another suite we know where to
-# find it. Finally, if we really can't find a code, the user can add modules by
-# hand.
-#
-class CodeNameMapper:
-
-    def __init__(self, interact=1, verbose=None):
-        self.code2name = {
-            "property" : {},
-            "class" : {},
-            "enum" : {},
-            "comparison" : {},
-        }
-        self.name2code =  {
-            "property" : {},
-            "class" : {},
-            "enum" : {},
-            "comparison" : {},
-        }
-        self.modulename = None
-        self.star_imported = 0
-        self.can_interact = interact
-        self.verbose = verbose
-
-    def addnamecode(self, type, name, code):
-        self.name2code[type][name] = code
-        if code not in self.code2name[type]:
-            self.code2name[type][code] = name
-
-    def hasname(self, name):
-        for dict in self.name2code.values():
-            if name in dict:
-                return True
-        return False
-
-    def hascode(self, type, code):
-        return code in self.code2name[type]
-
-    def findcodename(self, type, code):
-        if not self.hascode(type, code):
-            return None, None, None
-        name = self.code2name[type][code]
-        if self.modulename and not self.star_imported:
-            qualname = '%s.%s'%(self.modulename, name)
-        else:
-            qualname = name
-        return name, qualname, self.modulename
-
-    def getall(self, type):
-        return self.code2name[type].items()
-
-    def addmodule(self, module, name, star_imported):
-        self.modulename = name
-        self.star_imported = star_imported
-        for code, name in module._propdeclarations.items():
-            self.addnamecode('property', name, code)
-        for code, name in module._classdeclarations.items():
-            self.addnamecode('class', name, code)
-        for code in module._enumdeclarations.keys():
-            self.addnamecode('enum', '_Enum_'+identify(code), code)
-        for code, name in module._compdeclarations.items():
-            self.addnamecode('comparison', name, code)
-
-    def prepareforexport(self, name=None):
-        if not self.modulename:
-            self.modulename = name
-        return self
-
-class ObjectCompiler:
-    def __init__(self, fp, modname, basesuite, othernamemappers=None, interact=1,
-            verbose=None):
-        self.fp = fp
-        self.verbose = verbose
-        self.basesuite = basesuite
-        self.can_interact = interact
-        self.modulename = modname
-        self.namemappers = [CodeNameMapper(self.can_interact, self.verbose)]
-        if othernamemappers:
-            self.othernamemappers = othernamemappers[:]
-        else:
-            self.othernamemappers = []
-        if basesuite:
-            basemapper = CodeNameMapper(self.can_interact, self.verbose)
-            basemapper.addmodule(basesuite, '', 1)
-            self.namemappers.append(basemapper)
-
-    def getprecompinfo(self, modname):
-        list = []
-        for mapper in self.namemappers:
-            emapper = mapper.prepareforexport(modname)
-            if emapper:
-                list.append(emapper)
-        return list
-
-    def findcodename(self, type, code):
-        while 1:
-            # First try: check whether we already know about this code.
-            for mapper in self.namemappers:
-                if mapper.hascode(type, code):
-                    return mapper.findcodename(type, code)
-            # Second try: maybe one of the other modules knows about it.
-            for mapper in self.othernamemappers:
-                if mapper.hascode(type, code):
-                    self.othernamemappers.remove(mapper)
-                    self.namemappers.append(mapper)
-                    if self.fp:
-                        self.fp.write("import %s\n"%mapper.modulename)
-                    break
-            else:
-                # If all this has failed we ask the user for a guess on where it could
-                # be and retry.
-                if self.fp:
-                    m = self.askdefinitionmodule(type, code)
-                else:
-                    m = None
-                if not m: return None, None, None
-                mapper = CodeNameMapper(self.can_interact, self.verbose)
-                mapper.addmodule(m, m.__name__, 0)
-                self.namemappers.append(mapper)
-
-    def hasname(self, name):
-        for mapper in self.othernamemappers:
-            if mapper.hasname(name) and mapper.modulename != self.modulename:
-                if self.verbose:
-                    print("Duplicate Python identifier:", name, self.modulename, mapper.modulename, file=self.verbose)
-                return True
-        return False
-
-    def askdefinitionmodule(self, type, code):
-        if not self.can_interact:
-            if self.verbose:
-                print("** No definition for %s '%s' found" % (type, code), file=self.verbose)
-            return None
-        path = EasyDialogs.AskFileForSave(message='Where is %s %s declared?'%(type, code))
-        if not path: return
-        path, file = os.path.split(path)
-        modname = os.path.splitext(file)[0]
-        if not path in sys.path:
-            sys.path.insert(0, path)
-        m = __import__(modname)
-        self.fp.write("import %s\n"%modname)
-        return m
-
-    def compileclass(self, cls):
-        [name, code, desc, properties, elements] = cls
-        pname = identify(name)
-        if self.namemappers[0].hascode('class', code):
-            # plural forms and such
-            othername, dummy, dummy = self.namemappers[0].findcodename('class', code)
-            if self.fp:
-                self.fp.write("\n%s = %s\n"%(pname, othername))
-        else:
-            if self.fp:
-                self.fp.write('\nclass %s(aetools.ComponentItem):\n' % pname)
-                self.fp.write('    """%s - %s """\n' % (ascii(name), ascii(desc)))
-                self.fp.write('    want = %r\n' % (code,))
-        self.namemappers[0].addnamecode('class', pname, code)
-        is_application_class = (code == 'capp')
-        properties.sort()
-        for prop in properties:
-            self.compileproperty(prop, is_application_class)
-        elements.sort()
-        for elem in elements:
-            self.compileelement(elem)
-
-    def compileproperty(self, prop, is_application_class=False):
-        [name, code, what] = prop
-        if code == 'c@#!':
-            # Something silly with plurals. Skip it.
-            return
-        pname = identify(name)
-        if self.namemappers[0].hascode('property', code):
-            # plural forms and such
-            othername, dummy, dummy = self.namemappers[0].findcodename('property', code)
-            if pname == othername:
-                return
-            if self.fp:
-                self.fp.write("\n_Prop_%s = _Prop_%s\n"%(pname, othername))
-        else:
-            if self.fp:
-                self.fp.write("class _Prop_%s(aetools.NProperty):\n" % pname)
-                self.fp.write('    """%s - %s """\n' % (ascii(name), ascii(what[1])))
-                self.fp.write("    which = %r\n" % (code,))
-                self.fp.write("    want = %r\n" % (what[0],))
-        self.namemappers[0].addnamecode('property', pname, code)
-        if is_application_class and self.fp:
-            self.fp.write("%s = _Prop_%s()\n" % (pname, pname))
-
-    def compileelement(self, elem):
-        [code, keyform] = elem
-        if self.fp:
-            self.fp.write("#        element %r as %s\n" % (code, keyform))
-
-    def fillclasspropsandelems(self, cls):
-        [name, code, desc, properties, elements] = cls
-        cname = identify(name)
-        if self.namemappers[0].hascode('class', code) and \
-                self.namemappers[0].findcodename('class', code)[0] != cname:
-            # This is an other name (plural or so) for something else. Skip.
-            if self.fp and (elements or len(properties) > 1 or (len(properties) == 1 and
-                properties[0][1] != 'c@#!')):
-                if self.verbose:
-                    print('** Skip multiple %s of %s (code %r)' % (cname, self.namemappers[0].findcodename('class', code)[0], code), file=self.verbose)
-                raise RuntimeError("About to skip non-empty class")
-            return
-        plist = []
-        elist = []
-        superclasses = []
-        for prop in properties:
-            [pname, pcode, what] = prop
-            if pcode == "c@#^":
-                superclasses.append(what)
-            if pcode == 'c@#!':
-                continue
-            pname = identify(pname)
-            plist.append(pname)
-
-        superclassnames = []
-        for superclass in superclasses:
-            superId, superDesc, dummy = superclass
-            superclassname, fullyqualifiedname, module = self.findcodename("class", superId)
-            # I don't think this is correct:
-            if superclassname == cname:
-                pass # superclassnames.append(fullyqualifiedname)
-            else:
-                superclassnames.append(superclassname)
-
-        if self.fp:
-            self.fp.write("%s._superclassnames = %r\n"%(cname, superclassnames))
-
-        for elem in elements:
-            [ecode, keyform] = elem
-            if ecode == 'c@#!':
-                continue
-            name, ename, module = self.findcodename('class', ecode)
-            if not name:
-                if self.fp:
-                    self.fp.write("# XXXX %s element %r not found!!\n"%(cname, ecode))
-            else:
-                elist.append((name, ename))
-
-        plist.sort()
-        elist.sort()
-
-        if self.fp:
-            self.fp.write("%s._privpropdict = {\n"%cname)
-            for n in plist:
-                self.fp.write("    '%s' : _Prop_%s,\n"%(n, n))
-            self.fp.write("}\n")
-            self.fp.write("%s._privelemdict = {\n"%cname)
-            for n, fulln in elist:
-                self.fp.write("    '%s' : %s,\n"%(n, fulln))
-            self.fp.write("}\n")
-
-    def compilecomparison(self, comp):
-        [name, code, comment] = comp
-        iname = identify(name)
-        self.namemappers[0].addnamecode('comparison', iname, code)
-        if self.fp:
-            self.fp.write("class %s(aetools.NComparison):\n" % iname)
-            self.fp.write('    """%s - %s """\n' % (ascii(name), ascii(comment)))
-
-    def compileenumeration(self, enum):
-        [code, items] = enum
-        name = "_Enum_%s" % identify(code)
-        if self.fp:
-            self.fp.write("%s = {\n" % name)
-            for item in items:
-                self.compileenumerator(item)
-            self.fp.write("}\n\n")
-        self.namemappers[0].addnamecode('enum', name, code)
-        return code
-
-    def compileenumerator(self, item):
-        [name, code, desc] = item
-        self.fp.write("    %r : %r,\t# %s\n" % (identify(name), code, ascii(desc)))
-
-    def checkforenum(self, enum):
-        """This enum code is used by an event. Make sure it's available"""
-        name, fullname, module = self.findcodename('enum', enum)
-        if not name:
-            if self.fp:
-                self.fp.write("_Enum_%s = None # XXXX enum %s not found!!\n"%(identify(enum), ascii(enum)))
-            return
-        if module:
-            if self.fp:
-                self.fp.write("from %s import %s\n"%(module, name))
-
-    def dumpindex(self):
-        if not self.fp:
-            return
-        self.fp.write("\n#\n# Indices of types declared in this module\n#\n")
-
-        self.fp.write("_classdeclarations = {\n")
-        classlist = self.namemappers[0].getall('class')
-        classlist.sort()
-        for k, v in classlist:
-            self.fp.write("    %r : %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("    %r : _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("    %r : %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("    %r : %s,\n" % (k, v))
-        self.fp.write("}\n")
-
-def compiledata(data):
-    [type, description, flags] = data
-    return "%r -- %r %s" % (type, description, compiledataflags(flags))
-
-def is_null(data):
-    return data[0] == 'null'
-
-def is_optional(data):
-    return (data[2] & 0x8000)
-
-def is_enum(data):
-    return (data[2] & 0x2000)
-
-def getdatadoc(data):
-    [type, descr, flags] = data
-    if descr:
-        return ascii(descr)
-    if type == '****':
-        return 'anything'
-    if type == 'obj ':
-        return 'an AE object reference'
-    return "undocumented, typecode %r"%(type,)
-
-dataflagdict = {15: "optional", 14: "list", 13: "enum", 12: "mutable"}
-def compiledataflags(flags):
-    bits = []
-    for i in range(16):
-        if flags & (1<<i):
-            if i in dataflagdict.keys():
-                bits.append(dataflagdict[i])
-            else:
-                bits.append(repr(i))
-    return '[%s]' % ' '.join(bits)
-
-def ascii(str):
-    """Return a string with all non-ascii characters hex-encoded"""
-    if type(str) != type(''):
-        return map(ascii, str)
-    rv = ''
-    for c in str:
-        if c in ('\t', '\n', '\r') or ' ' <= c < chr(0x7f):
-            rv = rv + c
-        else:
-            rv = rv + '\\' + 'x%02.2x' % ord(c)
-    return rv
-
-def identify(str):
-    """Turn any string into an identifier:
-    - replace space by _
-    - replace other illegal chars by _xx_ (hex code)
-    - append _ if the result is a python keyword
-    """
-    if not str:
-        return "empty_ae_name_"
-    rv = ''
-    ok = string.ascii_letters + '_'
-    ok2 = ok + string.digits
-    for c in str:
-        if c in ok:
-            rv = rv + c
-        elif c == ' ':
-            rv = rv + '_'
-        else:
-            rv = rv + '_%02.2x_'%ord(c)
-        ok = ok2
-    if keyword.iskeyword(rv):
-        rv = rv + '_'
-    return rv
-
-# Call the main program
-
-if __name__ == '__main__':
-    main()
-    sys.exit(1)
diff --git a/Lib/plat-mac/ic.py b/Lib/plat-mac/ic.py
deleted file mode 100644 (file)
index f4f8370..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-"""IC wrapper module, based on Internet Config 1.3"""
-
-import icglue
-import sys
-import os
-from Carbon import Res
-import Carbon.File
-import macostools
-
-error=icglue.error
-
-# From ictypes.h:
-icPrefNotFoundErr = -666        # preference not found (duh!)
-icPermErr = -667                # cannot set preference
-icPrefDataErr = -668            # problem with preference data
-icInternalErr = -669            # hmm, this is not good
-icTruncatedErr = -670           # more data was present than was returned
-icNoMoreWritersErr = -671       # you cannot begin a write session because someone else is already doing it */
-icNothingToOverrideErr = -672   # no component for the override component to capture
-icNoURLErr = -673               # no URL found
-icConfigNotFoundErr = -674      # no configuration was found
-icConfigInappropriateErr = -675 # incorrect manufacturer code
-
-ICattr_no_change = -1
-
-icNoPerm = 0
-icReadOnlyPerm = 1
-icReadWritePerm = 2
-# End of ictypes.h
-
-class ICOpaqueData:
-    """An unparseable IC entry"""
-    def __init__(self, data):
-        self.data = data
-
-    def __repr__(self):
-        return "ICOpaqueData(%r)"%(self.data,)
-
-_ICOpaqueDataType=type(ICOpaqueData(''))
-
-def _decode_default(data, key):
-    if len(data) == 0:
-        return data
-    if data[0] == len(data)-1:
-        # Assume Pstring
-        return data[1:]
-    return ICOpaqueData(data)
-
-
-def _decode_multistr(data, key):
-    numstr = data[0] << 8 | data[1]
-    rv = []
-    ptr = 2
-    for i in range(numstr):
-        strlen = data[ptr]
-        str = data[ptr+1:ptr+strlen+1]
-        rv.append(str)
-        ptr = ptr + strlen + 1
-    return rv
-
-def _decode_fontrecord(data, key):
-    size = data[0] << 8 | data[1]
-    face = data[2]
-    namelen = data[4]
-    return size, face, data[5:5+namelen]
-
-def _decode_boolean(data, key):
-    return data[0]
-
-def _decode_text(data, key):
-    return data
-
-def _decode_charset(data, key):
-    return data[:256], data[256:]
-
-def _decode_appspec(data, key):
-    namelen = data[4]
-    return data[0:4], data[5:5+namelen]
-
-def _code_default(data, key):
-    return chr(len(data)) + data
-
-def _code_multistr(data, key):
-    numstr = len(data)
-    rv = chr((numstr>>8) & 0xff) + chr(numstr & 0xff)
-    for i in data:
-        rv = rv + _code_default(i)
-    return rv
-
-def _code_fontrecord(data, key):
-    size, face, name = data
-    return chr((size>>8) & 0xff) + chr(size & 0xff) + chr(face & 0xff) + \
-        chr(0) + _code_default(name)
-
-def _code_boolean(data, key):
-    print('XXXX boolean:', repr(data))
-    return chr(data)
-
-def _code_text(data, key):
-    return data
-
-def _code_charset(data, key):
-    return data[0] + data[1]
-
-def _code_appspec(data, key):
-    return data[0] + _code_default(data[1])
-
-_decoder_table = {
-    "ArchieAll" : (_decode_multistr , _code_multistr),
-    "UMichAll" : (_decode_multistr , _code_multistr),
-    "InfoMacAll" : (_decode_multistr , _code_multistr),
-    "ListFont" : (_decode_fontrecord , _code_fontrecord),
-    "ScreenFont" : (_decode_fontrecord , _code_fontrecord),
-    "PrinterFont" : (_decode_fontrecord , _code_fontrecord),
-#   "DownloadFolder" : (_decode_filespec , _code_filespec),
-    "Signature": (_decode_text , _code_text),
-    "Plan" : (_decode_text , _code_text),
-    "MailHeaders" : (_decode_text , _code_text),
-    "NewsHeaders" : (_decode_text , _code_text),
-#   "Mapping"
-    "CharacterSet" : (_decode_charset , _code_charset),
-    "Helper\245" : (_decode_appspec , _code_appspec),
-#   "Services" : (_decode_services, ????),
-    "NewMailFlashIcon" : (_decode_boolean , _code_boolean),
-    "NewMailDialog" : (_decode_boolean , _code_boolean),
-    "NewMailPlaySound" : (_decode_boolean , _code_boolean),
-#   "WebBackgroundColor" : _decode_color,
-    "NoProxyDomains" : (_decode_multistr , _code_multistr),
-    "UseHTTPProxy" : (_decode_boolean , _code_boolean),
-    "UseGopherProxy": (_decode_boolean , _code_boolean),
-    "UseFTPProxy" : (_decode_boolean , _code_boolean),
-    "UsePassiveFTP" : (_decode_boolean , _code_boolean),
-}
-
-def _decode(data, key):
-    if '\245' in key:
-        key2 = key[:key.index('\245')+1]
-    else:
-        key2 = key
-    if key2 in _decoder_table:
-        decoder = _decoder_table[key2][0]
-    else:
-        decoder = _decode_default
-    return decoder(data, key)
-
-def _code(data, key):
-    if type(data) == _ICOpaqueDataType:
-        return data.data
-    if '\245' in key:
-        key2 = key[:key.index('\245')+1]
-    else:
-        key2 = key
-    if key2 in _decoder_table:
-        coder = _decoder_table[key2][1]
-    else:
-        coder = _code_default
-    return coder(data, key)
-
-class IC:
-    def __init__(self, signature='Pyth', ic=None):
-        if ic:
-            self.ic = ic
-        else:
-            self.ic = icglue.ICStart(signature)
-            if hasattr(self.ic, 'ICFindConfigFile'):
-                self.ic.ICFindConfigFile()
-        self.h = Res.Resource('')
-
-    def keys(self):
-        rv = []
-        self.ic.ICBegin(icReadOnlyPerm)
-        num = self.ic.ICCountPref()
-        for i in range(num):
-            rv.append(self.ic.ICGetIndPref(i+1))
-        self.ic.ICEnd()
-        return rv
-
-    def __contains__(self, key):
-        try:
-            dummy = self.ic.ICFindPrefHandle(key, self.h)
-        except icglue.error:
-            return 0
-        return 1
-
-    def __getitem__(self, key):
-        attr = self.ic.ICFindPrefHandle(key, self.h)
-        return _decode(self.h.data, key)
-
-    def __setitem__(self, key, value):
-        value = _code(value, key)
-        self.ic.ICSetPref(key, ICattr_no_change, value)
-
-    def launchurl(self, url, hint=""):
-        # Work around a bug in ICLaunchURL: file:/foo does
-        # not work but file:///foo does.
-        if url[:6] == 'file:/' and url[6] != '/':
-            url = 'file:///' + url[6:]
-        self.ic.ICLaunchURL(hint, url, 0, len(url))
-
-    def parseurl(self, data, start=None, end=None, hint=""):
-        if start is None:
-            selStart = 0
-            selEnd = len(data)
-        else:
-            selStart = selEnd = start
-        if end is not None:
-            selEnd = end
-        selStart, selEnd = self.ic.ICParseURL(hint, data, selStart, selEnd, self.h)
-        return self.h.data, selStart, selEnd
-
-    def mapfile(self, file):
-        if type(file) != type(''):
-            file = file.as_tuple()[2]
-        return self.ic.ICMapFilename(file)
-
-    def maptypecreator(self, type, creator, filename=""):
-        return self.ic.ICMapTypeCreator(type, creator, filename)
-
-    def settypecreator(self, file):
-        file = Carbon.File.pathname(file)
-        record = self.mapfile(os.path.split(file)[1])
-        MacOS.SetCreatorAndType(file, record[2], record[1])
-        macostools.touched(fss)
-
-# Convenience routines
-_dft_ic = None
-
-def launchurl(url, hint=""):
-    global _dft_ic
-    if _dft_ic is None: _dft_ic = IC()
-    return _dft_ic.launchurl(url, hint)
-
-def parseurl(data, start=None, end=None, hint=""):
-    global _dft_ic
-    if _dft_ic is None: _dft_ic = IC()
-    return _dft_ic.parseurl(data, start, end, hint)
-
-def mapfile(filename):
-    global _dft_ic
-    if _dft_ic is None: _dft_ic = IC()
-    return _dft_ic.mapfile(filename)
-
-def maptypecreator(type, creator, filename=""):
-    global _dft_ic
-    if _dft_ic is None: _dft_ic = IC()
-    return _dft_ic.maptypecreator(type, creator, filename)
-
-def settypecreator(file):
-    global _dft_ic
-    if _dft_ic is None: _dft_ic = IC()
-    return _dft_ic.settypecreator(file)
-
-def _test():
-    ic = IC()
-    for k in ic.keys():
-        try:
-            v = ic[k]
-        except error:
-            v = '????'
-        print(k, '\t', v)
-    sys.exit(1)
-
-if __name__ == '__main__':
-    _test()
diff --git a/Lib/plat-mac/icopen.py b/Lib/plat-mac/icopen.py
deleted file mode 100644 (file)
index 146a333..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-"""icopen patch
-
-OVERVIEW
-
-icopen patches MacOS Python to use the Internet Config file mappings to select
-the type and creator for a file.
-
-Version 1 released to the public domain 3 November 1999
-by Oliver Steele (steele@cs.brandeis.edu).
-
-DETAILS
-
-This patch causes files created by Python's open(filename, 'w') command (and
-by functions and scripts that call it) to set the type and creator of the file
-to the type and creator associated with filename's extension (the
-portion of the filename after the last period), according to Internet Config.
-Thus, a script that creates a file foo.html will create one that opens in whatever
-browser you've set to handle *.html files, and so on.
-
-Python IDE uses its own algorithm to select the type and creator for saved
-editor windows, so this patch won't effect their types.
-
-As of System 8.6 at least, Internet Config is built into the system, and the
-file mappings are accessed from the Advanced pane of the Internet control
-panel.  User Mode (in the Edit menu) needs to be set to Advanced in order to
-access this pane.
-
-INSTALLATION
-
-Put this file in your Python path, and create a file named {Python}:sitecustomize.py
-that contains:
-        import icopen
-
-(If {Python}:sitecustomizer.py already exists, just add the 'import' line to it.)
-
-The next time you launch PythonInterpreter or Python IDE, the patch will take
-effect.
-"""
-
-import builtins
-
-_builtin_open = globals().get('_builtin_open', builtins.open)
-
-def _open_with_typer(*args):
-    file = _builtin_open(*args)
-    filename = args[0]
-    mode = 'r'
-    if args[1:]:
-        mode = args[1]
-    if mode[0] == 'w':
-        from ic import error, settypecreator
-        try:
-            settypecreator(filename)
-        except error:
-            pass
-    return file
-
-builtins.open = _open_with_typer
-
-"""
-open('test.py')
-_open_with_typer('test.py', 'w')
-_open_with_typer('test.txt', 'w')
-_open_with_typer('test.html', 'w')
-_open_with_typer('test.foo', 'w')
-"""
diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py
deleted file mode 100644 (file)
index ab1fd6a..0000000
+++ /dev/null
@@ -1,683 +0,0 @@
-"""Suite CodeWarrior suite: Terms for scripting the CodeWarrior IDE
-Level 0, version 0
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'CWIE'
-
-class CodeWarrior_suite_Events:
-
-    _argmap_add = {
-        'new' : 'kocl',
-        'with_data' : 'data',
-        'to_targets' : 'TTGT',
-        'to_group' : 'TGRP',
-    }
-
-    def add(self, _object, _attributes={}, **_arguments):
-        """add: add elements to a project or target
-        Required argument: an AE object reference
-        Keyword argument new: the class of the new element or elements to add
-        Keyword argument with_data: the initial data for the element or elements
-        Keyword argument to_targets: the targets to which the new element or elements will be added
-        Keyword argument to_group: the group to which the new element or elements will be added
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'ADDF'
-
-        aetools.keysubst(_arguments, self._argmap_add)
-        _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 build(self, _no_object=None, _attributes={}, **_arguments):
-        """build: build a project or target (equivalent of the Make menu command)
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'MAKE'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 check(self, _object=None, _attributes={}, **_arguments):
-        """check: check the syntax of a file in a project or target
-        Required argument: the file or files to be checked
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'CHEK'
-
-        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 compile_file(self, _object=None, _attributes={}, **_arguments):
-        """compile file: compile a file in a project or target
-        Required argument: the file or files to be compiled
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'COMP'
-
-        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 disassemble_file(self, _object=None, _attributes={}, **_arguments):
-        """disassemble file: disassemble a file in a project or target
-        Required argument: the file or files to be disassembled
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'DASM'
-
-        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_export = {
-        'in_' : 'kfil',
-    }
-
-    def export(self, _no_object=None, _attributes={}, **_arguments):
-        """export: Export the project file as an XML file
-        Keyword argument in_: the XML file in which to export the project
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'EXPT'
-
-        aetools.keysubst(_arguments, self._argmap_export)
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 remove_object_code(self, _no_object=None, _attributes={}, **_arguments):
-        """remove object code: remove object code from a project or target
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'RMOB'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 remove_target_files(self, _object, _attributes={}, **_arguments):
-        """remove target files: remove files from a target
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'RMFL'
-
-        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 run_target(self, _no_object=None, _attributes={}, **_arguments):
-        """run target: run a project or target
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'RUN '
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 touch_file(self, _object=None, _attributes={}, **_arguments):
-        """touch file: touch a file in a project or target for compilation
-        Required argument: the file or files to be touched
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'TOCH'
-
-        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 update(self, _no_object=None, _attributes={}, **_arguments):
-        """update: bring a project or target up to date
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'CWIE'
-        _subcode = 'UP2D'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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['----']
-
-
-class single_class_browser(aetools.ComponentItem):
-    """single class browser - a single class browser """
-    want = '1BRW'
-class _Prop_inherits(aetools.NProperty):
-    """inherits - all properties and elements of the given class are inherited by this class. """
-    which = 'c@#^'
-    want = 'TXTD'
-
-single_class_browsers = single_class_browser
-
-class single_class_hierarchy(aetools.ComponentItem):
-    """single class hierarchy - a single class hierarchy document """
-    want = '1HIR'
-
-single_class_hierarchies = single_class_hierarchy
-
-class class_browser(aetools.ComponentItem):
-    """class browser - a class browser """
-    want = 'BROW'
-
-class_browsers = class_browser
-
-class file_compare_document(aetools.ComponentItem):
-    """file compare document - a file compare document """
-    want = 'COMP'
-
-file_compare_documents = file_compare_document
-
-class catalog_document(aetools.ComponentItem):
-    """catalog document - a browser catalog document """
-    want = 'CTLG'
-
-catalog_documents = catalog_document
-
-class editor_document(aetools.ComponentItem):
-    """editor document - an editor document """
-    want = 'EDIT'
-
-editor_documents = editor_document
-
-class class_hierarchy(aetools.ComponentItem):
-    """class hierarchy - a class hierarchy document """
-    want = 'HIER'
-
-class_hierarchies = class_hierarchy
-
-class project_inspector(aetools.ComponentItem):
-    """project inspector - the project inspector """
-    want = 'INSP'
-
-project_inspectors = project_inspector
-
-class message_document(aetools.ComponentItem):
-    """message document - a message document """
-    want = 'MSSG'
-
-message_documents = message_document
-
-class build_progress_document(aetools.ComponentItem):
-    """build progress document - a build progress document """
-    want = 'PRGS'
-
-build_progress_documents = build_progress_document
-
-class project_document(aetools.ComponentItem):
-    """project document - a project document """
-    want = 'PRJD'
-class _Prop_current_target(aetools.NProperty):
-    """current target - the current target """
-    which = 'CURT'
-    want = 'TRGT'
-#        element 'TRGT' as ['indx', 'name', 'test', 'rang']
-
-project_documents = project_document
-
-class subtarget(aetools.ComponentItem):
-    """subtarget - a target that is prerequisite for another target """
-    want = 'SBTG'
-class _Prop_link_against_output(aetools.NProperty):
-    """link against output - is the output of this subtarget linked into its dependent target? """
-    which = 'LNKO'
-    want = 'bool'
-class _Prop_target(aetools.NProperty):
-    """target - the target that is dependent on this subtarget """
-    which = 'TrgT'
-    want = 'TRGT'
-
-subtargets = subtarget
-
-class target_file(aetools.ComponentItem):
-    """target file - a source or header file in a target """
-    want = 'SRCF'
-class _Prop_code_size(aetools.NProperty):
-    """code size - the size of the code (in bytes) produced by compiling this source file """
-    which = 'CSZE'
-    want = 'long'
-class _Prop_compiled_date(aetools.NProperty):
-    """compiled date - the date and this source file was last compiled """
-    which = 'CMPD'
-    want = 'ldt '
-class _Prop_data_size(aetools.NProperty):
-    """data size - the size of the date (in bytes) produced by compiling this source file """
-    which = 'DSZE'
-    want = 'long'
-class _Prop_debug(aetools.NProperty):
-    """debug - is debugging information generated for this source file? """
-    which = 'DBUG'
-    want = 'bool'
-class _Prop_dependents(aetools.NProperty):
-    """dependents - the source files that need this source file in order to build """
-    which = 'DPND'
-    want = 'list'
-class _Prop_id(aetools.NProperty):
-    """id - the unique ID number of the target file """
-    which = 'ID  '
-    want = 'long'
-class _Prop_init_before(aetools.NProperty):
-    """init before - is the \xd4initialize before\xd5 flag set for this shared library? """
-    which = 'INIT'
-    want = 'bool'
-class _Prop_link_index(aetools.NProperty):
-    """link index - the index of the source file in its target\xd5s link order (-1 if source file is not in link order) """
-    which = 'LIDX'
-    want = 'long'
-class _Prop_linked(aetools.NProperty):
-    """linked - is the source file in the link order of its target? """
-    which = 'LINK'
-    want = 'bool'
-class _Prop_location(aetools.NProperty):
-    """location - the location of the target file on disk """
-    which = 'FILE'
-    want = 'fss '
-class _Prop_merge_output(aetools.NProperty):
-    """merge output - is this shared library merged into another code fragment? """
-    which = 'MRGE'
-    want = 'bool'
-class _Prop_modified_date(aetools.NProperty):
-    """modified date - the date and time this source file was last modified """
-    which = 'MODD'
-    want = 'ldt '
-class _Prop_path(aetools.NProperty):
-    """path - the path of the source file on disk """
-    which = 'Path'
-    want = 'itxt'
-class _Prop_prerequisites(aetools.NProperty):
-    """prerequisites - the source files needed to build this source file """
-    which = 'PRER'
-    want = 'list'
-class _Prop_type(aetools.NProperty):
-    """type - the type of source file """
-    which = 'FTYP'
-    want = 'FTYP'
-class _Prop_weak_link(aetools.NProperty):
-    """weak link - is this shared library linked weakly? """
-    which = 'WEAK'
-    want = 'bool'
-
-target_files = target_file
-
-class symbol_browser(aetools.ComponentItem):
-    """symbol browser - a symbol browser """
-    want = 'SYMB'
-
-symbol_browsers = symbol_browser
-
-class ToolServer_worksheet(aetools.ComponentItem):
-    """ToolServer worksheet - a ToolServer worksheet """
-    want = 'TOOL'
-
-ToolServer_worksheets = ToolServer_worksheet
-
-class target(aetools.ComponentItem):
-    """target - a target in a project """
-    want = 'TRGT'
-class _Prop_name(aetools.NProperty):
-    """name -  """
-    which = 'pnam'
-    want = 'itxt'
-class _Prop_project_document(aetools.NProperty):
-    """project document - the project document that contains this target """
-    which = 'PrjD'
-    want = 'PRJD'
-#        element 'SBTG' as ['indx', 'test', 'rang']
-#        element 'SRCF' as ['indx', 'test', 'rang']
-
-targets = target
-
-class text_document(aetools.ComponentItem):
-    """text document - a document that contains text """
-    want = 'TXTD'
-class _Prop_modified(aetools.NProperty):
-    """modified - Has the document been modified since the last save? """
-    which = 'imod'
-    want = 'bool'
-class _Prop_selection(aetools.NProperty):
-    """selection - the selection visible to the user """
-    which = 'sele'
-    want = 'csel'
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cins' as ['rele']
-#        element 'clin' as ['indx', 'rang', 'rele']
-#        element 'ctxt' as ['rang']
-
-text_documents = text_document
-single_class_browser._superclassnames = ['text_document']
-single_class_browser._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-single_class_browser._privelemdict = {
-}
-from . import Standard_Suite
-single_class_hierarchy._superclassnames = ['document']
-single_class_hierarchy._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-single_class_hierarchy._privelemdict = {
-}
-class_browser._superclassnames = ['text_document']
-class_browser._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-class_browser._privelemdict = {
-}
-file_compare_document._superclassnames = ['text_document']
-file_compare_document._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-file_compare_document._privelemdict = {
-}
-catalog_document._superclassnames = ['text_document']
-catalog_document._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-catalog_document._privelemdict = {
-}
-editor_document._superclassnames = ['text_document']
-editor_document._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-editor_document._privelemdict = {
-}
-class_hierarchy._superclassnames = ['document']
-class_hierarchy._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-class_hierarchy._privelemdict = {
-}
-project_inspector._superclassnames = ['document']
-project_inspector._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-project_inspector._privelemdict = {
-}
-message_document._superclassnames = ['text_document']
-message_document._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-message_document._privelemdict = {
-}
-build_progress_document._superclassnames = ['document']
-build_progress_document._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-build_progress_document._privelemdict = {
-}
-project_document._superclassnames = ['document']
-project_document._privpropdict = {
-    'current_target' : _Prop_current_target,
-    'inherits' : _Prop_inherits,
-}
-project_document._privelemdict = {
-    'target' : target,
-}
-subtarget._superclassnames = ['target']
-subtarget._privpropdict = {
-    'inherits' : _Prop_inherits,
-    'link_against_output' : _Prop_link_against_output,
-    'target' : _Prop_target,
-}
-subtarget._privelemdict = {
-}
-target_file._superclassnames = []
-target_file._privpropdict = {
-    'code_size' : _Prop_code_size,
-    'compiled_date' : _Prop_compiled_date,
-    'data_size' : _Prop_data_size,
-    'debug' : _Prop_debug,
-    'dependents' : _Prop_dependents,
-    'id' : _Prop_id,
-    'init_before' : _Prop_init_before,
-    'link_index' : _Prop_link_index,
-    'linked' : _Prop_linked,
-    'location' : _Prop_location,
-    'merge_output' : _Prop_merge_output,
-    'modified_date' : _Prop_modified_date,
-    'path' : _Prop_path,
-    'prerequisites' : _Prop_prerequisites,
-    'type' : _Prop_type,
-    'weak_link' : _Prop_weak_link,
-}
-target_file._privelemdict = {
-}
-symbol_browser._superclassnames = ['text_document']
-symbol_browser._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-symbol_browser._privelemdict = {
-}
-ToolServer_worksheet._superclassnames = ['text_document']
-ToolServer_worksheet._privpropdict = {
-    'inherits' : _Prop_inherits,
-}
-ToolServer_worksheet._privelemdict = {
-}
-target._superclassnames = []
-target._privpropdict = {
-    'name' : _Prop_name,
-    'project_document' : _Prop_project_document,
-}
-target._privelemdict = {
-    'subtarget' : subtarget,
-    'target_file' : target_file,
-}
-text_document._superclassnames = ['document']
-text_document._privpropdict = {
-    'inherits' : _Prop_inherits,
-    'modified' : _Prop_modified,
-    'selection' : _Prop_selection,
-}
-text_document._privelemdict = {
-    'character' : Standard_Suite.character,
-    'insertion_point' : Standard_Suite.insertion_point,
-    'line' : Standard_Suite.line,
-    'text' : Standard_Suite.text,
-}
-_Enum_DKND = {
-    'project' : 'PRJD', # a project document
-    'editor_document' : 'EDIT', # an editor document
-    'message' : 'MSSG', # a message document
-    'file_compare' : 'COMP',    # a file compare document
-    'catalog_document' : 'CTLG',        # a browser catalog
-    'class_browser' : 'BROW',   # a class browser document
-    'single_class_browser' : '1BRW',    # a single class browser document
-    'symbol_browser' : 'SYMB',  # a symbol browser document
-    'class_hierarchy' : 'HIER', # a class hierarchy document
-    'single_class_hierarchy' : '1HIR',  # a single class hierarchy document
-    'project_inspector' : 'INSP',       # a project inspector
-    'ToolServer_worksheet' : 'TOOL',    # the ToolServer worksheet
-    'build_progress_document' : 'PRGS', # the build progress window
-}
-
-_Enum_FTYP = {
-    'library_file' : 'LIBF',    # a library file
-    'project_file' : 'PRJF',    # a project file
-    'resource_file' : 'RESF',   # a resource file
-    'text_file' : 'TXTF',       # a text file
-    'unknown_file' : 'UNKN',    # unknown file type
-}
-
-_Enum_Inte = {
-    'never_interact' : 'eNvr',  # never allow user interactions
-    'interact_with_self' : 'eInS',      # allow user interaction only when an AppleEvent is sent from within CodeWarrior
-    'interact_with_local' : 'eInL',     # allow user interaction when AppleEvents are sent from applications on the same machine (default)
-    'interact_with_all' : 'eInA',       # allow user interaction from both local and remote AppleEvents
-}
-
-_Enum_PERM = {
-    'read_write' : 'RdWr',      # the file is open with read/write permission
-    'read_only' : 'Read',       # the file is open with read/only permission
-    'checked_out_read_write' : 'CkRW',  # the file is checked out with read/write permission
-    'checked_out_read_only' : 'CkRO',   # the file is checked out with read/only permission
-    'checked_out_read_modify' : 'CkRM', # the file is checked out with read/modify permission
-    'locked' : 'Lock',  # the file is locked on disk
-    'none' : 'LNNO',    # the file is new
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    '1BRW' : single_class_browser,
-    '1HIR' : single_class_hierarchy,
-    'BROW' : class_browser,
-    'COMP' : file_compare_document,
-    'CTLG' : catalog_document,
-    'EDIT' : editor_document,
-    'HIER' : class_hierarchy,
-    'INSP' : project_inspector,
-    'MSSG' : message_document,
-    'PRGS' : build_progress_document,
-    'PRJD' : project_document,
-    'SBTG' : subtarget,
-    'SRCF' : target_file,
-    'SYMB' : symbol_browser,
-    'TOOL' : ToolServer_worksheet,
-    'TRGT' : target,
-    'TXTD' : text_document,
-}
-
-_propdeclarations = {
-    'CMPD' : _Prop_compiled_date,
-    'CSZE' : _Prop_code_size,
-    'CURT' : _Prop_current_target,
-    'DBUG' : _Prop_debug,
-    'DPND' : _Prop_dependents,
-    'DSZE' : _Prop_data_size,
-    'FILE' : _Prop_location,
-    'FTYP' : _Prop_type,
-    'ID  ' : _Prop_id,
-    'INIT' : _Prop_init_before,
-    'LIDX' : _Prop_link_index,
-    'LINK' : _Prop_linked,
-    'LNKO' : _Prop_link_against_output,
-    'MODD' : _Prop_modified_date,
-    'MRGE' : _Prop_merge_output,
-    'PRER' : _Prop_prerequisites,
-    'Path' : _Prop_path,
-    'PrjD' : _Prop_project_document,
-    'TrgT' : _Prop_target,
-    'WEAK' : _Prop_weak_link,
-    'c@#^' : _Prop_inherits,
-    'imod' : _Prop_modified,
-    'pnam' : _Prop_name,
-    'sele' : _Prop_selection,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'DKND' : _Enum_DKND,
-    'FTYP' : _Enum_FTYP,
-    'Inte' : _Enum_Inte,
-    'PERM' : _Enum_PERM,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Metrowerks_Shell_Suite.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Metrowerks_Shell_Suite.py
deleted file mode 100644 (file)
index 48f42fd..0000000
+++ /dev/null
@@ -1,2378 +0,0 @@
-"""Suite Metrowerks Shell Suite: Events supported by the Metrowerks Project Shell
-Level 1, version 1
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'MMPR'
-
-class Metrowerks_Shell_Suite_Events:
-
-    _argmap_Add_Files = {
-        'To_Segment' : 'Segm',
-    }
-
-    def Add_Files(self, _object, _attributes={}, **_arguments):
-        """Add Files: Add the specified file(s) to the current project
-        Required argument: List of files to add
-        Keyword argument To_Segment: Segment number into which to add the file(s)
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Error code for each file added
-        """
-        _code = 'MMPR'
-        _subcode = 'AddF'
-
-        aetools.keysubst(_arguments, self._argmap_Add_Files)
-        _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_Check_Syntax = {
-        'ExternalEditor' : 'Errs',
-    }
-
-    def Check_Syntax(self, _object, _attributes={}, **_arguments):
-        """Check Syntax: Check the syntax of the specified file(s)
-        Required argument: List of files to check the syntax of
-        Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Errors for each file whose syntax was checked
-        """
-        _code = 'MMPR'
-        _subcode = 'Chek'
-
-        aetools.keysubst(_arguments, self._argmap_Check_Syntax)
-        _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 Close_Project(self, _no_object=None, _attributes={}, **_arguments):
-        """Close Project: Close the current project
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'ClsP'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_Close_Window = {
-        'Saving' : 'savo',
-    }
-
-    def Close_Window(self, _object, _attributes={}, **_arguments):
-        """Close Window: Close the windows showing the specified files
-        Required argument: The files to close
-        Keyword argument Saving: Whether to save changes to each file before closing its window
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'ClsW'
-
-        aetools.keysubst(_arguments, self._argmap_Close_Window)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_Compile = {
-        'ExternalEditor' : 'Errs',
-    }
-
-    def Compile(self, _object, _attributes={}, **_arguments):
-        """Compile: Compile the specified file(s)
-        Required argument: List of files to compile
-        Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Errors for each file compiled
-        """
-        _code = 'MMPR'
-        _subcode = 'Comp'
-
-        aetools.keysubst(_arguments, self._argmap_Compile)
-        _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_Create_Project = {
-        'from_stationery' : 'Tmpl',
-    }
-
-    def Create_Project(self, _object, _attributes={}, **_arguments):
-        """Create Project: Create a new project file
-        Required argument: New project file specifier
-        Keyword argument from_stationery: undocumented, typecode 'alis'
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'NewP'
-
-        aetools.keysubst(_arguments, self._argmap_Create_Project)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def Get_Definition(self, _object, _attributes={}, **_arguments):
-        """Get Definition: Returns the location(s) of a globally scoped function or data object.
-        Required argument: undocumented, typecode 'TEXT'
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: undocumented, typecode 'FDef'
-        """
-        _code = 'MMPR'
-        _subcode = 'GDef'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def Get_Open_Documents(self, _no_object=None, _attributes={}, **_arguments):
-        """Get Open Documents: Returns the list of open documents
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: The list of documents
-        """
-        _code = 'MMPR'
-        _subcode = 'GDoc'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_Get_Preferences = {
-        'of' : 'PRec',
-        'from_panel' : 'PNam',
-    }
-
-    def Get_Preferences(self, _no_object=None, _attributes={}, **_arguments):
-        """Get Preferences: Get the preferences for the current project
-        Keyword argument of: Names of requested preferences
-        Keyword argument from_panel: Name of the preference panel
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: The requested preferences
-        """
-        _code = 'MMPR'
-        _subcode = 'Gref'
-
-        aetools.keysubst(_arguments, self._argmap_Get_Preferences)
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_Get_Project_File = {
-        'Segment' : 'Segm',
-    }
-
-    def Get_Project_File(self, _object, _attributes={}, **_arguments):
-        """Get Project File: Returns a description of a file in the project window.
-        Required argument: The index of the file within its segment.
-        Keyword argument Segment: The segment containing the file.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: undocumented, typecode 'SrcF'
-        """
-        _code = 'MMPR'
-        _subcode = 'GFil'
-
-        aetools.keysubst(_arguments, self._argmap_Get_Project_File)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def Get_Project_Specifier(self, _no_object=None, _attributes={}, **_arguments):
-        """Get Project Specifier: Return the File Specifier for the current project
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: File Specifier for the current project
-        """
-        _code = 'MMPR'
-        _subcode = 'GetP'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 Get_Segments(self, _no_object=None, _attributes={}, **_arguments):
-        """Get Segments: Returns a description of each segment in the project.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: undocumented, typecode 'Seg '
-        """
-        _code = 'MMPR'
-        _subcode = 'GSeg'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 Get_member_function_names(self, _object, _attributes={}, **_arguments):
-        """Get member function names: Returns a list containing the names of all the member functions of a class object
-        Required argument: must be a class object
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: undocumented, typecode 'list'
-        """
-        _code = 'MMPR'
-        _subcode = 'MbFN'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def Get_nonsimple_classes(self, _no_object=None, _attributes={}, **_arguments):
-        """Get nonsimple classes: Returns an alphabetical list of classes with member functions, bases classes, or subclasses
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: undocumented, typecode 'list'
-        """
-        _code = 'MMPR'
-        _subcode = 'NsCl'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 Goto_Function(self, _object, _attributes={}, **_arguments):
-        """Goto Function: Goto Specified Function Name
-        Required argument: undocumented, typecode 'TEXT'
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'GoFn'
-
-        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 Goto_Line(self, _object, _attributes={}, **_arguments):
-        """Goto Line: Goto Specified Line Number
-        Required argument: The requested source file line number
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'GoLn'
-
-        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 Is_In_Project(self, _object, _attributes={}, **_arguments):
-        """Is In Project: Whether or not the specified file(s) is in the current project
-        Required argument: List of files to check for project membership
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Result code for each file
-        """
-        _code = 'MMPR'
-        _subcode = 'FInP'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_Make_Project = {
-        'ExternalEditor' : 'Errs',
-    }
-
-    def Make_Project(self, _no_object=None, _attributes={}, **_arguments):
-        """Make Project: Make the current project
-        Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Errors that occurred while making the project
-        """
-        _code = 'MMPR'
-        _subcode = 'Make'
-
-        aetools.keysubst(_arguments, self._argmap_Make_Project)
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_browser(self, _object, _attributes={}, **_arguments):
-        """Open browser: Display a class, member function, or data member object in a single class browser window
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'Brow'
-
-        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_Precompile = {
-        'Saving_As' : 'Targ',
-        'ExternalEditor' : 'Errs',
-    }
-
-    def Precompile(self, _object, _attributes={}, **_arguments):
-        """Precompile: Precompile the specified file to the specified destination file
-        Required argument: File to precompile
-        Keyword argument Saving_As: Destination file for precompiled header
-        Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Errors for the precompiled file
-        """
-        _code = 'MMPR'
-        _subcode = 'PreC'
-
-        aetools.keysubst(_arguments, self._argmap_Precompile)
-        _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_Preprocess = {
-        'ExternalEditor' : 'Errs',
-    }
-
-    def Preprocess(self, _object, _attributes={}, **_arguments):
-        """Preprocess: Preprocesses the specified file(s)
-        Required argument: undocumented, typecode 'alis'
-        Keyword argument ExternalEditor: undocumented, typecode 'bool'
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Errors for each preprocessed file
-        """
-        _code = 'MMPR'
-        _subcode = 'PreP'
-
-        aetools.keysubst(_arguments, self._argmap_Preprocess)
-        _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 Remove_Binaries(self, _no_object=None, _attributes={}, **_arguments):
-        """Remove Binaries: Remove the binary object code from the current project
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'RemB'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 Remove_Files(self, _object, _attributes={}, **_arguments):
-        """Remove Files: Remove the specified file(s) from the current project
-        Required argument: List of files to remove
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Error code for each file removed
-        """
-        _code = 'MMPR'
-        _subcode = 'RemF'
-
-        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 Reset_File_Paths(self, _no_object=None, _attributes={}, **_arguments):
-        """Reset File Paths: Resets access paths for all files belonging to open project.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'ReFP'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_Run_Project = {
-        'ExternalEditor' : 'Errs',
-        'SourceDebugger' : 'DeBg',
-    }
-
-    def Run_Project(self, _no_object=None, _attributes={}, **_arguments):
-        """Run Project: Run the current project
-        Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
-        Keyword argument SourceDebugger: Run the application under the control of the source-level debugger
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Errors that occurred when running the project
-        """
-        _code = 'MMPR'
-        _subcode = 'RunP'
-
-        aetools.keysubst(_arguments, self._argmap_Run_Project)
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 Save_Error_Window_As(self, _object, _attributes={}, **_arguments):
-        """Save Error Window As: Saves the Errors & Warnings window as a text file
-        Required argument: Destination file for Save Message Window As
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'SvMs'
-
-        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 Set_Current_Target(self, _object=None, _attributes={}, **_arguments):
-        """Set Current Target: Set the current target of a project
-        Required argument: Name of target
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'STrg'
-
-        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 Set_Default_Project(self, _object, _attributes={}, **_arguments):
-        """Set Default Project: Set the default project
-        Required argument: Name of project
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'SDfP'
-
-        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_Set_Modification_Date = {
-        'to' : 'MDat',
-    }
-
-    def Set_Modification_Date(self, _object, _attributes={}, **_arguments):
-        """Set Modification Date: Changes the internal modification date of the specified file(s)
-        Required argument: List of files
-        Keyword argument to: undocumented, typecode 'ldt '
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Error code for each modified file
-        """
-        _code = 'MMPR'
-        _subcode = 'SMod'
-
-        aetools.keysubst(_arguments, self._argmap_Set_Modification_Date)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_Set_Preferences = {
-        'of_panel' : 'PNam',
-        'to' : 'PRec',
-    }
-
-    def Set_Preferences(self, _no_object=None, _attributes={}, **_arguments):
-        """Set Preferences: Set the preferences for the current project
-        Keyword argument of_panel: Name of the preference panel
-        Keyword argument to: Preferences settings
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'Pref'
-
-        aetools.keysubst(_arguments, self._argmap_Set_Preferences)
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_Set_Project_File = {
-        'to' : 'SrcS',
-    }
-
-    def Set_Project_File(self, _object, _attributes={}, **_arguments):
-        """Set Project File: Changes the settings for a given file in the project.
-        Required argument: The name of the file
-        Keyword argument to: The new settings for the file
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'SFil'
-
-        aetools.keysubst(_arguments, self._argmap_Set_Project_File)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_Set_Segment = {
-        'to' : 'Segm',
-    }
-
-    def Set_Segment(self, _object, _attributes={}, **_arguments):
-        """Set Segment: Changes the name and attributes of a segment.
-        Required argument: The segment to change
-        Keyword argument to: The new name and attributes for the segment.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'MMPR'
-        _subcode = 'SSeg'
-
-        aetools.keysubst(_arguments, self._argmap_Set_Segment)
-        _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 Touch(self, _object, _attributes={}, **_arguments):
-        """Touch: Force recompilation of the specified file(s)
-        Required argument: List of files to compile
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Error code for each file touched
-        """
-        _code = 'MMPR'
-        _subcode = 'Toch'
-
-        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_Update_Project = {
-        'ExternalEditor' : 'Errs',
-    }
-
-    def Update_Project(self, _no_object=None, _attributes={}, **_arguments):
-        """Update Project: Update the current project
-        Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Errors that occurred while updating the project
-        """
-        _code = 'MMPR'
-        _subcode = 'UpdP'
-
-        aetools.keysubst(_arguments, self._argmap_Update_Project)
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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['----']
-
-
-class Browser_Coloring(aetools.ComponentItem):
-    """Browser Coloring - Colors for Browser symbols. """
-    want = 'BRKW'
-class _Prop_Browser_Keywords(aetools.NProperty):
-    """Browser Keywords - Mark Browser symbols with color. """
-    which = 'BW00'
-    want = 'bool'
-class _Prop_Classes_Color(aetools.NProperty):
-    """Classes Color - The color for classes. """
-    which = 'BW01'
-    want = 'cRGB'
-class _Prop_Constants_Color(aetools.NProperty):
-    """Constants Color - The color for constants. """
-    which = 'BW02'
-    want = 'cRGB'
-class _Prop_Enums_Color(aetools.NProperty):
-    """Enums Color - The color for enums. """
-    which = 'BW03'
-    want = 'cRGB'
-class _Prop_Functions_Color(aetools.NProperty):
-    """Functions Color - Set color for functions. """
-    which = 'BW04'
-    want = 'cRGB'
-class _Prop_Globals_Color(aetools.NProperty):
-    """Globals Color - The color for globals """
-    which = 'BW05'
-    want = 'cRGB'
-class _Prop_Macros_Color(aetools.NProperty):
-    """Macros Color - The color for macros. """
-    which = 'BW06'
-    want = 'cRGB'
-class _Prop_Template_Commands_in_Menu(aetools.NProperty):
-    """Template Commands in Menu - Include template commands in context menus """
-    which = 'BW10'
-    want = 'bool'
-class _Prop_Templates_Color(aetools.NProperty):
-    """Templates Color - Set color for templates. """
-    which = 'BW07'
-    want = 'cRGB'
-class _Prop_Typedefs_Color(aetools.NProperty):
-    """Typedefs Color - The color for typedefs. """
-    which = 'BW08'
-    want = 'cRGB'
-
-class Build_Settings(aetools.ComponentItem):
-    """Build Settings - Build Settings preferences. """
-    want = 'BSTG'
-class _Prop_Build_Before_Running(aetools.NProperty):
-    """Build Before Running - Build the target before running. """
-    which = 'BX04'
-    want = 'BXbr'
-class _Prop_Compiler_Thread_Stack_Size(aetools.NProperty):
-    """Compiler Thread Stack Size - Compiler Thread Stack Size """
-    which = 'BX06'
-    want = 'long'
-class _Prop_Completion_Sound(aetools.NProperty):
-    """Completion Sound - Play a sound when finished a Bring Up To Date or Make command. """
-    which = 'BX01'
-    want = 'bool'
-class _Prop_Failure_Sound(aetools.NProperty):
-    """Failure Sound - The sound CodeWarrior plays when it cannot finish a Bring Up To Date or Make command. """
-    which = 'BX03'
-    want = 'TEXT'
-class _Prop_Include_Cache_Size(aetools.NProperty):
-    """Include Cache Size - Include file cache size. """
-    which = 'BX05'
-    want = 'long'
-class _Prop_Save_Before_Building(aetools.NProperty):
-    """Save Before Building - Save open editor files before build operations """
-    which = 'BX07'
-    want = 'bool'
-class _Prop_Success_Sound(aetools.NProperty):
-    """Success Sound - The sound CodeWarrior plays when it successfully finishes a Bring Up To Date or Make command. """
-    which = 'BX02'
-    want = 'TEXT'
-
-class base_class(aetools.ComponentItem):
-    """base class - A base class or super class of a class """
-    want = 'BsCl'
-class _Prop_access(aetools.NProperty):
-    """access -  """
-    which = 'Acce'
-    want = 'Acce'
-class _Prop_class_(aetools.NProperty):
-    """class - The class object corresponding to this base class """
-    which = 'Clas'
-    want = 'obj '
-class _Prop_virtual(aetools.NProperty):
-    """virtual -  """
-    which = 'Virt'
-    want = 'bool'
-
-base_classes = base_class
-
-class Custom_Keywords(aetools.ComponentItem):
-    """Custom Keywords -  """
-    want = 'CUKW'
-class _Prop_Custom_Color_1(aetools.NProperty):
-    """Custom Color 1 - The color for the first set of custom keywords. """
-    which = 'GH05'
-    want = 'cRGB'
-class _Prop_Custom_Color_2(aetools.NProperty):
-    """Custom Color 2 - The color for the second set custom keywords. """
-    which = 'GH06'
-    want = 'cRGB'
-class _Prop_Custom_Color_3(aetools.NProperty):
-    """Custom Color 3 - The color for the third set of custom keywords. """
-    which = 'GH07'
-    want = 'cRGB'
-class _Prop_Custom_Color_4(aetools.NProperty):
-    """Custom Color 4 - The color for the fourth set of custom keywords. """
-    which = 'GH08'
-    want = 'cRGB'
-
-class browser_catalog(aetools.ComponentItem):
-    """browser catalog - The browser symbol catalog for the current project """
-    want = 'Cata'
-#        element 'Clas' as ['indx', 'name']
-
-class class_(aetools.ComponentItem):
-    """class - A class, struct, or record type in the current project. """
-    want = 'Clas'
-class _Prop_all_subclasses(aetools.NProperty):
-    """all subclasses - the classes directly or indirectly derived from this class """
-    which = 'SubA'
-    want = 'Clas'
-class _Prop_declaration_end_offset(aetools.NProperty):
-    """declaration end offset - End of class declaration """
-    which = 'DcEn'
-    want = 'long'
-class _Prop_declaration_file(aetools.NProperty):
-    """declaration file - Source file containing the class declaration """
-    which = 'DcFl'
-    want = 'fss '
-class _Prop_declaration_start_offset(aetools.NProperty):
-    """declaration start offset - Start of class declaration source code """
-    which = 'DcSt'
-    want = 'long'
-class _Prop_language(aetools.NProperty):
-    """language - Implementation language of this class """
-    which = 'Lang'
-    want = 'Lang'
-class _Prop_name(aetools.NProperty):
-    """name -  """
-    which = 'pnam'
-    want = 'TEXT'
-class _Prop_subclasses(aetools.NProperty):
-    """subclasses - the immediate subclasses of this class """
-    which = 'SubC'
-    want = 'Clas'
-#        element 'BsCl' as ['indx']
-#        element 'DtMb' as ['indx', 'name']
-#        element 'MbFn' as ['indx', 'name']
-
-classes = class_
-
-class Debugger_Display(aetools.ComponentItem):
-    """Debugger Display - Debugger Display preferences """
-    want = 'DbDS'
-class _Prop_Default_Array_Size(aetools.NProperty):
-    """Default Array Size - Controls whether CodeWarrior uses its own integrated editor or an external application for editing text files. """
-    which = 'Db08'
-    want = 'shor'
-class _Prop_Show_As_Decimal(aetools.NProperty):
-    """Show As Decimal - Show variable values as decimal by default """
-    which = 'Db10'
-    want = 'bool'
-class _Prop_Show_Locals(aetools.NProperty):
-    """Show Locals - Show locals by default """
-    which = 'Db09'
-    want = 'bool'
-class _Prop_Show_Variable_Types(aetools.NProperty):
-    """Show Variable Types - Show variable types by default. """
-    which = 'Db01'
-    want = 'bool'
-class _Prop_Sort_By_Method(aetools.NProperty):
-    """Sort By Method - Sort functions by method. """
-    which = 'Db02'
-    want = 'bool'
-class _Prop_Threads_in_Window(aetools.NProperty):
-    """Threads in Window - Show threads in separate windows. """
-    which = 'Db04'
-    want = 'bool'
-class _Prop_Use_RTTI(aetools.NProperty):
-    """Use RTTI - Enable RunTime Type Information. """
-    which = 'Db03'
-    want = 'bool'
-class _Prop_Variable_Changed_Hilite(aetools.NProperty):
-    """Variable Changed Hilite - Variable changed hilite color. """
-    which = 'Db07'
-    want = 'cRGB'
-class _Prop_Variable_Hints(aetools.NProperty):
-    """Variable Hints - Show variable hints. """
-    which = 'Db05'
-    want = 'bool'
-class _Prop_Watchpoint_Hilite(aetools.NProperty):
-    """Watchpoint Hilite - Watchpoint hilite color. """
-    which = 'Db06'
-    want = 'cRGB'
-
-class Debugger_Global(aetools.ComponentItem):
-    """Debugger Global - Debugger Global preferences """
-    want = 'DbGL'
-class _Prop_Auto_Target_Libraries(aetools.NProperty):
-    """Auto Target Libraries - Automatically target libraries when debugging """
-    which = 'Dg11'
-    want = 'bool'
-class _Prop_Cache_Edited_Files(aetools.NProperty):
-    """Cache Edited Files - Cache edit files between debug sessions """
-    which = 'Dg12'
-    want = 'bool'
-class _Prop_Confirm_Kill(aetools.NProperty):
-    """Confirm Kill - Confirm the \xd4killing\xd5 of the process. """
-    which = 'Dg04'
-    want = 'bool'
-class _Prop_Dont_Step_in_Runtime(aetools.NProperty):
-    """Dont Step in Runtime - Don\xd5t step into runtime code when debugging. """
-    which = 'Dg07'
-    want = 'bool'
-class _Prop_File_Cache_Duration(aetools.NProperty):
-    """File Cache Duration - Duration to keep files in cache (in days) """
-    which = 'Dg13'
-    want = 'shor'
-class _Prop_Ignore_Mod_Dates(aetools.NProperty):
-    """Ignore Mod Dates - Ignore modification dates of files. """
-    which = 'Dg01'
-    want = 'bool'
-class _Prop_Launch_Apps_on_Open(aetools.NProperty):
-    """Launch Apps on Open - Launch applications on the opening of sym files. """
-    which = 'Dg03'
-    want = 'bool'
-class _Prop_Open_All_Classes(aetools.NProperty):
-    """Open All Classes - Open all Java class files. """
-    which = 'Dg02'
-    want = 'bool'
-class _Prop_Select_Stack_Crawl(aetools.NProperty):
-    """Select Stack Crawl - Select the stack crawl. """
-    which = 'Dg06'
-    want = 'bool'
-class _Prop_Stop_at_Main(aetools.NProperty):
-    """Stop at Main - Stop to debug on the main() function. """
-    which = 'Dg05'
-    want = 'bool'
-
-class Debugger_Target(aetools.ComponentItem):
-    """Debugger Target - Debugger Target preferences """
-    want = 'DbTG'
-class _Prop_Cache_symbolics(aetools.NProperty):
-    """Cache symbolics - Cache symbolics between runs when executable doesn\xd5t change, else release symbolics files after killing process. """
-    which = 'Dt15'
-    want = 'bool'
-class _Prop_Data_Update_Interval(aetools.NProperty):
-    """Data Update Interval - How often to update the data while running (in seconds) """
-    which = 'Dt09'
-    want = 'long'
-class _Prop_Log_System_Messages(aetools.NProperty):
-    """Log System Messages - Log all system messages while debugging. """
-    which = 'Dt02'
-    want = 'bool'
-class _Prop_Relocated_Executable_Path(aetools.NProperty):
-    """Relocated Executable Path - Path to location of relocated libraries, code resources or remote debugging folder """
-    which = 'Dt10'
-    want = 'RlPt'
-class _Prop_Stop_at_temp_breakpoint(aetools.NProperty):
-    """Stop at temp breakpoint - Stop at a temp breakpoint on program launch. Set breakpoint type in Temp Breakpoint Type AppleEvent. """
-    which = 'Dt13'
-    want = 'bool'
-class _Prop_Temp_Breakpoint_Type(aetools.NProperty):
-    """Temp Breakpoint Type - Type of temp breakpoint to set on program launch. """
-    which = 'Dt16'
-    want = 'TmpB'
-class _Prop_Temp_breakpoint_names(aetools.NProperty):
-    """Temp breakpoint names - Comma separated list of names to attempt to stop at on program launch. First symbol to resolve in list is the temp BP that will be set. """
-    which = 'Dt14'
-    want = 'ctxt'
-class _Prop_Update_Data_While_Running(aetools.NProperty):
-    """Update Data While Running - Should pause to update data while running """
-    which = 'Dt08'
-    want = 'bool'
-
-class Debugger_Windowing(aetools.ComponentItem):
-    """Debugger Windowing -  """
-    want = 'DbWN'
-class _Prop_Debugging_Start_Action(aetools.NProperty):
-    """Debugging Start Action - What action to take when debug session starts """
-    which = 'Dw01'
-    want = 'DbSA'
-class _Prop_Do_Nothing_To_Projects(aetools.NProperty):
-    """Do Nothing To Projects - Suppress debugging start action for project windows """
-    which = 'Dw02'
-    want = 'bool'
-
-class data_member(aetools.ComponentItem):
-    """data member - A class data member or field """
-    want = 'DtMb'
-class _Prop_static(aetools.NProperty):
-    """static -  """
-    which = 'Stat'
-    want = 'bool'
-
-data_members = data_member
-
-class Editor(aetools.ComponentItem):
-    """Editor -  """
-    want = 'EDTR'
-class _Prop_Background_Color(aetools.NProperty):
-    """Background Color - Color of the background of editor windows. """
-    which = 'ED13'
-    want = 'cRGB'
-class _Prop_Balance(aetools.NProperty):
-    """Balance - Flash the matching opening bracket when you type a closing bracket. """
-    which = 'ED03'
-    want = 'bool'
-class _Prop_Context_Popup_Delay(aetools.NProperty):
-    """Context Popup Delay - The amount of time, in sixtieths of a second, before the context popup is displayed if you click and hold on a browser symbol. """
-    which = 'ED14'
-    want = 'long'
-class _Prop_Default_Text_File_Format(aetools.NProperty):
-    """Default Text File Format - Default text file format (i.e. which type of line endings to use) """
-    which = 'ED17'
-    want = 'TxtF'
-class _Prop_Dynamic_Scroll(aetools.NProperty):
-    """Dynamic Scroll - Display a window\xd5s contents as you move the scroll box. """
-    which = 'ED02'
-    want = 'bool'
-class _Prop_Flash_Delay(aetools.NProperty):
-    """Flash Delay - The amount of time, in sixtieths of a second, the editor highlights a matching bracket. """
-    which = 'ED01'
-    want = 'long'
-class _Prop_Left_Margin_Line_Select(aetools.NProperty):
-    """Left Margin Line Select - Clicking in the left margin selects lines """
-    which = 'ED16'
-    want = 'bool'
-class _Prop_Main_Text_Color(aetools.NProperty):
-    """Main Text Color - Main, default, color for text. """
-    which = 'ED12'
-    want = 'cRGB'
-class _Prop_Relaxed_C_Popup_Parsing(aetools.NProperty):
-    """Relaxed C Popup Parsing - Relax the function parser for C source files """
-    which = 'ED15'
-    want = 'bool'
-class _Prop_Remember_Font(aetools.NProperty):
-    """Remember Font - Display a source file with its own font settings. """
-    which = 'ED08'
-    want = 'bool'
-class _Prop_Remember_Selection(aetools.NProperty):
-    """Remember Selection - Restore the previous selection in a file when you open it. """
-    which = 'ED09'
-    want = 'bool'
-class _Prop_Remember_Window(aetools.NProperty):
-    """Remember Window - Restore the last size and position for a source file window when you open it. """
-    which = 'ED10'
-    want = 'bool'
-class _Prop_Sort_Function_Popup(aetools.NProperty):
-    """Sort Function Popup -  """
-    which = 'ED06'
-    want = 'bool'
-class _Prop_Use_Drag__26__Drop_Editing(aetools.NProperty):
-    """Use Drag & Drop Editing - Use Drag & Drop text editing. """
-    which = 'ED04'
-    want = 'bool'
-class _Prop_Use_Multiple_Undo(aetools.NProperty):
-    """Use Multiple Undo -  """
-    which = 'ED07'
-    want = 'bool'
-
-class Environment_Variable(aetools.ComponentItem):
-    """Environment Variable - Environment variable for host OS """
-    want = 'EnvV'
-class _Prop_value(aetools.NProperty):
-    """value - Value of the environment variable """
-    which = 'Valu'
-    want = 'TEXT'
-
-class Error_Information(aetools.ComponentItem):
-    """Error Information - Describes a single error or warning from the compiler or the linker. """
-    want = 'ErrM'
-class _Prop_disk_file(aetools.NProperty):
-    """disk file - The file where the error occurred.  May not be returned for certain kinds of errors (eg, link errors). """
-    which = 'file'
-    want = 'fss '
-class _Prop_lineNumber(aetools.NProperty):
-    """lineNumber - The line in the file where the error occurred.  May not be returned for certain kinds of errors (eg, link errors). """
-    which = 'ErrL'
-    want = 'long'
-class _Prop_message(aetools.NProperty):
-    """message - The error or warning message. """
-    which = 'ErrS'
-    want = 'TEXT'
-class _Prop_messageKind(aetools.NProperty):
-    """messageKind - The type of error or warning. """
-    which = 'ErrT'
-    want = 'ErrT'
-
-class Function_Information(aetools.ComponentItem):
-    """Function Information - Describes the location of any function or global data definition within the current project. """
-    want = 'FDef'
-
-class File_Mappings(aetools.ComponentItem):
-    """File Mappings - Mappings of extensions & file types to compilers """
-    want = 'FLMP'
-class _Prop_Mappings(aetools.NProperty):
-    """Mappings -  """
-    which = 'FMps'
-    want = 'FMap'
-
-class File_Mapping(aetools.ComponentItem):
-    """File Mapping -  """
-    want = 'FMap'
-class _Prop_Compiler(aetools.NProperty):
-    """Compiler -  """
-    which = 'TA07'
-    want = 'TEXT'
-class _Prop_Extension(aetools.NProperty):
-    """Extension -  """
-    which = 'TA02'
-    want = 'TEXT'
-class _Prop_File_Type(aetools.NProperty):
-    """File Type -  """
-    which = 'PR04'
-    want = 'TEXT'
-class _Prop_Ignored_by_Make(aetools.NProperty):
-    """Ignored by Make -  """
-    which = 'TA06'
-    want = 'bool'
-class _Prop_Launchable(aetools.NProperty):
-    """Launchable -  """
-    which = 'TA05'
-    want = 'bool'
-class _Prop_Precompiled(aetools.NProperty):
-    """Precompiled -  """
-    which = 'TA03'
-    want = 'bool'
-class _Prop_Resource_File(aetools.NProperty):
-    """Resource File -  """
-    which = 'TA04'
-    want = 'bool'
-
-class Global_Source_Trees(aetools.ComponentItem):
-    """Global Source Trees - Globally-defined source tree roots """
-    want = 'GSTs'
-class _Prop_Source_Trees(aetools.NProperty):
-    """Source Trees - List of source tree roots """
-    which = 'ST01'
-    want = 'SrcT'
-
-class Extras(aetools.ComponentItem):
-    """Extras -  """
-    want = 'GXTR'
-class _Prop_Automatic_Toolbar_Help(aetools.NProperty):
-    """Automatic Toolbar Help - Automatically show balloon help in toolbar after delay """
-    which = 'EX19'
-    want = 'bool'
-class _Prop_External_Reference(aetools.NProperty):
-    """External Reference - Which on-line function reference to use. """
-    which = 'EX08'
-    want = 'RefP'
-class _Prop_Full_Screen_Zoom(aetools.NProperty):
-    """Full Screen Zoom - Zoom windows to the full screen width. """
-    which = 'EX07'
-    want = 'bool'
-class _Prop_Recent_Editor_Count(aetools.NProperty):
-    """Recent Editor Count - Maximum number of editor documents to show in the \xd2Open Recent\xd3 menu """
-    which = 'EX16'
-    want = 'shor'
-class _Prop_Recent_Project_Count(aetools.NProperty):
-    """Recent Project Count - Maximum number of project documents to show in the \xd2Open Recent\xd3 menu """
-    which = 'EX17'
-    want = 'shor'
-class _Prop_Use_Editor_Extensions(aetools.NProperty):
-    """Use Editor Extensions - Controls the use of the Editor Extensions menu """
-    which = 'EX10'
-    want = 'bool'
-class _Prop_Use_External_Editor(aetools.NProperty):
-    """Use External Editor - Controls whether CodeWarrior uses its own integrated editor or an external application for editing text files. """
-    which = 'EX11'
-    want = 'bool'
-class _Prop_Use_Script_Menu(aetools.NProperty):
-    """Use Script Menu - Controls the use of the AppleScript menu """
-    which = 'EX12'
-    want = 'bool'
-class _Prop_Use_ToolServer_Menu(aetools.NProperty):
-    """Use ToolServer Menu - Controls the use of the ToolServer menu """
-    which = 'EX18'
-    want = 'bool'
-
-class Build_Extras(aetools.ComponentItem):
-    """Build Extras -  """
-    want = 'LXTR'
-class _Prop_Browser_Active(aetools.NProperty):
-    """Browser Active - Allow the collection of browser information. """
-    which = 'EX09'
-    want = 'bool'
-class _Prop_Cache_Subproject_Data(aetools.NProperty):
-    """Cache Subproject Data -  """
-    which = 'EX31'
-    want = 'bool'
-class _Prop_Dump_Browser_Info(aetools.NProperty):
-    """Dump Browser Info -  """
-    which = 'EX30'
-    want = 'bool'
-class _Prop_Modification_Date_Caching(aetools.NProperty):
-    """Modification Date Caching -  """
-    which = 'EX04'
-    want = 'bool'
-
-class member_function(aetools.ComponentItem):
-    """member function - A class member function or method. """
-    want = 'MbFn'
-class _Prop_implementation_end_offset(aetools.NProperty):
-    """implementation end offset - end of member function definition """
-    which = 'DfEn'
-    want = 'long'
-class _Prop_implementation_file(aetools.NProperty):
-    """implementation file - Source file containing the member function definition """
-    which = 'DfFl'
-    want = 'fss '
-class _Prop_implementation_start_offset(aetools.NProperty):
-    """implementation start offset - start of member function definition source code """
-    which = 'DfSt'
-    want = 'long'
-
-member_functions = member_function
-
-class Access_Paths(aetools.ComponentItem):
-    """Access Paths - Contains the definitions of a project\xd5s access (search) paths. """
-    want = 'PATH'
-class _Prop_Always_Full_Search(aetools.NProperty):
-    """Always Full Search - To force the compiler to search for system includes like it searches for user includes. """
-    which = 'PA02'
-    want = 'bool'
-class _Prop_Convert_Paths(aetools.NProperty):
-    """Convert Paths - Enables conversion of DOS & Unix-style relative paths when searching for files. """
-    which = 'PA04'
-    want = 'bool'
-class _Prop_Require_Framework_Includes(aetools.NProperty):
-    """Require Framework Includes - Causes the IDE to only look in the framework access paths if a Mac OS X framework style include (i.e. <Carbon/Carbon.h> ) is used. """
-    which = 'PA05'
-    want = 'bool'
-class _Prop_System_Paths(aetools.NProperty):
-    """System Paths - To add an access path for the include files. (Not supported in Pascal) """
-    which = 'PA03'
-    want = 'PInf'
-class _Prop_User_Paths(aetools.NProperty):
-    """User Paths - To add an access path for the source files. """
-    which = 'PA01'
-    want = 'PInf'
-
-class Path_Information(aetools.ComponentItem):
-    """Path Information - Contains all of the parameters that describe an access path. """
-    want = 'PInf'
-class _Prop_format(aetools.NProperty):
-    """format - Format of the a """
-    which = 'Frmt'
-    want = 'PthF'
-class _Prop_framework(aetools.NProperty):
-    """framework - Is the path a Mac OS X framework style path?  (This flag is readable but not writable from AppleScript.) """
-    which = 'Frmw'
-    want = 'bool'
-class _Prop_host_flags(aetools.NProperty):
-    """host flags - Bit fields enabling the access path for each host OS (1 = Mac OS, 2 = Windows) """
-    which = 'HstF'
-    want = 'long'
-class _Prop_origin(aetools.NProperty):
-    """origin -  """
-    which = 'Orig'
-    want = 'PPrm'
-class _Prop_recursive(aetools.NProperty):
-    """recursive - Will the path be searched recursively?  (Default is true) """
-    which = 'Recu'
-    want = 'bool'
-class _Prop_root(aetools.NProperty):
-    """root - Name of the root of the relative path. Pre-defined values are \xd2Absolute\xd3, \xd2Project\xd3, \xd2CodeWarrior\xd3, and  \xd2System\xd3. Anything else is a user-defined root. """
-    which = 'Root'
-    want = 'TEXT'
-
-class Plugin_Settings(aetools.ComponentItem):
-    """Plugin Settings - Settings for plugin tools """
-    want = 'PSTG'
-class _Prop_Disable_Third_Party_COM_Plugins(aetools.NProperty):
-    """Disable Third Party COM Plugins - Disable COM plugins from third parties """
-    which = 'PX02'
-    want = 'bool'
-class _Prop_Plugin_Diagnostics_Level(aetools.NProperty):
-    """Plugin Diagnostics Level - Plugin Diagnostics Level is for those who are developing plugins for the IDE and need to debug them. """
-    which = 'PX01'
-    want = 'PXdg'
-
-class Runtime_Settings(aetools.ComponentItem):
-    """Runtime Settings - Runtime settings """
-    want = 'RSTG'
-class _Prop_Command_Line_Arguments(aetools.NProperty):
-    """Command Line Arguments - Extra command line args to pass to executable """
-    which = 'RS02'
-    want = 'TEXT'
-class _Prop_Environment_Variables(aetools.NProperty):
-    """Environment Variables - Environment variables to use when running the executable """
-    which = 'RS04'
-    want = 'EnvV'
-class _Prop_Host_Application(aetools.NProperty):
-    """Host Application - Host application for running/debugging libraries and code resources """
-    which = 'RS01'
-    want = 'RlPt'
-class _Prop_Working_Directory(aetools.NProperty):
-    """Working Directory - Working directory to use when running the executable """
-    which = 'RS03'
-    want = 'TEXT'
-
-class Relative_Path(aetools.ComponentItem):
-    """Relative Path - Relative path from some root """
-    want = 'RlPt'
-
-class Shielded_Folder(aetools.ComponentItem):
-    """Shielded Folder -  """
-    want = 'SFit'
-class _Prop_Expression_To_Match(aetools.NProperty):
-    """Expression To Match - Regular expression which describes folders to skip """
-    which = 'SF01'
-    want = 'TEXT'
-class _Prop_Skip_Find_And_Compare_Operations(aetools.NProperty):
-    """Skip Find And Compare Operations - Matching folders will be skipped during find and compare operations """
-    which = 'SF03'
-    want = 'bool'
-class _Prop_Skip_Project_Operations(aetools.NProperty):
-    """Skip Project Operations - Matching folders will be skipped during project operations """
-    which = 'SF02'
-    want = 'bool'
-
-class Shielded_Folders(aetools.ComponentItem):
-    """Shielded Folders - Folders skipped when performing project and find-and-compare operations """
-    want = 'SHFL'
-class _Prop_Shielded_Items(aetools.NProperty):
-    """Shielded Items -  """
-    which = 'SFis'
-    want = 'SFit'
-
-class Syntax_Coloring(aetools.ComponentItem):
-    """Syntax Coloring -  """
-    want = 'SNTX'
-class _Prop_Comment_Color(aetools.NProperty):
-    """Comment Color - The color for comments. """
-    which = 'GH02'
-    want = 'cRGB'
-class _Prop_Keyword_Color(aetools.NProperty):
-    """Keyword Color - The color for language keywords. """
-    which = 'GH03'
-    want = 'cRGB'
-class _Prop_String_Color(aetools.NProperty):
-    """String Color - The color for strings. """
-    which = 'GH04'
-    want = 'cRGB'
-class _Prop_Syntax_Coloring(aetools.NProperty):
-    """Syntax Coloring - Mark keywords and comments with color. """
-    which = 'GH01'
-    want = 'bool'
-
-class Segment(aetools.ComponentItem):
-    """Segment - A segment or group in the project """
-    want = 'Seg '
-class _Prop_filecount(aetools.NProperty):
-    """filecount -  """
-    which = 'NumF'
-    want = 'shor'
-class _Prop_seg_2d_locked(aetools.NProperty):
-    """seg-locked - Is the segment locked ? [68K only] """
-    which = 'PLck'
-    want = 'bool'
-class _Prop_seg_2d_preloaded(aetools.NProperty):
-    """seg-preloaded - Is the segment preloaded ? [68K only] """
-    which = 'Prel'
-    want = 'bool'
-class _Prop_seg_2d_protected(aetools.NProperty):
-    """seg-protected - Is the segment protected ? [68K only] """
-    which = 'Prot'
-    want = 'bool'
-class _Prop_seg_2d_purgeable(aetools.NProperty):
-    """seg-purgeable - Is the segment purgeable ? [68K only] """
-    which = 'Purg'
-    want = 'bool'
-class _Prop_seg_2d_system_heap(aetools.NProperty):
-    """seg-system heap - Is the segment loaded into the system heap ? [68K only] """
-    which = 'SysH'
-    want = 'bool'
-
-class ProjectFile(aetools.ComponentItem):
-    """ProjectFile - A file contained in a project """
-    want = 'SrcF'
-class _Prop_codesize(aetools.NProperty):
-    """codesize - The size of this file\xd5s code. """
-    which = 'CSiz'
-    want = 'long'
-class _Prop_datasize(aetools.NProperty):
-    """datasize - The size of this file\xd5s data. """
-    which = 'DSiz'
-    want = 'long'
-class _Prop_filetype(aetools.NProperty):
-    """filetype - What kind of file is this ? """
-    which = 'SrcT'
-    want = 'SrcT'
-class _Prop_includes(aetools.NProperty):
-    """includes -  """
-    which = 'IncF'
-    want = 'fss '
-class _Prop_initialize_before(aetools.NProperty):
-    """initialize before - Initialize the shared library before the main application. """
-    which = 'Bfor'
-    want = 'bool'
-class _Prop_symbols(aetools.NProperty):
-    """symbols - Are debugging symbols generated for this file ? """
-    which = 'SymG'
-    want = 'bool'
-class _Prop_up_to_date(aetools.NProperty):
-    """up to date - Has the file been compiled since its last modification ? """
-    which = 'UpTD'
-    want = 'bool'
-class _Prop_weak_link(aetools.NProperty):
-    """weak link - Is this file imported weakly into the project ? [PowerPC only] """
-    which = 'Weak'
-    want = 'bool'
-
-class Source_Tree(aetools.ComponentItem):
-    """Source Tree - User-defined source tree root """
-    want = 'SrcT'
-class _Prop_path(aetools.NProperty):
-    """path - path for the user-defined source tree root """
-    which = 'Path'
-    want = 'TEXT'
-class _Prop_path_kind(aetools.NProperty):
-    """path kind - kind of path """
-    which = 'Kind'
-    want = 'STKd'
-
-class Target_Settings(aetools.ComponentItem):
-    """Target Settings - Contains the definitions of a project\xd5s target. """
-    want = 'TARG'
-class _Prop_Linker(aetools.NProperty):
-    """Linker - The name of the current linker. """
-    which = 'TA01'
-    want = 'TEXT'
-class _Prop_Output_Directory_Location(aetools.NProperty):
-    """Output Directory Location - Location of output directory """
-    which = 'TA16'
-    want = 'RlPt'
-class _Prop_Output_Directory_Origin(aetools.NProperty):
-    """Output Directory Origin - Origin of path to output directory. Usage of this property is deprecated. Use the \xd2Output Directory Location\xd3 property instead. """
-    which = 'TA12'
-    want = 'PPrm'
-class _Prop_Output_Directory_Path(aetools.NProperty):
-    """Output Directory Path - Path to output directory. Usage of this property is deprecated. Use the \xd2Output Directory Location\xd3 property instead. """
-    which = 'TA11'
-    want = 'TEXT'
-class _Prop_Post_Linker(aetools.NProperty):
-    """Post Linker -  """
-    which = 'TA09'
-    want = 'TEXT'
-class _Prop_Pre_Linker(aetools.NProperty):
-    """Pre Linker -  """
-    which = 'TA13'
-    want = 'TEXT'
-class _Prop_Target_Name(aetools.NProperty):
-    """Target Name -  """
-    which = 'TA10'
-    want = 'TEXT'
-class _Prop_Use_Relative_Paths(aetools.NProperty):
-    """Use Relative Paths - Save project entries using relative paths """
-    which = 'TA15'
-    want = 'bool'
-
-class Target_Source_Trees(aetools.ComponentItem):
-    """Target Source Trees - Target-specific user-defined source tree roots """
-    want = 'TSTs'
-
-class VCS_Setup(aetools.ComponentItem):
-    """VCS Setup - The version control system preferences. """
-    want = 'VCSs'
-class _Prop_Always_Prompt(aetools.NProperty):
-    """Always Prompt - Always show login dialog """
-    which = 'VC07'
-    want = 'bool'
-class _Prop_Auto_Connect(aetools.NProperty):
-    """Auto Connect - Automatically connect to database when starting. """
-    which = 'VC05'
-    want = 'bool'
-class _Prop_Connection_Method(aetools.NProperty):
-    """Connection Method - Name of Version Control System to use. """
-    which = 'VC02'
-    want = 'TEXT'
-class _Prop_Database_Path(aetools.NProperty):
-    """Database Path - Path to the VCS database. """
-    which = 'VC09'
-    want = 'RlPt'
-class _Prop_Local_Path(aetools.NProperty):
-    """Local Path - Path to the local root """
-    which = 'VC10'
-    want = 'RlPt'
-class _Prop_Mount_Volume(aetools.NProperty):
-    """Mount Volume - Attempt to mount the database volume if it isn't available. """
-    which = 'VC08'
-    want = 'bool'
-class _Prop_Password(aetools.NProperty):
-    """Password - The password for the VCS. """
-    which = 'VC04'
-    want = 'TEXT'
-class _Prop_Store_Password(aetools.NProperty):
-    """Store Password - Store the password. """
-    which = 'VC06'
-    want = 'bool'
-class _Prop_Use_Global_Settings(aetools.NProperty):
-    """Use Global Settings - Use the global VCS settings by default """
-    which = 'VC11'
-    want = 'bool'
-class _Prop_Username(aetools.NProperty):
-    """Username - The user name for the VCS. """
-    which = 'VC03'
-    want = 'TEXT'
-class _Prop_VCS_Active(aetools.NProperty):
-    """VCS Active - Use Version Control """
-    which = 'VC01'
-    want = 'bool'
-
-class Font(aetools.ComponentItem):
-    """Font -  """
-    want = 'mFNT'
-class _Prop_Auto_Indent(aetools.NProperty):
-    """Auto Indent - Indent new lines automatically. """
-    which = 'FN01'
-    want = 'bool'
-class _Prop_Tab_Indents_Selection(aetools.NProperty):
-    """Tab Indents Selection - Tab indents selection when multiple lines are selected """
-    which = 'FN03'
-    want = 'bool'
-class _Prop_Tab_Inserts_Spaces(aetools.NProperty):
-    """Tab Inserts Spaces - Insert spaces instead of tab character """
-    which = 'FN04'
-    want = 'bool'
-class _Prop_Tab_Size(aetools.NProperty):
-    """Tab Size -  """
-    which = 'FN02'
-    want = 'shor'
-class _Prop_Text_Font(aetools.NProperty):
-    """Text Font - The font used in editing windows. """
-    which = 'ptxf'
-    want = 'TEXT'
-class _Prop_Text_Size(aetools.NProperty):
-    """Text Size - The size of the text in an editing window. """
-    which = 'ptps'
-    want = 'shor'
-Browser_Coloring._superclassnames = []
-Browser_Coloring._privpropdict = {
-    'Browser_Keywords' : _Prop_Browser_Keywords,
-    'Classes_Color' : _Prop_Classes_Color,
-    'Constants_Color' : _Prop_Constants_Color,
-    'Enums_Color' : _Prop_Enums_Color,
-    'Functions_Color' : _Prop_Functions_Color,
-    'Globals_Color' : _Prop_Globals_Color,
-    'Macros_Color' : _Prop_Macros_Color,
-    'Template_Commands_in_Menu' : _Prop_Template_Commands_in_Menu,
-    'Templates_Color' : _Prop_Templates_Color,
-    'Typedefs_Color' : _Prop_Typedefs_Color,
-}
-Browser_Coloring._privelemdict = {
-}
-Build_Settings._superclassnames = []
-Build_Settings._privpropdict = {
-    'Build_Before_Running' : _Prop_Build_Before_Running,
-    'Compiler_Thread_Stack_Size' : _Prop_Compiler_Thread_Stack_Size,
-    'Completion_Sound' : _Prop_Completion_Sound,
-    'Failure_Sound' : _Prop_Failure_Sound,
-    'Include_Cache_Size' : _Prop_Include_Cache_Size,
-    'Save_Before_Building' : _Prop_Save_Before_Building,
-    'Success_Sound' : _Prop_Success_Sound,
-}
-Build_Settings._privelemdict = {
-}
-base_class._superclassnames = []
-base_class._privpropdict = {
-    'access' : _Prop_access,
-    'class_' : _Prop_class_,
-    'virtual' : _Prop_virtual,
-}
-base_class._privelemdict = {
-}
-Custom_Keywords._superclassnames = []
-Custom_Keywords._privpropdict = {
-    'Custom_Color_1' : _Prop_Custom_Color_1,
-    'Custom_Color_2' : _Prop_Custom_Color_2,
-    'Custom_Color_3' : _Prop_Custom_Color_3,
-    'Custom_Color_4' : _Prop_Custom_Color_4,
-}
-Custom_Keywords._privelemdict = {
-}
-browser_catalog._superclassnames = []
-browser_catalog._privpropdict = {
-}
-browser_catalog._privelemdict = {
-    'class_' : class_,
-}
-class_._superclassnames = []
-class_._privpropdict = {
-    'all_subclasses' : _Prop_all_subclasses,
-    'declaration_end_offset' : _Prop_declaration_end_offset,
-    'declaration_file' : _Prop_declaration_file,
-    'declaration_start_offset' : _Prop_declaration_start_offset,
-    'language' : _Prop_language,
-    'name' : _Prop_name,
-    'subclasses' : _Prop_subclasses,
-}
-class_._privelemdict = {
-    'base_class' : base_class,
-    'data_member' : data_member,
-    'member_function' : member_function,
-}
-Debugger_Display._superclassnames = []
-Debugger_Display._privpropdict = {
-    'Default_Array_Size' : _Prop_Default_Array_Size,
-    'Show_As_Decimal' : _Prop_Show_As_Decimal,
-    'Show_Locals' : _Prop_Show_Locals,
-    'Show_Variable_Types' : _Prop_Show_Variable_Types,
-    'Sort_By_Method' : _Prop_Sort_By_Method,
-    'Threads_in_Window' : _Prop_Threads_in_Window,
-    'Use_RTTI' : _Prop_Use_RTTI,
-    'Variable_Changed_Hilite' : _Prop_Variable_Changed_Hilite,
-    'Variable_Hints' : _Prop_Variable_Hints,
-    'Watchpoint_Hilite' : _Prop_Watchpoint_Hilite,
-}
-Debugger_Display._privelemdict = {
-}
-Debugger_Global._superclassnames = []
-Debugger_Global._privpropdict = {
-    'Auto_Target_Libraries' : _Prop_Auto_Target_Libraries,
-    'Cache_Edited_Files' : _Prop_Cache_Edited_Files,
-    'Confirm_Kill' : _Prop_Confirm_Kill,
-    'Dont_Step_in_Runtime' : _Prop_Dont_Step_in_Runtime,
-    'File_Cache_Duration' : _Prop_File_Cache_Duration,
-    'Ignore_Mod_Dates' : _Prop_Ignore_Mod_Dates,
-    'Launch_Apps_on_Open' : _Prop_Launch_Apps_on_Open,
-    'Open_All_Classes' : _Prop_Open_All_Classes,
-    'Select_Stack_Crawl' : _Prop_Select_Stack_Crawl,
-    'Stop_at_Main' : _Prop_Stop_at_Main,
-}
-Debugger_Global._privelemdict = {
-}
-Debugger_Target._superclassnames = []
-Debugger_Target._privpropdict = {
-    'Auto_Target_Libraries' : _Prop_Auto_Target_Libraries,
-    'Cache_symbolics' : _Prop_Cache_symbolics,
-    'Data_Update_Interval' : _Prop_Data_Update_Interval,
-    'Log_System_Messages' : _Prop_Log_System_Messages,
-    'Relocated_Executable_Path' : _Prop_Relocated_Executable_Path,
-    'Stop_at_temp_breakpoint' : _Prop_Stop_at_temp_breakpoint,
-    'Temp_Breakpoint_Type' : _Prop_Temp_Breakpoint_Type,
-    'Temp_breakpoint_names' : _Prop_Temp_breakpoint_names,
-    'Update_Data_While_Running' : _Prop_Update_Data_While_Running,
-}
-Debugger_Target._privelemdict = {
-}
-Debugger_Windowing._superclassnames = []
-Debugger_Windowing._privpropdict = {
-    'Debugging_Start_Action' : _Prop_Debugging_Start_Action,
-    'Do_Nothing_To_Projects' : _Prop_Do_Nothing_To_Projects,
-}
-Debugger_Windowing._privelemdict = {
-}
-data_member._superclassnames = []
-data_member._privpropdict = {
-    'access' : _Prop_access,
-    'declaration_end_offset' : _Prop_declaration_end_offset,
-    'declaration_start_offset' : _Prop_declaration_start_offset,
-    'name' : _Prop_name,
-    'static' : _Prop_static,
-}
-data_member._privelemdict = {
-}
-Editor._superclassnames = []
-Editor._privpropdict = {
-    'Background_Color' : _Prop_Background_Color,
-    'Balance' : _Prop_Balance,
-    'Context_Popup_Delay' : _Prop_Context_Popup_Delay,
-    'Default_Text_File_Format' : _Prop_Default_Text_File_Format,
-    'Dynamic_Scroll' : _Prop_Dynamic_Scroll,
-    'Flash_Delay' : _Prop_Flash_Delay,
-    'Left_Margin_Line_Select' : _Prop_Left_Margin_Line_Select,
-    'Main_Text_Color' : _Prop_Main_Text_Color,
-    'Relaxed_C_Popup_Parsing' : _Prop_Relaxed_C_Popup_Parsing,
-    'Remember_Font' : _Prop_Remember_Font,
-    'Remember_Selection' : _Prop_Remember_Selection,
-    'Remember_Window' : _Prop_Remember_Window,
-    'Sort_Function_Popup' : _Prop_Sort_Function_Popup,
-    'Use_Drag__26__Drop_Editing' : _Prop_Use_Drag__26__Drop_Editing,
-    'Use_Multiple_Undo' : _Prop_Use_Multiple_Undo,
-}
-Editor._privelemdict = {
-}
-Environment_Variable._superclassnames = []
-Environment_Variable._privpropdict = {
-    'name' : _Prop_name,
-    'value' : _Prop_value,
-}
-Environment_Variable._privelemdict = {
-}
-Error_Information._superclassnames = []
-Error_Information._privpropdict = {
-    'disk_file' : _Prop_disk_file,
-    'lineNumber' : _Prop_lineNumber,
-    'message' : _Prop_message,
-    'messageKind' : _Prop_messageKind,
-}
-Error_Information._privelemdict = {
-}
-Function_Information._superclassnames = []
-Function_Information._privpropdict = {
-    'disk_file' : _Prop_disk_file,
-    'lineNumber' : _Prop_lineNumber,
-}
-Function_Information._privelemdict = {
-}
-File_Mappings._superclassnames = []
-File_Mappings._privpropdict = {
-    'Mappings' : _Prop_Mappings,
-}
-File_Mappings._privelemdict = {
-}
-File_Mapping._superclassnames = []
-File_Mapping._privpropdict = {
-    'Compiler' : _Prop_Compiler,
-    'Extension' : _Prop_Extension,
-    'File_Type' : _Prop_File_Type,
-    'Ignored_by_Make' : _Prop_Ignored_by_Make,
-    'Launchable' : _Prop_Launchable,
-    'Precompiled' : _Prop_Precompiled,
-    'Resource_File' : _Prop_Resource_File,
-}
-File_Mapping._privelemdict = {
-}
-Global_Source_Trees._superclassnames = []
-Global_Source_Trees._privpropdict = {
-    'Source_Trees' : _Prop_Source_Trees,
-}
-Global_Source_Trees._privelemdict = {
-}
-Extras._superclassnames = []
-Extras._privpropdict = {
-    'Automatic_Toolbar_Help' : _Prop_Automatic_Toolbar_Help,
-    'External_Reference' : _Prop_External_Reference,
-    'Full_Screen_Zoom' : _Prop_Full_Screen_Zoom,
-    'Recent_Editor_Count' : _Prop_Recent_Editor_Count,
-    'Recent_Project_Count' : _Prop_Recent_Project_Count,
-    'Use_Editor_Extensions' : _Prop_Use_Editor_Extensions,
-    'Use_External_Editor' : _Prop_Use_External_Editor,
-    'Use_Script_Menu' : _Prop_Use_Script_Menu,
-    'Use_ToolServer_Menu' : _Prop_Use_ToolServer_Menu,
-}
-Extras._privelemdict = {
-}
-Build_Extras._superclassnames = []
-Build_Extras._privpropdict = {
-    'Browser_Active' : _Prop_Browser_Active,
-    'Cache_Subproject_Data' : _Prop_Cache_Subproject_Data,
-    'Dump_Browser_Info' : _Prop_Dump_Browser_Info,
-    'Modification_Date_Caching' : _Prop_Modification_Date_Caching,
-}
-Build_Extras._privelemdict = {
-}
-member_function._superclassnames = []
-member_function._privpropdict = {
-    'access' : _Prop_access,
-    'declaration_end_offset' : _Prop_declaration_end_offset,
-    'declaration_file' : _Prop_declaration_file,
-    'declaration_start_offset' : _Prop_declaration_start_offset,
-    'implementation_end_offset' : _Prop_implementation_end_offset,
-    'implementation_file' : _Prop_implementation_file,
-    'implementation_start_offset' : _Prop_implementation_start_offset,
-    'name' : _Prop_name,
-    'static' : _Prop_static,
-    'virtual' : _Prop_virtual,
-}
-member_function._privelemdict = {
-}
-Access_Paths._superclassnames = []
-Access_Paths._privpropdict = {
-    'Always_Full_Search' : _Prop_Always_Full_Search,
-    'Convert_Paths' : _Prop_Convert_Paths,
-    'Require_Framework_Includes' : _Prop_Require_Framework_Includes,
-    'System_Paths' : _Prop_System_Paths,
-    'User_Paths' : _Prop_User_Paths,
-}
-Access_Paths._privelemdict = {
-}
-Path_Information._superclassnames = []
-Path_Information._privpropdict = {
-    'format' : _Prop_format,
-    'framework' : _Prop_framework,
-    'host_flags' : _Prop_host_flags,
-    'name' : _Prop_name,
-    'origin' : _Prop_origin,
-    'recursive' : _Prop_recursive,
-    'root' : _Prop_root,
-}
-Path_Information._privelemdict = {
-}
-Plugin_Settings._superclassnames = []
-Plugin_Settings._privpropdict = {
-    'Disable_Third_Party_COM_Plugins' : _Prop_Disable_Third_Party_COM_Plugins,
-    'Plugin_Diagnostics_Level' : _Prop_Plugin_Diagnostics_Level,
-}
-Plugin_Settings._privelemdict = {
-}
-Runtime_Settings._superclassnames = []
-Runtime_Settings._privpropdict = {
-    'Command_Line_Arguments' : _Prop_Command_Line_Arguments,
-    'Environment_Variables' : _Prop_Environment_Variables,
-    'Host_Application' : _Prop_Host_Application,
-    'Working_Directory' : _Prop_Working_Directory,
-}
-Runtime_Settings._privelemdict = {
-}
-Relative_Path._superclassnames = []
-Relative_Path._privpropdict = {
-    'format' : _Prop_format,
-    'name' : _Prop_name,
-    'origin' : _Prop_origin,
-    'root' : _Prop_root,
-}
-Relative_Path._privelemdict = {
-}
-Shielded_Folder._superclassnames = []
-Shielded_Folder._privpropdict = {
-    'Expression_To_Match' : _Prop_Expression_To_Match,
-    'Skip_Find_And_Compare_Operations' : _Prop_Skip_Find_And_Compare_Operations,
-    'Skip_Project_Operations' : _Prop_Skip_Project_Operations,
-}
-Shielded_Folder._privelemdict = {
-}
-Shielded_Folders._superclassnames = []
-Shielded_Folders._privpropdict = {
-    'Shielded_Items' : _Prop_Shielded_Items,
-}
-Shielded_Folders._privelemdict = {
-}
-Syntax_Coloring._superclassnames = []
-Syntax_Coloring._privpropdict = {
-    'Comment_Color' : _Prop_Comment_Color,
-    'Custom_Color_1' : _Prop_Custom_Color_1,
-    'Custom_Color_2' : _Prop_Custom_Color_2,
-    'Custom_Color_3' : _Prop_Custom_Color_3,
-    'Custom_Color_4' : _Prop_Custom_Color_4,
-    'Keyword_Color' : _Prop_Keyword_Color,
-    'String_Color' : _Prop_String_Color,
-    'Syntax_Coloring' : _Prop_Syntax_Coloring,
-}
-Syntax_Coloring._privelemdict = {
-}
-Segment._superclassnames = []
-Segment._privpropdict = {
-    'filecount' : _Prop_filecount,
-    'name' : _Prop_name,
-    'seg_2d_locked' : _Prop_seg_2d_locked,
-    'seg_2d_preloaded' : _Prop_seg_2d_preloaded,
-    'seg_2d_protected' : _Prop_seg_2d_protected,
-    'seg_2d_purgeable' : _Prop_seg_2d_purgeable,
-    'seg_2d_system_heap' : _Prop_seg_2d_system_heap,
-}
-Segment._privelemdict = {
-}
-ProjectFile._superclassnames = []
-ProjectFile._privpropdict = {
-    'codesize' : _Prop_codesize,
-    'datasize' : _Prop_datasize,
-    'disk_file' : _Prop_disk_file,
-    'filetype' : _Prop_filetype,
-    'includes' : _Prop_includes,
-    'initialize_before' : _Prop_initialize_before,
-    'name' : _Prop_name,
-    'symbols' : _Prop_symbols,
-    'up_to_date' : _Prop_up_to_date,
-    'weak_link' : _Prop_weak_link,
-}
-ProjectFile._privelemdict = {
-}
-Source_Tree._superclassnames = []
-Source_Tree._privpropdict = {
-    'format' : _Prop_format,
-    'name' : _Prop_name,
-    'path' : _Prop_path,
-    'path_kind' : _Prop_path_kind,
-}
-Source_Tree._privelemdict = {
-}
-Target_Settings._superclassnames = []
-Target_Settings._privpropdict = {
-    'Linker' : _Prop_Linker,
-    'Output_Directory_Location' : _Prop_Output_Directory_Location,
-    'Output_Directory_Origin' : _Prop_Output_Directory_Origin,
-    'Output_Directory_Path' : _Prop_Output_Directory_Path,
-    'Post_Linker' : _Prop_Post_Linker,
-    'Pre_Linker' : _Prop_Pre_Linker,
-    'Target_Name' : _Prop_Target_Name,
-    'Use_Relative_Paths' : _Prop_Use_Relative_Paths,
-}
-Target_Settings._privelemdict = {
-}
-Target_Source_Trees._superclassnames = []
-Target_Source_Trees._privpropdict = {
-    'Source_Trees' : _Prop_Source_Trees,
-}
-Target_Source_Trees._privelemdict = {
-}
-VCS_Setup._superclassnames = []
-VCS_Setup._privpropdict = {
-    'Always_Prompt' : _Prop_Always_Prompt,
-    'Auto_Connect' : _Prop_Auto_Connect,
-    'Connection_Method' : _Prop_Connection_Method,
-    'Database_Path' : _Prop_Database_Path,
-    'Local_Path' : _Prop_Local_Path,
-    'Mount_Volume' : _Prop_Mount_Volume,
-    'Password' : _Prop_Password,
-    'Store_Password' : _Prop_Store_Password,
-    'Use_Global_Settings' : _Prop_Use_Global_Settings,
-    'Username' : _Prop_Username,
-    'VCS_Active' : _Prop_VCS_Active,
-}
-VCS_Setup._privelemdict = {
-}
-Font._superclassnames = []
-Font._privpropdict = {
-    'Auto_Indent' : _Prop_Auto_Indent,
-    'Tab_Indents_Selection' : _Prop_Tab_Indents_Selection,
-    'Tab_Inserts_Spaces' : _Prop_Tab_Inserts_Spaces,
-    'Tab_Size' : _Prop_Tab_Size,
-    'Text_Font' : _Prop_Text_Font,
-    'Text_Size' : _Prop_Text_Size,
-}
-Font._privelemdict = {
-}
-_Enum_Acce = {
-    'public' : 'Publ',  #
-    'protected' : 'Prot',       #
-    'private' : 'Priv', #
-}
-
-_Enum_BXbr = {
-    'Always_Build' : 'BXb1',    # Always build the target before running.
-    'Ask_Build' : 'BXb2',       # Ask before building the target when running.
-    'Never_Build' : 'BXb3',     # Never before building the target before running.
-}
-
-_Enum_DbSA = {
-    'No_Action' : 'DSA1',       # Don\xd5t do anything to non-debug windows
-    'Hide_Windows' : 'DSA2',    # Hide non-debugging windows
-    'Collapse_Windows' : 'DSA3',        # Collapse non-debugging windows
-    'Close_Windows' : 'DSA4',   # Close non-debugging windows
-}
-
-_Enum_DgBL = {
-    'Always' : 'DgB0',  # Always build before debugging.
-    'Never' : 'DgB1',   # Never build before debugging.
-    'Ask' : 'DgB2',     # Ask about building before debugging.
-}
-
-_Enum_ErrT = {
-    'information' : 'ErIn',     #
-    'compiler_warning' : 'ErCW',        #
-    'compiler_error' : 'ErCE',  #
-    'definition' : 'ErDf',      #
-    'linker_warning' : 'ErLW',  #
-    'linker_error' : 'ErLE',    #
-    'find_result' : 'ErFn',     #
-    'generic_error' : 'ErGn',   #
-}
-
-_Enum_Inte = {
-    'never_interact' : 'eNvr',  # Never allow user interactions
-    'interact_with_self' : 'eInS',      # Allow user interaction only when an AppleEvent is sent from within CodeWarrior
-    'interact_with_local' : 'eInL',     # Allow user interaction when AppleEvents are sent from applications on the same machine (default)
-    'interact_with_all' : 'eInA',       # Allow user interaction from both local and remote AppleEvents
-}
-
-_Enum_Lang = {
-    'C' : 'LC  ',       #
-    'C_2b__2b_' : 'LC++',       #
-    'Pascal' : 'LP  ',  #
-    'Object_Pascal' : 'LP++',   #
-    'Java' : 'LJav',    #
-    'Assembler' : 'LAsm',       #
-    'Unknown' : 'L?  ', #
-}
-
-_Enum_PPrm = {
-    'absolute' : 'Abso',        # An absolute path name, including volume name.
-    'project_relative' : 'PRel',        # A path relative to the current project\xd5s folder.
-    'shell_relative' : 'SRel',  # A path relative to the CodeWarrior\xaa folder.
-    'system_relative' : 'YRel', # A path relative to the system folder
-    'root_relative' : 'RRel',   #
-}
-
-_Enum_PXdg = {
-    'Diagnose_None' : 'PXd1',   # No Plugin Diagnostics.
-    'Diagnose_Errors' : 'PXd2', # Plugin Diagnostics for errors only.
-    'Diagnose_All' : 'PXd3',    # Plugin Diagnostics for everything.
-}
-
-_Enum_PthF = {
-    'Generic_Path' : 'PFGn',    #
-    'MacOS_Path' : 'PFMc',      # MacOS path using colon as separator
-    'Windows_Path' : 'PFWn',    # Windows path using backslash as separator
-    'Unix_Path' : 'PFUx',       # Unix path using slash as separator
-}
-
-_Enum_RefP = {
-    'Think_Reference' : 'DanR', #
-    'QuickView' : 'ALTV',       #
-}
-
-_Enum_STKd = {
-    'Absolute_Path' : 'STK0',   # The \xd2path\xd3 property is an absolute path to the location of the source tree.
-    'Registry_Key' : 'STK1',    # The \xd2path\xd3 property is the name of a registry key that contains the path to the root.
-    'Environment_Variable' : 'STK2',    # The \xd2path\xd3 property is the name of an environment variable that contains the path to the root.
-}
-
-_Enum_SrcT = {
-    'source' : 'FTxt',  # A source file (.c, .cp, .p, etc).
-    'unknown' : 'FUnk', # An unknown file type.
-}
-
-_Enum_TmpB = {
-    'User_Specified' : 'Usrs',  # Use user specified symbols when setting temporary breakpoints on program launch.
-    'Default' : 'Dflt', # Use system default symbols when setting temporary breakpoints on program launch.
-}
-
-_Enum_TxtF = {
-    'MacOS' : 'TxF0',   # MacOS text format
-    'DOS' : 'TxF1',     # DOS text format
-    'Unix' : 'TxF2',    # Unix text format
-}
-
-_Enum_savo = {
-    'yes' : 'yes ',     # Save changes
-    'no' : 'no  ',      # Do not save changes
-    'ask' : 'ask ',     # Ask the user whether to save
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'BRKW' : Browser_Coloring,
-    'BSTG' : Build_Settings,
-    'BsCl' : base_class,
-    'CUKW' : Custom_Keywords,
-    'Cata' : browser_catalog,
-    'Clas' : class_,
-    'DbDS' : Debugger_Display,
-    'DbGL' : Debugger_Global,
-    'DbTG' : Debugger_Target,
-    'DbWN' : Debugger_Windowing,
-    'DtMb' : data_member,
-    'EDTR' : Editor,
-    'EnvV' : Environment_Variable,
-    'ErrM' : Error_Information,
-    'FDef' : Function_Information,
-    'FLMP' : File_Mappings,
-    'FMap' : File_Mapping,
-    'GSTs' : Global_Source_Trees,
-    'GXTR' : Extras,
-    'LXTR' : Build_Extras,
-    'MbFn' : member_function,
-    'PATH' : Access_Paths,
-    'PInf' : Path_Information,
-    'PSTG' : Plugin_Settings,
-    'RSTG' : Runtime_Settings,
-    'RlPt' : Relative_Path,
-    'SFit' : Shielded_Folder,
-    'SHFL' : Shielded_Folders,
-    'SNTX' : Syntax_Coloring,
-    'Seg ' : Segment,
-    'SrcF' : ProjectFile,
-    'SrcT' : Source_Tree,
-    'TARG' : Target_Settings,
-    'TSTs' : Target_Source_Trees,
-    'VCSs' : VCS_Setup,
-    'mFNT' : Font,
-}
-
-_propdeclarations = {
-    'Acce' : _Prop_access,
-    'BW00' : _Prop_Browser_Keywords,
-    'BW01' : _Prop_Classes_Color,
-    'BW02' : _Prop_Constants_Color,
-    'BW03' : _Prop_Enums_Color,
-    'BW04' : _Prop_Functions_Color,
-    'BW05' : _Prop_Globals_Color,
-    'BW06' : _Prop_Macros_Color,
-    'BW07' : _Prop_Templates_Color,
-    'BW08' : _Prop_Typedefs_Color,
-    'BW10' : _Prop_Template_Commands_in_Menu,
-    'BX01' : _Prop_Completion_Sound,
-    'BX02' : _Prop_Success_Sound,
-    'BX03' : _Prop_Failure_Sound,
-    'BX04' : _Prop_Build_Before_Running,
-    'BX05' : _Prop_Include_Cache_Size,
-    'BX06' : _Prop_Compiler_Thread_Stack_Size,
-    'BX07' : _Prop_Save_Before_Building,
-    'Bfor' : _Prop_initialize_before,
-    'CSiz' : _Prop_codesize,
-    'Clas' : _Prop_class_,
-    'DSiz' : _Prop_datasize,
-    'Db01' : _Prop_Show_Variable_Types,
-    'Db02' : _Prop_Sort_By_Method,
-    'Db03' : _Prop_Use_RTTI,
-    'Db04' : _Prop_Threads_in_Window,
-    'Db05' : _Prop_Variable_Hints,
-    'Db06' : _Prop_Watchpoint_Hilite,
-    'Db07' : _Prop_Variable_Changed_Hilite,
-    'Db08' : _Prop_Default_Array_Size,
-    'Db09' : _Prop_Show_Locals,
-    'Db10' : _Prop_Show_As_Decimal,
-    'DcEn' : _Prop_declaration_end_offset,
-    'DcFl' : _Prop_declaration_file,
-    'DcSt' : _Prop_declaration_start_offset,
-    'DfEn' : _Prop_implementation_end_offset,
-    'DfFl' : _Prop_implementation_file,
-    'DfSt' : _Prop_implementation_start_offset,
-    'Dg01' : _Prop_Ignore_Mod_Dates,
-    'Dg02' : _Prop_Open_All_Classes,
-    'Dg03' : _Prop_Launch_Apps_on_Open,
-    'Dg04' : _Prop_Confirm_Kill,
-    'Dg05' : _Prop_Stop_at_Main,
-    'Dg06' : _Prop_Select_Stack_Crawl,
-    'Dg07' : _Prop_Dont_Step_in_Runtime,
-    'Dg11' : _Prop_Auto_Target_Libraries,
-    'Dg12' : _Prop_Cache_Edited_Files,
-    'Dg13' : _Prop_File_Cache_Duration,
-    'Dt02' : _Prop_Log_System_Messages,
-    'Dt08' : _Prop_Update_Data_While_Running,
-    'Dt09' : _Prop_Data_Update_Interval,
-    'Dt10' : _Prop_Relocated_Executable_Path,
-    'Dt13' : _Prop_Stop_at_temp_breakpoint,
-    'Dt14' : _Prop_Temp_breakpoint_names,
-    'Dt15' : _Prop_Cache_symbolics,
-    'Dt16' : _Prop_Temp_Breakpoint_Type,
-    'Dw01' : _Prop_Debugging_Start_Action,
-    'Dw02' : _Prop_Do_Nothing_To_Projects,
-    'ED01' : _Prop_Flash_Delay,
-    'ED02' : _Prop_Dynamic_Scroll,
-    'ED03' : _Prop_Balance,
-    'ED04' : _Prop_Use_Drag__26__Drop_Editing,
-    'ED06' : _Prop_Sort_Function_Popup,
-    'ED07' : _Prop_Use_Multiple_Undo,
-    'ED08' : _Prop_Remember_Font,
-    'ED09' : _Prop_Remember_Selection,
-    'ED10' : _Prop_Remember_Window,
-    'ED12' : _Prop_Main_Text_Color,
-    'ED13' : _Prop_Background_Color,
-    'ED14' : _Prop_Context_Popup_Delay,
-    'ED15' : _Prop_Relaxed_C_Popup_Parsing,
-    'ED16' : _Prop_Left_Margin_Line_Select,
-    'ED17' : _Prop_Default_Text_File_Format,
-    'EX04' : _Prop_Modification_Date_Caching,
-    'EX07' : _Prop_Full_Screen_Zoom,
-    'EX08' : _Prop_External_Reference,
-    'EX09' : _Prop_Browser_Active,
-    'EX10' : _Prop_Use_Editor_Extensions,
-    'EX11' : _Prop_Use_External_Editor,
-    'EX12' : _Prop_Use_Script_Menu,
-    'EX16' : _Prop_Recent_Editor_Count,
-    'EX17' : _Prop_Recent_Project_Count,
-    'EX18' : _Prop_Use_ToolServer_Menu,
-    'EX19' : _Prop_Automatic_Toolbar_Help,
-    'EX30' : _Prop_Dump_Browser_Info,
-    'EX31' : _Prop_Cache_Subproject_Data,
-    'ErrL' : _Prop_lineNumber,
-    'ErrS' : _Prop_message,
-    'ErrT' : _Prop_messageKind,
-    'FMps' : _Prop_Mappings,
-    'FN01' : _Prop_Auto_Indent,
-    'FN02' : _Prop_Tab_Size,
-    'FN03' : _Prop_Tab_Indents_Selection,
-    'FN04' : _Prop_Tab_Inserts_Spaces,
-    'Frmt' : _Prop_format,
-    'Frmw' : _Prop_framework,
-    'GH01' : _Prop_Syntax_Coloring,
-    'GH02' : _Prop_Comment_Color,
-    'GH03' : _Prop_Keyword_Color,
-    'GH04' : _Prop_String_Color,
-    'GH05' : _Prop_Custom_Color_1,
-    'GH06' : _Prop_Custom_Color_2,
-    'GH07' : _Prop_Custom_Color_3,
-    'GH08' : _Prop_Custom_Color_4,
-    'HstF' : _Prop_host_flags,
-    'IncF' : _Prop_includes,
-    'Kind' : _Prop_path_kind,
-    'Lang' : _Prop_language,
-    'NumF' : _Prop_filecount,
-    'Orig' : _Prop_origin,
-    'PA01' : _Prop_User_Paths,
-    'PA02' : _Prop_Always_Full_Search,
-    'PA03' : _Prop_System_Paths,
-    'PA04' : _Prop_Convert_Paths,
-    'PA05' : _Prop_Require_Framework_Includes,
-    'PLck' : _Prop_seg_2d_locked,
-    'PR04' : _Prop_File_Type,
-    'PX01' : _Prop_Plugin_Diagnostics_Level,
-    'PX02' : _Prop_Disable_Third_Party_COM_Plugins,
-    'Path' : _Prop_path,
-    'Prel' : _Prop_seg_2d_preloaded,
-    'Prot' : _Prop_seg_2d_protected,
-    'Purg' : _Prop_seg_2d_purgeable,
-    'RS01' : _Prop_Host_Application,
-    'RS02' : _Prop_Command_Line_Arguments,
-    'RS03' : _Prop_Working_Directory,
-    'RS04' : _Prop_Environment_Variables,
-    'Recu' : _Prop_recursive,
-    'Root' : _Prop_root,
-    'SF01' : _Prop_Expression_To_Match,
-    'SF02' : _Prop_Skip_Project_Operations,
-    'SF03' : _Prop_Skip_Find_And_Compare_Operations,
-    'SFis' : _Prop_Shielded_Items,
-    'ST01' : _Prop_Source_Trees,
-    'SrcT' : _Prop_filetype,
-    'Stat' : _Prop_static,
-    'SubA' : _Prop_all_subclasses,
-    'SubC' : _Prop_subclasses,
-    'SymG' : _Prop_symbols,
-    'SysH' : _Prop_seg_2d_system_heap,
-    'TA01' : _Prop_Linker,
-    'TA02' : _Prop_Extension,
-    'TA03' : _Prop_Precompiled,
-    'TA04' : _Prop_Resource_File,
-    'TA05' : _Prop_Launchable,
-    'TA06' : _Prop_Ignored_by_Make,
-    'TA07' : _Prop_Compiler,
-    'TA09' : _Prop_Post_Linker,
-    'TA10' : _Prop_Target_Name,
-    'TA11' : _Prop_Output_Directory_Path,
-    'TA12' : _Prop_Output_Directory_Origin,
-    'TA13' : _Prop_Pre_Linker,
-    'TA15' : _Prop_Use_Relative_Paths,
-    'TA16' : _Prop_Output_Directory_Location,
-    'UpTD' : _Prop_up_to_date,
-    'VC01' : _Prop_VCS_Active,
-    'VC02' : _Prop_Connection_Method,
-    'VC03' : _Prop_Username,
-    'VC04' : _Prop_Password,
-    'VC05' : _Prop_Auto_Connect,
-    'VC06' : _Prop_Store_Password,
-    'VC07' : _Prop_Always_Prompt,
-    'VC08' : _Prop_Mount_Volume,
-    'VC09' : _Prop_Database_Path,
-    'VC10' : _Prop_Local_Path,
-    'VC11' : _Prop_Use_Global_Settings,
-    'Valu' : _Prop_value,
-    'Virt' : _Prop_virtual,
-    'Weak' : _Prop_weak_link,
-    'file' : _Prop_disk_file,
-    'pnam' : _Prop_name,
-    'ptps' : _Prop_Text_Size,
-    'ptxf' : _Prop_Text_Font,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'Acce' : _Enum_Acce,
-    'BXbr' : _Enum_BXbr,
-    'DbSA' : _Enum_DbSA,
-    'DgBL' : _Enum_DgBL,
-    'ErrT' : _Enum_ErrT,
-    'Inte' : _Enum_Inte,
-    'Lang' : _Enum_Lang,
-    'PPrm' : _Enum_PPrm,
-    'PXdg' : _Enum_PXdg,
-    'PthF' : _Enum_PthF,
-    'RefP' : _Enum_RefP,
-    'STKd' : _Enum_STKd,
-    'SrcT' : _Enum_SrcT,
-    'TmpB' : _Enum_TmpB,
-    'TxtF' : _Enum_TxtF,
-    'savo' : _Enum_savo,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py
deleted file mode 100644 (file)
index 6eef960..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-"""Suite Required: Terms that every application should support
-Level 1, version 1
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_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['----']
-
-_Enum_Conv = {
-    'yes' : 'yes ',     # Convert the project if necessary on open
-    'no' : 'no  ',      # Do not convert the project if needed on open
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'Conv' : _Enum_Conv,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py
deleted file mode 100644 (file)
index a0df41e..0000000
+++ /dev/null
@@ -1,408 +0,0 @@
-"""Suite Standard Suite: Common terms for most applications
-Level 1, version 1
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'CoRe'
-
-from StdSuites.Standard_Suite import *
-class Standard_Suite_Events(Standard_Suite_Events):
-
-    _argmap_close = {
-        'saving' : 'savo',
-        'saving_in' : 'kfil',
-    }
-
-    def close(self, _object, _attributes={}, **_arguments):
-        """close: close an object
-        Required argument: the object to close
-        Keyword argument saving: specifies whether or not changes should be saved before closing
-        Keyword argument saving_in: the file in which to save the object
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'clos'
-
-        aetools.keysubst(_arguments, self._argmap_close)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_count = {
-        'each' : 'kocl',
-    }
-
-    def count(self, _object, _attributes={}, **_arguments):
-        """count: return the number of elements of a particular class within an object
-        Required argument: the object whose elements are to be counted
-        Keyword argument each: the class of the elements to be counted. Keyword 'each' is optional in AppleScript
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the number of elements
-        """
-        _code = 'core'
-        _subcode = 'cnte'
-
-        aetools.keysubst(_arguments, self._argmap_count)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_get = {
-        'as' : 'rtyp',
-    }
-
-    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 as: the desired types for the data, in order of preference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: The data from the object
-        """
-        _code = 'core'
-        _subcode = 'getd'
-
-        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['----']
-
-    _argmap_make = {
-        'new' : 'kocl',
-        'as' : 'rtyp',
-        'at' : 'insh',
-        'with_data' : 'data',
-        'with_properties' : 'prdt',
-    }
-
-    def make(self, _no_object=None, _attributes={}, **_arguments):
-        """make: make a new element
-        Keyword argument new: the class of the new element\xd1keyword 'new' is optional in AppleScript
-        Keyword argument as: the desired types for the data, in order of preference
-        Keyword argument at: the location at which to insert the element
-        Keyword argument with_data: the initial data for the element
-        Keyword argument with_properties: the initial values for the properties of the element
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: to the new object(s)
-        """
-        _code = 'core'
-        _subcode = 'crel'
-
-        aetools.keysubst(_arguments, self._argmap_make)
-        if _no_object is not 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 select(self, _object=None, _attributes={}, **_arguments):
-        """select: select the specified object
-        Required argument: the object to select
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'misc'
-        _subcode = 'slct'
-
-        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_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.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'
-class _Prop_user_interaction(aetools.NProperty):
-    """user interaction - user interaction level """
-    which = 'inte'
-    want = 'Inte'
-user_interaction = _Prop_user_interaction()
-#        element 'cwin' as ['indx', 'name', 'rang']
-#        element 'docu' as ['indx', 'name', 'rang']
-
-class character(aetools.ComponentItem):
-    """character - a character """
-    want = 'cha '
-class _Prop_length(aetools.NProperty):
-    """length - length in characters of this object """
-    which = 'pLen'
-    want = 'long'
-class _Prop_offset(aetools.NProperty):
-    """offset - offset of a text object from the beginning of the document (first char has offset 1) """
-    which = 'pOff'
-    want = 'long'
-
-class insertion_point(aetools.ComponentItem):
-    """insertion point - An insertion location between two objects """
-    want = 'cins'
-
-class line(aetools.ComponentItem):
-    """line - lines of text """
-    want = 'clin'
-class _Prop_index(aetools.NProperty):
-    """index - index of a line object from the beginning of the document (first line has index 1) """
-    which = 'pidx'
-    want = 'long'
-#        element 'cha ' as ['indx', 'rang', 'rele']
-
-lines = line
-
-class selection_2d_object(aetools.ComponentItem):
-    """selection-object - the selection visible to the user """
-    want = 'csel'
-class _Prop_contents(aetools.NProperty):
-    """contents - the contents of the selection """
-    which = 'pcnt'
-    want = 'type'
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'clin' as ['indx', 'rang', 'rele']
-#        element 'ctxt' as ['rang']
-
-class text(aetools.ComponentItem):
-    """text - Text """
-    want = 'ctxt'
-#        element 'cha ' as ['indx', 'rele', 'rang']
-#        element 'cins' as ['rele']
-#        element 'clin' as ['indx', 'rang', 'rele']
-#        element 'ctxt' as ['rang']
-
-class window(aetools.ComponentItem):
-    """window - A window """
-    want = 'cwin'
-class _Prop_bounds(aetools.NProperty):
-    """bounds - the boundary rectangle for the window """
-    which = 'pbnd'
-    want = 'qdrt'
-class _Prop_document(aetools.NProperty):
-    """document - the document that owns this window """
-    which = 'docu'
-    want = 'docu'
-class _Prop_name(aetools.NProperty):
-    """name - the title of the window """
-    which = 'pnam'
-    want = 'itxt'
-class _Prop_position(aetools.NProperty):
-    """position - upper left coordinates of window """
-    which = 'ppos'
-    want = 'QDpt'
-class _Prop_visible(aetools.NProperty):
-    """visible - is the window visible? """
-    which = 'pvis'
-    want = 'bool'
-class _Prop_zoomed(aetools.NProperty):
-    """zoomed - Is the window zoomed? """
-    which = 'pzum'
-    want = 'bool'
-
-windows = window
-
-class document(aetools.ComponentItem):
-    """document - a document """
-    want = 'docu'
-class _Prop_file_permissions(aetools.NProperty):
-    """file permissions - the file permissions for the document """
-    which = 'PERM'
-    want = 'PERM'
-class _Prop_kind(aetools.NProperty):
-    """kind - the kind of document """
-    which = 'DKND'
-    want = 'DKND'
-class _Prop_location(aetools.NProperty):
-    """location - the file of the document """
-    which = 'FILE'
-    want = 'fss '
-class _Prop_window(aetools.NProperty):
-    """window - the window of the document. """
-    which = 'cwin'
-    want = 'cwin'
-
-documents = document
-
-class files(aetools.ComponentItem):
-    """files - Every file """
-    want = 'file'
-
-file = files
-application._superclassnames = []
-application._privpropdict = {
-    'user_interaction' : _Prop_user_interaction,
-}
-application._privelemdict = {
-    'document' : document,
-    'window' : window,
-}
-character._superclassnames = []
-character._privpropdict = {
-    'length' : _Prop_length,
-    'offset' : _Prop_offset,
-}
-character._privelemdict = {
-}
-insertion_point._superclassnames = []
-insertion_point._privpropdict = {
-    'length' : _Prop_length,
-    'offset' : _Prop_offset,
-}
-insertion_point._privelemdict = {
-}
-line._superclassnames = []
-line._privpropdict = {
-    'index' : _Prop_index,
-    'length' : _Prop_length,
-    'offset' : _Prop_offset,
-}
-line._privelemdict = {
-    'character' : character,
-}
-selection_2d_object._superclassnames = []
-selection_2d_object._privpropdict = {
-    'contents' : _Prop_contents,
-    'length' : _Prop_length,
-    'offset' : _Prop_offset,
-}
-selection_2d_object._privelemdict = {
-    'character' : character,
-    'line' : line,
-    'text' : text,
-}
-text._superclassnames = []
-text._privpropdict = {
-    'length' : _Prop_length,
-    'offset' : _Prop_offset,
-}
-text._privelemdict = {
-    'character' : character,
-    'insertion_point' : insertion_point,
-    'line' : line,
-    'text' : text,
-}
-window._superclassnames = []
-window._privpropdict = {
-    'bounds' : _Prop_bounds,
-    'document' : _Prop_document,
-    'index' : _Prop_index,
-    'name' : _Prop_name,
-    'position' : _Prop_position,
-    'visible' : _Prop_visible,
-    'zoomed' : _Prop_zoomed,
-}
-window._privelemdict = {
-}
-document._superclassnames = []
-document._privpropdict = {
-    'file_permissions' : _Prop_file_permissions,
-    'index' : _Prop_index,
-    'kind' : _Prop_kind,
-    'location' : _Prop_location,
-    'name' : _Prop_name,
-    'window' : _Prop_window,
-}
-document._privelemdict = {
-}
-files._superclassnames = []
-files._privpropdict = {
-}
-files._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-    'cha ' : character,
-    'cins' : insertion_point,
-    'clin' : line,
-    'csel' : selection_2d_object,
-    'ctxt' : text,
-    'cwin' : window,
-    'docu' : document,
-    'file' : files,
-}
-
-_propdeclarations = {
-    'DKND' : _Prop_kind,
-    'FILE' : _Prop_location,
-    'PERM' : _Prop_file_permissions,
-    'cwin' : _Prop_window,
-    'docu' : _Prop_document,
-    'inte' : _Prop_user_interaction,
-    'pLen' : _Prop_length,
-    'pOff' : _Prop_offset,
-    'pbnd' : _Prop_bounds,
-    'pcnt' : _Prop_contents,
-    'pidx' : _Prop_index,
-    'pnam' : _Prop_name,
-    'ppos' : _Prop_position,
-    'pvis' : _Prop_visible,
-    'pzum' : _Prop_zoomed,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py
deleted file mode 100644 (file)
index c57fd1f..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-"""
-Package generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
-"""
-import aetools
-Error = aetools.Error
-from . import CodeWarrior_suite
-from . import Standard_Suite
-from . import Metrowerks_Shell_Suite
-from . import Required
-
-
-_code_to_module = {
-    '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'),
-}
-
-from CodeWarrior.CodeWarrior_suite import *
-from CodeWarrior.Standard_Suite import *
-from CodeWarrior.Metrowerks_Shell_Suite import *
-from CodeWarrior.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', {}))
-
-import StdSuites
-
-#
-# Set property and element dictionaries now that all classes have been defined
-#
-getbaseclasses(character)
-getbaseclasses(selection_2d_object)
-getbaseclasses(application)
-getbaseclasses(document)
-getbaseclasses(text)
-getbaseclasses(window)
-getbaseclasses(file)
-getbaseclasses(line)
-getbaseclasses(insertion_point)
-getbaseclasses(single_class_browser)
-getbaseclasses(project_document)
-getbaseclasses(symbol_browser)
-getbaseclasses(editor_document)
-getbaseclasses(file_compare_document)
-getbaseclasses(class_browser)
-getbaseclasses(subtarget)
-getbaseclasses(message_document)
-getbaseclasses(project_inspector)
-getbaseclasses(text_document)
-getbaseclasses(catalog_document)
-getbaseclasses(class_hierarchy)
-getbaseclasses(target)
-getbaseclasses(build_progress_document)
-getbaseclasses(target_file)
-getbaseclasses(ToolServer_worksheet)
-getbaseclasses(single_class_hierarchy)
-getbaseclasses(File_Mapping)
-getbaseclasses(browser_catalog)
-getbaseclasses(Build_Settings)
-getbaseclasses(ProjectFile)
-getbaseclasses(VCS_Setup)
-getbaseclasses(data_member)
-getbaseclasses(Shielded_Folder)
-getbaseclasses(Custom_Keywords)
-getbaseclasses(Path_Information)
-getbaseclasses(Segment)
-getbaseclasses(Source_Tree)
-getbaseclasses(Access_Paths)
-getbaseclasses(Debugger_Windowing)
-getbaseclasses(Relative_Path)
-getbaseclasses(Environment_Variable)
-getbaseclasses(base_class)
-getbaseclasses(Debugger_Display)
-getbaseclasses(Build_Extras)
-getbaseclasses(Error_Information)
-getbaseclasses(Editor)
-getbaseclasses(Shielded_Folders)
-getbaseclasses(Extras)
-getbaseclasses(File_Mappings)
-getbaseclasses(Function_Information)
-getbaseclasses(Debugger_Target)
-getbaseclasses(Syntax_Coloring)
-getbaseclasses(class_)
-getbaseclasses(Global_Source_Trees)
-getbaseclasses(Target_Settings)
-getbaseclasses(Debugger_Global)
-getbaseclasses(member_function)
-getbaseclasses(Runtime_Settings)
-getbaseclasses(Plugin_Settings)
-getbaseclasses(Browser_Coloring)
-getbaseclasses(Font)
-getbaseclasses(Target_Source_Trees)
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'cha ' : character,
-    'csel' : selection_2d_object,
-    'capp' : application,
-    'docu' : document,
-    'ctxt' : text,
-    'cwin' : window,
-    'file' : file,
-    'clin' : line,
-    'cins' : insertion_point,
-    '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,
-    'VCSs' : VCS_Setup,
-    'DtMb' : data_member,
-    'SFit' : Shielded_Folder,
-    'CUKW' : Custom_Keywords,
-    'PInf' : Path_Information,
-    'Seg ' : Segment,
-    'SrcT' : Source_Tree,
-    'PATH' : Access_Paths,
-    'DbWN' : Debugger_Windowing,
-    'RlPt' : Relative_Path,
-    'EnvV' : Environment_Variable,
-    'BsCl' : base_class,
-    'DbDS' : Debugger_Display,
-    'LXTR' : Build_Extras,
-    'ErrM' : Error_Information,
-    'EDTR' : Editor,
-    'SHFL' : Shielded_Folders,
-    'GXTR' : Extras,
-    'FLMP' : File_Mappings,
-    'FDef' : Function_Information,
-    'DbTG' : Debugger_Target,
-    'SNTX' : Syntax_Coloring,
-    'Clas' : class_,
-    'GSTs' : Global_Source_Trees,
-    'TARG' : Target_Settings,
-    'DbGL' : Debugger_Global,
-    'MbFn' : member_function,
-    'RSTG' : Runtime_Settings,
-    'PSTG' : Plugin_Settings,
-    'BRKW' : Browser_Coloring,
-    'mFNT' : Font,
-    'TSTs' : Target_Source_Trees,
-}
-
-
-class CodeWarrior(CodeWarrior_suite_Events,
-        Standard_Suite_Events,
-        Metrowerks_Shell_Suite_Events,
-        Required_Events,
-        aetools.TalkTo):
-    _signature = 'CWIE'
-
-    _moduleName = 'CodeWarrior'
diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py
deleted file mode 100644 (file)
index ce8e217..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-"""Suite Microsoft Internet Explorer Suite: Events defined by Internet Explorer
-Level 1, version 1
-
-Generated from /Applications/Internet Explorer.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_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['----']
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Netscape_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Netscape_Suite.py
deleted file mode 100644 (file)
index cee442c..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-"""Suite Netscape Suite: Events defined by Netscape
-Level 1, version 1
-
-Generated from /Applications/Internet Explorer.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_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'
-
-        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['----']
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Required_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Required_Suite.py
deleted file mode 100644 (file)
index cc6ef6f..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-"""Suite Required Suite: Events that every application should support
-Level 1, version 1
-
-Generated from /Applications/Internet Explorer.app
-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(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 is not 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 is not 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['----']
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py
deleted file mode 100644 (file)
index fa0d04e..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""Suite Standard Suite: Common terms for most applications
-Level 1, version 1
-
-Generated from /Applications/Internet Explorer.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = '****'
-
-class Standard_Suite_Events:
-
-    _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'
-
-        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['----']
-
-
-class application(aetools.ComponentItem):
-    """application - An application program """
-    want = 'capp'
-class _Prop_selected_text(aetools.NProperty):
-    """selected text - the selected text """
-    which = 'stxt'
-    want = 'TEXT'
-selected_text = _Prop_selected_text()
-application._superclassnames = []
-application._privpropdict = {
-    'selected_text' : _Prop_selected_text,
-}
-application._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-}
-
-_propdeclarations = {
-    'stxt' : _Prop_selected_text,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/URL_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/URL_Suite.py
deleted file mode 100644 (file)
index 1fef012..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-"""Suite URL Suite: Standard suite for Uniform Resource Locators
-Level 1, version 1
-
-Generated from /Applications/Internet Explorer.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'GURL'
-
-class URL_Suite_Events:
-
-    _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'
-
-        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['----']
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py b/Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py
deleted file mode 100644 (file)
index a7e4a8c..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-"""Suite Web Browser Suite: Class of events supported by Web Browser applications
-Level 1, version 1
-
-Generated from /Applications/Internet Explorer.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'WWW!'
-
-class Web_Browser_Suite_Events:
-
-    def Activate(self, _object=None, _attributes={}, **_arguments):
-        """Activate: Activate Internet Explorer and optionally select window designated by Window Identifier.
-        Required argument: Window Identifier
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Window Identifier of window to activate
-        """
-        _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.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def CloseAllWindows(self, _no_object=None, _attributes={}, **_arguments):
-        """CloseAllWindows: Closes all windows
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Success
-        """
-        _code = 'WWW!'
-        _subcode = 'CLSA'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_CloseWindow = {
-        'ID' : 'WIND',
-        'Title' : 'TITL',
-    }
-
-    def CloseWindow(self, _no_object=None, _attributes={}, **_arguments):
-        """CloseWindow: Close the window specified by either Window Identifier or Title. If no parameter is specified, close the top window.
-        Keyword argument ID: ID of the window to close. (Can use -1 for top window)
-        Keyword argument Title: Title of the window to close
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Success
-        """
-        _code = 'WWW!'
-        _subcode = 'CLOS'
-
-        aetools.keysubst(_arguments, self._argmap_CloseWindow)
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 GetWindowInfo(self, _object, _attributes={}, **_arguments):
-        """GetWindowInfo: Returns a window info record (URL/Title) for the specified window.
-        Required argument: Window Identifier of the window
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns:
-        """
-        _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.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def ListWindows(self, _no_object=None, _attributes={}, **_arguments):
-        """ListWindows: Returns list of Window Identifiers for all open windows.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: undocumented, typecode 'list'
-        """
-        _code = 'WWW!'
-        _subcode = 'LSTW'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_OpenURL = {
-        'to' : 'INTO',
-        'toWindow' : 'WIND',
-        'Flags' : 'FLGS',
-        'FormData' : 'POST',
-        'MIME_Type' : 'MIME',
-    }
-
-    def OpenURL(self, _object, _attributes={}, **_arguments):
-        """OpenURL: Retrieves URL off the Web.
-        Required argument: Fully-qualified URL
-        Keyword argument to: Target file for saving downloaded data
-        Keyword argument toWindow: Target window for resource at URL (-1 for top window, 0 for new window)
-        Keyword argument Flags: Valid Flags settings are: 1-Ignore the document cache; 2-Ignore the image cache; 4-Operate in background mode.
-        Keyword argument FormData: data to post
-        Keyword argument MIME_Type: MIME type of data being posted
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'WWW!'
-        _subcode = 'OURL'
-
-        aetools.keysubst(_arguments, self._argmap_OpenURL)
-        _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_ParseAnchor = {
-        'withURL' : 'RELA',
-    }
-
-    def ParseAnchor(self, _object, _attributes={}, **_arguments):
-        """ParseAnchor: Combines a base URL and a relative URL to produce a fully-qualified URL
-        Required argument: Base URL
-        Keyword argument withURL: Relative URL that is combined with the Base URL (in the direct object) to produce a fully-qualified URL.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: Fully-qualified URL
-        """
-        _code = 'WWW!'
-        _subcode = 'PRSA'
-
-        aetools.keysubst(_arguments, self._argmap_ParseAnchor)
-        _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_ShowFile = {
-        'MIME_Type' : 'MIME',
-        'Window_Identifier' : 'WIND',
-        'URL' : 'URL ',
-    }
-
-    def ShowFile(self, _object, _attributes={}, **_arguments):
-        """ShowFile: FileSpec containing data of specified MIME type to be rendered in window specified by Window Identifier.
-        Required argument: The file
-        Keyword argument MIME_Type: MIME type
-        Keyword argument Window_Identifier: Identifier of the target window for the URL. (Can use -1 for top window)
-        Keyword argument URL: URL that allows this document to be reloaded.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'WWW!'
-        _subcode = 'SHWF'
-
-        aetools.keysubst(_arguments, self._argmap_ShowFile)
-        _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['----']
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Explorer/__init__.py b/Lib/plat-mac/lib-scriptpackages/Explorer/__init__.py
deleted file mode 100644 (file)
index 734c90f..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-"""
-Package generated from /Applications/Internet Explorer.app
-"""
-import aetools
-Error = aetools.Error
-from . import Standard_Suite
-from . import URL_Suite
-from . import Netscape_Suite
-from . import Microsoft_Internet_Explorer
-from . import Web_Browser_Suite
-from . 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,
-}
-
-
-
-_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'),
-}
-
-from Explorer.Standard_Suite import *
-from Explorer.URL_Suite import *
-from Explorer.Netscape_Suite import *
-from Explorer.Microsoft_Internet_Explorer import *
-from Explorer.Web_Browser_Suite import *
-from Explorer.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', {}))
-
-import StdSuites
-
-#
-# Set property and element dictionaries now that all classes have been defined
-#
-getbaseclasses(application)
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    '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'
-
-    _moduleName = 'Explorer'
-
-    _elemdict = application._elemdict
-    _propdict = application._propdict
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Containers_and_folders.py b/Lib/plat-mac/lib-scriptpackages/Finder/Containers_and_folders.py
deleted file mode 100644 (file)
index 474ac6f..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-"""Suite Containers and folders: Classes that can contain other file system items
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/Finder.app
-AETE/AEUT resource version 0/144, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'fndr'
-
-class Containers_and_folders_Events:
-
-    pass
-
-
-class disk(aetools.ComponentItem):
-    """disk - A disk """
-    want = 'cdis'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - inherits some of its properties from the container class """
-    which = 'c@#^'
-    want = 'ctnr'
-class _Prop_capacity(aetools.NProperty):
-    """capacity - the total number of bytes (free or used) on the disk """
-    which = 'capa'
-    want = 'comp'
-class _Prop_ejectable(aetools.NProperty):
-    """ejectable - Can the media be ejected (floppies, CD's, and so on)? """
-    which = 'isej'
-    want = 'bool'
-class _Prop_format(aetools.NProperty):
-    """format - the filesystem format of this disk """
-    which = 'dfmt'
-    want = 'edfm'
-class _Prop_free_space(aetools.NProperty):
-    """free space - the number of free bytes left on the disk """
-    which = 'frsp'
-    want = 'comp'
-class _Prop_ignore_privileges(aetools.NProperty):
-    """ignore privileges - Ignore permissions on this disk? """
-    which = 'igpr'
-    want = 'bool'
-class _Prop_local_volume(aetools.NProperty):
-    """local volume - Is the media a local volume (as opposed to a file server)? """
-    which = 'isrv'
-    want = 'bool'
-class _Prop_startup(aetools.NProperty):
-    """startup - Is this disk the boot disk? """
-    which = 'istd'
-    want = 'bool'
-#        element 'alia' as ['indx', 'name']
-#        element 'appf' as ['indx', 'name', 'ID  ']
-#        element 'cfol' as ['indx', 'name', 'ID  ']
-#        element 'clpf' as ['indx', 'name']
-#        element 'cobj' as ['indx', 'name']
-#        element 'ctnr' as ['indx', 'name']
-#        element 'docf' as ['indx', 'name']
-#        element 'file' as ['indx', 'name']
-#        element 'inlf' as ['indx', 'name']
-#        element 'pack' as ['indx', 'name']
-
-disks = disk
-
-class desktop_2d_object(aetools.ComponentItem):
-    """desktop-object - Desktop-object is the class of the \xd2desktop\xd3 object """
-    want = 'cdsk'
-#        element 'alia' as ['indx', 'name']
-#        element 'appf' as ['indx', 'name', 'ID  ']
-#        element 'cdis' as ['indx', 'name']
-#        element 'cfol' as ['indx', 'name', 'ID  ']
-#        element 'clpf' as ['indx', 'name']
-#        element 'cobj' as ['indx', 'name']
-#        element 'ctnr' as ['indx', 'name']
-#        element 'docf' as ['indx', 'name']
-#        element 'file' as ['indx', 'name']
-#        element 'inlf' as ['indx', 'name']
-#        element 'pack' as ['indx', 'name']
-
-class folder(aetools.ComponentItem):
-    """folder - A folder """
-    want = 'cfol'
-#        element 'alia' as ['indx', 'name']
-#        element 'appf' as ['indx', 'name', 'ID  ']
-#        element 'cfol' as ['indx', 'name', 'ID  ']
-#        element 'clpf' as ['indx', 'name']
-#        element 'cobj' as ['indx', 'name']
-#        element 'ctnr' as ['indx', 'name']
-#        element 'docf' as ['indx', 'name']
-#        element 'file' as ['indx', 'name']
-#        element 'inlf' as ['indx', 'name']
-#        element 'pack' as ['indx', 'name']
-
-folders = folder
-
-class container(aetools.ComponentItem):
-    """container - An item that contains other items """
-    want = 'ctnr'
-class _Prop_completely_expanded(aetools.NProperty):
-    """completely expanded - (NOT AVAILABLE YET) Are the container and all of its children opened as outlines? (can only be set for containers viewed as lists) """
-    which = 'pexc'
-    want = 'bool'
-class _Prop_container_window(aetools.NProperty):
-    """container window - the container window for this folder """
-    which = 'cwnd'
-    want = 'obj '
-class _Prop_entire_contents(aetools.NProperty):
-    """entire contents - the entire contents of the container, including the contents of its children """
-    which = 'ects'
-    want = 'obj '
-class _Prop_expandable(aetools.NProperty):
-    """expandable - (NOT AVAILABLE YET) Is the container capable of being expanded as an outline? """
-    which = 'pexa'
-    want = 'bool'
-class _Prop_expanded(aetools.NProperty):
-    """expanded - (NOT AVAILABLE YET) Is the container opened as an outline? (can only be set for containers viewed as lists) """
-    which = 'pexp'
-    want = 'bool'
-#        element 'alia' as ['indx', 'name']
-#        element 'appf' as ['indx', 'name', 'ID  ']
-#        element 'cfol' as ['indx', 'name', 'ID  ']
-#        element 'clpf' as ['indx', 'name']
-#        element 'cobj' as ['indx', 'name']
-#        element 'ctnr' as ['indx', 'name']
-#        element 'docf' as ['indx', 'name']
-#        element 'file' as ['indx', 'name']
-#        element 'inlf' as ['indx', 'name']
-#        element 'pack' as ['indx', 'name']
-
-containers = container
-
-class trash_2d_object(aetools.ComponentItem):
-    """trash-object - Trash-object is the class of the \xd2trash\xd3 object """
-    want = 'ctrs'
-class _Prop_warns_before_emptying(aetools.NProperty):
-    """warns before emptying - Display a dialog when emptying the trash? """
-    which = 'warn'
-    want = 'bool'
-#        element 'alia' as ['indx', 'name']
-#        element 'appf' as ['indx', 'name', 'ID  ']
-#        element 'cfol' as ['indx', 'name', 'ID  ']
-#        element 'clpf' as ['indx', 'name']
-#        element 'cobj' as ['indx', 'name']
-#        element 'ctnr' as ['indx', 'name']
-#        element 'docf' as ['indx', 'name']
-#        element 'file' as ['indx', 'name']
-#        element 'inlf' as ['indx', 'name']
-#        element 'pack' as ['indx', 'name']
-disk._superclassnames = ['container']
-from . import Files
-from . import Finder_items
-disk._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'capacity' : _Prop_capacity,
-    'ejectable' : _Prop_ejectable,
-    'format' : _Prop_format,
-    'free_space' : _Prop_free_space,
-    'ignore_privileges' : _Prop_ignore_privileges,
-    'local_volume' : _Prop_local_volume,
-    'startup' : _Prop_startup,
-}
-disk._privelemdict = {
-    'alias_file' : Files.alias_file,
-    'application_file' : Files.application_file,
-    'clipping' : Files.clipping,
-    'container' : container,
-    'document_file' : Files.document_file,
-    'file' : Files.file,
-    'folder' : folder,
-    'internet_location_file' : Files.internet_location_file,
-    'item' : Finder_items.item,
-    'package' : Files.package,
-}
-desktop_2d_object._superclassnames = ['container']
-desktop_2d_object._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-}
-desktop_2d_object._privelemdict = {
-    'alias_file' : Files.alias_file,
-    'application_file' : Files.application_file,
-    'clipping' : Files.clipping,
-    'container' : container,
-    'disk' : disk,
-    'document_file' : Files.document_file,
-    'file' : Files.file,
-    'folder' : folder,
-    'internet_location_file' : Files.internet_location_file,
-    'item' : Finder_items.item,
-    'package' : Files.package,
-}
-folder._superclassnames = ['container']
-folder._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-}
-folder._privelemdict = {
-    'alias_file' : Files.alias_file,
-    'application_file' : Files.application_file,
-    'clipping' : Files.clipping,
-    'container' : container,
-    'document_file' : Files.document_file,
-    'file' : Files.file,
-    'folder' : folder,
-    'internet_location_file' : Files.internet_location_file,
-    'item' : Finder_items.item,
-    'package' : Files.package,
-}
-container._superclassnames = ['item']
-container._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'completely_expanded' : _Prop_completely_expanded,
-    'container_window' : _Prop_container_window,
-    'entire_contents' : _Prop_entire_contents,
-    'expandable' : _Prop_expandable,
-    'expanded' : _Prop_expanded,
-}
-container._privelemdict = {
-    'alias_file' : Files.alias_file,
-    'application_file' : Files.application_file,
-    'clipping' : Files.clipping,
-    'container' : container,
-    'document_file' : Files.document_file,
-    'file' : Files.file,
-    'folder' : folder,
-    'internet_location_file' : Files.internet_location_file,
-    'item' : Finder_items.item,
-    'package' : Files.package,
-}
-trash_2d_object._superclassnames = ['container']
-trash_2d_object._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'warns_before_emptying' : _Prop_warns_before_emptying,
-}
-trash_2d_object._privelemdict = {
-    'alias_file' : Files.alias_file,
-    'application_file' : Files.application_file,
-    'clipping' : Files.clipping,
-    'container' : container,
-    'document_file' : Files.document_file,
-    'file' : Files.file,
-    'folder' : folder,
-    'internet_location_file' : Files.internet_location_file,
-    'item' : Finder_items.item,
-    'package' : Files.package,
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'cdis' : disk,
-    'cdsk' : desktop_2d_object,
-    'cfol' : folder,
-    'ctnr' : container,
-    'ctrs' : trash_2d_object,
-}
-
-_propdeclarations = {
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'capa' : _Prop_capacity,
-    'cwnd' : _Prop_container_window,
-    'dfmt' : _Prop_format,
-    'ects' : _Prop_entire_contents,
-    'frsp' : _Prop_free_space,
-    'igpr' : _Prop_ignore_privileges,
-    'isej' : _Prop_ejectable,
-    'isrv' : _Prop_local_volume,
-    'istd' : _Prop_startup,
-    'pexa' : _Prop_expandable,
-    'pexc' : _Prop_completely_expanded,
-    'pexp' : _Prop_expanded,
-    'warn' : _Prop_warns_before_emptying,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Enumerations.py b/Lib/plat-mac/lib-scriptpackages/Finder/Enumerations.py
deleted file mode 100644 (file)
index 558d7ff..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-"""Suite Enumerations: Enumerations for the Finder
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/Finder.app
-AETE/AEUT resource version 0/144, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'tpnm'
-
-from StdSuites.Type_Names_Suite import *
-class Enumerations_Events(Type_Names_Suite_Events):
-
-    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',       #
-}
-
-_Enum_ecvw = {
-    '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??',  #
-}
-
-_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',  #
-}
-
-_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',     #
-}
-
-_Enum_isiz = {
-    'mini' : 'miic',    #
-    'small' : 'smic',   #
-    'large' : 'lgic',   #
-}
-
-_Enum_lvic = {
-    'small_icon' : 'smic',      #
-    'large_icon' : 'lgic',      #
-}
-
-_Enum_priv = {
-    'read_only' : 'read',       #
-    'read_write' : 'rdwr',      #
-    'write_only' : 'writ',      #
-    'none' : 'none',    #
-}
-
-_Enum_sodr = {
-    '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',     #
-}
-
-
-#
-# Indices of types declared in this module
-#
-_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,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Files.py b/Lib/plat-mac/lib-scriptpackages/Finder/Files.py
deleted file mode 100644 (file)
index 1b96540..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-"""Suite Files: Classes representing files
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/Finder.app
-AETE/AEUT resource version 0/144, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'fndr'
-
-class Files_Events:
-
-    pass
-
-
-class alias_file(aetools.ComponentItem):
-    """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'
-class _Prop_original_item(aetools.NProperty):
-    """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'
-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'
-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'
-class _Prop_minimum_size(aetools.NProperty):
-    """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'
-class _Prop_preferred_size(aetools.NProperty):
-    """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'
-
-application_files = application_file
-
-class clipping(aetools.ComponentItem):
-    """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 '
-
-clippings = clipping
-
-class document_file(aetools.ComponentItem):
-    """document file - A document file """
-    want = 'docf'
-
-document_files = document_file
-
-class file(aetools.ComponentItem):
-    """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'
-class _Prop_file_type(aetools.NProperty):
-    """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'
-class _Prop_stationery(aetools.NProperty):
-    """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'
-
-files = file
-
-class internet_location_file(aetools.ComponentItem):
-    """internet location file - An file containing an internet location """
-    want = 'inlf'
-class _Prop_location(aetools.NProperty):
-    """location - the internet location """
-    which = 'iloc'
-    want = 'utxt'
-
-internet_location_files = internet_location_file
-
-class package(aetools.ComponentItem):
-    """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,
-}
-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,
-}
-application_file._privelemdict = {
-}
-clipping._superclassnames = ['file']
-clipping._privpropdict = {
-    '_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_,
-}
-document_file._privelemdict = {
-}
-from . 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,
-}
-file._privelemdict = {
-}
-internet_location_file._superclassnames = ['file']
-internet_location_file._privpropdict = {
-    '_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_,
-}
-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,
-}
-
-_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 = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py
deleted file mode 100644 (file)
index 3433d7a..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-"""Suite Finder Basics: Commonly-used Finder commands and object classes
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/Finder.app
-AETE/AEUT resource version 0/144, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_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 is not 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'
-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 = _Prop_Finder_preferences()
-class _Prop_clipboard(aetools.NProperty):
-    """clipboard - (NOT AVAILABLE YET) the Finder\xd5s clipboard window """
-    which = 'pcli'
-    want = 'obj '
-clipboard = _Prop_clipboard()
-class _Prop_desktop(aetools.NProperty):
-    """desktop - the desktop """
-    which = 'desk'
-    want = 'cdsk'
-desktop = _Prop_desktop()
-class _Prop_frontmost(aetools.NProperty):
-    """frontmost - Is the Finder the frontmost process? """
-    which = 'pisf'
-    want = 'bool'
-frontmost = _Prop_frontmost()
-class _Prop_home(aetools.NProperty):
-    """home - the home directory """
-    which = 'home'
-    want = 'cfol'
-home = _Prop_home()
-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 = _Prop_insertion_location()
-class _Prop_name(aetools.NProperty):
-    """name - the Finder\xd5s name """
-    which = 'pnam'
-    want = 'itxt'
-name = _Prop_name()
-class _Prop_product_version(aetools.NProperty):
-    """product version - the version of the System software running on this computer """
-    which = 'ver2'
-    want = 'utxt'
-product_version = _Prop_product_version()
-class _Prop_selection(aetools.NProperty):
-    """selection - the selection in the frontmost Finder window """
-    which = 'sele'
-    want = 'obj '
-selection = _Prop_selection()
-class _Prop_startup_disk(aetools.NProperty):
-    """startup disk - the startup disk """
-    which = 'sdsk'
-    want = 'cdis'
-startup_disk = _Prop_startup_disk()
-class _Prop_trash(aetools.NProperty):
-    """trash - the trash """
-    which = 'trsh'
-    want = 'ctrs'
-trash = _Prop_trash()
-class _Prop_version(aetools.NProperty):
-    """version - the version of the Finder """
-    which = 'vers'
-    want = 'utxt'
-version = _Prop_version()
-class _Prop_visible(aetools.NProperty):
-    """visible - Is the Finder\xd5s layer visible? """
-    which = 'pvis'
-    want = 'bool'
-visible = _Prop_visible()
-#        element 'alia' as ['indx', 'name']
-#        element 'appf' as ['indx', 'name', 'ID  ']
-#        element 'brow' as ['indx', 'ID  ']
-#        element 'cdis' as ['indx', 'name', 'ID  ']
-#        element 'cfol' as ['indx', 'name', 'ID  ']
-#        element 'clpf' as ['indx', 'name']
-#        element 'cobj' as ['indx', 'rele', 'name', 'rang', 'test']
-#        element 'ctnr' as ['indx', 'name']
-#        element 'cwin' as ['indx', 'name']
-#        element 'docf' as ['indx', 'name']
-#        element 'file' as ['indx', 'name']
-#        element 'inlf' as ['indx', 'name']
-#        element 'lwnd' as ['indx', 'name']
-#        element 'pack' as ['indx', 'name']
-application._superclassnames = []
-from . import Files
-from . import Window_classes
-from . import Containers_and_folders
-from . 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,
-}
-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,
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    '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 = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py
deleted file mode 100644 (file)
index a804109..0000000
+++ /dev/null
@@ -1,355 +0,0 @@
-"""Suite Finder items: Commands used with file system items, and basic item definition
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/Finder.app
-AETE/AEUT resource version 0/144, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'fndr'
-
-class Finder_items_Events:
-
-    def add_to_favorites(self, _object, _attributes={}, **_arguments):
-        """add to favorites: (NOT AVAILABLE YET) Add the items to the user\xd5s Favorites
-        Required argument: the items to add to the collection of Favorites
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'ffav'
-
-        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_clean_up = {
-        'by' : 'by  ',
-    }
-
-    def clean_up(self, _object, _attributes={}, **_arguments):
-        """clean up: (NOT AVAILABLE YET) Arrange items in window nicely (only applies to open windows in icon view that are not kept arranged)
-        Required argument: the window to clean up
-        Keyword argument by: the order in which to clean up the objects (name, index, date, etc.)
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'fclu'
-
-        aetools.keysubst(_arguments, self._argmap_clean_up)
-        _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 eject(self, _object=None, _attributes={}, **_arguments):
-        """eject: Eject the specified disk(s)
-        Required argument: the disk(s) to eject
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'ejct'
-
-        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 empty(self, _object=None, _attributes={}, **_arguments):
-        """empty: Empty the trash
-        Required argument: \xd2empty\xd3 and \xd2empty trash\xd3 both do the same thing
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'empt'
-
-        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 erase(self, _object, _attributes={}, **_arguments):
-        """erase: (NOT AVAILABLE) Erase the specified disk(s)
-        Required argument: the items to erase
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'fera'
-
-        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 reveal(self, _object, _attributes={}, **_arguments):
-        """reveal: Bring the specified object(s) into view
-        Required argument: the object to be made visible
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'misc'
-        _subcode = 'mvis'
-
-        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_update = {
-        'necessity' : 'nec?',
-        'registering_applications' : 'reg?',
-    }
-
-    def update(self, _object, _attributes={}, **_arguments):
-        """update: Update the display of the specified object(s) to match their on-disk representation
-        Required argument: the item to update
-        Keyword argument necessity: only update if necessary (i.e. a finder window is open).  default is false
-        Keyword argument registering_applications: register applications. default is true
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'fupd'
-
-        aetools.keysubst(_arguments, self._argmap_update)
-        _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 item(aetools.ComponentItem):
-    """item - An item """
-    want = 'cobj'
-class _Prop_bounds(aetools.NProperty):
-    """bounds - the bounding rectangle of the item (can only be set for an item in a window viewed as icons or buttons) """
-    which = 'pbnd'
-    want = 'qdrt'
-class _Prop_comment(aetools.NProperty):
-    """comment - the comment of the item, displayed in the \xd2Get Info\xd3 window """
-    which = 'comt'
-    want = 'utxt'
-class _Prop_container(aetools.NProperty):
-    """container - the container of the item """
-    which = 'ctnr'
-    want = 'obj '
-class _Prop_creation_date(aetools.NProperty):
-    """creation date - the date on which the item was created """
-    which = 'ascd'
-    want = 'ldt '
-class _Prop_description(aetools.NProperty):
-    """description - a description of the item """
-    which = 'dscr'
-    want = 'utxt'
-class _Prop_disk(aetools.NProperty):
-    """disk - the disk on which the item is stored """
-    which = 'cdis'
-    want = 'obj '
-class _Prop_displayed_name(aetools.NProperty):
-    """displayed name - the user-visible name of the item """
-    which = 'dnam'
-    want = 'utxt'
-class _Prop_everyones_privileges(aetools.NProperty):
-    """everyones privileges -  """
-    which = 'gstp'
-    want = 'priv'
-class _Prop_extension_hidden(aetools.NProperty):
-    """extension hidden - Is the item's extension hidden from the user? """
-    which = 'hidx'
-    want = 'bool'
-class _Prop_group(aetools.NProperty):
-    """group - the user or group that has special access to the container """
-    which = 'sgrp'
-    want = 'utxt'
-class _Prop_group_privileges(aetools.NProperty):
-    """group privileges -  """
-    which = 'gppr'
-    want = 'priv'
-class _Prop_icon(aetools.NProperty):
-    """icon - the icon bitmap of the item """
-    which = 'iimg'
-    want = 'ifam'
-class _Prop_index(aetools.NProperty):
-    """index - the index in the front-to-back ordering within its container """
-    which = 'pidx'
-    want = 'long'
-class _Prop_information_window(aetools.NProperty):
-    """information window - the information window for the item """
-    which = 'iwnd'
-    want = 'obj '
-class _Prop_kind(aetools.NProperty):
-    """kind - the kind of the item """
-    which = 'kind'
-    want = 'utxt'
-class _Prop_label_index(aetools.NProperty):
-    """label index - the label of the item """
-    which = 'labi'
-    want = 'long'
-class _Prop_locked(aetools.NProperty):
-    """locked - Is the file locked? """
-    which = 'aslk'
-    want = 'bool'
-class _Prop_modification_date(aetools.NProperty):
-    """modification date - the date on which the item was last modified """
-    which = 'asmo'
-    want = 'ldt '
-class _Prop_name(aetools.NProperty):
-    """name - the name of the item """
-    which = 'pnam'
-    want = 'utxt'
-class _Prop_name_extension(aetools.NProperty):
-    """name extension - the name extension of the item (such as \xd2txt\xd3) """
-    which = 'nmxt'
-    want = 'utxt'
-class _Prop_owner(aetools.NProperty):
-    """owner - the user that owns the container """
-    which = 'sown'
-    want = 'utxt'
-class _Prop_owner_privileges(aetools.NProperty):
-    """owner privileges -  """
-    which = 'ownr'
-    want = 'priv'
-class _Prop_physical_size(aetools.NProperty):
-    """physical size - the actual space used by the item on disk """
-    which = 'phys'
-    want = 'comp'
-class _Prop_position(aetools.NProperty):
-    """position - the position of the item within its parent window (can only be set for an item in a window viewed as icons or buttons) """
-    which = 'posn'
-    want = 'QDpt'
-class _Prop_properties(aetools.NProperty):
-    """properties - every property of an item """
-    which = 'pALL'
-    want = 'reco'
-class _Prop_size(aetools.NProperty):
-    """size - the logical size of the item """
-    which = 'ptsz'
-    want = 'comp'
-class _Prop_url(aetools.NProperty):
-    """url - the url of the item """
-    which = 'pURL'
-    want = 'utxt'
-
-items = item
-item._superclassnames = []
-item._privpropdict = {
-    'bounds' : _Prop_bounds,
-    'comment' : _Prop_comment,
-    'container' : _Prop_container,
-    'creation_date' : _Prop_creation_date,
-    'description' : _Prop_description,
-    'disk' : _Prop_disk,
-    'displayed_name' : _Prop_displayed_name,
-    'everyones_privileges' : _Prop_everyones_privileges,
-    'extension_hidden' : _Prop_extension_hidden,
-    'group' : _Prop_group,
-    'group_privileges' : _Prop_group_privileges,
-    'icon' : _Prop_icon,
-    'index' : _Prop_index,
-    'information_window' : _Prop_information_window,
-    'kind' : _Prop_kind,
-    'label_index' : _Prop_label_index,
-    'locked' : _Prop_locked,
-    'modification_date' : _Prop_modification_date,
-    'name' : _Prop_name,
-    'name_extension' : _Prop_name_extension,
-    'owner' : _Prop_owner,
-    'owner_privileges' : _Prop_owner_privileges,
-    'physical_size' : _Prop_physical_size,
-    'position' : _Prop_position,
-    'properties' : _Prop_properties,
-    'size' : _Prop_size,
-    'url' : _Prop_url,
-}
-item._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'cobj' : item,
-}
-
-_propdeclarations = {
-    'ascd' : _Prop_creation_date,
-    'aslk' : _Prop_locked,
-    'asmo' : _Prop_modification_date,
-    'cdis' : _Prop_disk,
-    'comt' : _Prop_comment,
-    'ctnr' : _Prop_container,
-    'dnam' : _Prop_displayed_name,
-    'dscr' : _Prop_description,
-    'gppr' : _Prop_group_privileges,
-    'gstp' : _Prop_everyones_privileges,
-    'hidx' : _Prop_extension_hidden,
-    'iimg' : _Prop_icon,
-    'iwnd' : _Prop_information_window,
-    'kind' : _Prop_kind,
-    'labi' : _Prop_label_index,
-    'nmxt' : _Prop_name_extension,
-    'ownr' : _Prop_owner_privileges,
-    'pALL' : _Prop_properties,
-    'pURL' : _Prop_url,
-    'pbnd' : _Prop_bounds,
-    'phys' : _Prop_physical_size,
-    'pidx' : _Prop_index,
-    'pnam' : _Prop_name,
-    'posn' : _Prop_position,
-    'ptsz' : _Prop_size,
-    'sgrp' : _Prop_group,
-    'sown' : _Prop_owner,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py b/Lib/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py
deleted file mode 100644 (file)
index fc9da2e..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-"""Suite Legacy suite: Operations formerly handled by the Finder, but now automatically delegated to other applications
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/Finder.app
-AETE/AEUT resource version 0/144, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'fleg'
-
-class Legacy_suite_Events:
-
-    def restart(self, _no_object=None, _attributes={}, **_arguments):
-        """restart: Restart the computer
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'rest'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 shut_down(self, _no_object=None, _attributes={}, **_arguments):
-        """shut down: Shut Down the computer
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'shut'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 sleep(self, _no_object=None, _attributes={}, **_arguments):
-        """sleep: Put the computer to sleep
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'slep'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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['----']
-
-
-class application(aetools.ComponentItem):
-    """application - The Finder """
-    want = 'capp'
-class _Prop_desktop_picture(aetools.NProperty):
-    """desktop picture - the desktop picture of the main monitor """
-    which = 'dpic'
-    want = 'file'
-desktop_picture = _Prop_desktop_picture()
-
-class application_process(aetools.ComponentItem):
-    """application process - A process launched from an application file """
-    want = 'pcap'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - inherits some of its properties from the process class """
-    which = 'c@#^'
-    want = 'prcs'
-class _Prop_application_file(aetools.NProperty):
-    """application file - the application file from which this process was launched """
-    which = 'appf'
-    want = 'appf'
-
-application_processes = application_process
-
-class desk_accessory_process(aetools.ComponentItem):
-    """desk accessory process - A process launched from a desk accessory file """
-    want = 'pcda'
-class _Prop_desk_accessory_file(aetools.NProperty):
-    """desk accessory file - the desk accessory file from which this process was launched """
-    which = 'dafi'
-    want = 'obj '
-
-desk_accessory_processes = desk_accessory_process
-
-class process(aetools.ComponentItem):
-    """process - A process running on this computer """
-    want = 'prcs'
-class _Prop_accepts_high_level_events(aetools.NProperty):
-    """accepts high level events - Is the process high-level event aware (accepts open application, open document, print document, and quit)? """
-    which = 'isab'
-    want = 'bool'
-class _Prop_accepts_remote_events(aetools.NProperty):
-    """accepts remote events - Does the process accept remote events? """
-    which = 'revt'
-    want = 'bool'
-class _Prop_creator_type(aetools.NProperty):
-    """creator type - the OSType of the creator of the process (the signature) """
-    which = 'fcrt'
-    want = 'type'
-class _Prop_file(aetools.NProperty):
-    """file - the file from which the process was launched """
-    which = 'file'
-    want = 'obj '
-class _Prop_file_type(aetools.NProperty):
-    """file type - the OSType of the file type of the process """
-    which = 'asty'
-    want = 'type'
-class _Prop_frontmost(aetools.NProperty):
-    """frontmost - Is the process the frontmost process? """
-    which = 'pisf'
-    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'
-class _Prop_name(aetools.NProperty):
-    """name - the name of the process """
-    which = 'pnam'
-    want = 'itxt'
-class _Prop_partition_space_used(aetools.NProperty):
-    """partition space used - the number of bytes currently used in the process' partition """
-    which = 'pusd'
-    want = 'long'
-class _Prop_total_partition_size(aetools.NProperty):
-    """total partition size - the size of the partition with which the process was launched """
-    which = 'appt'
-    want = 'long'
-class _Prop_visible(aetools.NProperty):
-    """visible - Is the process' layer visible? """
-    which = 'pvis'
-    want = 'bool'
-
-processes = process
-application._superclassnames = []
-application._privpropdict = {
-    'desktop_picture' : _Prop_desktop_picture,
-}
-application._privelemdict = {
-}
-application_process._superclassnames = ['process']
-application_process._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'application_file' : _Prop_application_file,
-}
-application_process._privelemdict = {
-}
-desk_accessory_process._superclassnames = ['process']
-desk_accessory_process._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'desk_accessory_file' : _Prop_desk_accessory_file,
-}
-desk_accessory_process._privelemdict = {
-}
-process._superclassnames = []
-process._privpropdict = {
-    'accepts_high_level_events' : _Prop_accepts_high_level_events,
-    'accepts_remote_events' : _Prop_accepts_remote_events,
-    'creator_type' : _Prop_creator_type,
-    'file' : _Prop_file,
-    'file_type' : _Prop_file_type,
-    'frontmost' : _Prop_frontmost,
-    'has_scripting_terminology' : _Prop_has_scripting_terminology,
-    'name' : _Prop_name,
-    'partition_space_used' : _Prop_partition_space_used,
-    'total_partition_size' : _Prop_total_partition_size,
-    'visible' : _Prop_visible,
-}
-process._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-    'pcap' : application_process,
-    'pcda' : desk_accessory_process,
-    'prcs' : process,
-}
-
-_propdeclarations = {
-    'appf' : _Prop_application_file,
-    'appt' : _Prop_total_partition_size,
-    'asty' : _Prop_file_type,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'dafi' : _Prop_desk_accessory_file,
-    'dpic' : _Prop_desktop_picture,
-    'fcrt' : _Prop_creator_type,
-    'file' : _Prop_file,
-    'hscr' : _Prop_has_scripting_terminology,
-    'isab' : _Prop_accepts_high_level_events,
-    'pisf' : _Prop_frontmost,
-    'pnam' : _Prop_name,
-    'pusd' : _Prop_partition_space_used,
-    'pvis' : _Prop_visible,
-    'revt' : _Prop_accepts_remote_events,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py
deleted file mode 100644 (file)
index ff75edc..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-"""Suite Standard Suite: Common terms that most applications should support
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/Finder.app
-AETE/AEUT resource version 0/144, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'CoRe'
-
-from StdSuites.Standard_Suite import *
-class Standard_Suite_Events(Standard_Suite_Events):
-
-    def close(self, _object, _attributes={}, **_arguments):
-        """close: Close an object
-        Required argument: the object 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.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_count = {
-        'each' : 'kocl',
-    }
-
-    def count(self, _object, _attributes={}, **_arguments):
-        """count: Return the number of elements of a particular class within an object
-        Required argument: the object whose elements are to be counted
-        Keyword argument each: the class of the elements to be counted
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the number of elements
-        """
-        _code = 'core'
-        _subcode = 'cnte'
-
-        aetools.keysubst(_arguments, self._argmap_count)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_data_size = {
-        'as' : 'rtyp',
-    }
-
-    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 as: the data type for which the size is calculated
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the size of the object in bytes
-        """
-        _code = 'core'
-        _subcode = 'dsiz'
-
-        aetools.keysubst(_arguments, self._argmap_data_size)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def delete(self, _object, _attributes={}, **_arguments):
-        """delete: Move an item from its container to the trash
-        Required argument: the item to delete
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: to the item that was just deleted
-        """
-        _code = 'core'
-        _subcode = 'delo'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_duplicate = {
-        'to' : 'insh',
-        'replacing' : 'alrp',
-        'routing_suppressed' : 'rout',
-    }
-
-    def duplicate(self, _object, _attributes={}, **_arguments):
-        """duplicate: Duplicate one or more object(s)
-        Required argument: the object(s) to duplicate
-        Keyword argument to: the new location for the object(s)
-        Keyword argument replacing: Specifies whether or not to replace items in the destination that have the same name as items being duplicated
-        Keyword argument routing_suppressed: Specifies whether or not to autoroute items (default is false). Only applies when copying to the system folder.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: to the duplicated object(s)
-        """
-        _code = 'core'
-        _subcode = 'clon'
-
-        aetools.keysubst(_arguments, self._argmap_duplicate)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'alrp', _Enum_bool)
-        aetools.enumsubst(_arguments, 'rout', _Enum_bool)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def exists(self, _object, _attributes={}, **_arguments):
-        """exists: Verify if an object exists
-        Required argument: the object in question
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: true if it exists, false if not
-        """
-        _code = 'core'
-        _subcode = 'doex'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_make = {
-        'new' : 'kocl',
-        'at' : 'insh',
-        'to' : 'to  ',
-        'with_properties' : 'prdt',
-    }
-
-    def make(self, _no_object=None, _attributes={}, **_arguments):
-        """make: Make a new element
-        Keyword argument new: the class of the new element
-        Keyword argument at: the location at which to insert the element
-        Keyword argument to: when creating an alias file, the original item to create an alias to or when creating a file viewer window, the target of the window
-        Keyword argument with_properties: the initial values for the properties of the element
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: to the new object(s)
-        """
-        _code = 'core'
-        _subcode = 'crel'
-
-        aetools.keysubst(_arguments, self._argmap_make)
-        if _no_object is not None: raise TypeError('No direct arg expected')
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_move = {
-        'to' : 'insh',
-        'replacing' : 'alrp',
-        'positioned_at' : 'mvpl',
-        'routing_suppressed' : 'rout',
-    }
-
-    def move(self, _object, _attributes={}, **_arguments):
-        """move: Move object(s) to a new location
-        Required argument: the object(s) to move
-        Keyword argument to: the new location for the object(s)
-        Keyword argument replacing: Specifies whether or not to replace items in the destination that have the same name as items being moved
-        Keyword argument positioned_at: Gives a list (in local window coordinates) of positions for the destination items
-        Keyword argument routing_suppressed: Specifies whether or not to autoroute items (default is false). Only applies when moving to the system folder.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: to the object(s) after they have been moved
-        """
-        _code = 'core'
-        _subcode = 'move'
-
-        aetools.keysubst(_arguments, self._argmap_move)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'alrp', _Enum_bool)
-        aetools.enumsubst(_arguments, 'mvpl', _Enum_list)
-        aetools.enumsubst(_arguments, 'rout', _Enum_bool)
-
-        _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 = {
-        'using' : 'usin',
-        'with_properties' : 'prdt',
-    }
-
-    def open(self, _object, _attributes={}, **_arguments):
-        """open: Open the specified object(s)
-        Required argument: list of objects to open
-        Keyword argument using: the application file to open the object with
-        Keyword argument with_properties: the initial values for the properties, to be included with the open command sent to the application that opens the direct object
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'odoc'
-
-        aetools.keysubst(_arguments, self._argmap_open)
-        _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_print_ = {
-        'with_properties' : 'prdt',
-    }
-
-    def print_(self, _object, _attributes={}, **_arguments):
-        """print: Print the specified object(s)
-        Required argument: list of objects to print
-        Keyword argument with_properties: optional properties to be included with the print command sent to the application that prints the direct object
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'pdoc'
-
-        aetools.keysubst(_arguments, self._argmap_print_)
-        _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 the Finder
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'quit'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 select(self, _object, _attributes={}, **_arguments):
-        """select: Select the specified object(s)
-        Required argument: the object to select
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'misc'
-        _subcode = 'slct'
-
-        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['----']
-
-_Enum_list = None # XXXX enum list not found!!
-_Enum_bool = None # XXXX enum bool not found!!
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Type_Definitions.py b/Lib/plat-mac/lib-scriptpackages/Finder/Type_Definitions.py
deleted file mode 100644 (file)
index 3e7d817..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-"""Suite Type Definitions: Definitions of records used in scripting the Finder
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/Finder.app
-AETE/AEUT resource version 0/144, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'tpdf'
-
-class Type_Definitions_Events:
-
-    pass
-
-
-class alias_list(aetools.ComponentItem):
-    """alias list - A list of aliases.  Use \xd4as alias list\xd5 when a list of aliases is needed (instead of a list of file system item references). """
-    want = 'alst'
-
-class label(aetools.ComponentItem):
-    """label - (NOT AVAILABLE YET) A Finder label (name and color) """
-    want = 'clbl'
-class _Prop_color(aetools.NProperty):
-    """color - the color associated with the label """
-    which = 'colr'
-    want = 'cRGB'
-class _Prop_index(aetools.NProperty):
-    """index - the index in the front-to-back ordering within its container """
-    which = 'pidx'
-    want = 'long'
-class _Prop_name(aetools.NProperty):
-    """name - the name associated with the label """
-    which = 'pnam'
-    want = 'utxt'
-
-class preferences(aetools.ComponentItem):
-    """preferences - (NOT AVAILABLE, SUBJECT TO CHANGE) The Finder Preferences """
-    want = 'cprf'
-class _Prop_button_view_arrangement(aetools.NProperty):
-    """button view arrangement - the method of arrangement of icons in default Finder button view windows """
-    which = 'barr'
-    want = 'earr'
-class _Prop_button_view_icon_size(aetools.NProperty):
-    """button view icon size - the size of icons displayed in Finder button view windows. """
-    which = 'bisz'
-    want = 'long'
-class _Prop_calculates_folder_sizes(aetools.NProperty):
-    """calculates folder sizes - Are folder sizes calculated and displayed in Finder list view windows? """
-    which = 'sfsz'
-    want = 'bool'
-class _Prop_delay_before_springing(aetools.NProperty):
-    """delay before springing - the delay before springing open a container in ticks (1/60th of a second) (12 is shortest delay, 60 is longest delay) """
-    which = 'dela'
-    want = 'shor'
-class _Prop_list_view_icon_size(aetools.NProperty):
-    """list view icon size - the size of icons displayed in Finder list view windows. """
-    which = 'lisz'
-    want = 'long'
-class _Prop_shows_comments(aetools.NProperty):
-    """shows comments - Are comments displayed in default Finder list view windows? """
-    which = 'scom'
-    want = 'bool'
-class _Prop_shows_creation_date(aetools.NProperty):
-    """shows creation date - Are creation dates displayed in default Finder list view windows? """
-    which = 'scda'
-    want = 'bool'
-class _Prop_shows_kind(aetools.NProperty):
-    """shows kind - Are document kinds displayed in default Finder list view windows? """
-    which = 'sknd'
-    want = 'bool'
-class _Prop_shows_label(aetools.NProperty):
-    """shows label - Are labels displayed in default Finder list view windows? """
-    which = 'slbl'
-    want = 'bool'
-class _Prop_shows_modification_date(aetools.NProperty):
-    """shows modification date - Are modification dates displayed in default Finder list view windows? """
-    which = 'sdat'
-    want = 'bool'
-class _Prop_shows_size(aetools.NProperty):
-    """shows size - Are file sizes displayed in default Finder list view windows? """
-    which = 'ssiz'
-    want = 'bool'
-class _Prop_shows_version(aetools.NProperty):
-    """shows version - Are file versions displayed in default Finder list view windows? """
-    which = 'svrs'
-    want = 'bool'
-class _Prop_spatial_view_arrangement(aetools.NProperty):
-    """spatial view arrangement - the method of arrangement of icons in default Finder spatial view windows """
-    which = 'iarr'
-    want = 'earr'
-class _Prop_spatial_view_icon_size(aetools.NProperty):
-    """spatial view icon size - the size of icons displayed in Finder spatial view windows. """
-    which = 'iisz'
-    want = 'long'
-class _Prop_spring_open_folders(aetools.NProperty):
-    """spring open folders - Spring open folders after the specified delay? """
-    which = 'sprg'
-    want = 'bool'
-class _Prop_uses_relative_dates(aetools.NProperty):
-    """uses relative dates - Are relative dates (e.g., today, yesterday) shown  in Finder list view windows? """
-    which = 'urdt'
-    want = 'bool'
-class _Prop_uses_simple_menus(aetools.NProperty):
-    """uses simple menus - Use simplified Finder menus? """
-    which = 'usme'
-    want = 'bool'
-class _Prop_uses_wide_grid(aetools.NProperty):
-    """uses wide grid - Space icons on a wide grid? """
-    which = 'uswg'
-    want = 'bool'
-class _Prop_view_font(aetools.NProperty):
-    """view font - the id of the font used in Finder views. """
-    which = 'vfnt'
-    want = 'long'
-class _Prop_view_font_size(aetools.NProperty):
-    """view font size - the size of the font used in Finder views """
-    which = 'vfsz'
-    want = 'long'
-class _Prop_window(aetools.NProperty):
-    """window - the window that would open if Finder preferences was opened """
-    which = 'cwin'
-    want = 'pwnd'
-#        element 'clbl' as ['indx', 'name']
-
-class icon_view_options(aetools.ComponentItem):
-    """icon view options - the icon view options """
-    want = 'icop'
-
-_Prop_arrangement = _Prop_spatial_view_arrangement
-class _Prop_icon_size(aetools.NProperty):
-    """icon size - the size of icons displayed in the icon view """
-    which = 'lvis'
-    want = 'shor'
-
-class icon_family(aetools.ComponentItem):
-    """icon family - (NOT AVAILABLE YET) A family of icons """
-    want = 'ifam'
-class _Prop_large_32_bit_icon(aetools.NProperty):
-    """large 32 bit icon - the large 32-bit color icon """
-    which = 'il32'
-    want = 'il32'
-class _Prop_large_4_bit_icon(aetools.NProperty):
-    """large 4 bit icon - the large 4-bit color icon """
-    which = 'icl4'
-    want = 'icl4'
-class _Prop_large_8_bit_icon(aetools.NProperty):
-    """large 8 bit icon - the large 8-bit color icon """
-    which = 'icl8'
-    want = 'icl8'
-class _Prop_large_8_bit_mask(aetools.NProperty):
-    """large 8 bit mask - the large 8-bit mask for large 32-bit icons """
-    which = 'l8mk'
-    want = 'l8mk'
-class _Prop_large_monochrome_icon_and_mask(aetools.NProperty):
-    """large monochrome icon and mask - the large black-and-white icon and the mask for large icons """
-    which = 'ICN#'
-    want = 'ICN#'
-class _Prop_small_32_bit_icon(aetools.NProperty):
-    """small 32 bit icon - the small 32-bit color icon """
-    which = 'is32'
-    want = 'is32'
-class _Prop_small_4_bit_icon(aetools.NProperty):
-    """small 4 bit icon - the small 4-bit color icon """
-    which = 'ics4'
-    want = 'ics4'
-class _Prop_small_8_bit_icon(aetools.NProperty):
-    """small 8 bit icon - the small 8-bit color icon """
-    which = 'ics8'
-    want = 'ics8'
-
-_Prop_small_8_bit_mask = _Prop_small_8_bit_icon
-class _Prop_small_monochrome_icon_and_mask(aetools.NProperty):
-    """small monochrome icon and mask - the small black-and-white icon and the mask for small icons """
-    which = 'ics#'
-    want = 'ics#'
-
-class column(aetools.ComponentItem):
-    """column - a column of a list view """
-    want = 'lvcl'
-class _Prop_sort_direction(aetools.NProperty):
-    """sort direction - The direction in which the window is sorted """
-    which = 'sord'
-    want = 'sodr'
-class _Prop_visible(aetools.NProperty):
-    """visible - is this column visible """
-    which = 'pvis'
-    want = 'bool'
-class _Prop_width(aetools.NProperty):
-    """width - the width of this column """
-    which = 'clwd'
-    want = 'shor'
-
-columns = column
-
-class list_view_options(aetools.ComponentItem):
-    """list view options - the list view options """
-    want = 'lvop'
-class _Prop_sort_column(aetools.NProperty):
-    """sort column - the column that the list view is sorted on """
-    which = 'srtc'
-    want = 'lvcl'
-#        element 'lvcl' as ['indx', 'rele', 'rang', 'test']
-alias_list._superclassnames = []
-alias_list._privpropdict = {
-}
-alias_list._privelemdict = {
-}
-label._superclassnames = []
-label._privpropdict = {
-    'color' : _Prop_color,
-    'index' : _Prop_index,
-    'name' : _Prop_name,
-}
-label._privelemdict = {
-}
-preferences._superclassnames = []
-preferences._privpropdict = {
-    'button_view_arrangement' : _Prop_button_view_arrangement,
-    'button_view_icon_size' : _Prop_button_view_icon_size,
-    'calculates_folder_sizes' : _Prop_calculates_folder_sizes,
-    'delay_before_springing' : _Prop_delay_before_springing,
-    'list_view_icon_size' : _Prop_list_view_icon_size,
-    'shows_comments' : _Prop_shows_comments,
-    'shows_creation_date' : _Prop_shows_creation_date,
-    'shows_kind' : _Prop_shows_kind,
-    'shows_label' : _Prop_shows_label,
-    'shows_modification_date' : _Prop_shows_modification_date,
-    'shows_size' : _Prop_shows_size,
-    'shows_version' : _Prop_shows_version,
-    'spatial_view_arrangement' : _Prop_spatial_view_arrangement,
-    'spatial_view_icon_size' : _Prop_spatial_view_icon_size,
-    'spring_open_folders' : _Prop_spring_open_folders,
-    'uses_relative_dates' : _Prop_uses_relative_dates,
-    'uses_simple_menus' : _Prop_uses_simple_menus,
-    'uses_wide_grid' : _Prop_uses_wide_grid,
-    'view_font' : _Prop_view_font,
-    'view_font_size' : _Prop_view_font_size,
-    'window' : _Prop_window,
-}
-preferences._privelemdict = {
-    'label' : label,
-}
-icon_view_options._superclassnames = []
-icon_view_options._privpropdict = {
-    'arrangement' : _Prop_arrangement,
-    'icon_size' : _Prop_icon_size,
-}
-icon_view_options._privelemdict = {
-}
-icon_family._superclassnames = []
-icon_family._privpropdict = {
-    'large_32_bit_icon' : _Prop_large_32_bit_icon,
-    'large_4_bit_icon' : _Prop_large_4_bit_icon,
-    'large_8_bit_icon' : _Prop_large_8_bit_icon,
-    'large_8_bit_mask' : _Prop_large_8_bit_mask,
-    'large_monochrome_icon_and_mask' : _Prop_large_monochrome_icon_and_mask,
-    'small_32_bit_icon' : _Prop_small_32_bit_icon,
-    'small_4_bit_icon' : _Prop_small_4_bit_icon,
-    'small_8_bit_icon' : _Prop_small_8_bit_icon,
-    'small_8_bit_mask' : _Prop_small_8_bit_mask,
-    'small_monochrome_icon_and_mask' : _Prop_small_monochrome_icon_and_mask,
-}
-icon_family._privelemdict = {
-}
-column._superclassnames = []
-column._privpropdict = {
-    'index' : _Prop_index,
-    'name' : _Prop_name,
-    'sort_direction' : _Prop_sort_direction,
-    'visible' : _Prop_visible,
-    'width' : _Prop_width,
-}
-column._privelemdict = {
-}
-list_view_options._superclassnames = []
-list_view_options._privpropdict = {
-    'calculates_folder_sizes' : _Prop_calculates_folder_sizes,
-    'icon_size' : _Prop_icon_size,
-    'sort_column' : _Prop_sort_column,
-    'uses_relative_dates' : _Prop_uses_relative_dates,
-}
-list_view_options._privelemdict = {
-    'column' : column,
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'alst' : alias_list,
-    'clbl' : label,
-    'cprf' : preferences,
-    'icop' : icon_view_options,
-    'ifam' : icon_family,
-    'lvcl' : column,
-    'lvop' : list_view_options,
-}
-
-_propdeclarations = {
-    'ICN#' : _Prop_large_monochrome_icon_and_mask,
-    'barr' : _Prop_button_view_arrangement,
-    'bisz' : _Prop_button_view_icon_size,
-    'clwd' : _Prop_width,
-    'colr' : _Prop_color,
-    'cwin' : _Prop_window,
-    'dela' : _Prop_delay_before_springing,
-    'iarr' : _Prop_spatial_view_arrangement,
-    'icl4' : _Prop_large_4_bit_icon,
-    'icl8' : _Prop_large_8_bit_icon,
-    'ics#' : _Prop_small_monochrome_icon_and_mask,
-    'ics4' : _Prop_small_4_bit_icon,
-    'ics8' : _Prop_small_8_bit_icon,
-    'iisz' : _Prop_spatial_view_icon_size,
-    'il32' : _Prop_large_32_bit_icon,
-    'is32' : _Prop_small_32_bit_icon,
-    'l8mk' : _Prop_large_8_bit_mask,
-    'lisz' : _Prop_list_view_icon_size,
-    'lvis' : _Prop_icon_size,
-    'pidx' : _Prop_index,
-    'pnam' : _Prop_name,
-    'pvis' : _Prop_visible,
-    'scda' : _Prop_shows_creation_date,
-    'scom' : _Prop_shows_comments,
-    'sdat' : _Prop_shows_modification_date,
-    'sfsz' : _Prop_calculates_folder_sizes,
-    'sknd' : _Prop_shows_kind,
-    'slbl' : _Prop_shows_label,
-    'sord' : _Prop_sort_direction,
-    'sprg' : _Prop_spring_open_folders,
-    'srtc' : _Prop_sort_column,
-    'ssiz' : _Prop_shows_size,
-    'svrs' : _Prop_shows_version,
-    'urdt' : _Prop_uses_relative_dates,
-    'usme' : _Prop_uses_simple_menus,
-    'uswg' : _Prop_uses_wide_grid,
-    'vfnt' : _Prop_view_font,
-    'vfsz' : _Prop_view_font_size,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Window_classes.py b/Lib/plat-mac/lib-scriptpackages/Finder/Window_classes.py
deleted file mode 100644 (file)
index 496968a..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-"""Suite Window classes: Classes representing windows
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/Finder.app
-AETE/AEUT resource version 0/144, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'fndr'
-
-class Window_classes_Events:
-
-    pass
-
-
-class Finder_window(aetools.ComponentItem):
-    """Finder window - A file viewer window """
-    want = 'brow'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - inherits some of its properties from the window class """
-    which = 'c@#^'
-    want = 'cwin'
-class _Prop_current_view(aetools.NProperty):
-    """current view - the current view for the container window """
-    which = 'pvew'
-    want = 'ecvw'
-class _Prop_icon_view_options(aetools.NProperty):
-    """icon view options - the icon view options for the container window """
-    which = 'icop'
-    want = 'icop'
-class _Prop_list_view_options(aetools.NProperty):
-    """list view options - the list view options for the container window """
-    which = 'lvop'
-    want = 'lvop'
-class _Prop_target(aetools.NProperty):
-    """target - the container at which this file viewer is targeted """
-    which = 'fvtg'
-    want = 'obj '
-
-Finder_windows = Finder_window
-
-class window(aetools.ComponentItem):
-    """window - A window """
-    want = 'cwin'
-class _Prop_bounds(aetools.NProperty):
-    """bounds - the boundary rectangle for the window """
-    which = 'pbnd'
-    want = 'qdrt'
-class _Prop_closeable(aetools.NProperty):
-    """closeable - Does the window have a close box? """
-    which = 'hclb'
-    want = 'bool'
-class _Prop_collapsed(aetools.NProperty):
-    """collapsed - Is the window collapsed """
-    which = 'wshd'
-    want = 'bool'
-class _Prop_floating(aetools.NProperty):
-    """floating - Does the window have a title bar? """
-    which = 'isfl'
-    want = 'bool'
-class _Prop_id(aetools.NProperty):
-    """id - the unique id for this window """
-    which = 'ID  '
-    want = 'magn'
-class _Prop_index(aetools.NProperty):
-    """index - the number of the window in the front-to-back layer ordering """
-    which = 'pidx'
-    want = 'long'
-class _Prop_modal(aetools.NProperty):
-    """modal - Is the window modal? """
-    which = 'pmod'
-    want = 'bool'
-class _Prop_name(aetools.NProperty):
-    """name - the name of the window """
-    which = 'pnam'
-    want = 'utxt'
-class _Prop_position(aetools.NProperty):
-    """position - the upper left position of the window """
-    which = 'posn'
-    want = 'QDpt'
-class _Prop_properties(aetools.NProperty):
-    """properties - every property of a window """
-    which = 'pALL'
-    want = 'reco'
-class _Prop_resizable(aetools.NProperty):
-    """resizable - Is the window resizable? """
-    which = 'prsz'
-    want = 'bool'
-class _Prop_titled(aetools.NProperty):
-    """titled - Does the window have a title bar? """
-    which = 'ptit'
-    want = 'bool'
-class _Prop_visible(aetools.NProperty):
-    """visible - Is the window visible (always true for open Finder windows)? """
-    which = 'pvis'
-    want = 'bool'
-class _Prop_zoomable(aetools.NProperty):
-    """zoomable - Is the window zoomable? """
-    which = 'iszm'
-    want = 'bool'
-class _Prop_zoomed(aetools.NProperty):
-    """zoomed - Is the window zoomed? """
-    which = 'pzum'
-    want = 'bool'
-class _Prop_zoomed_full_size(aetools.NProperty):
-    """zoomed full size - Is the window zoomed to the full size of the screen? (can only be set, not read) """
-    which = 'zumf'
-    want = 'bool'
-
-windows = window
-
-class information_window(aetools.ComponentItem):
-    """information window - An inspector window (opened by \xd2Show Info\xd3) """
-    want = 'iwnd'
-class _Prop_current_panel(aetools.NProperty):
-    """current panel - the current panel in the information window """
-    which = 'panl'
-    want = 'ipnl'
-class _Prop_item(aetools.NProperty):
-    """item - the item from which this window was opened """
-    which = 'cobj'
-    want = 'obj '
-
-class clipping_window(aetools.ComponentItem):
-    """clipping window - The window containing a clipping """
-    want = 'lwnd'
-
-clipping_windows = clipping_window
-
-class preferences_window(aetools.ComponentItem):
-    """preferences window - (NOT AVAILABLE YET) The Finder Preferences window """
-    want = 'pwnd'
-Finder_window._superclassnames = ['window']
-Finder_window._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'current_view' : _Prop_current_view,
-    'icon_view_options' : _Prop_icon_view_options,
-    'list_view_options' : _Prop_list_view_options,
-    'target' : _Prop_target,
-}
-Finder_window._privelemdict = {
-}
-window._superclassnames = []
-window._privpropdict = {
-    'bounds' : _Prop_bounds,
-    'closeable' : _Prop_closeable,
-    'collapsed' : _Prop_collapsed,
-    'floating' : _Prop_floating,
-    'id' : _Prop_id,
-    'index' : _Prop_index,
-    'modal' : _Prop_modal,
-    'name' : _Prop_name,
-    'position' : _Prop_position,
-    'properties' : _Prop_properties,
-    'resizable' : _Prop_resizable,
-    'titled' : _Prop_titled,
-    'visible' : _Prop_visible,
-    'zoomable' : _Prop_zoomable,
-    'zoomed' : _Prop_zoomed,
-    'zoomed_full_size' : _Prop_zoomed_full_size,
-}
-window._privelemdict = {
-}
-information_window._superclassnames = ['window']
-information_window._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'current_panel' : _Prop_current_panel,
-    'item' : _Prop_item,
-}
-information_window._privelemdict = {
-}
-clipping_window._superclassnames = ['window']
-clipping_window._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-}
-clipping_window._privelemdict = {
-}
-preferences_window._superclassnames = ['window']
-preferences_window._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'current_panel' : _Prop_current_panel,
-}
-preferences_window._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'brow' : Finder_window,
-    'cwin' : window,
-    'iwnd' : information_window,
-    'lwnd' : clipping_window,
-    'pwnd' : preferences_window,
-}
-
-_propdeclarations = {
-    'ID  ' : _Prop_id,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'cobj' : _Prop_item,
-    'fvtg' : _Prop_target,
-    'hclb' : _Prop_closeable,
-    'icop' : _Prop_icon_view_options,
-    'isfl' : _Prop_floating,
-    'iszm' : _Prop_zoomable,
-    'lvop' : _Prop_list_view_options,
-    'pALL' : _Prop_properties,
-    'panl' : _Prop_current_panel,
-    'pbnd' : _Prop_bounds,
-    'pidx' : _Prop_index,
-    'pmod' : _Prop_modal,
-    'pnam' : _Prop_name,
-    'posn' : _Prop_position,
-    'prsz' : _Prop_resizable,
-    'ptit' : _Prop_titled,
-    'pvew' : _Prop_current_view,
-    'pvis' : _Prop_visible,
-    'pzum' : _Prop_zoomed,
-    'wshd' : _Prop_collapsed,
-    'zumf' : _Prop_zoomed_full_size,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py b/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py
deleted file mode 100644 (file)
index 364d467..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-"""
-Package generated from /System/Library/CoreServices/Finder.app
-"""
-import aetools
-Error = aetools.Error
-from . import Standard_Suite
-from . import Legacy_suite
-from . import Containers_and_folders
-from . import Files
-from . import Finder_Basics
-from . import Finder_items
-from . import Window_classes
-from . import Type_Definitions
-from . import Enumerations
-
-
-_code_to_module = {
-    'CoRe' : Standard_Suite,
-    'fleg' : Legacy_suite,
-    'fndr' : Containers_and_folders,
-    'fndr' : Files,
-    'fndr' : Finder_Basics,
-    'fndr' : Finder_items,
-    'fndr' : Window_classes,
-    'tpdf' : Type_Definitions,
-    'tpnm' : Enumerations,
-}
-
-
-
-_code_to_fullname = {
-    'CoRe' : ('Finder.Standard_Suite', 'Standard_Suite'),
-    'fleg' : ('Finder.Legacy_suite', 'Legacy_suite'),
-    'fndr' : ('Finder.Containers_and_folders', 'Containers_and_folders'),
-    'fndr' : ('Finder.Files', 'Files'),
-    'fndr' : ('Finder.Finder_Basics', 'Finder_Basics'),
-    'fndr' : ('Finder.Finder_items', 'Finder_items'),
-    'fndr' : ('Finder.Window_classes', 'Window_classes'),
-    'tpdf' : ('Finder.Type_Definitions', 'Type_Definitions'),
-    'tpnm' : ('Finder.Enumerations', 'Enumerations'),
-}
-
-from Finder.Standard_Suite import *
-from Finder.Legacy_suite import *
-from Finder.Containers_and_folders import *
-from Finder.Files import *
-from Finder.Finder_Basics import *
-from Finder.Finder_items import *
-from Finder.Window_classes import *
-from Finder.Type_Definitions import *
-from Finder.Enumerations import *
-
-def getbaseclasses(v):
-    if not getattr(v, '_propdict', None):
-        v._propdict = {}
-        v._elemdict = {}
-        for superclassname in getattr(v, '_superclassnames', []):
-            superclass = eval(superclassname)
-            getbaseclasses(superclass)
-            v._propdict.update(getattr(superclass, '_propdict', {}))
-            v._elemdict.update(getattr(superclass, '_elemdict', {}))
-        v._propdict.update(getattr(v, '_privpropdict', {}))
-        v._elemdict.update(getattr(v, '_privelemdict', {}))
-
-import StdSuites
-
-#
-# Set property and element dictionaries now that all classes have been defined
-#
-getbaseclasses(StdSuites.Type_Names_Suite.small_integer)
-getbaseclasses(StdSuites.Type_Names_Suite.system_dictionary)
-getbaseclasses(StdSuites.Type_Names_Suite.color_table)
-getbaseclasses(StdSuites.Type_Names_Suite.fixed_point)
-getbaseclasses(StdSuites.Type_Names_Suite.string)
-getbaseclasses(StdSuites.Type_Names_Suite.type_element_info)
-getbaseclasses(StdSuites.Type_Names_Suite.machine_location)
-getbaseclasses(StdSuites.Type_Names_Suite.PostScript_picture)
-getbaseclasses(StdSuites.Type_Names_Suite.type_property_info)
-getbaseclasses(StdSuites.Type_Names_Suite.menu_item)
-getbaseclasses(StdSuites.Type_Names_Suite.scrap_styles)
-getbaseclasses(StdSuites.Type_Names_Suite.fixed_rectangle)
-getbaseclasses(StdSuites.Type_Names_Suite.null)
-getbaseclasses(StdSuites.Type_Names_Suite.type_event_info)
-getbaseclasses(StdSuites.Type_Names_Suite.rotation)
-getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_rectangle)
-getbaseclasses(StdSuites.Type_Names_Suite.long_point)
-getbaseclasses(StdSuites.Type_Names_Suite.target_id)
-getbaseclasses(StdSuites.Type_Names_Suite.type_suite_info)
-getbaseclasses(StdSuites.Type_Names_Suite.type_parameter_info)
-getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_point)
-getbaseclasses(StdSuites.Type_Names_Suite.bounding_rectangle)
-getbaseclasses(StdSuites.Type_Names_Suite.TIFF_picture)
-getbaseclasses(StdSuites.Type_Names_Suite.long_fixed)
-getbaseclasses(StdSuites.Type_Names_Suite.version)
-getbaseclasses(StdSuites.Type_Names_Suite.RGB16_color)
-getbaseclasses(StdSuites.Type_Names_Suite.double_integer)
-getbaseclasses(StdSuites.Type_Names_Suite.location_reference)
-getbaseclasses(StdSuites.Type_Names_Suite.point)
-getbaseclasses(StdSuites.Type_Names_Suite.application_dictionary)
-getbaseclasses(StdSuites.Type_Names_Suite.unsigned_integer)
-getbaseclasses(StdSuites.Type_Names_Suite.menu)
-getbaseclasses(StdSuites.Type_Names_Suite.small_real)
-getbaseclasses(StdSuites.Type_Names_Suite.fixed)
-getbaseclasses(StdSuites.Type_Names_Suite.type_class_info)
-getbaseclasses(StdSuites.Type_Names_Suite.RGB96_color)
-getbaseclasses(StdSuites.Type_Names_Suite.dash_style)
-getbaseclasses(StdSuites.Type_Names_Suite.pixel_map_record)
-getbaseclasses(StdSuites.Type_Names_Suite.extended_real)
-getbaseclasses(StdSuites.Type_Names_Suite.long_rectangle)
-getbaseclasses(process)
-getbaseclasses(application_process)
-getbaseclasses(desk_accessory_process)
-getbaseclasses(application)
-getbaseclasses(trash_2d_object)
-getbaseclasses(desktop_2d_object)
-getbaseclasses(container)
-getbaseclasses(folder)
-getbaseclasses(disk)
-getbaseclasses(application)
-getbaseclasses(alias_file)
-getbaseclasses(package)
-getbaseclasses(file)
-getbaseclasses(application_file)
-getbaseclasses(internet_location_file)
-getbaseclasses(document_file)
-getbaseclasses(clipping)
-getbaseclasses(preferences_window)
-getbaseclasses(Finder_window)
-getbaseclasses(window)
-getbaseclasses(clipping_window)
-getbaseclasses(information_window)
-getbaseclasses(item)
-getbaseclasses(icon_view_options)
-getbaseclasses(preferences)
-getbaseclasses(alias_list)
-getbaseclasses(icon_family)
-getbaseclasses(label)
-getbaseclasses(column)
-getbaseclasses(list_view_options)
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'shor' : StdSuites.Type_Names_Suite.small_integer,
-    'aeut' : StdSuites.Type_Names_Suite.system_dictionary,
-    'clrt' : StdSuites.Type_Names_Suite.color_table,
-    'fpnt' : StdSuites.Type_Names_Suite.fixed_point,
-    'TEXT' : StdSuites.Type_Names_Suite.string,
-    'elin' : StdSuites.Type_Names_Suite.type_element_info,
-    'mLoc' : StdSuites.Type_Names_Suite.machine_location,
-    'EPS ' : StdSuites.Type_Names_Suite.PostScript_picture,
-    'pinf' : StdSuites.Type_Names_Suite.type_property_info,
-    'cmen' : StdSuites.Type_Names_Suite.menu_item,
-    'styl' : StdSuites.Type_Names_Suite.scrap_styles,
-    'frct' : StdSuites.Type_Names_Suite.fixed_rectangle,
-    'null' : StdSuites.Type_Names_Suite.null,
-    'evin' : StdSuites.Type_Names_Suite.type_event_info,
-    'trot' : StdSuites.Type_Names_Suite.rotation,
-    'lfrc' : StdSuites.Type_Names_Suite.long_fixed_rectangle,
-    'lpnt' : StdSuites.Type_Names_Suite.long_point,
-    'targ' : StdSuites.Type_Names_Suite.target_id,
-    'suin' : StdSuites.Type_Names_Suite.type_suite_info,
-    'pmin' : StdSuites.Type_Names_Suite.type_parameter_info,
-    'lfpt' : StdSuites.Type_Names_Suite.long_fixed_point,
-    'qdrt' : StdSuites.Type_Names_Suite.bounding_rectangle,
-    'TIFF' : StdSuites.Type_Names_Suite.TIFF_picture,
-    'lfxd' : StdSuites.Type_Names_Suite.long_fixed,
-    'vers' : StdSuites.Type_Names_Suite.version,
-    'tr16' : StdSuites.Type_Names_Suite.RGB16_color,
-    'comp' : StdSuites.Type_Names_Suite.double_integer,
-    'insl' : StdSuites.Type_Names_Suite.location_reference,
-    'QDpt' : StdSuites.Type_Names_Suite.point,
-    'aete' : StdSuites.Type_Names_Suite.application_dictionary,
-    'magn' : StdSuites.Type_Names_Suite.unsigned_integer,
-    'cmnu' : StdSuites.Type_Names_Suite.menu,
-    'sing' : StdSuites.Type_Names_Suite.small_real,
-    'fixd' : StdSuites.Type_Names_Suite.fixed,
-    'gcli' : StdSuites.Type_Names_Suite.type_class_info,
-    'tr96' : StdSuites.Type_Names_Suite.RGB96_color,
-    'tdas' : StdSuites.Type_Names_Suite.dash_style,
-    'tpmm' : StdSuites.Type_Names_Suite.pixel_map_record,
-    'exte' : StdSuites.Type_Names_Suite.extended_real,
-    'lrct' : StdSuites.Type_Names_Suite.long_rectangle,
-    'prcs' : process,
-    'pcap' : application_process,
-    'pcda' : desk_accessory_process,
-    'capp' : application,
-    'ctrs' : trash_2d_object,
-    'cdsk' : desktop_2d_object,
-    'ctnr' : container,
-    'cfol' : folder,
-    'cdis' : disk,
-    'capp' : application,
-    'alia' : alias_file,
-    'pack' : package,
-    'file' : file,
-    'appf' : application_file,
-    'inlf' : internet_location_file,
-    'docf' : document_file,
-    'clpf' : clipping,
-    'pwnd' : preferences_window,
-    'brow' : Finder_window,
-    'cwin' : window,
-    'lwnd' : clipping_window,
-    'iwnd' : information_window,
-    'cobj' : item,
-    'icop' : icon_view_options,
-    'cprf' : preferences,
-    'alst' : alias_list,
-    'ifam' : icon_family,
-    'clbl' : label,
-    'lvcl' : column,
-    'lvop' : list_view_options,
-}
-
-
-class Finder(Standard_Suite_Events,
-        Legacy_suite_Events,
-        Containers_and_folders_Events,
-        Files_Events,
-        Finder_Basics_Events,
-        Finder_items_Events,
-        Window_classes_Events,
-        Type_Definitions_Events,
-        Enumerations_Events,
-        aetools.TalkTo):
-    _signature = 'MACS'
-
-    _moduleName = 'Finder'
-
-    _elemdict = application._elemdict
-    _propdict = application._propdict
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py
deleted file mode 100644 (file)
index 89cb37f..0000000
+++ /dev/null
@@ -1,269 +0,0 @@
-"""Suite Mozilla suite: Experimental Mozilla suite
-Level 1, version 1
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'MOSS'
-
-class Mozilla_suite_Events:
-
-    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, \xd4Brwz\xd5 browser, \xd4Addr\xd5 addressbook, \xd4Mesg\xd5 messenger, etc., 4 bytes)
-        """
-        _code = 'MOSS'
-        _subcode = 'Impt'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 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 \xd2Joe Bloggs\xd3. 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 is not 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 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 \xd2FILE://foo/applicationname\xd3
-        """
-        _code = 'MOSS'
-        _subcode = 'wurl'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_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.get('errn', 0):
-            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.get('errn', 0):
-            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 is not 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_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.get('errn', 0):
-            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 is not 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_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.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _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  \xd4DEFAULT\xd5)
-        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.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-_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_dire = {
-    'again' : 'agai',   # Again (reload)
-    'home' : 'home',    # Home
-    'backward' : 'prev',        # Previous page
-    'forward' : 'next', # Next page
-}
-
-_Enum_ncmd = {
-    'Get_new_mail' : '\x00\x00\x04W',   #
-    'Send_queued_messages' : '\x00\x00\x04X',   #
-    'Read_newsgroups' : '\x00\x00\x04\x04',     #
-    'Show_Inbox' : '\x00\x00\x04\x05',  #
-    'Show_Bookmarks_window' : '\x00\x00\x04\x06',       #
-    'Show_History_window' : '\x00\x00\x04\x07', #
-    'Show_Address_Book_window' : '\x00\x00\x04\t',      #
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'comp' : _Enum_comp,
-    'dire' : _Enum_dire,
-    'ncmd' : _Enum_ncmd,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py b/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py
deleted file mode 100644 (file)
index a5dd228..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-"""Suite PowerPlant:
-Level 0, version 0
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_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 is not 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).
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'dbac' : _Enum_dbac,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Required_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Required_suite.py
deleted file mode 100644 (file)
index a7d3e96..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-"""Suite Required suite:
-Level 0, version 0
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
-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(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.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 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.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 Navigator
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'quit'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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: 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 is not 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['----']
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py
deleted file mode 100644 (file)
index 7bb4a5c..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-"""Suite Standard Suite: Common terms for most applications
-Level 1, version 1
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'CoRe'
-
-from StdSuites.Standard_Suite import *
-class Standard_Suite_Events(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.get('errn', 0):
-            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.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def get(self, _object, _attributes={}, **_arguments):
-        """get: Get the data for an object
-        Required argument: the object 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.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_set = {
-        'to' : 'data',
-    }
-
-    def set(self, _object, _attributes={}, **_arguments):
-        """set: Set an object\xd5s 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.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'
-class _Prop_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\xd5d like to conform to the standard. """
-    which = 'ALAP'
-    want = 'type'
-alert_application = _Prop_alert_application()
-class _Prop_kiosk_mode(aetools.NProperty):
-    """kiosk mode - Kiosk mode leaves very few menus enabled """
-    which = 'KOSK'
-    want = 'long'
-kiosk_mode = _Prop_kiosk_mode()
-#        element 'cwin' as ['indx', 'name', 'ID  ']
-
-class window(aetools.ComponentItem):
-    """window - A Window """
-    want = 'cwin'
-class _Prop_URL(aetools.NProperty):
-    """URL - Current URL """
-    which = 'curl'
-    want = 'TEXT'
-class _Prop_bounds(aetools.NProperty):
-    """bounds - the boundary rectangle for the window """
-    which = 'pbnd'
-    want = 'qdrt'
-class _Prop_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'
-class _Prop_closeable(aetools.NProperty):
-    """closeable - Does the window have a close box? """
-    which = 'hclb'
-    want = 'bool'
-class _Prop_floating(aetools.NProperty):
-    """floating - Does the window float? """
-    which = 'isfl'
-    want = 'bool'
-class _Prop_index(aetools.NProperty):
-    """index - the number of the window """
-    which = 'pidx'
-    want = 'long'
-class _Prop_modal(aetools.NProperty):
-    """modal - Is the window modal? """
-    which = 'pmod'
-    want = 'bool'
-class _Prop_name(aetools.NProperty):
-    """name - the title of the window """
-    which = 'pnam'
-    want = 'itxt'
-class _Prop_position(aetools.NProperty):
-    """position - upper left coordinates of window """
-    which = 'ppos'
-    want = 'QDpt'
-class _Prop_resizable(aetools.NProperty):
-    """resizable - Is the window resizable? """
-    which = 'prsz'
-    want = 'bool'
-class _Prop_titled(aetools.NProperty):
-    """titled - Does the window have a title bar? """
-    which = 'ptit'
-    want = 'bool'
-class _Prop_unique_ID(aetools.NProperty):
-    """unique ID - Window\xd5s unique ID (a bridge between WWW! suite window id\xd5s and standard AE windows) """
-    which = 'wiid'
-    want = 'long'
-class _Prop_visible(aetools.NProperty):
-    """visible - is the window visible? """
-    which = 'pvis'
-    want = 'bool'
-class _Prop_zoomable(aetools.NProperty):
-    """zoomable - Is the window zoomable? """
-    which = 'iszm'
-    want = 'bool'
-class _Prop_zoomed(aetools.NProperty):
-    """zoomed - Is the window zoomed? """
-    which = 'pzum'
-    want = 'bool'
-application._superclassnames = []
-application._privpropdict = {
-    'alert_application' : _Prop_alert_application,
-    'kiosk_mode' : _Prop_kiosk_mode,
-}
-application._privelemdict = {
-    'window' : window,
-}
-window._superclassnames = []
-window._privpropdict = {
-    'URL' : _Prop_URL,
-    'bounds' : _Prop_bounds,
-    'busy' : _Prop_busy,
-    'closeable' : _Prop_closeable,
-    'floating' : _Prop_floating,
-    'index' : _Prop_index,
-    'modal' : _Prop_modal,
-    'name' : _Prop_name,
-    'position' : _Prop_position,
-    'resizable' : _Prop_resizable,
-    'titled' : _Prop_titled,
-    'unique_ID' : _Prop_unique_ID,
-    'visible' : _Prop_visible,
-    'zoomable' : _Prop_zoomable,
-    'zoomed' : _Prop_zoomed,
-}
-window._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-    'cwin' : window,
-}
-
-_propdeclarations = {
-    'ALAP' : _Prop_alert_application,
-    'KOSK' : _Prop_kiosk_mode,
-    'busy' : _Prop_busy,
-    'curl' : _Prop_URL,
-    'hclb' : _Prop_closeable,
-    'isfl' : _Prop_floating,
-    'iszm' : _Prop_zoomable,
-    'pbnd' : _Prop_bounds,
-    'pidx' : _Prop_index,
-    'pmod' : _Prop_modal,
-    'pnam' : _Prop_name,
-    'ppos' : _Prop_position,
-    'prsz' : _Prop_resizable,
-    'ptit' : _Prop_titled,
-    'pvis' : _Prop_visible,
-    'pzum' : _Prop_zoomed,
-    'wiid' : _Prop_unique_ID,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py
deleted file mode 100644 (file)
index 6001118..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-"""Suite Standard URL suite: Mac URL standard, supported by many apps
-
-
-Level 1, version 1
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
-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.get('errn', 0):
-            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 = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Text.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Text.py
deleted file mode 100644 (file)
index 2360d94..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-"""Suite Text:
-Level 0, version 0
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'TEXT'
-
-from StdSuites.Text_Suite import *
-class Text_Events(Text_Suite_Events):
-
-    pass
-
-
-class text(aetools.ComponentItem):
-    """text - independent text view objects """
-    want = 'ctxt'
-class _Prop_beginning(aetools.NProperty):
-    """beginning - Beginning of element """
-    which = 'bgng'
-    want = 'obj '
-class _Prop_end(aetools.NProperty):
-    """end - Ending of element """
-    which = 'end '
-    want = 'obj '
-class _Prop_infront(aetools.NProperty):
-    """infront - Immediately before element """
-    which = 'pBef'
-    want = 'obj '
-class _Prop_justbehind(aetools.NProperty):
-    """justbehind - Immediately after element """
-    which = 'pAft'
-    want = 'obj '
-class _Prop_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'
-#        element 'stys' as ['indx', 'name']
-
-class styleset(aetools.ComponentItem):
-    """styleset - A style \xd2set\xd3 that may be used repeatedly in text objects. """
-    want = 'stys'
-class _Prop_color(aetools.NProperty):
-    """color - the color """
-    which = 'colr'
-    want = 'RGB '
-class _Prop_font(aetools.NProperty):
-    """font - font name """
-    which = 'font'
-    want = 'TEXT'
-class _Prop_name(aetools.NProperty):
-    """name - style name """
-    which = 'pnam'
-    want = 'TEXT'
-class _Prop_size(aetools.NProperty):
-    """size - the size in points """
-    which = 'ptsz'
-    want = 'long'
-class _Prop_style(aetools.NProperty):
-    """style - the text styles or face attributes """
-    which = 'txst'
-    want = 'tsty'
-class _Prop_writing_code(aetools.NProperty):
-    """writing code - the script system and language """
-    which = 'psct'
-    want = 'tsty'
-
-stylesets = styleset
-text._superclassnames = []
-text._privpropdict = {
-    'beginning' : _Prop_beginning,
-    'end' : _Prop_end,
-    'infront' : _Prop_infront,
-    'justbehind' : _Prop_justbehind,
-    'updateLevel' : _Prop_updateLevel,
-}
-text._privelemdict = {
-    'styleset' : styleset,
-}
-styleset._superclassnames = []
-styleset._privpropdict = {
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'name' : _Prop_name,
-    'size' : _Prop_size,
-    'style' : _Prop_style,
-    'writing_code' : _Prop_writing_code,
-}
-styleset._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'ctxt' : text,
-    'stys' : styleset,
-}
-
-_propdeclarations = {
-    'bgng' : _Prop_beginning,
-    'colr' : _Prop_color,
-    'end ' : _Prop_end,
-    'font' : _Prop_font,
-    'pAft' : _Prop_justbehind,
-    'pBef' : _Prop_infront,
-    'pUpL' : _Prop_updateLevel,
-    'pnam' : _Prop_name,
-    'psct' : _Prop_writing_code,
-    'ptsz' : _Prop_size,
-    'txst' : _Prop_style,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py
deleted file mode 100644 (file)
index 24a89e7..0000000
+++ /dev/null
@@ -1,426 +0,0 @@
-"""Suite WorldWideWeb suite, as defined in Spyglass spec.:
-Level 1, version 1
-
-Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
-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.get('errn', 0):
-            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.get('errn', 0):
-            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.get('errn', 0):
-            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.get('errn', 0):
-            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.get('errn', 0):
-            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 is not 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_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.get('errn', 0):
-            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 \xd2echo\xd3 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.get('errn', 0):
-            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 \xd2handler\xd3 for this protocol with a given prefix. The handler will receive \xd2OpenURL\xd3, or if that fails, \xd2GetURL\xd3 event.
-        Required argument: Application sig
-        Keyword argument for_protocol: protocol prefix: \xd2finger:\xd3, \xd2file\xd3,
-        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.get('errn', 0):
-            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 \xd4special\xd5 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.get('errn', 0):
-            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.get('errn', 0):
-            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.get('errn', 0):
-            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 \xd2register protocol\xd3
-        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.get('errn', 0):
-            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.get('errn', 0):
-            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.get('errn', 0):
-            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.get('errn', 0):
-            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 = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py b/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py
deleted file mode 100644 (file)
index 6fc495f..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-"""
-Package generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
-"""
-import aetools
-Error = aetools.Error
-from . import Standard_Suite
-from . import Standard_URL_suite
-from . import Mozilla_suite
-from . import Text
-from . import WorldWideWeb_suite
-from . import PowerPlant
-from . import Required_suite
-
-
-_code_to_module = {
-    'CoRe' : Standard_Suite,
-    'GURL' : Standard_URL_suite,
-    'MOSS' : Mozilla_suite,
-    'TEXT' : Text,
-    'WWW!' : WorldWideWeb_suite,
-    'ppnt' : PowerPlant,
-    'reqd' : Required_suite,
-}
-
-
-
-_code_to_fullname = {
-    'CoRe' : ('Netscape.Standard_Suite', 'Standard_Suite'),
-    'GURL' : ('Netscape.Standard_URL_suite', 'Standard_URL_suite'),
-    'MOSS' : ('Netscape.Mozilla_suite', 'Mozilla_suite'),
-    'TEXT' : ('Netscape.Text', 'Text'),
-    'WWW!' : ('Netscape.WorldWideWeb_suite', 'WorldWideWeb_suite'),
-    'ppnt' : ('Netscape.PowerPlant', 'PowerPlant'),
-    'reqd' : ('Netscape.Required_suite', 'Required_suite'),
-}
-
-from Netscape.Standard_Suite import *
-from Netscape.Standard_URL_suite import *
-from Netscape.Mozilla_suite import *
-from Netscape.Text import *
-from Netscape.WorldWideWeb_suite import *
-from Netscape.PowerPlant import *
-from Netscape.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', {}))
-
-import StdSuites
-
-#
-# Set property and element dictionaries now that all classes have been defined
-#
-getbaseclasses(text)
-getbaseclasses(styleset)
-getbaseclasses(StdSuites.Text_Suite.character)
-getbaseclasses(StdSuites.Text_Suite.text_flow)
-getbaseclasses(StdSuites.Text_Suite.word)
-getbaseclasses(StdSuites.Text_Suite.paragraph)
-getbaseclasses(StdSuites.Text_Suite.text_style_info)
-getbaseclasses(StdSuites.Text_Suite.line)
-getbaseclasses(StdSuites.Text_Suite.text)
-getbaseclasses(window)
-getbaseclasses(application)
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'ctxt' : text,
-    'stys' : styleset,
-    'cha ' : StdSuites.Text_Suite.character,
-    'cflo' : StdSuites.Text_Suite.text_flow,
-    'cwor' : StdSuites.Text_Suite.word,
-    'cpar' : StdSuites.Text_Suite.paragraph,
-    'tsty' : StdSuites.Text_Suite.text_style_info,
-    'clin' : StdSuites.Text_Suite.line,
-    'ctxt' : StdSuites.Text_Suite.text,
-    'cwin' : window,
-    'capp' : application,
-}
-
-
-class Netscape(Standard_Suite_Events,
-        Standard_URL_suite_Events,
-        Mozilla_suite_Events,
-        Text_Events,
-        WorldWideWeb_suite_Events,
-        PowerPlant_Events,
-        Required_suite_Events,
-        aetools.TalkTo):
-    _signature = 'MOSS'
-
-    _moduleName = 'Netscape'
-
-    _elemdict = application._elemdict
-    _propdict = application._propdict
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py
deleted file mode 100644 (file)
index e5acd48..0000000
+++ /dev/null
@@ -1,2216 +0,0 @@
-"""Suite AppleScript Suite: Standard terms for AppleScript
-Level 1, version 1
-
-Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'ascr'
-
-class AppleScript_Suite_Events:
-
-    def _26_(self, _object, _attributes={}, **_arguments):
-        """&: Concatenation
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'ccat'
-
-        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 _2a_(self, _object, _attributes={}, **_arguments):
-        """*: Multiplication
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '*   '
-
-        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 _2b_(self, _object, _attributes={}, **_arguments):
-        """+: Addition
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '+   '
-
-        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 _2d_(self, _object, _attributes={}, **_arguments):
-        """-: Subtraction
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '-   '
-
-        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 _3c_(self, _object, _attributes={}, **_arguments):
-        """<: Less than
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '<   '
-
-        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 _3d_(self, _object, _attributes={}, **_arguments):
-        """=: Equality
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '=   '
-
-        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 _3e_(self, _object, _attributes={}, **_arguments):
-        """>: Greater than
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '>   '
-
-        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_Call_a5_subroutine = {
-        'at' : 'at  ',
-        'from_' : 'from',
-        'for_' : 'for ',
-        'to' : 'to  ',
-        'thru' : 'thru',
-        'through' : 'thgh',
-        'by' : 'by  ',
-        'on' : 'on  ',
-        'into' : 'into',
-        'onto' : 'onto',
-        'between' : 'btwn',
-        'against' : 'agst',
-        'out_of' : 'outo',
-        'instead_of' : 'isto',
-        'aside_from' : 'asdf',
-        'around' : 'arnd',
-        'beside' : 'bsid',
-        'beneath' : 'bnth',
-        'under' : 'undr',
-        'over' : 'over',
-        'above' : 'abve',
-        'below' : 'belw',
-        'apart_from' : 'aprt',
-        'about' : 'abou',
-        'since' : 'snce',
-        'given' : 'givn',
-        'with' : 'with',
-        'without' : 'wout',
-    }
-
-    def Call_a5_subroutine(self, _object=None, _attributes={}, **_arguments):
-        """Call\xa5subroutine: A subroutine call
-        Required argument: anything
-        Keyword argument at: a preposition
-        Keyword argument from_: a preposition
-        Keyword argument for_: a preposition
-        Keyword argument to: a preposition
-        Keyword argument thru: a preposition
-        Keyword argument through: a preposition
-        Keyword argument by: a preposition
-        Keyword argument on: a preposition
-        Keyword argument into: a preposition
-        Keyword argument onto: a preposition
-        Keyword argument between: a preposition
-        Keyword argument against: a preposition
-        Keyword argument out_of: a preposition
-        Keyword argument instead_of: a preposition
-        Keyword argument aside_from: a preposition
-        Keyword argument around: a preposition
-        Keyword argument beside: a preposition
-        Keyword argument beneath: a preposition
-        Keyword argument under: a preposition
-        Keyword argument over: a preposition
-        Keyword argument above: a preposition
-        Keyword argument below: a preposition
-        Keyword argument apart_from: a preposition
-        Keyword argument about: a preposition
-        Keyword argument since: a preposition
-        Keyword argument given: parameter:value pairs, comma-separated
-        Keyword argument with: formal parameter set to true if matching actual parameter is provided
-        Keyword argument without: formal parameter set to false if matching actual parmeter is provided
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'psbr'
-
-        aetools.keysubst(_arguments, self._argmap_Call_a5_subroutine)
-        _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 _5e_(self, _object, _attributes={}, **_arguments):
-        """^: Exponentiation
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '^   '
-
-        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 activate(self, _no_object=None, _attributes={}, **_arguments):
-        """activate: Bring the targeted application program to the front
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'misc'
-        _subcode = 'actv'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 and_(self, _object, _attributes={}, **_arguments):
-        """and: Logical conjunction
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'AND '
-
-        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 as_(self, _object, _attributes={}, **_arguments):
-        """as: Coercion
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'coer'
-
-        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 contains(self, _object, _attributes={}, **_arguments):
-        """contains: Containment
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'cont'
-
-        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 div(self, _object, _attributes={}, **_arguments):
-        """div: Quotient
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'div '
-
-        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 end_tell(self, _no_object=None, _attributes={}, **_arguments):
-        """end tell: Record or log an \xd4end tell\xd5 statement
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'ascr'
-        _subcode = 'tend'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 ends_with(self, _object, _attributes={}, **_arguments):
-        """ends with: Ends with
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'ends'
-
-        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_error = {
-        'number' : 'errn',
-        'partial_result' : 'ptlr',
-        'from_' : 'erob',
-        'to' : 'errt',
-    }
-
-    def error(self, _object=None, _attributes={}, **_arguments):
-        """error: Raise an error
-        Required argument: anything
-        Keyword argument number: an error number
-        Keyword argument partial_result: any partial result occurring before the error
-        Keyword argument from_: the object that caused the error
-        Keyword argument to: the desired class for a failed coercion
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'ascr'
-        _subcode = 'err '
-
-        aetools.keysubst(_arguments, self._argmap_error)
-        _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 idle(self, _no_object=None, _attributes={}, **_arguments):
-        """idle: Sent to a script application when it is idle
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the number of seconds to wait for next idle event
-        """
-        _code = 'misc'
-        _subcode = 'idle'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 launch(self, _no_object=None, _attributes={}, **_arguments):
-        """launch: Start an application for scripting
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'ascr'
-        _subcode = 'noop'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 log(self, _object, _attributes={}, **_arguments):
-        """log: Cause a comment to be logged
-        Required argument: undocumented, typecode 'TEXT'
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'ascr'
-        _subcode = 'cmnt'
-
-        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 mod(self, _object, _attributes={}, **_arguments):
-        """mod: Remainder
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'mod '
-
-        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 negate(self, _object, _attributes={}, **_arguments):
-        """negate: Numeric negation
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'neg '
-
-        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 not_(self, _object, _attributes={}, **_arguments):
-        """not: Logical negation
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'NOT '
-
-        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 or_(self, _object, _attributes={}, **_arguments):
-        """or: Logical disjunction
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'OR  '
-
-        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 start_log(self, _no_object=None, _attributes={}, **_arguments):
-        """start log: Start event logging in the script editor
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'ToyS'
-        _subcode = 'log1'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 starts_with(self, _object, _attributes={}, **_arguments):
-        """starts with: Starts with
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = 'bgwt'
-
-        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 stop_log(self, _no_object=None, _attributes={}, **_arguments):
-        """stop log: Stop event logging in the script editor
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'ToyS'
-        _subcode = 'log0'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 tell(self, _no_object=None, _attributes={}, **_arguments):
-        """tell: Record or log a \xd4tell\xd5 statement
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'ascr'
-        _subcode = 'tell'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 _ad_(self, _object, _attributes={}, **_arguments):
-        """\xad: Inequality
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '\xad   '
-
-        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 _b2_(self, _object, _attributes={}, **_arguments):
-        """\xb2: Less than or equal to
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '<=  '
-
-        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 _b3_(self, _object, _attributes={}, **_arguments):
-        """\xb3: Greater than or equal to
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '>=  '
-
-        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 _d6_(self, _object, _attributes={}, **_arguments):
-        """\xd6: Division
-        Required argument: an AE object reference
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: anything
-        """
-        _code = 'ascr'
-        _subcode = '/   '
-
-        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['----']
-
-
-class anything(aetools.ComponentItem):
-    """anything - any class or reference """
-    want = '****'
-
-class pictures(aetools.ComponentItem):
-    """pictures -  """
-    want = 'PICT'
-
-picture = pictures
-
-class styled_text(aetools.ComponentItem):
-    """styled text - text with font, size, and style information """
-    want = 'STXT'
-
-styled_text = styled_text
-
-class strings(aetools.ComponentItem):
-    """strings -  """
-    want = 'TEXT'
-
-string = strings
-
-class alias(aetools.ComponentItem):
-    """alias - a file on a disk or server.  The file must exist when you check the syntax of your script. """
-    want = 'alis'
-class _Prop_POSIX_path(aetools.NProperty):
-    """POSIX path - the POSIX path of the file """
-    which = 'psxp'
-    want = 'TEXT'
-
-aliases = alias
-
-class April(aetools.ComponentItem):
-    """April - the month of April """
-    want = 'apr '
-
-class August(aetools.ComponentItem):
-    """August - the month of August """
-    want = 'aug '
-
-class booleans(aetools.ComponentItem):
-    """booleans -  """
-    want = 'bool'
-
-boolean = booleans
-
-class RGB_colors(aetools.ComponentItem):
-    """RGB colors -  """
-    want = 'cRGB'
-
-RGB_color = RGB_colors
-
-class application(aetools.ComponentItem):
-    """application - specifies global properties of AppleScript """
-    want = 'capp'
-class _Prop_AppleScript(aetools.NProperty):
-    """AppleScript - the top-level script object """
-    which = 'ascr'
-    want = 'scpt'
-AppleScript = _Prop_AppleScript()
-class _Prop_days(aetools.NProperty):
-    """days - the number of seconds in a day """
-    which = 'days'
-    want = 'long'
-days = _Prop_days()
-class _Prop_hours(aetools.NProperty):
-    """hours - the number of seconds in an hour """
-    which = 'hour'
-    want = 'long'
-hours = _Prop_hours()
-class _Prop_minutes(aetools.NProperty):
-    """minutes - the number of seconds in a minute """
-    which = 'min '
-    want = 'long'
-minutes = _Prop_minutes()
-class _Prop_pi(aetools.NProperty):
-    """pi - the constant pi """
-    which = 'pi  '
-    want = 'doub'
-pi = _Prop_pi()
-class _Prop_print_depth(aetools.NProperty):
-    """print depth - the maximum depth to print """
-    which = 'prdp'
-    want = 'long'
-print_depth = _Prop_print_depth()
-class _Prop_print_length(aetools.NProperty):
-    """print length - the maximum length to print """
-    which = 'prln'
-    want = 'long'
-print_length = _Prop_print_length()
-class _Prop_result(aetools.NProperty):
-    """result - the last result of evaluation """
-    which = 'rslt'
-    want = '****'
-result = _Prop_result()
-class _Prop_return_(aetools.NProperty):
-    """return - a return character """
-    which = 'ret '
-    want = 'cha '
-return_ = _Prop_return_()
-class _Prop_space(aetools.NProperty):
-    """space - a space character """
-    which = 'spac'
-    want = 'cha '
-space = _Prop_space()
-class _Prop_tab(aetools.NProperty):
-    """tab - a tab character """
-    which = 'tab '
-    want = 'cha '
-tab = _Prop_tab()
-class _Prop_text_item_delimiters(aetools.NProperty):
-    """text item delimiters - the text item delimiters of a string """
-    which = 'txdl'
-    want = 'list'
-text_item_delimiters = _Prop_text_item_delimiters()
-class _Prop_weeks(aetools.NProperty):
-    """weeks - the number of seconds in a week """
-    which = 'week'
-    want = 'long'
-weeks = _Prop_weeks()
-
-applications = application
-
-app = application
-
-class upper_case(aetools.ComponentItem):
-    """upper case - Text with lower case converted to upper case """
-    want = 'case'
-
-class cubic_centimeters(aetools.ComponentItem):
-    """cubic centimeters - a volume measurement in SI cubic centimeters """
-    want = 'ccmt'
-
-cubic_centimetres = cubic_centimeters
-
-class cubic_feet(aetools.ComponentItem):
-    """cubic feet - a volume measurement in Imperial cubic feet """
-    want = 'cfet'
-
-class characters(aetools.ComponentItem):
-    """characters -  """
-    want = 'cha '
-
-character = characters
-
-class writing_code_info(aetools.ComponentItem):
-    """writing code info - script code and language code of text run """
-    want = 'citl'
-class _Prop_language_code(aetools.NProperty):
-    """language code - the language code for the text """
-    which = 'plcd'
-    want = 'shor'
-class _Prop_script_code(aetools.NProperty):
-    """script code - the script code for the text """
-    which = 'pscd'
-    want = 'shor'
-
-writing_code_infos = writing_code_info
-
-class text_items(aetools.ComponentItem):
-    """text items -  """
-    want = 'citm'
-
-text_item = text_items
-
-class cubic_meters(aetools.ComponentItem):
-    """cubic meters - a volume measurement in SI cubic meters """
-    want = 'cmet'
-
-cubic_metres = cubic_meters
-
-class centimeters(aetools.ComponentItem):
-    """centimeters - a distance measurement in SI centimeters """
-    want = 'cmtr'
-
-centimetres = centimeters
-
-class item(aetools.ComponentItem):
-    """item - An item of any type """
-    want = 'cobj'
-class _Prop_id(aetools.NProperty):
-    """id - the unique ID number of this object """
-    which = 'ID  '
-    want = 'long'
-
-items = item
-
-class C_strings(aetools.ComponentItem):
-    """C strings -  """
-    want = 'cstr'
-
-C_string = C_strings
-
-class text(aetools.ComponentItem):
-    """text - text with language and style information """
-    want = 'ctxt'
-
-class cubic_inches(aetools.ComponentItem):
-    """cubic inches - a volume measurement in Imperial cubic inches """
-    want = 'cuin'
-
-class cubic_yards(aetools.ComponentItem):
-    """cubic yards - a distance measurement in Imperial cubic yards """
-    want = 'cyrd'
-
-class December(aetools.ComponentItem):
-    """December - the month of December """
-    want = 'dec '
-
-class degrees_Celsius(aetools.ComponentItem):
-    """degrees Celsius - a temperature measurement in SI degrees Celsius """
-    want = 'degc'
-
-class degrees_Fahrenheit(aetools.ComponentItem):
-    """degrees Fahrenheit - a temperature measurement in degrees Fahrenheit """
-    want = 'degf'
-
-class degrees_Kelvin(aetools.ComponentItem):
-    """degrees Kelvin - a temperature measurement in degrees Kelvin """
-    want = 'degk'
-
-class reals(aetools.ComponentItem):
-    """reals -  """
-    want = 'doub'
-
-real = reals
-
-class encoded_strings(aetools.ComponentItem):
-    """encoded strings -  """
-    want = 'encs'
-
-encoded_string = encoded_strings
-
-class constants(aetools.ComponentItem):
-    """constants -  """
-    want = 'enum'
-
-constant = constants
-
-class events(aetools.ComponentItem):
-    """events -  """
-    want = 'evnt'
-
-event = events
-
-class February(aetools.ComponentItem):
-    """February - the month of February """
-    want = 'feb '
-
-class feet(aetools.ComponentItem):
-    """feet - a distance measurement in Imperial feet """
-    want = 'feet'
-
-class Friday(aetools.ComponentItem):
-    """Friday - Friday """
-    want = 'fri '
-
-class file_specification(aetools.ComponentItem):
-    """file specification - a file specification as used by the operating system """
-    want = 'fss '
-
-file_specifications = file_specification
-
-class gallons(aetools.ComponentItem):
-    """gallons - a volume measurement in Imperial gallons """
-    want = 'galn'
-
-class grams(aetools.ComponentItem):
-    """grams - a mass measurement in SI meters """
-    want = 'gram'
-
-class handlers(aetools.ComponentItem):
-    """handlers -  """
-    want = 'hand'
-
-handler = handlers
-
-class inches(aetools.ComponentItem):
-    """inches - a distance measurement in Imperial inches """
-    want = 'inch'
-
-class international_text(aetools.ComponentItem):
-    """international text - text that begins with a writing code """
-    want = 'itxt'
-
-international_text = international_text
-
-class January(aetools.ComponentItem):
-    """January - the month of January """
-    want = 'jan '
-
-class July(aetools.ComponentItem):
-    """July - the month of July """
-    want = 'jul '
-
-class June(aetools.ComponentItem):
-    """June - the month of June """
-    want = 'jun '
-
-class reference_forms(aetools.ComponentItem):
-    """reference forms -  """
-    want = 'kfrm'
-
-reference_form = reference_forms
-
-class kilograms(aetools.ComponentItem):
-    """kilograms - a mass measurement in SI kilograms """
-    want = 'kgrm'
-
-class kilometers(aetools.ComponentItem):
-    """kilometers - a distance measurement in SI kilometers """
-    want = 'kmtr'
-
-kilometres = kilometers
-
-class keystroke(aetools.ComponentItem):
-    """keystroke - a press of a key combination on a Macintosh keyboard """
-    want = 'kprs'
-class _Prop_key(aetools.NProperty):
-    """key - the character for the key was pressed (ignoring modifiers) """
-    which = 'kMsg'
-    want = 'cha '
-class _Prop_key_kind(aetools.NProperty):
-    """key kind - the kind of key that was pressed """
-    which = 'kknd'
-    want = 'ekst'
-class _Prop_modifiers(aetools.NProperty):
-    """modifiers - the modifier keys pressed in combination """
-    which = 'kMod'
-    want = 'eMds'
-
-keystrokes = keystroke
-
-class pounds(aetools.ComponentItem):
-    """pounds - a weight measurement in SI meters """
-    want = 'lbs '
-
-class date(aetools.ComponentItem):
-    """date - Absolute date and time values """
-    want = 'ldt '
-class _Prop_date_string(aetools.NProperty):
-    """date string - the date portion of a date-time value as text """
-    which = 'dstr'
-    want = 'TEXT'
-class _Prop_day(aetools.NProperty):
-    """day - the day of the month of a date """
-    which = 'day '
-    want = 'long'
-class _Prop_month(aetools.NProperty):
-    """month - the month of a date """
-    which = 'mnth'
-    want = 'mnth'
-class _Prop_time(aetools.NProperty):
-    """time - the time since midnight of a date """
-    which = 'time'
-    want = 'long'
-class _Prop_time_string(aetools.NProperty):
-    """time string - the time portion of a date-time value as text """
-    which = 'tstr'
-    want = 'TEXT'
-class _Prop_weekday(aetools.NProperty):
-    """weekday - the day of a week of a date """
-    which = 'wkdy'
-    want = 'wkdy'
-class _Prop_year(aetools.NProperty):
-    """year - the year of a date """
-    which = 'year'
-    want = 'long'
-
-dates = date
-
-class list(aetools.ComponentItem):
-    """list - An ordered collection of items """
-    want = 'list'
-class _Prop_length(aetools.NProperty):
-    """length - the length of a list """
-    which = 'leng'
-    want = 'long'
-class _Prop_rest(aetools.NProperty):
-    """rest - all items of the list excluding first """
-    which = 'rest'
-    want = 'list'
-class _Prop_reverse(aetools.NProperty):
-    """reverse - the items of the list in reverse order """
-    which = 'rvse'
-    want = 'list'
-
-lists = list
-
-class liters(aetools.ComponentItem):
-    """liters - a volume measurement in SI liters """
-    want = 'litr'
-
-litres = liters
-
-class linked_list(aetools.ComponentItem):
-    """linked list - An ordered collection of items """
-    want = 'llst'
-
-linked_lists = linked_list
-
-class integers(aetools.ComponentItem):
-    """integers -  """
-    want = 'long'
-
-integer = integers
-
-class list_or_record(aetools.ComponentItem):
-    """list or record - a list or record """
-    want = 'lr  '
-
-class list_2c__record_or_text(aetools.ComponentItem):
-    """list, record or text - a list, record or text """
-    want = 'lrs '
-
-class list_or_string(aetools.ComponentItem):
-    """list or string - a list or string """
-    want = 'ls  '
-
-class machines(aetools.ComponentItem):
-    """machines -  """
-    want = 'mach'
-
-machine = machines
-
-class March(aetools.ComponentItem):
-    """March - the month of March """
-    want = 'mar '
-
-class May(aetools.ComponentItem):
-    """May - the month of May """
-    want = 'may '
-
-class meters(aetools.ComponentItem):
-    """meters - a distance measurement in SI meters """
-    want = 'metr'
-
-metres = meters
-
-class miles(aetools.ComponentItem):
-    """miles - a distance measurement in Imperial miles """
-    want = 'mile'
-
-class months(aetools.ComponentItem):
-    """months -  """
-    want = 'mnth'
-
-month = months
-
-class Monday(aetools.ComponentItem):
-    """Monday - Monday """
-    want = 'mon '
-
-class missing_values(aetools.ComponentItem):
-    """missing values -  """
-    want = 'msng'
-
-missing_value = missing_values
-
-class number_or_date(aetools.ComponentItem):
-    """number or date - a number or date """
-    want = 'nd  '
-
-class number_2c__date_or_text(aetools.ComponentItem):
-    """number, date or text - a number, date or text """
-    want = 'nds '
-
-class numbers(aetools.ComponentItem):
-    """numbers -  """
-    want = 'nmbr'
-
-number = numbers
-
-class November(aetools.ComponentItem):
-    """November - the month of November """
-    want = 'nov '
-
-class number_or_string(aetools.ComponentItem):
-    """number or string - a number or string """
-    want = 'ns  '
-
-class references(aetools.ComponentItem):
-    """references -  """
-    want = 'obj '
-
-reference = references
-
-class October(aetools.ComponentItem):
-    """October - the month of October """
-    want = 'oct '
-
-class ounces(aetools.ComponentItem):
-    """ounces - a weight measurement in SI meters """
-    want = 'ozs '
-
-class class_(aetools.ComponentItem):
-    """class - the type of a value """
-    want = 'pcls'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - inherits some of its properties from this class """
-    which = 'c@#^'
-    want = 'type'
-
-classes = class_
-
-class prepositions(aetools.ComponentItem):
-    """prepositions -  """
-    want = 'prep'
-
-preposition = prepositions
-
-class properties(aetools.ComponentItem):
-    """properties -  """
-    want = 'prop'
-
-property = properties
-
-class writing_code(aetools.ComponentItem):
-    """writing code - codes that identify the language and script system """
-    want = 'psct'
-
-class Pascal_strings(aetools.ComponentItem):
-    """Pascal strings -  """
-    want = 'pstr'
-
-Pascal_string = Pascal_strings
-
-class quarts(aetools.ComponentItem):
-    """quarts - a volume measurement in Imperial quarts """
-    want = 'qrts'
-
-class data(aetools.ComponentItem):
-    """data - an AppleScript raw data object """
-    want = 'rdat'
-
-class records(aetools.ComponentItem):
-    """records -  """
-    want = 'reco'
-
-record = records
-
-class Saturday(aetools.ComponentItem):
-    """Saturday - Saturday """
-    want = 'sat '
-
-class seconds(aetools.ComponentItem):
-    """seconds - more than one second """
-    want = 'scnd'
-
-class script(aetools.ComponentItem):
-    """script - An AppleScript script """
-    want = 'scpt'
-class _Prop_name(aetools.NProperty):
-    """name - the name of the script """
-    which = 'pnam'
-    want = 'TEXT'
-class _Prop_parent(aetools.NProperty):
-    """parent - its parent, i.e. the script that will handle events that this script doesn\xd5t """
-    which = 'pare'
-    want = 'scpt'
-
-scripts = script
-
-class September(aetools.ComponentItem):
-    """September - the month of September """
-    want = 'sep '
-
-class alias_or_string(aetools.ComponentItem):
-    """alias or string - an alias or string """
-    want = 'sf  '
-
-class sounds(aetools.ComponentItem):
-    """sounds -  """
-    want = 'snd '
-
-sound = sounds
-
-class square_feet(aetools.ComponentItem):
-    """square feet - an area measurement in Imperial square feet """
-    want = 'sqft'
-
-class square_kilometers(aetools.ComponentItem):
-    """square kilometers - an area measurement in SI square kilometers """
-    want = 'sqkm'
-
-square_kilometres = square_kilometers
-
-class square_miles(aetools.ComponentItem):
-    """square miles - an area measurement in Imperial square miles """
-    want = 'sqmi'
-
-class square_meters(aetools.ComponentItem):
-    """square meters - an area measurement in SI square meters """
-    want = 'sqrm'
-
-square_metres = square_meters
-
-class square_yards(aetools.ComponentItem):
-    """square yards - an area measurement in Imperial square yards """
-    want = 'sqyd'
-
-class styled_Clipboard_text(aetools.ComponentItem):
-    """styled Clipboard text - clipboard text with font, size, and style information """
-    want = 'styl'
-
-styled_Clipboard_text = styled_Clipboard_text
-
-class Sunday(aetools.ComponentItem):
-    """Sunday - Sunday """
-    want = 'sun '
-
-class styled_Unicode_text(aetools.ComponentItem):
-    """styled Unicode text - styled text in the Unicode format """
-    want = 'sutx'
-
-styled_Unicode_text = styled_Unicode_text
-
-class Thursday(aetools.ComponentItem):
-    """Thursday - Thursday """
-    want = 'thu '
-
-class Tuesday(aetools.ComponentItem):
-    """Tuesday - Tuesday """
-    want = 'tue '
-
-class type_class(aetools.ComponentItem):
-    """type class - the name of a particular class (or any four-character code) """
-    want = 'type'
-
-class empty_ae_name_(aetools.ComponentItem):
-    """ - the undefined value """
-    want = 'undf'
-
-class Unicode_text(aetools.ComponentItem):
-    """Unicode text - text in the Unicode format (cannot be viewed without conversion) """
-    want = 'utxt'
-
-Unicode_text = Unicode_text
-
-class vector(aetools.ComponentItem):
-    """vector - An ordered collection of items """
-    want = 'vect'
-
-vectors = vector
-
-class version(aetools.ComponentItem):
-    """version - a version value """
-    want = 'vers'
-
-class Wednesday(aetools.ComponentItem):
-    """Wednesday - Wednesday """
-    want = 'wed '
-
-class weekdays(aetools.ComponentItem):
-    """weekdays -  """
-    want = 'wkdy'
-
-weekday = weekdays
-
-class yards(aetools.ComponentItem):
-    """yards - a distance measurement in Imperial yards """
-    want = 'yard'
-
-class zones(aetools.ComponentItem):
-    """zones -  """
-    want = 'zone'
-
-zone = zones
-anything._superclassnames = []
-anything._privpropdict = {
-}
-anything._privelemdict = {
-}
-pictures._superclassnames = []
-pictures._privpropdict = {
-}
-pictures._privelemdict = {
-}
-styled_text._superclassnames = []
-styled_text._privpropdict = {
-}
-styled_text._privelemdict = {
-}
-styled_text._superclassnames = []
-styled_text._privpropdict = {
-}
-styled_text._privelemdict = {
-}
-strings._superclassnames = []
-strings._privpropdict = {
-}
-strings._privelemdict = {
-}
-alias._superclassnames = []
-alias._privpropdict = {
-    'POSIX_path' : _Prop_POSIX_path,
-}
-alias._privelemdict = {
-}
-April._superclassnames = []
-April._privpropdict = {
-}
-April._privelemdict = {
-}
-August._superclassnames = []
-August._privpropdict = {
-}
-August._privelemdict = {
-}
-booleans._superclassnames = []
-booleans._privpropdict = {
-}
-booleans._privelemdict = {
-}
-RGB_colors._superclassnames = []
-RGB_colors._privpropdict = {
-}
-RGB_colors._privelemdict = {
-}
-application._superclassnames = []
-application._privpropdict = {
-    'AppleScript' : _Prop_AppleScript,
-    'days' : _Prop_days,
-    'hours' : _Prop_hours,
-    'minutes' : _Prop_minutes,
-    'pi' : _Prop_pi,
-    'print_depth' : _Prop_print_depth,
-    'print_length' : _Prop_print_length,
-    'result' : _Prop_result,
-    'return_' : _Prop_return_,
-    'space' : _Prop_space,
-    'tab' : _Prop_tab,
-    'text_item_delimiters' : _Prop_text_item_delimiters,
-    'weeks' : _Prop_weeks,
-}
-application._privelemdict = {
-}
-upper_case._superclassnames = []
-upper_case._privpropdict = {
-}
-upper_case._privelemdict = {
-}
-cubic_centimeters._superclassnames = []
-cubic_centimeters._privpropdict = {
-}
-cubic_centimeters._privelemdict = {
-}
-cubic_feet._superclassnames = []
-cubic_feet._privpropdict = {
-}
-cubic_feet._privelemdict = {
-}
-characters._superclassnames = []
-characters._privpropdict = {
-}
-characters._privelemdict = {
-}
-writing_code_info._superclassnames = []
-writing_code_info._privpropdict = {
-    'language_code' : _Prop_language_code,
-    'script_code' : _Prop_script_code,
-}
-writing_code_info._privelemdict = {
-}
-text_items._superclassnames = []
-text_items._privpropdict = {
-}
-text_items._privelemdict = {
-}
-cubic_meters._superclassnames = []
-cubic_meters._privpropdict = {
-}
-cubic_meters._privelemdict = {
-}
-centimeters._superclassnames = []
-centimeters._privpropdict = {
-}
-centimeters._privelemdict = {
-}
-item._superclassnames = []
-item._privpropdict = {
-    'id' : _Prop_id,
-}
-item._privelemdict = {
-}
-C_strings._superclassnames = []
-C_strings._privpropdict = {
-}
-C_strings._privelemdict = {
-}
-text._superclassnames = []
-text._privpropdict = {
-}
-text._privelemdict = {
-}
-cubic_inches._superclassnames = []
-cubic_inches._privpropdict = {
-}
-cubic_inches._privelemdict = {
-}
-cubic_yards._superclassnames = []
-cubic_yards._privpropdict = {
-}
-cubic_yards._privelemdict = {
-}
-December._superclassnames = []
-December._privpropdict = {
-}
-December._privelemdict = {
-}
-degrees_Celsius._superclassnames = []
-degrees_Celsius._privpropdict = {
-}
-degrees_Celsius._privelemdict = {
-}
-degrees_Fahrenheit._superclassnames = []
-degrees_Fahrenheit._privpropdict = {
-}
-degrees_Fahrenheit._privelemdict = {
-}
-degrees_Kelvin._superclassnames = []
-degrees_Kelvin._privpropdict = {
-}
-degrees_Kelvin._privelemdict = {
-}
-reals._superclassnames = []
-reals._privpropdict = {
-}
-reals._privelemdict = {
-}
-encoded_strings._superclassnames = []
-encoded_strings._privpropdict = {
-}
-encoded_strings._privelemdict = {
-}
-constants._superclassnames = []
-constants._privpropdict = {
-}
-constants._privelemdict = {
-}
-events._superclassnames = []
-events._privpropdict = {
-}
-events._privelemdict = {
-}
-February._superclassnames = []
-February._privpropdict = {
-}
-February._privelemdict = {
-}
-feet._superclassnames = []
-feet._privpropdict = {
-}
-feet._privelemdict = {
-}
-Friday._superclassnames = []
-Friday._privpropdict = {
-}
-Friday._privelemdict = {
-}
-file_specification._superclassnames = []
-file_specification._privpropdict = {
-    'POSIX_path' : _Prop_POSIX_path,
-}
-file_specification._privelemdict = {
-}
-gallons._superclassnames = []
-gallons._privpropdict = {
-}
-gallons._privelemdict = {
-}
-grams._superclassnames = []
-grams._privpropdict = {
-}
-grams._privelemdict = {
-}
-handlers._superclassnames = []
-handlers._privpropdict = {
-}
-handlers._privelemdict = {
-}
-inches._superclassnames = []
-inches._privpropdict = {
-}
-inches._privelemdict = {
-}
-international_text._superclassnames = []
-international_text._privpropdict = {
-}
-international_text._privelemdict = {
-}
-international_text._superclassnames = []
-international_text._privpropdict = {
-}
-international_text._privelemdict = {
-}
-January._superclassnames = []
-January._privpropdict = {
-}
-January._privelemdict = {
-}
-July._superclassnames = []
-July._privpropdict = {
-}
-July._privelemdict = {
-}
-June._superclassnames = []
-June._privpropdict = {
-}
-June._privelemdict = {
-}
-reference_forms._superclassnames = []
-reference_forms._privpropdict = {
-}
-reference_forms._privelemdict = {
-}
-kilograms._superclassnames = []
-kilograms._privpropdict = {
-}
-kilograms._privelemdict = {
-}
-kilometers._superclassnames = []
-kilometers._privpropdict = {
-}
-kilometers._privelemdict = {
-}
-keystroke._superclassnames = []
-keystroke._privpropdict = {
-    'key' : _Prop_key,
-    'key_kind' : _Prop_key_kind,
-    'modifiers' : _Prop_modifiers,
-}
-keystroke._privelemdict = {
-}
-pounds._superclassnames = []
-pounds._privpropdict = {
-}
-pounds._privelemdict = {
-}
-date._superclassnames = []
-date._privpropdict = {
-    'date_string' : _Prop_date_string,
-    'day' : _Prop_day,
-    'month' : _Prop_month,
-    'time' : _Prop_time,
-    'time_string' : _Prop_time_string,
-    'weekday' : _Prop_weekday,
-    'year' : _Prop_year,
-}
-date._privelemdict = {
-}
-list._superclassnames = []
-list._privpropdict = {
-    'length' : _Prop_length,
-    'rest' : _Prop_rest,
-    'reverse' : _Prop_reverse,
-}
-list._privelemdict = {
-}
-liters._superclassnames = []
-liters._privpropdict = {
-}
-liters._privelemdict = {
-}
-linked_list._superclassnames = []
-linked_list._privpropdict = {
-    'length' : _Prop_length,
-}
-linked_list._privelemdict = {
-}
-integers._superclassnames = []
-integers._privpropdict = {
-}
-integers._privelemdict = {
-}
-list_or_record._superclassnames = []
-list_or_record._privpropdict = {
-}
-list_or_record._privelemdict = {
-}
-list_2c__record_or_text._superclassnames = []
-list_2c__record_or_text._privpropdict = {
-}
-list_2c__record_or_text._privelemdict = {
-}
-list_or_string._superclassnames = []
-list_or_string._privpropdict = {
-}
-list_or_string._privelemdict = {
-}
-machines._superclassnames = []
-machines._privpropdict = {
-}
-machines._privelemdict = {
-}
-March._superclassnames = []
-March._privpropdict = {
-}
-March._privelemdict = {
-}
-May._superclassnames = []
-May._privpropdict = {
-}
-May._privelemdict = {
-}
-meters._superclassnames = []
-meters._privpropdict = {
-}
-meters._privelemdict = {
-}
-miles._superclassnames = []
-miles._privpropdict = {
-}
-miles._privelemdict = {
-}
-months._superclassnames = []
-months._privpropdict = {
-}
-months._privelemdict = {
-}
-Monday._superclassnames = []
-Monday._privpropdict = {
-}
-Monday._privelemdict = {
-}
-missing_values._superclassnames = []
-missing_values._privpropdict = {
-}
-missing_values._privelemdict = {
-}
-number_or_date._superclassnames = []
-number_or_date._privpropdict = {
-}
-number_or_date._privelemdict = {
-}
-number_2c__date_or_text._superclassnames = []
-number_2c__date_or_text._privpropdict = {
-}
-number_2c__date_or_text._privelemdict = {
-}
-numbers._superclassnames = []
-numbers._privpropdict = {
-}
-numbers._privelemdict = {
-}
-November._superclassnames = []
-November._privpropdict = {
-}
-November._privelemdict = {
-}
-number_or_string._superclassnames = []
-number_or_string._privpropdict = {
-}
-number_or_string._privelemdict = {
-}
-references._superclassnames = []
-references._privpropdict = {
-}
-references._privelemdict = {
-}
-October._superclassnames = []
-October._privpropdict = {
-}
-October._privelemdict = {
-}
-ounces._superclassnames = []
-ounces._privpropdict = {
-}
-ounces._privelemdict = {
-}
-class_._superclassnames = ['type_class']
-class_._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-}
-class_._privelemdict = {
-}
-prepositions._superclassnames = []
-prepositions._privpropdict = {
-}
-prepositions._privelemdict = {
-}
-properties._superclassnames = []
-properties._privpropdict = {
-}
-properties._privelemdict = {
-}
-writing_code._superclassnames = []
-writing_code._privpropdict = {
-}
-writing_code._privelemdict = {
-}
-Pascal_strings._superclassnames = []
-Pascal_strings._privpropdict = {
-}
-Pascal_strings._privelemdict = {
-}
-quarts._superclassnames = []
-quarts._privpropdict = {
-}
-quarts._privelemdict = {
-}
-data._superclassnames = []
-data._privpropdict = {
-}
-data._privelemdict = {
-}
-records._superclassnames = []
-records._privpropdict = {
-}
-records._privelemdict = {
-}
-Saturday._superclassnames = []
-Saturday._privpropdict = {
-}
-Saturday._privelemdict = {
-}
-seconds._superclassnames = []
-seconds._privpropdict = {
-}
-seconds._privelemdict = {
-}
-script._superclassnames = []
-script._privpropdict = {
-    'name' : _Prop_name,
-    'parent' : _Prop_parent,
-}
-script._privelemdict = {
-}
-September._superclassnames = []
-September._privpropdict = {
-}
-September._privelemdict = {
-}
-alias_or_string._superclassnames = []
-alias_or_string._privpropdict = {
-}
-alias_or_string._privelemdict = {
-}
-sounds._superclassnames = []
-sounds._privpropdict = {
-}
-sounds._privelemdict = {
-}
-square_feet._superclassnames = []
-square_feet._privpropdict = {
-}
-square_feet._privelemdict = {
-}
-square_kilometers._superclassnames = []
-square_kilometers._privpropdict = {
-}
-square_kilometers._privelemdict = {
-}
-square_miles._superclassnames = []
-square_miles._privpropdict = {
-}
-square_miles._privelemdict = {
-}
-square_meters._superclassnames = []
-square_meters._privpropdict = {
-}
-square_meters._privelemdict = {
-}
-square_yards._superclassnames = []
-square_yards._privpropdict = {
-}
-square_yards._privelemdict = {
-}
-styled_Clipboard_text._superclassnames = []
-styled_Clipboard_text._privpropdict = {
-}
-styled_Clipboard_text._privelemdict = {
-}
-styled_Clipboard_text._superclassnames = []
-styled_Clipboard_text._privpropdict = {
-}
-styled_Clipboard_text._privelemdict = {
-}
-Sunday._superclassnames = []
-Sunday._privpropdict = {
-}
-Sunday._privelemdict = {
-}
-styled_Unicode_text._superclassnames = []
-styled_Unicode_text._privpropdict = {
-}
-styled_Unicode_text._privelemdict = {
-}
-styled_Unicode_text._superclassnames = []
-styled_Unicode_text._privpropdict = {
-}
-styled_Unicode_text._privelemdict = {
-}
-Thursday._superclassnames = []
-Thursday._privpropdict = {
-}
-Thursday._privelemdict = {
-}
-Tuesday._superclassnames = []
-Tuesday._privpropdict = {
-}
-Tuesday._privelemdict = {
-}
-type_class._superclassnames = []
-type_class._privpropdict = {
-}
-type_class._privelemdict = {
-}
-empty_ae_name_._superclassnames = []
-empty_ae_name_._privpropdict = {
-}
-empty_ae_name_._privelemdict = {
-}
-Unicode_text._superclassnames = []
-Unicode_text._privpropdict = {
-}
-Unicode_text._privelemdict = {
-}
-Unicode_text._superclassnames = []
-Unicode_text._privpropdict = {
-}
-Unicode_text._privelemdict = {
-}
-vector._superclassnames = []
-vector._privpropdict = {
-    'length' : _Prop_length,
-}
-vector._privelemdict = {
-}
-version._superclassnames = []
-version._privpropdict = {
-}
-version._privelemdict = {
-}
-Wednesday._superclassnames = []
-Wednesday._privpropdict = {
-}
-Wednesday._privelemdict = {
-}
-weekdays._superclassnames = []
-weekdays._privpropdict = {
-}
-weekdays._privelemdict = {
-}
-yards._superclassnames = []
-yards._privpropdict = {
-}
-yards._privelemdict = {
-}
-zones._superclassnames = []
-zones._privpropdict = {
-}
-zones._privelemdict = {
-}
-_Enum_boov = {
-    'true' : 'true',    # the true boolean value
-    'false' : 'fals',   # the false boolean value
-}
-
-_Enum_cons = {
-    'case' : 'case',    # case
-    'diacriticals' : 'diac',    # diacriticals
-    'white_space' : 'whit',     # white space
-    'hyphens' : 'hyph', # hyphens
-    'expansion' : 'expa',       # expansion
-    'punctuation' : 'punc',     # punctuation
-    'application_responses' : 'rmte',   # remote event replies
-}
-
-_Enum_eMds = {
-    'option_down' : 'Kopt',     #
-    'command_down' : 'Kcmd',    #
-    'control_down' : 'Kctl',    #
-    'shift_down' : 'Ksft',      #
-    'caps_lock_down' : 'Kclk',  #
-}
-
-_Enum_ekst = {
-    'escape_key' : 'ks5\x00',   #
-    'delete_key' : 'ks3\x00',   #
-    'tab_key' : 'ks0\x00',      #
-    'return_key' : 'ks$\x00',   #
-    'clear_key' : 'ksG\x00',    #
-    'enter_key' : 'ksL\x00',    #
-    'up_arrow_key' : 'ks~\x00', #
-    'down_arrow_key' : 'ks}\x00',       #
-    'left_arrow_key' : 'ks{\x00',       #
-    'right_arrow_key' : 'ks|\x00',      #
-    'help_key' : 'ksr\x00',     #
-    'home_key' : 'kss\x00',     #
-    'page_up_key' : 'kst\x00',  #
-    'page_down_key' : 'ksy\x00',        #
-    'forward_del_key' : 'ksu\x00',      #
-    'end_key' : 'ksw\x00',      #
-    'F1_key' : 'ksz\x00',       #
-    'F2_key' : 'ksx\x00',       #
-    'F3_key' : 'ksc\x00',       #
-    'F4_key' : 'ksv\x00',       #
-    'F5_key' : 'ks`\x00',       #
-    'F6_key' : 'ksa\x00',       #
-    'F7_key' : 'ksb\x00',       #
-    'F8_key' : 'ksd\x00',       #
-    'F9_key' : 'kse\x00',       #
-    'F10_key' : 'ksm\x00',      #
-    'F11_key' : 'ksg\x00',      #
-    'F12_key' : 'kso\x00',      #
-    'F13_key' : 'ksi\x00',      #
-    'F14_key' : 'ksk\x00',      #
-    'F15_key' : 'ksq\x00',      #
-}
-
-_Enum_misc = {
-    'current_application' : 'cura',     # the current application
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    '****' : anything,
-    'PICT' : pictures,
-    'STXT' : styled_text,
-    'TEXT' : strings,
-    'alis' : alias,
-    'apr ' : April,
-    'aug ' : August,
-    'bool' : booleans,
-    'cRGB' : RGB_colors,
-    'capp' : application,
-    'case' : upper_case,
-    'ccmt' : cubic_centimeters,
-    'cfet' : cubic_feet,
-    'cha ' : characters,
-    'citl' : writing_code_info,
-    'citm' : text_items,
-    'cmet' : cubic_meters,
-    'cmtr' : centimeters,
-    'cobj' : item,
-    'cstr' : C_strings,
-    'ctxt' : text,
-    'cuin' : cubic_inches,
-    'cyrd' : cubic_yards,
-    'dec ' : December,
-    'degc' : degrees_Celsius,
-    'degf' : degrees_Fahrenheit,
-    'degk' : degrees_Kelvin,
-    'doub' : reals,
-    'encs' : encoded_strings,
-    'enum' : constants,
-    'evnt' : events,
-    'feb ' : February,
-    'feet' : feet,
-    'fri ' : Friday,
-    'fss ' : file_specification,
-    'galn' : gallons,
-    'gram' : grams,
-    'hand' : handlers,
-    'inch' : inches,
-    'itxt' : international_text,
-    'jan ' : January,
-    'jul ' : July,
-    'jun ' : June,
-    'kfrm' : reference_forms,
-    'kgrm' : kilograms,
-    'kmtr' : kilometers,
-    'kprs' : keystroke,
-    'lbs ' : pounds,
-    'ldt ' : date,
-    'list' : list,
-    'litr' : liters,
-    'llst' : linked_list,
-    'long' : integers,
-    'lr  ' : list_or_record,
-    'lrs ' : list_2c__record_or_text,
-    'ls  ' : list_or_string,
-    'mach' : machines,
-    'mar ' : March,
-    'may ' : May,
-    'metr' : meters,
-    'mile' : miles,
-    'mnth' : months,
-    'mon ' : Monday,
-    'msng' : missing_values,
-    'nd  ' : number_or_date,
-    'nds ' : number_2c__date_or_text,
-    'nmbr' : numbers,
-    'nov ' : November,
-    'ns  ' : number_or_string,
-    'obj ' : references,
-    'oct ' : October,
-    'ozs ' : ounces,
-    'pcls' : class_,
-    'prep' : prepositions,
-    'prop' : properties,
-    'psct' : writing_code,
-    'pstr' : Pascal_strings,
-    'qrts' : quarts,
-    'rdat' : data,
-    'reco' : records,
-    'sat ' : Saturday,
-    'scnd' : seconds,
-    'scpt' : script,
-    'sep ' : September,
-    'sf  ' : alias_or_string,
-    'snd ' : sounds,
-    'sqft' : square_feet,
-    'sqkm' : square_kilometers,
-    'sqmi' : square_miles,
-    'sqrm' : square_meters,
-    'sqyd' : square_yards,
-    'styl' : styled_Clipboard_text,
-    'sun ' : Sunday,
-    'sutx' : styled_Unicode_text,
-    'thu ' : Thursday,
-    'tue ' : Tuesday,
-    'type' : type_class,
-    'undf' : empty_ae_name_,
-    'utxt' : Unicode_text,
-    'vect' : vector,
-    'vers' : version,
-    'wed ' : Wednesday,
-    'wkdy' : weekdays,
-    'yard' : yards,
-    'zone' : zones,
-}
-
-_propdeclarations = {
-    'ID  ' : _Prop_id,
-    'ascr' : _Prop_AppleScript,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'day ' : _Prop_day,
-    'days' : _Prop_days,
-    'dstr' : _Prop_date_string,
-    'hour' : _Prop_hours,
-    'kMod' : _Prop_modifiers,
-    'kMsg' : _Prop_key,
-    'kknd' : _Prop_key_kind,
-    'leng' : _Prop_length,
-    'min ' : _Prop_minutes,
-    'mnth' : _Prop_month,
-    'pare' : _Prop_parent,
-    'pi  ' : _Prop_pi,
-    'plcd' : _Prop_language_code,
-    'pnam' : _Prop_name,
-    'prdp' : _Prop_print_depth,
-    'prln' : _Prop_print_length,
-    'pscd' : _Prop_script_code,
-    'psxp' : _Prop_POSIX_path,
-    'rest' : _Prop_rest,
-    'ret ' : _Prop_return_,
-    'rslt' : _Prop_result,
-    'rvse' : _Prop_reverse,
-    'spac' : _Prop_space,
-    'tab ' : _Prop_tab,
-    'time' : _Prop_time,
-    'tstr' : _Prop_time_string,
-    'txdl' : _Prop_text_item_delimiters,
-    'week' : _Prop_weeks,
-    'wkdy' : _Prop_weekday,
-    'year' : _Prop_year,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'boov' : _Enum_boov,
-    'cons' : _Enum_cons,
-    'eMds' : _Enum_eMds,
-    'ekst' : _Enum_ekst,
-    'misc' : _Enum_misc,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Macintosh_Connectivity_Clas.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Macintosh_Connectivity_Clas.py
deleted file mode 100644 (file)
index 99fe5e3..0000000
+++ /dev/null
@@ -1,373 +0,0 @@
-"""Suite Macintosh Connectivity Classes: Classes relating to Apple Macintosh personal computer connectivity
-Level 1, version 1
-
-Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'macc'
-
-class Macintosh_Connectivity_Clas_Events:
-
-    pass
-
-
-class ADB_address(aetools.ComponentItem):
-    """ADB address - Addresses a device connected via Apple Desktop Bus """
-    want = 'cadb'
-class _Prop__3c_inheritance_3e_(aetools.NProperty):
-    """<inheritance> - inherits some of its properties from this class """
-    which = 'c@#^'
-    want = 'cadr'
-class _Prop_ID(aetools.NProperty):
-    """ID - the Apple Desktop Bus device ID """
-    which = 'ID  '
-    want = 'shor'
-
-ADB_addresses = ADB_address
-
-class address_specification(aetools.ComponentItem):
-    """address specification - Unique designation of a device or service connected to this computer """
-    want = 'cadr'
-class _Prop_conduit(aetools.NProperty):
-    """conduit - How the addressee is physically connected """
-    which = 'pcon'
-    want = 'econ'
-class _Prop_properties(aetools.NProperty):
-    """properties - property that allows getting and setting of multiple properties """
-    which = 'pALL'
-    want = 'reco'
-class _Prop_protocol(aetools.NProperty):
-    """protocol - How to talk to this addressee """
-    which = 'pprt'
-    want = 'epro'
-
-address_specifications = address_specification
-
-class AppleTalk_address(aetools.ComponentItem):
-    """AppleTalk address - Addresses a device or service connected via the AppleTalk protocol """
-    want = 'cat '
-class _Prop_AppleTalk_machine(aetools.NProperty):
-    """AppleTalk machine - the machine name part of the address """
-    which = 'patm'
-    want = 'TEXT'
-class _Prop_AppleTalk_type(aetools.NProperty):
-    """AppleTalk type - the type part of the AppleTalk address """
-    which = 'patt'
-    want = 'TEXT'
-class _Prop_AppleTalk_zone(aetools.NProperty):
-    """AppleTalk zone - the zone part of the address """
-    which = 'patz'
-    want = 'TEXT'
-
-AppleTalk_addresses = AppleTalk_address
-
-class bus_slot(aetools.ComponentItem):
-    """bus slot - Addresses a PC, PCI, or NuBus card """
-    want = 'cbus'
-
-bus_slots = bus_slot
-
-class device_specification(aetools.ComponentItem):
-    """device specification - A device connected to a computer """
-    want = 'cdev'
-class _Prop_device_address(aetools.NProperty):
-    """device address - the address of the device """
-    which = 'pdva'
-    want = 'cadr'
-class _Prop_device_type(aetools.NProperty):
-    """device type - the kind of device """
-    which = 'pdvt'
-    want = 'edvt'
-
-device_specifications = device_specification
-
-class Ethernet_address(aetools.ComponentItem):
-    """Ethernet address - Addresses a device by its Ethernet address """
-    want = 'cen '
-
-Ethernet_addresses = Ethernet_address
-
-class FireWire_address(aetools.ComponentItem):
-    """FireWire address - Addresses a device on the FireWire bus """
-    want = 'cfw '
-
-FireWire_addresses = FireWire_address
-
-class IP_address(aetools.ComponentItem):
-    """IP address - Addresses a device or service via the Internet Protocol (IP) """
-    want = 'cip '
-class _Prop_DNS_form(aetools.NProperty):
-    """DNS form - the address in the form "apple.com" """
-    which = 'pdns'
-    want = 'TEXT'
-class _Prop_port(aetools.NProperty):
-    """port - the port number of the service or client being addressed """
-    which = 'ppor'
-    want = 'TEXT'
-
-IP_addresses = IP_address
-
-class LocalTalk_address(aetools.ComponentItem):
-    """LocalTalk address - Addresses a device by its LocalTalk address """
-    want = 'clt '
-class _Prop_network(aetools.NProperty):
-    """network - the LocalTalk network number """
-    which = 'pnet'
-    want = 'shor'
-class _Prop_node(aetools.NProperty):
-    """node - the LocalTalk node number """
-    which = 'pnod'
-    want = 'shor'
-class _Prop_socket(aetools.NProperty):
-    """socket - the LocalTalk socket number """
-    which = 'psoc'
-    want = 'shor'
-
-LocalTalk_addresses = LocalTalk_address
-
-class SCSI_address(aetools.ComponentItem):
-    """SCSI address - Addresses a SCSI device """
-    want = 'cscs'
-class _Prop_LUN(aetools.NProperty):
-    """LUN - the SCSI logical unit number """
-    which = 'pslu'
-    want = 'shor'
-class _Prop_SCSI_bus(aetools.NProperty):
-    """SCSI bus - the SCSI bus number """
-    which = 'pscb'
-    want = 'shor'
-
-SCSI_addresses = SCSI_address
-
-class Token_Ring_address(aetools.ComponentItem):
-    """Token Ring address - Addresses a device or service via the Token Ring protocol """
-    want = 'ctok'
-
-Token_Ring_addresses = Token_Ring_address
-
-class USB_address(aetools.ComponentItem):
-    """USB address - Addresses a device on the Universal Serial Bus """
-    want = 'cusb'
-class _Prop_name(aetools.NProperty):
-    """name - the USB device name """
-    which = 'pnam'
-    want = 'TEXT'
-
-USB_Addresses = USB_address
-ADB_address._superclassnames = ['address_specification']
-ADB_address._privpropdict = {
-    'ID' : _Prop_ID,
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-ADB_address._privelemdict = {
-}
-address_specification._superclassnames = []
-address_specification._privpropdict = {
-    'conduit' : _Prop_conduit,
-    'properties' : _Prop_properties,
-    'protocol' : _Prop_protocol,
-}
-address_specification._privelemdict = {
-}
-AppleTalk_address._superclassnames = ['address_specification']
-AppleTalk_address._privpropdict = {
-    'AppleTalk_machine' : _Prop_AppleTalk_machine,
-    'AppleTalk_type' : _Prop_AppleTalk_type,
-    'AppleTalk_zone' : _Prop_AppleTalk_zone,
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-AppleTalk_address._privelemdict = {
-}
-bus_slot._superclassnames = ['address_specification']
-bus_slot._privpropdict = {
-    'ID' : _Prop_ID,
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-bus_slot._privelemdict = {
-}
-device_specification._superclassnames = []
-device_specification._privpropdict = {
-    'device_address' : _Prop_device_address,
-    'device_type' : _Prop_device_type,
-    'properties' : _Prop_properties,
-}
-device_specification._privelemdict = {
-}
-Ethernet_address._superclassnames = ['address_specification']
-Ethernet_address._privpropdict = {
-    'ID' : _Prop_ID,
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-Ethernet_address._privelemdict = {
-}
-FireWire_address._superclassnames = ['address_specification']
-FireWire_address._privpropdict = {
-    'ID' : _Prop_ID,
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-FireWire_address._privelemdict = {
-}
-IP_address._superclassnames = ['address_specification']
-IP_address._privpropdict = {
-    'DNS_form' : _Prop_DNS_form,
-    'ID' : _Prop_ID,
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-    'port' : _Prop_port,
-}
-IP_address._privelemdict = {
-}
-LocalTalk_address._superclassnames = ['address_specification']
-LocalTalk_address._privpropdict = {
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-    'network' : _Prop_network,
-    'node' : _Prop_node,
-    'socket' : _Prop_socket,
-}
-LocalTalk_address._privelemdict = {
-}
-SCSI_address._superclassnames = ['address_specification']
-SCSI_address._privpropdict = {
-    'ID' : _Prop_ID,
-    'LUN' : _Prop_LUN,
-    'SCSI_bus' : _Prop_SCSI_bus,
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-SCSI_address._privelemdict = {
-}
-Token_Ring_address._superclassnames = ['address_specification']
-Token_Ring_address._privpropdict = {
-    'ID' : _Prop_ID,
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-Token_Ring_address._privelemdict = {
-}
-USB_address._superclassnames = ['address_specification']
-USB_address._privpropdict = {
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-    'name' : _Prop_name,
-}
-USB_address._privelemdict = {
-}
-_Enum_econ = {
-    'ADB' : 'eadb',     #
-    'printer_port' : 'ecpp',    #
-    'modem_port' : 'ecmp',      #
-    'modem_printer_port' : 'empp',      #
-    'LocalTalk' : 'eclt',       #
-    'Ethernet' : 'ecen',        #
-    'Token_Ring' : 'etok',      #
-    'SCSI' : 'ecsc',    #
-    'USB' : 'ecus',     #
-    'FireWire' : 'ecfw',        #
-    'infrared' : 'ecir',        #
-    'PC_card' : 'ecpc', #
-    'PCI_bus' : 'ecpi', #
-    'NuBus' : 'enub',   #
-    'PDS_slot' : 'ecpd',        #
-    'Comm_slot' : 'eccm',       #
-    'monitor_out' : 'ecmn',     #
-    'video_out' : 'ecvo',       #
-    'video_in' : 'ecvi',        #
-    'audio_out' : 'ecao',       #
-    'audio_line_in' : 'ecai',   #
-    'audio_line_out' : 'ecal',  #
-    'microphone' : 'ecmi',      #
-}
-
-_Enum_edvt = {
-    'hard_disk_drive' : 'ehd ', #
-    'floppy_disk_drive' : 'efd ',       #
-    'CD_ROM_drive' : 'ecd ',    #
-    'DVD_drive' : 'edvd',       #
-    'storage_device' : 'edst',  #
-    'keyboard' : 'ekbd',        #
-    'mouse' : 'emou',   #
-    'trackball' : 'etrk',       #
-    'trackpad' : 'edtp',        #
-    'pointing_device' : 'edpd', #
-    'video_monitor' : 'edvm',   #
-    'LCD_display' : 'edlc',     #
-    'display' : 'edds', #
-    'modem' : 'edmm',   #
-    'PC_card' : 'ecpc', #
-    'PCI_card' : 'edpi',        #
-    'NuBus_card' : 'ednb',      #
-    'printer' : 'edpr', #
-    'speakers' : 'edsp',        #
-    'microphone' : 'ecmi',      #
-}
-
-_Enum_epro = {
-    'serial' : 'epsr',  #
-    'AppleTalk' : 'epat',       #
-    'IP' : 'epip',      #
-    'SCSI' : 'ecsc',    #
-    'ADB' : 'eadb',     #
-    'FireWire' : 'ecfw',        #
-    'IrDA' : 'epir',    #
-    'IRTalk' : 'epit',  #
-    'USB' : 'ecus',     #
-    'PC_card' : 'ecpc', #
-    'PCI_bus' : 'ecpi', #
-    'NuBus' : 'enub',   #
-    'bus' : 'ebus',     #
-    'Macintosh_video' : 'epmv', #
-    'SVGA' : 'epsg',    #
-    'S_video' : 'epsv', #
-    'analog_audio' : 'epau',    #
-    'digital_audio' : 'epda',   #
-    'PostScript' : 'epps',      #
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'cadb' : ADB_address,
-    'cadr' : address_specification,
-    'cat ' : AppleTalk_address,
-    'cbus' : bus_slot,
-    'cdev' : device_specification,
-    'cen ' : Ethernet_address,
-    'cfw ' : FireWire_address,
-    'cip ' : IP_address,
-    'clt ' : LocalTalk_address,
-    'cscs' : SCSI_address,
-    'ctok' : Token_Ring_address,
-    'cusb' : USB_address,
-}
-
-_propdeclarations = {
-    'ID  ' : _Prop_ID,
-    'c@#^' : _Prop__3c_inheritance_3e_,
-    'pALL' : _Prop_properties,
-    'patm' : _Prop_AppleTalk_machine,
-    'patt' : _Prop_AppleTalk_type,
-    'patz' : _Prop_AppleTalk_zone,
-    'pcon' : _Prop_conduit,
-    'pdns' : _Prop_DNS_form,
-    'pdva' : _Prop_device_address,
-    'pdvt' : _Prop_device_type,
-    'pnam' : _Prop_name,
-    'pnet' : _Prop_network,
-    'pnod' : _Prop_node,
-    'ppor' : _Prop_port,
-    'pprt' : _Prop_protocol,
-    'pscb' : _Prop_SCSI_bus,
-    'pslu' : _Prop_LUN,
-    'psoc' : _Prop_socket,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'econ' : _Enum_econ,
-    'edvt' : _Enum_edvt,
-    'epro' : _Enum_epro,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suite.py
deleted file mode 100644 (file)
index 11747f9..0000000
+++ /dev/null
@@ -1,417 +0,0 @@
-"""Suite QuickDraw Graphics Suite: A set of basic classes for graphics
-Level 1, version 1
-
-Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'qdrw'
-
-class QuickDraw_Graphics_Suite_Events:
-
-    pass
-
-
-class arc(aetools.ComponentItem):
-    """arc - An arc """
-    want = 'carc'
-class _Prop_arc_angle(aetools.NProperty):
-    """arc angle - the angle of the arc in degrees """
-    which = 'parc'
-    want = 'fixd'
-class _Prop_bounds(aetools.NProperty):
-    """bounds - the smallest rectangle that contains the entire arc """
-    which = 'pbnd'
-    want = 'qdrt'
-class _Prop_definition_rect(aetools.NProperty):
-    """definition rect - the rectangle that contains the circle or oval used to define the arc """
-    which = 'pdrt'
-    want = 'qdrt'
-class _Prop_fill_color(aetools.NProperty):
-    """fill color - the fill color """
-    which = 'flcl'
-    want = 'cRGB'
-class _Prop_fill_pattern(aetools.NProperty):
-    """fill pattern - the fill pattern """
-    which = 'flpt'
-    want = 'cpix'
-class _Prop_pen_color(aetools.NProperty):
-    """pen color - the pen color """
-    which = 'ppcl'
-    want = 'cRGB'
-class _Prop_pen_pattern(aetools.NProperty):
-    """pen pattern - the pen pattern """
-    which = 'pppa'
-    want = 'cpix'
-class _Prop_pen_width(aetools.NProperty):
-    """pen width - the pen width """
-    which = 'ppwd'
-    want = 'shor'
-class _Prop_start_angle(aetools.NProperty):
-    """start angle - the angle that defines the start of the arc, in degrees """
-    which = 'pang'
-    want = 'fixd'
-class _Prop_transfer_mode(aetools.NProperty):
-    """transfer mode - the transfer mode """
-    which = 'pptm'
-    want = 'tran'
-
-arcs = arc
-
-class drawing_area(aetools.ComponentItem):
-    """drawing area - Container for graphics and supporting information """
-    want = 'cdrw'
-class _Prop_background_color(aetools.NProperty):
-    """background color - the color used to fill in unoccupied areas """
-    which = 'pbcl'
-    want = 'cRGB'
-class _Prop_background_pattern(aetools.NProperty):
-    """background pattern - the pattern used to fill in unoccupied areas """
-    which = 'pbpt'
-    want = 'cpix'
-class _Prop_color_table(aetools.NProperty):
-    """color table - the color table """
-    which = 'cltb'
-    want = 'clrt'
-class _Prop_default_font(aetools.NProperty):
-    """default font - the name of the default font for text objects """
-    which = 'ptxf'
-    want = 'itxt'
-class _Prop_default_location(aetools.NProperty):
-    """default location - the default location of each new graphic object """
-    which = 'pnel'
-    want = 'QDpt'
-class _Prop_default_size(aetools.NProperty):
-    """default size - the default size for text objects """
-    which = 'ptps'
-    want = 'fixd'
-class _Prop_name(aetools.NProperty):
-    """name - the name """
-    which = 'pnam'
-    want = 'itxt'
-class _Prop_ordering(aetools.NProperty):
-    """ordering - the ordered list of graphic objects in the drawing area """
-    which = 'gobs'
-    want = 'obj '
-class _Prop_pixel_depth(aetools.NProperty):
-    """pixel depth - the number of bits per pixel """
-    which = 'pdpt'
-    want = 'shor'
-class _Prop_style(aetools.NProperty):
-    """style - the default text style for text objects """
-    which = 'txst'
-    want = 'tsty'
-class _Prop_text_color(aetools.NProperty):
-    """text color - the default color for text objects """
-    which = 'ptxc'
-    want = 'cRGB'
-class _Prop_update_on_change(aetools.NProperty):
-    """update on change - Redraw after each change? """
-    which = 'pupd'
-    want = 'bool'
-class _Prop_writing_code(aetools.NProperty):
-    """writing code - the script system and language of text objects in the drawing area """
-    which = 'psct'
-    want = 'intl'
-
-drawing_areas = drawing_area
-
-class graphic_objects(aetools.ComponentItem):
-    """graphic objects -  """
-    want = 'cgob'
-
-graphic_object = graphic_objects
-
-class graphic_shapes(aetools.ComponentItem):
-    """graphic shapes -  """
-    want = 'cgsh'
-
-graphic_shape = graphic_shapes
-
-class graphic_text(aetools.ComponentItem):
-    """graphic text - A series of characters within a drawing area """
-    want = 'cgtx'
-class _Prop_color(aetools.NProperty):
-    """color - the color of the first character """
-    which = 'colr'
-    want = 'cRGB'
-class _Prop_font(aetools.NProperty):
-    """font - the name of the font of the first character """
-    which = 'font'
-    want = 'ctxt'
-class _Prop_size(aetools.NProperty):
-    """size - the size in points of the first character """
-    which = 'ptsz'
-    want = 'fixd'
-class _Prop_uniform_styles(aetools.NProperty):
-    """uniform styles - the text styles that are uniform throughout the text """
-    which = 'ustl'
-    want = 'tsty'
-
-class ovals(aetools.ComponentItem):
-    """ovals -  """
-    want = 'covl'
-
-oval = ovals
-
-class polygon(aetools.ComponentItem):
-    """polygon - A polygon """
-    want = 'cpgn'
-class _Prop_point_list(aetools.NProperty):
-    """point list - the list of points that define the polygon """
-    which = 'ptlt'
-    want = 'QDpt'
-
-polygons = polygon
-
-class graphic_groups(aetools.ComponentItem):
-    """graphic groups -  """
-    want = 'cpic'
-
-graphic_group = graphic_groups
-
-class pixel_maps(aetools.ComponentItem):
-    """pixel maps -  """
-    want = 'cpix'
-
-pixel_map = pixel_maps
-
-class pixel(aetools.ComponentItem):
-    """pixel - A pixel """
-    want = 'cpxl'
-
-pixels = pixel
-
-class rectangles(aetools.ComponentItem):
-    """rectangles -  """
-    want = 'crec'
-
-rectangle = rectangles
-
-class rounded_rectangle(aetools.ComponentItem):
-    """rounded rectangle - A rounded rectangle """
-    want = 'crrc'
-class _Prop_corner_curve_height(aetools.NProperty):
-    """corner curve height - the height of the oval used to define the shape of the rounded corners """
-    which = 'pchd'
-    want = 'shor'
-class _Prop_corner_curve_width(aetools.NProperty):
-    """corner curve width - the width of the oval used to define the shape of the rounded corners """
-    which = 'pcwd'
-    want = 'shor'
-
-rounded_rectangles = rounded_rectangle
-
-class graphic_line(aetools.ComponentItem):
-    """graphic line - A graphic line """
-    want = 'glin'
-class _Prop_arrow_style(aetools.NProperty):
-    """arrow style - the arrow style """
-    which = 'arro'
-    want = 'arro'
-class _Prop_dash_style(aetools.NProperty):
-    """dash style - the dash style """
-    which = 'pdst'
-    want = 'tdas'
-class _Prop_end_point(aetools.NProperty):
-    """end point - the ending point of the line """
-    which = 'pend'
-    want = 'QDpt'
-class _Prop_start_point(aetools.NProperty):
-    """start point - the starting point of the line """
-    which = 'pstp'
-    want = 'QDpt'
-
-graphic_lines = graphic_line
-arc._superclassnames = []
-arc._privpropdict = {
-    'arc_angle' : _Prop_arc_angle,
-    'bounds' : _Prop_bounds,
-    'definition_rect' : _Prop_definition_rect,
-    'fill_color' : _Prop_fill_color,
-    'fill_pattern' : _Prop_fill_pattern,
-    'pen_color' : _Prop_pen_color,
-    'pen_pattern' : _Prop_pen_pattern,
-    'pen_width' : _Prop_pen_width,
-    'start_angle' : _Prop_start_angle,
-    'transfer_mode' : _Prop_transfer_mode,
-}
-arc._privelemdict = {
-}
-drawing_area._superclassnames = []
-drawing_area._privpropdict = {
-    'background_color' : _Prop_background_color,
-    'background_pattern' : _Prop_background_pattern,
-    'color_table' : _Prop_color_table,
-    'default_font' : _Prop_default_font,
-    'default_location' : _Prop_default_location,
-    'default_size' : _Prop_default_size,
-    'name' : _Prop_name,
-    'ordering' : _Prop_ordering,
-    'pixel_depth' : _Prop_pixel_depth,
-    'style' : _Prop_style,
-    'text_color' : _Prop_text_color,
-    'update_on_change' : _Prop_update_on_change,
-    'writing_code' : _Prop_writing_code,
-}
-drawing_area._privelemdict = {
-}
-graphic_objects._superclassnames = []
-graphic_objects._privpropdict = {
-}
-graphic_objects._privelemdict = {
-}
-graphic_shapes._superclassnames = []
-graphic_shapes._privpropdict = {
-}
-graphic_shapes._privelemdict = {
-}
-graphic_text._superclassnames = []
-graphic_text._privpropdict = {
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-    'uniform_styles' : _Prop_uniform_styles,
-}
-graphic_text._privelemdict = {
-}
-ovals._superclassnames = []
-ovals._privpropdict = {
-}
-ovals._privelemdict = {
-}
-polygon._superclassnames = []
-polygon._privpropdict = {
-    'point_list' : _Prop_point_list,
-}
-polygon._privelemdict = {
-}
-graphic_groups._superclassnames = []
-graphic_groups._privpropdict = {
-}
-graphic_groups._privelemdict = {
-}
-pixel_maps._superclassnames = []
-pixel_maps._privpropdict = {
-}
-pixel_maps._privelemdict = {
-}
-pixel._superclassnames = []
-pixel._privpropdict = {
-    'color' : _Prop_color,
-}
-pixel._privelemdict = {
-}
-rectangles._superclassnames = []
-rectangles._privpropdict = {
-}
-rectangles._privelemdict = {
-}
-rounded_rectangle._superclassnames = []
-rounded_rectangle._privpropdict = {
-    'corner_curve_height' : _Prop_corner_curve_height,
-    'corner_curve_width' : _Prop_corner_curve_width,
-}
-rounded_rectangle._privelemdict = {
-}
-graphic_line._superclassnames = []
-graphic_line._privpropdict = {
-    'arrow_style' : _Prop_arrow_style,
-    'dash_style' : _Prop_dash_style,
-    'end_point' : _Prop_end_point,
-    'start_point' : _Prop_start_point,
-}
-graphic_line._privelemdict = {
-}
-_Enum_arro = {
-    'no_arrow' : 'arno',        # No arrow on line
-    'arrow_at_start' : 'arst',  # Arrow at start of line
-    'arrow_at_end' : 'aren',    # Arrow at end of line
-    'arrow_at_both_ends' : 'arbo',      # Arrow at both the start and the end of the line
-}
-
-_Enum_tran = {
-    'copy_pixels' : 'cpy ',     #
-    'not_copy_pixels' : 'ncpy', #
-    'or_pixels' : 'or  ',       #
-    'not_or_pixels' : 'ntor',   #
-    'bic_pixels' : 'bic ',      #
-    'not_bic_pixels' : 'nbic',  #
-    'xor_pixels' : 'xor ',      #
-    'not_xor_pixels' : 'nxor',  #
-    'add_over_pixels' : 'addo', #
-    'add_pin_pixels' : 'addp',  #
-    'sub_over_pixels' : 'subo', #
-    'sub_pin_pixels' : 'subp',  #
-    'ad_max_pixels' : 'admx',   #
-    'ad_min_pixels' : 'admn',   #
-    'blend_pixels' : 'blnd',    #
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'carc' : arc,
-    'cdrw' : drawing_area,
-    'cgob' : graphic_objects,
-    'cgsh' : graphic_shapes,
-    'cgtx' : graphic_text,
-    'covl' : ovals,
-    'cpgn' : polygon,
-    'cpic' : graphic_groups,
-    'cpix' : pixel_maps,
-    'cpxl' : pixel,
-    'crec' : rectangles,
-    'crrc' : rounded_rectangle,
-    'glin' : graphic_line,
-}
-
-_propdeclarations = {
-    'arro' : _Prop_arrow_style,
-    'cltb' : _Prop_color_table,
-    'colr' : _Prop_color,
-    'flcl' : _Prop_fill_color,
-    'flpt' : _Prop_fill_pattern,
-    'font' : _Prop_font,
-    'gobs' : _Prop_ordering,
-    'pang' : _Prop_start_angle,
-    'parc' : _Prop_arc_angle,
-    'pbcl' : _Prop_background_color,
-    'pbnd' : _Prop_bounds,
-    'pbpt' : _Prop_background_pattern,
-    'pchd' : _Prop_corner_curve_height,
-    'pcwd' : _Prop_corner_curve_width,
-    'pdpt' : _Prop_pixel_depth,
-    'pdrt' : _Prop_definition_rect,
-    'pdst' : _Prop_dash_style,
-    'pend' : _Prop_end_point,
-    'pnam' : _Prop_name,
-    'pnel' : _Prop_default_location,
-    'ppcl' : _Prop_pen_color,
-    'pppa' : _Prop_pen_pattern,
-    'pptm' : _Prop_transfer_mode,
-    'ppwd' : _Prop_pen_width,
-    'psct' : _Prop_writing_code,
-    'pstp' : _Prop_start_point,
-    'ptlt' : _Prop_point_list,
-    'ptps' : _Prop_default_size,
-    'ptsz' : _Prop_size,
-    'ptxc' : _Prop_text_color,
-    'ptxf' : _Prop_default_font,
-    'pupd' : _Prop_update_on_change,
-    'txst' : _Prop_style,
-    'ustl' : _Prop_uniform_styles,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'arro' : _Enum_arro,
-    'tran' : _Enum_tran,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suppleme.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suppleme.py
deleted file mode 100644 (file)
index d781937..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-"""Suite QuickDraw Graphics Supplemental Suite: Defines transformations of graphic objects
-Level 1, version 1
-
-Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'qdsp'
-
-class QuickDraw_Graphics_Suppleme_Events:
-
-    pass
-
-
-class drawing_area(aetools.ComponentItem):
-    """drawing area - Container for graphics and supporting information """
-    want = 'cdrw'
-class _Prop_rotation(aetools.NProperty):
-    """rotation - the default rotation for objects in the drawing area """
-    which = 'prot'
-    want = 'trot'
-class _Prop_scale(aetools.NProperty):
-    """scale - the default scaling for objects in the drawing area """
-    which = 'pscl'
-    want = 'fixd'
-class _Prop_translation(aetools.NProperty):
-    """translation - the default repositioning for objects in the drawing area """
-    which = 'ptrs'
-    want = 'QDpt'
-
-drawing_areas = drawing_area
-
-class graphic_groups(aetools.ComponentItem):
-    """graphic groups -  """
-    want = 'cpic'
-
-graphic_group = graphic_groups
-drawing_area._superclassnames = []
-drawing_area._privpropdict = {
-    'rotation' : _Prop_rotation,
-    'scale' : _Prop_scale,
-    'translation' : _Prop_translation,
-}
-drawing_area._privelemdict = {
-}
-graphic_groups._superclassnames = []
-graphic_groups._privpropdict = {
-}
-graphic_groups._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'cdrw' : drawing_area,
-    'cpic' : graphic_groups,
-}
-
-_propdeclarations = {
-    'prot' : _Prop_rotation,
-    'pscl' : _Prop_scale,
-    'ptrs' : _Prop_translation,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Required_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Required_Suite.py
deleted file mode 100644 (file)
index 7e77dbb..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-"""Suite Required Suite: Every application supports open, print, run, and quit
-Level 1, version 1
-
-Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'reqd'
-
-from _builtinSuites.builtin_Suite import *
-class Required_Suite_Events(builtin_Suite_Events):
-
-    pass
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py
deleted file mode 100644 (file)
index e305668..0000000
+++ /dev/null
@@ -1,738 +0,0 @@
-"""Suite Standard Suite: Common terms for most applications
-Level 1, version 1
-
-Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'core'
-
-from _builtinSuites.builtin_Suite import *
-class Standard_Suite_Events(builtin_Suite_Events):
-
-    _argmap_class_info = {
-        'in_' : 'wrcd',
-    }
-
-    def class_info(self, _object=None, _attributes={}, **_arguments):
-        """class info: (optional) Get information about an object class
-        Required argument: the object class about which information is requested
-        Keyword argument in_: the human language and script system in which to return information
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: a record containing the object\xd5s properties and elements
-        """
-        _code = 'core'
-        _subcode = 'qobj'
-
-        aetools.keysubst(_arguments, self._argmap_class_info)
-        _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_close = {
-        'saving' : 'savo',
-        'saving_in' : 'kfil',
-    }
-
-    def close(self, _object, _attributes={}, **_arguments):
-        """close: Close an object
-        Required argument: the object to close
-        Keyword argument saving: specifies whether changes should be saved before closing
-        Keyword argument saving_in: the file or alias in which to save the object
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'clos'
-
-        aetools.keysubst(_arguments, self._argmap_close)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_count = {
-        'each' : 'kocl',
-    }
-
-    def count(self, _object, _attributes={}, **_arguments):
-        """count: Return the number of elements of an object
-        Required argument: the object whose elements are to be counted
-        Keyword argument each: if specified, restricts counting to objects of this class
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the number of elements
-        """
-        _code = 'core'
-        _subcode = 'cnte'
-
-        aetools.keysubst(_arguments, self._argmap_count)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_data_size = {
-        'as' : 'rtyp',
-    }
-
-    def data_size(self, _object, _attributes={}, **_arguments):
-        """data size: (optional) Return the size in bytes of an object
-        Required argument: the object whose data size is to be returned
-        Keyword argument as: the data type for which the size is calculated
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the size of the object in bytes
-        """
-        _code = 'core'
-        _subcode = 'dsiz'
-
-        aetools.keysubst(_arguments, self._argmap_data_size)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def delete(self, _object, _attributes={}, **_arguments):
-        """delete: Delete an object from its container. Note this does not work on script variables, only on elements of application classes.
-        Required argument: the element to delete
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'delo'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_duplicate = {
-        'to' : 'insh',
-        'with_properties' : 'prdt',
-    }
-
-    def duplicate(self, _object, _attributes={}, **_arguments):
-        """duplicate: Duplicate one or more objects
-        Required argument: the object(s) to duplicate
-        Keyword argument to: the new location for the object(s)
-        Keyword argument with_properties: the initial values for properties of the new object that are to be different from the original
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: to the duplicated object(s)
-        """
-        _code = 'core'
-        _subcode = 'clon'
-
-        aetools.keysubst(_arguments, self._argmap_duplicate)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_event_info = {
-        'in_' : 'wrcd',
-    }
-
-    def event_info(self, _object, _attributes={}, **_arguments):
-        """event info: (optional) Get information about the Apple events in a suite
-        Required argument: the event class of the Apple events for which to return information
-        Keyword argument in_: the human language and script system in which to return information
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: a record containing the events and their parameters
-        """
-        _code = 'core'
-        _subcode = 'gtei'
-
-        aetools.keysubst(_arguments, self._argmap_event_info)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def exists(self, _object, _attributes={}, **_arguments):
-        """exists: Verify if an object exists
-        Required argument: the object in question
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: true if it exists, false if not
-        """
-        _code = 'core'
-        _subcode = 'doex'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def handleBreakpoint(self, _object, _attributes={}, **_arguments):
-        """handleBreakpoint: return true to stop at a breakpoint
-        Required argument: the call frame of the breakpoint
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: true to stop, false if not
-        """
-        _code = 'core'
-        _subcode = 'brak'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_make = {
-        'new' : 'kocl',
-        'at' : 'insh',
-        'with_data' : 'data',
-        'with_properties' : 'prdt',
-    }
-
-    def make(self, _no_object=None, _attributes={}, **_arguments):
-        """make: Make a new element
-        Keyword argument new: the class of the new element
-        Keyword argument at: the location at which to insert the element
-        Keyword argument with_data: the initial data for the element
-        Keyword argument with_properties: the initial values for the properties of the element
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: to the new object(s)
-        """
-        _code = 'core'
-        _subcode = 'crel'
-
-        aetools.keysubst(_arguments, self._argmap_make)
-        if _no_object is not None: raise TypeError('No direct arg expected')
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_move = {
-        'to' : 'insh',
-    }
-
-    def move(self, _object, _attributes={}, **_arguments):
-        """move: Move object(s) to a new location
-        Required argument: the object(s) to move
-        Keyword argument to: the new location for the object(s)
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: to the object(s) after they have been moved
-        """
-        _code = 'core'
-        _subcode = 'move'
-
-        aetools.keysubst(_arguments, self._argmap_move)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def open(self, _object, _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.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 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.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_quit = {
-        'saving' : 'savo',
-    }
-
-    def quit(self, _no_object=None, _attributes={}, **_arguments):
-        """quit: Quit an application
-        Keyword argument saving: specifies whether to save currently open documents
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'quit'
-
-        aetools.keysubst(_arguments, self._argmap_quit)
-        if _no_object is not None: raise TypeError('No direct arg expected')
-
-        aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def reopen(self, _no_object=None, _attributes={}, **_arguments):
-        """reopen: Reactivate a running application.  Some applications will open a new untitled window if no window is open.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'rapp'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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: Run an application.  Most applications will open an empty, untitled window.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'oapp'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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_save = {
-        'in_' : 'kfil',
-        'as' : 'fltp',
-    }
-
-    def save(self, _object, _attributes={}, **_arguments):
-        """save: Save an object
-        Required argument: the object to save, usually a document or window
-        Keyword argument in_: the file or alias in which to save the object
-        Keyword argument as: the file type of the document in which to save the data
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'save'
-
-        aetools.keysubst(_arguments, self._argmap_save)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def select(self, _object, _attributes={}, **_arguments):
-        """select: Make a selection
-        Required argument: the object to select
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'misc'
-        _subcode = 'slct'
-
-        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_suite_info = {
-        'in_' : 'wrcd',
-    }
-
-    def suite_info(self, _object, _attributes={}, **_arguments):
-        """suite info: (optional) Get information about event suite(s)
-        Required argument: the suite for which to return information
-        Keyword argument in_: the human language and script system in which to return information
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: a record containing the suites and their versions
-        """
-        _code = 'core'
-        _subcode = 'gtsi'
-
-        aetools.keysubst(_arguments, self._argmap_suite_info)
-        _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 alias(aetools.ComponentItem):
-    """alias - a file on a disk or server.  The file must exist when you check the syntax of your script. """
-    want = 'alis'
-class _Prop_POSIX_path(aetools.NProperty):
-    """POSIX path - the POSIX path of the file """
-    which = 'psxp'
-    want = 'TEXT'
-
-aliases = alias
-
-class application(aetools.ComponentItem):
-    """application - An application program """
-    want = 'capp'
-class _Prop_clipboard(aetools.NProperty):
-    """clipboard - the contents of the clipboard for this application """
-    which = 'pcli'
-    want = '****'
-clipboard = _Prop_clipboard()
-class _Prop_frontmost(aetools.NProperty):
-    """frontmost - Is this the frontmost application? """
-    which = 'pisf'
-    want = 'bool'
-frontmost = _Prop_frontmost()
-class _Prop_name(aetools.NProperty):
-    """name - the name of the application """
-    which = 'pnam'
-    want = 'itxt'
-name = _Prop_name()
-class _Prop_selection(aetools.NProperty):
-    """selection - the selection visible to the user.  Use the \xd4select\xd5 command to set a new selection; use \xd4contents of selection\xd5 to get or change information in the document. """
-    which = 'sele'
-    want = 'csel'
-selection = _Prop_selection()
-class _Prop_version(aetools.NProperty):
-    """version - the version of the application """
-    which = 'vers'
-    want = 'vers'
-version = _Prop_version()
-
-applications = application
-
-class insertion_points(aetools.ComponentItem):
-    """insertion points -  """
-    want = 'cins'
-
-insertion_point = insertion_points
-
-class selection_2d_object(aetools.ComponentItem):
-    """selection-object - A way to refer to the state of the current of the selection.  Use the \xd4select\xd5 command to make a new selection. """
-    want = 'csel'
-class _Prop_contents(aetools.NProperty):
-    """contents - the information currently selected.  Use \xd4contents of selection\xd5 to get or change information in a document. """
-    which = 'pcnt'
-    want = '****'
-
-class window(aetools.ComponentItem):
-    """window - A window """
-    want = 'cwin'
-class _Prop_bounds(aetools.NProperty):
-    """bounds - the boundary rectangle for the window """
-    which = 'pbnd'
-    want = 'qdrt'
-class _Prop_closeable(aetools.NProperty):
-    """closeable - Does the window have a close box? """
-    which = 'hclb'
-    want = 'bool'
-class _Prop_floating(aetools.NProperty):
-    """floating - Does the window float? """
-    which = 'isfl'
-    want = 'bool'
-class _Prop_index(aetools.NProperty):
-    """index - the number of the window """
-    which = 'pidx'
-    want = 'long'
-class _Prop_modal(aetools.NProperty):
-    """modal - Is the window modal? """
-    which = 'pmod'
-    want = 'bool'
-class _Prop_resizable(aetools.NProperty):
-    """resizable - Is the window resizable? """
-    which = 'prsz'
-    want = 'bool'
-class _Prop_titled(aetools.NProperty):
-    """titled - Does the window have a title bar? """
-    which = 'ptit'
-    want = 'bool'
-class _Prop_visible(aetools.NProperty):
-    """visible - Is the window visible? """
-    which = 'pvis'
-    want = 'bool'
-class _Prop_zoomable(aetools.NProperty):
-    """zoomable - Is the window zoomable? """
-    which = 'iszm'
-    want = 'bool'
-class _Prop_zoomed(aetools.NProperty):
-    """zoomed - Is the window zoomed? """
-    which = 'pzum'
-    want = 'bool'
-
-windows = window
-
-class document(aetools.ComponentItem):
-    """document - A document of a scriptable application """
-    want = 'docu'
-class _Prop_modified(aetools.NProperty):
-    """modified - Has the document been modified since the last save? """
-    which = 'imod'
-    want = 'bool'
-
-documents = document
-
-class file(aetools.ComponentItem):
-    """file - a file on a disk or server """
-    want = 'file'
-
-files = file
-alias._superclassnames = []
-alias._privpropdict = {
-    'POSIX_path' : _Prop_POSIX_path,
-}
-alias._privelemdict = {
-}
-application._superclassnames = []
-application._privpropdict = {
-    'clipboard' : _Prop_clipboard,
-    'frontmost' : _Prop_frontmost,
-    'name' : _Prop_name,
-    'selection' : _Prop_selection,
-    'version' : _Prop_version,
-}
-application._privelemdict = {
-}
-insertion_points._superclassnames = []
-insertion_points._privpropdict = {
-}
-insertion_points._privelemdict = {
-}
-selection_2d_object._superclassnames = []
-selection_2d_object._privpropdict = {
-    'contents' : _Prop_contents,
-}
-selection_2d_object._privelemdict = {
-}
-window._superclassnames = []
-window._privpropdict = {
-    'bounds' : _Prop_bounds,
-    'closeable' : _Prop_closeable,
-    'floating' : _Prop_floating,
-    'index' : _Prop_index,
-    'modal' : _Prop_modal,
-    'resizable' : _Prop_resizable,
-    'titled' : _Prop_titled,
-    'visible' : _Prop_visible,
-    'zoomable' : _Prop_zoomable,
-    'zoomed' : _Prop_zoomed,
-}
-window._privelemdict = {
-}
-document._superclassnames = []
-document._privpropdict = {
-    'modified' : _Prop_modified,
-}
-document._privelemdict = {
-}
-file._superclassnames = []
-file._privpropdict = {
-    'POSIX_path' : _Prop_POSIX_path,
-}
-file._privelemdict = {
-}
-class _3c_(aetools.NComparison):
-    """< - Less than """
-class _3d_(aetools.NComparison):
-    """= - Equal """
-class _3e_(aetools.NComparison):
-    """> - Greater than """
-class contains(aetools.NComparison):
-    """contains - Contains """
-class ends_with(aetools.NComparison):
-    """ends with - Ends with """
-class starts_with(aetools.NComparison):
-    """starts with - Starts with """
-class _b2_(aetools.NComparison):
-    """\xb2 - Less than or equal to """
-class _b3_(aetools.NComparison):
-    """\xb3 - Greater than or equal to """
-_Enum_kfrm = {
-    'index' : 'indx',   # keyform designating indexed access
-    'named' : 'name',   # keyform designating named access
-    'id' : 'ID  ',      # keyform designating access by unique identifier
-}
-
-_Enum_savo = {
-    'yes' : 'yes ',     # Save objects now
-    'no' : 'no  ',      # Do not save objects
-    'ask' : 'ask ',     # Ask the user whether to save
-}
-
-_Enum_styl = {
-    'plain' : 'plan',   # Plain
-    'bold' : 'bold',    # Bold
-    'italic' : 'ital',  # Italic
-    'outline' : 'outl', # Outline
-    'shadow' : 'shad',  # Shadow
-    'underline' : 'undl',       # Underline
-    'superscript' : 'spsc',     # Superscript
-    'subscript' : 'sbsc',       # Subscript
-    'strikethrough' : 'strk',   # Strikethrough
-    'small_caps' : 'smcp',      # Small caps
-    'all_caps' : 'alcp',        # All capital letters
-    'all_lowercase' : 'lowc',   # Lowercase
-    'condensed' : 'cond',       # Condensed
-    'expanded' : 'pexp',        # Expanded
-    'hidden' : 'hidn',  # Hidden
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'alis' : alias,
-    'capp' : application,
-    'cins' : insertion_points,
-    'csel' : selection_2d_object,
-    'cwin' : window,
-    'docu' : document,
-    'file' : file,
-}
-
-_propdeclarations = {
-    'hclb' : _Prop_closeable,
-    'imod' : _Prop_modified,
-    'isfl' : _Prop_floating,
-    'iszm' : _Prop_zoomable,
-    'pbnd' : _Prop_bounds,
-    'pcli' : _Prop_clipboard,
-    'pcnt' : _Prop_contents,
-    'pidx' : _Prop_index,
-    'pisf' : _Prop_frontmost,
-    'pmod' : _Prop_modal,
-    'pnam' : _Prop_name,
-    'prsz' : _Prop_resizable,
-    'psxp' : _Prop_POSIX_path,
-    'ptit' : _Prop_titled,
-    'pvis' : _Prop_visible,
-    'pzum' : _Prop_zoomed,
-    'sele' : _Prop_selection,
-    'vers' : _Prop_version,
-}
-
-_compdeclarations = {
-    '<   ' : _3c_,
-    '<=  ' : _b2_,
-    '=   ' : _3d_,
-    '>   ' : _3e_,
-    '>=  ' : _b3_,
-    'bgwt' : starts_with,
-    'cont' : contains,
-    'ends' : ends_with,
-}
-
-_enumdeclarations = {
-    'kfrm' : _Enum_kfrm,
-    'savo' : _Enum_savo,
-    'styl' : _Enum_styl,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Table_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Table_Suite.py
deleted file mode 100644 (file)
index afa01a0..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-"""Suite Table Suite: Classes for manipulating tables
-Level 1, version 1
-
-Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'tbls'
-
-class Table_Suite_Events:
-
-    pass
-
-
-class cell(aetools.ComponentItem):
-    """cell - A cell """
-    want = 'ccel'
-class _Prop_formula(aetools.NProperty):
-    """formula - the formula of the cell """
-    which = 'pfor'
-    want = 'ctxt'
-class _Prop_protection(aetools.NProperty):
-    """protection - Indicates whether value or formula in the cell can be changed """
-    which = 'ppro'
-    want = 'prtn'
-
-cells = cell
-
-class column(aetools.ComponentItem):
-    """column - A column """
-    want = 'ccol'
-class _Prop_name(aetools.NProperty):
-    """name - the name of the column """
-    which = 'pnam'
-    want = 'itxt'
-
-columns = column
-
-class rows(aetools.ComponentItem):
-    """rows -  """
-    want = 'crow'
-
-row = rows
-
-class tables(aetools.ComponentItem):
-    """tables -  """
-    want = 'ctbl'
-
-table = tables
-cell._superclassnames = []
-cell._privpropdict = {
-    'formula' : _Prop_formula,
-    'protection' : _Prop_protection,
-}
-cell._privelemdict = {
-}
-column._superclassnames = []
-column._privpropdict = {
-    'name' : _Prop_name,
-}
-column._privelemdict = {
-}
-rows._superclassnames = []
-rows._privpropdict = {
-}
-rows._privelemdict = {
-}
-tables._superclassnames = []
-tables._privpropdict = {
-}
-tables._privelemdict = {
-}
-_Enum_prtn = {
-    'read_only' : 'nmod',       # Can\xd5t change values or formulas
-    'formulas_protected' : 'fpro',      # Can changes values but not formulas
-    'read_2f_write' : 'modf',   # Can change values and formulas
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'ccel' : cell,
-    'ccol' : column,
-    'crow' : rows,
-    'ctbl' : tables,
-}
-
-_propdeclarations = {
-    'pfor' : _Prop_formula,
-    'pnam' : _Prop_name,
-    'ppro' : _Prop_protection,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'prtn' : _Enum_prtn,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Text_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Text_Suite.py
deleted file mode 100644 (file)
index 1845f4d..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-"""Suite Text Suite: A set of basic classes for text processing
-Level 1, version 1
-
-Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'TEXT'
-
-class Text_Suite_Events:
-
-    pass
-
-
-class text_flow(aetools.ComponentItem):
-    """text flow - A contiguous block of text.  Page layout applications call this a \xd4story.\xd5 """
-    want = 'cflo'
-class _Prop__3c_inheritance_3e_(aetools.NProperty):
-    """<inheritance> - inherits some of its properties from this class """
-    which = 'c@#^'
-    want = 'ctxt'
-class _Prop_name(aetools.NProperty):
-    """name - the name """
-    which = 'pnam'
-    want = 'itxt'
-
-text_flows = text_flow
-
-class character(aetools.ComponentItem):
-    """character - A character """
-    want = 'cha '
-
-class line(aetools.ComponentItem):
-    """line - A line of text """
-    want = 'clin'
-class _Prop_justification(aetools.NProperty):
-    """justification - the justification of the text """
-    which = 'pjst'
-    want = 'just'
-
-lines = line
-
-class paragraph(aetools.ComponentItem):
-    """paragraph - A paragraph """
-    want = 'cpar'
-
-paragraphs = paragraph
-
-class text(aetools.ComponentItem):
-    """text - Text """
-    want = 'ctxt'
-class _Prop_color(aetools.NProperty):
-    """color - the color of the first character """
-    which = 'colr'
-    want = 'cRGB'
-class _Prop_font(aetools.NProperty):
-    """font - the name of the font of the first character """
-    which = 'font'
-    want = 'ctxt'
-class _Prop_quoted_form(aetools.NProperty):
-    """quoted form - the text in quoted form """
-    which = 'strq'
-    want = 'ctxt'
-class _Prop_size(aetools.NProperty):
-    """size - the size in points of the first character """
-    which = 'ptsz'
-    want = 'fixd'
-class _Prop_style(aetools.NProperty):
-    """style - the text style of the first character of the first character """
-    which = 'txst'
-    want = 'tsty'
-class _Prop_uniform_styles(aetools.NProperty):
-    """uniform styles - the text styles that are uniform throughout the text """
-    which = 'ustl'
-    want = 'tsty'
-class _Prop_writing_code(aetools.NProperty):
-    """writing code - the script system and language """
-    which = 'psct'
-    want = 'intl'
-#        element 'cha ' as ['indx']
-#        element 'clin' as ['indx']
-#        element 'cpar' as ['indx']
-#        element 'ctxt' as ['indx']
-#        element 'cwor' as ['indx']
-
-class word(aetools.ComponentItem):
-    """word - A word """
-    want = 'cwor'
-
-words = word
-
-class text_style_info(aetools.ComponentItem):
-    """text style info - On and Off styles of text run """
-    want = 'tsty'
-class _Prop_off_styles(aetools.NProperty):
-    """off styles - the styles that are off for the text """
-    which = 'ofst'
-    want = 'styl'
-class _Prop_on_styles(aetools.NProperty):
-    """on styles - the styles that are on for the text """
-    which = 'onst'
-    want = 'styl'
-
-text_style_infos = text_style_info
-text_flow._superclassnames = ['text']
-text_flow._privpropdict = {
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-    'name' : _Prop_name,
-}
-text_flow._privelemdict = {
-}
-character._superclassnames = ['text']
-character._privpropdict = {
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-character._privelemdict = {
-}
-line._superclassnames = ['text']
-line._privpropdict = {
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-    'justification' : _Prop_justification,
-}
-line._privelemdict = {
-}
-paragraph._superclassnames = ['text']
-paragraph._privpropdict = {
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-paragraph._privelemdict = {
-}
-text._superclassnames = []
-text._privpropdict = {
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'quoted_form' : _Prop_quoted_form,
-    'size' : _Prop_size,
-    'style' : _Prop_style,
-    'uniform_styles' : _Prop_uniform_styles,
-    'writing_code' : _Prop_writing_code,
-}
-text._privelemdict = {
-    'character' : character,
-    'line' : line,
-    'paragraph' : paragraph,
-    'text' : text,
-    'word' : word,
-}
-word._superclassnames = ['text']
-word._privpropdict = {
-    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
-}
-word._privelemdict = {
-}
-text_style_info._superclassnames = []
-text_style_info._privpropdict = {
-    'off_styles' : _Prop_off_styles,
-    'on_styles' : _Prop_on_styles,
-}
-text_style_info._privelemdict = {
-}
-_Enum_just = {
-    'left' : 'left',    # Align with left margin
-    'right' : 'rght',   # Align with right margin
-    'center' : 'cent',  # Align with center
-    'full' : 'full',    # Align with both left and right margins
-}
-
-_Enum_styl = {
-    'plain' : 'plan',   # Plain
-    'bold' : 'bold',    # Bold
-    'italic' : 'ital',  # Italic
-    'outline' : 'outl', # Outline
-    'shadow' : 'shad',  # Shadow
-    'underline' : 'undl',       # Underline
-    'superscript' : 'spsc',     # Superscript
-    'subscript' : 'sbsc',       # Subscript
-    'strikethrough' : 'strk',   # Strikethrough
-    'small_caps' : 'smcp',      # Small caps
-    'all_caps' : 'alcp',        # All capital letters
-    'all_lowercase' : 'lowc',   # Lowercase
-    'condensed' : 'cond',       # Condensed
-    'expanded' : 'pexp',        # Expanded
-    'hidden' : 'hidn',  # Hidden
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'cflo' : text_flow,
-    'cha ' : character,
-    'clin' : line,
-    'cpar' : paragraph,
-    'ctxt' : text,
-    'cwor' : word,
-    'tsty' : text_style_info,
-}
-
-_propdeclarations = {
-    'c@#^' : _Prop__3c_inheritance_3e_,
-    'colr' : _Prop_color,
-    'font' : _Prop_font,
-    'ofst' : _Prop_off_styles,
-    'onst' : _Prop_on_styles,
-    'pjst' : _Prop_justification,
-    'pnam' : _Prop_name,
-    'psct' : _Prop_writing_code,
-    'ptsz' : _Prop_size,
-    'strq' : _Prop_quoted_form,
-    'txst' : _Prop_style,
-    'ustl' : _Prop_uniform_styles,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'just' : _Enum_just,
-    'styl' : _Enum_styl,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Type_Names_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Type_Names_Suite.py
deleted file mode 100644 (file)
index cd9fa19..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-"""Suite Type Names Suite: Terminology for Registry data types
-Level 1, version 1
-
-Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'tpnm'
-
-class Type_Names_Suite_Events:
-
-    pass
-
-
-class PostScript_picture(aetools.ComponentItem):
-    """PostScript picture -  """
-    want = 'EPS '
-
-class point(aetools.ComponentItem):
-    """point - point coordinates """
-    want = 'QDpt'
-
-class string(aetools.ComponentItem):
-    """string - a string of characters """
-    want = 'TEXT'
-
-plain_text = string
-
-plain_text = string
-
-class TIFF_picture(aetools.ComponentItem):
-    """TIFF picture -  """
-    want = 'TIFF'
-
-class application_dictionary(aetools.ComponentItem):
-    """application dictionary -  """
-    want = 'aete'
-
-class system_dictionary(aetools.ComponentItem):
-    """system dictionary -  """
-    want = 'aeut'
-
-class color_table(aetools.ComponentItem):
-    """color table -  """
-    want = 'clrt'
-
-class menu_item(aetools.ComponentItem):
-    """menu item -  """
-    want = 'cmen'
-
-class menu(aetools.ComponentItem):
-    """menu -  """
-    want = 'cmnu'
-
-class double_integer(aetools.ComponentItem):
-    """double integer -  """
-    want = 'comp'
-
-class type_element_info(aetools.ComponentItem):
-    """type element info -  """
-    want = 'elin'
-
-class type_event_info(aetools.ComponentItem):
-    """type event info - information about an event """
-    want = 'evin'
-
-class extended_real(aetools.ComponentItem):
-    """extended real -  """
-    want = 'exte'
-
-class fixed(aetools.ComponentItem):
-    """fixed - a real number """
-    want = 'fixd'
-
-class fixed_point(aetools.ComponentItem):
-    """fixed point -  """
-    want = 'fpnt'
-
-class fixed_rectangle(aetools.ComponentItem):
-    """fixed rectangle -  """
-    want = 'frct'
-
-class type_class_info(aetools.ComponentItem):
-    """type class info - information about properties and elements of a class """
-    want = 'gcli'
-
-class location_reference(aetools.ComponentItem):
-    """location reference -  """
-    want = 'insl'
-
-class long_fixed_point(aetools.ComponentItem):
-    """long fixed point -  """
-    want = 'lfpt'
-
-class long_fixed_rectangle(aetools.ComponentItem):
-    """long fixed rectangle -  """
-    want = 'lfrc'
-
-class long_fixed(aetools.ComponentItem):
-    """long fixed -  """
-    want = 'lfxd'
-
-class long_point(aetools.ComponentItem):
-    """long point -  """
-    want = 'lpnt'
-
-class long_rectangle(aetools.ComponentItem):
-    """long rectangle -  """
-    want = 'lrct'
-
-class machine_location(aetools.ComponentItem):
-    """machine location -  """
-    want = 'mLoc'
-
-class unsigned_integer(aetools.ComponentItem):
-    """unsigned integer -  """
-    want = 'magn'
-
-class null(aetools.ComponentItem):
-    """null -  """
-    want = 'null'
-
-class type_property_info(aetools.ComponentItem):
-    """type property info -  """
-    want = 'pinf'
-
-class type_parameter_info(aetools.ComponentItem):
-    """type parameter info -  """
-    want = 'pmin'
-
-class bounding_rectangle(aetools.ComponentItem):
-    """bounding rectangle - bounding rectangle """
-    want = 'qdrt'
-
-class small_integer(aetools.ComponentItem):
-    """small integer -  """
-    want = 'shor'
-
-class small_real(aetools.ComponentItem):
-    """small real -  """
-    want = 'sing'
-
-class scrap_styles(aetools.ComponentItem):
-    """scrap styles -  """
-    want = 'styl'
-
-class type_suite_info(aetools.ComponentItem):
-    """type suite info -  """
-    want = 'suin'
-
-class target_id(aetools.ComponentItem):
-    """target id -  """
-    want = 'targ'
-
-class dash_style(aetools.ComponentItem):
-    """dash style -  """
-    want = 'tdas'
-
-class pixel_map_record(aetools.ComponentItem):
-    """pixel map record -  """
-    want = 'tpmm'
-
-class RGB16_color(aetools.ComponentItem):
-    """RGB16 color -  """
-    want = 'tr16'
-
-class RGB96_color(aetools.ComponentItem):
-    """RGB96 color -  """
-    want = 'tr96'
-
-class rotation(aetools.ComponentItem):
-    """rotation -  """
-    want = 'trot'
-
-class version(aetools.ComponentItem):
-    """version -  """
-    want = 'vers'
-PostScript_picture._superclassnames = []
-PostScript_picture._privpropdict = {
-}
-PostScript_picture._privelemdict = {
-}
-point._superclassnames = []
-point._privpropdict = {
-}
-point._privelemdict = {
-}
-string._superclassnames = []
-string._privpropdict = {
-}
-string._privelemdict = {
-}
-TIFF_picture._superclassnames = []
-TIFF_picture._privpropdict = {
-}
-TIFF_picture._privelemdict = {
-}
-application_dictionary._superclassnames = []
-application_dictionary._privpropdict = {
-}
-application_dictionary._privelemdict = {
-}
-system_dictionary._superclassnames = []
-system_dictionary._privpropdict = {
-}
-system_dictionary._privelemdict = {
-}
-color_table._superclassnames = []
-color_table._privpropdict = {
-}
-color_table._privelemdict = {
-}
-menu_item._superclassnames = []
-menu_item._privpropdict = {
-}
-menu_item._privelemdict = {
-}
-menu._superclassnames = []
-menu._privpropdict = {
-}
-menu._privelemdict = {
-}
-double_integer._superclassnames = []
-double_integer._privpropdict = {
-}
-double_integer._privelemdict = {
-}
-type_element_info._superclassnames = []
-type_element_info._privpropdict = {
-}
-type_element_info._privelemdict = {
-}
-type_event_info._superclassnames = []
-type_event_info._privpropdict = {
-}
-type_event_info._privelemdict = {
-}
-extended_real._superclassnames = []
-extended_real._privpropdict = {
-}
-extended_real._privelemdict = {
-}
-fixed._superclassnames = []
-fixed._privpropdict = {
-}
-fixed._privelemdict = {
-}
-fixed_point._superclassnames = []
-fixed_point._privpropdict = {
-}
-fixed_point._privelemdict = {
-}
-fixed_rectangle._superclassnames = []
-fixed_rectangle._privpropdict = {
-}
-fixed_rectangle._privelemdict = {
-}
-type_class_info._superclassnames = []
-type_class_info._privpropdict = {
-}
-type_class_info._privelemdict = {
-}
-location_reference._superclassnames = []
-location_reference._privpropdict = {
-}
-location_reference._privelemdict = {
-}
-long_fixed_point._superclassnames = []
-long_fixed_point._privpropdict = {
-}
-long_fixed_point._privelemdict = {
-}
-long_fixed_rectangle._superclassnames = []
-long_fixed_rectangle._privpropdict = {
-}
-long_fixed_rectangle._privelemdict = {
-}
-long_fixed._superclassnames = []
-long_fixed._privpropdict = {
-}
-long_fixed._privelemdict = {
-}
-long_point._superclassnames = []
-long_point._privpropdict = {
-}
-long_point._privelemdict = {
-}
-long_rectangle._superclassnames = []
-long_rectangle._privpropdict = {
-}
-long_rectangle._privelemdict = {
-}
-machine_location._superclassnames = []
-machine_location._privpropdict = {
-}
-machine_location._privelemdict = {
-}
-unsigned_integer._superclassnames = []
-unsigned_integer._privpropdict = {
-}
-unsigned_integer._privelemdict = {
-}
-null._superclassnames = []
-null._privpropdict = {
-}
-null._privelemdict = {
-}
-type_property_info._superclassnames = []
-type_property_info._privpropdict = {
-}
-type_property_info._privelemdict = {
-}
-type_parameter_info._superclassnames = []
-type_parameter_info._privpropdict = {
-}
-type_parameter_info._privelemdict = {
-}
-bounding_rectangle._superclassnames = []
-bounding_rectangle._privpropdict = {
-}
-bounding_rectangle._privelemdict = {
-}
-small_integer._superclassnames = []
-small_integer._privpropdict = {
-}
-small_integer._privelemdict = {
-}
-small_real._superclassnames = []
-small_real._privpropdict = {
-}
-small_real._privelemdict = {
-}
-scrap_styles._superclassnames = []
-scrap_styles._privpropdict = {
-}
-scrap_styles._privelemdict = {
-}
-type_suite_info._superclassnames = []
-type_suite_info._privpropdict = {
-}
-type_suite_info._privelemdict = {
-}
-target_id._superclassnames = []
-target_id._privpropdict = {
-}
-target_id._privelemdict = {
-}
-dash_style._superclassnames = []
-dash_style._privpropdict = {
-}
-dash_style._privelemdict = {
-}
-pixel_map_record._superclassnames = []
-pixel_map_record._privpropdict = {
-}
-pixel_map_record._privelemdict = {
-}
-RGB16_color._superclassnames = []
-RGB16_color._privpropdict = {
-}
-RGB16_color._privelemdict = {
-}
-RGB96_color._superclassnames = []
-RGB96_color._privpropdict = {
-}
-RGB96_color._privelemdict = {
-}
-rotation._superclassnames = []
-rotation._privpropdict = {
-}
-rotation._privelemdict = {
-}
-version._superclassnames = []
-version._privpropdict = {
-}
-version._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'EPS ' : PostScript_picture,
-    'QDpt' : point,
-    'TEXT' : string,
-    'TIFF' : TIFF_picture,
-    'aete' : application_dictionary,
-    'aeut' : system_dictionary,
-    'clrt' : color_table,
-    'cmen' : menu_item,
-    'cmnu' : menu,
-    'comp' : double_integer,
-    'elin' : type_element_info,
-    'evin' : type_event_info,
-    'exte' : extended_real,
-    'fixd' : fixed,
-    'fpnt' : fixed_point,
-    'frct' : fixed_rectangle,
-    'gcli' : type_class_info,
-    'insl' : location_reference,
-    'lfpt' : long_fixed_point,
-    'lfrc' : long_fixed_rectangle,
-    'lfxd' : long_fixed,
-    'lpnt' : long_point,
-    'lrct' : long_rectangle,
-    'mLoc' : machine_location,
-    'magn' : unsigned_integer,
-    'null' : null,
-    'pinf' : type_property_info,
-    'pmin' : type_parameter_info,
-    'qdrt' : bounding_rectangle,
-    'shor' : small_integer,
-    'sing' : small_real,
-    'styl' : scrap_styles,
-    'suin' : type_suite_info,
-    'targ' : target_id,
-    'tdas' : dash_style,
-    'tpmm' : pixel_map_record,
-    'tr16' : RGB16_color,
-    'tr96' : RGB96_color,
-    'trot' : rotation,
-    'vers' : version,
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py
deleted file mode 100644 (file)
index b07f160..0000000
+++ /dev/null
@@ -1,471 +0,0 @@
-"""
-Package generated from /Volumes/Sap/System Folder/Extensions/AppleScript
-Resource aeut resid 0 Standard Event Suites for English
-"""
-import aetools
-Error = aetools.Error
-from . import Text_Suite
-from . import AppleScript_Suite
-from . import Standard_Suite
-from . import Macintosh_Connectivity_Clas
-from . import QuickDraw_Graphics_Suite
-from . import QuickDraw_Graphics_Suppleme
-from . import Required_Suite
-from . import Table_Suite
-from . import Type_Names_Suite
-
-
-_code_to_module = {
-    'TEXT' : Text_Suite,
-    'ascr' : AppleScript_Suite,
-    'core' : Standard_Suite,
-    'macc' : Macintosh_Connectivity_Clas,
-    'qdrw' : QuickDraw_Graphics_Suite,
-    'qdsp' : QuickDraw_Graphics_Suppleme,
-    'reqd' : Required_Suite,
-    'tbls' : Table_Suite,
-    'tpnm' : Type_Names_Suite,
-}
-
-
-
-_code_to_fullname = {
-    'TEXT' : ('StdSuites.Text_Suite', 'Text_Suite'),
-    'ascr' : ('StdSuites.AppleScript_Suite', 'AppleScript_Suite'),
-    'core' : ('StdSuites.Standard_Suite', 'Standard_Suite'),
-    'macc' : ('StdSuites.Macintosh_Connectivity_Clas', 'Macintosh_Connectivity_Clas'),
-    'qdrw' : ('StdSuites.QuickDraw_Graphics_Suite', 'QuickDraw_Graphics_Suite'),
-    'qdsp' : ('StdSuites.QuickDraw_Graphics_Suppleme', 'QuickDraw_Graphics_Suppleme'),
-    'reqd' : ('StdSuites.Required_Suite', 'Required_Suite'),
-    'tbls' : ('StdSuites.Table_Suite', 'Table_Suite'),
-    'tpnm' : ('StdSuites.Type_Names_Suite', 'Type_Names_Suite'),
-}
-
-from StdSuites.Text_Suite import *
-from StdSuites.AppleScript_Suite import *
-from StdSuites.Standard_Suite import *
-from StdSuites.Macintosh_Connectivity_Clas import *
-from StdSuites.QuickDraw_Graphics_Suite import *
-from StdSuites.QuickDraw_Graphics_Suppleme import *
-from StdSuites.Required_Suite import *
-from StdSuites.Table_Suite import *
-from StdSuites.Type_Names_Suite import *
-
-def getbaseclasses(v):
-    if not getattr(v, '_propdict', None):
-        v._propdict = {}
-        v._elemdict = {}
-        for superclassname in getattr(v, '_superclassnames', []):
-            superclass = eval(superclassname)
-            getbaseclasses(superclass)
-            v._propdict.update(getattr(superclass, '_propdict', {}))
-            v._elemdict.update(getattr(superclass, '_elemdict', {}))
-        v._propdict.update(getattr(v, '_privpropdict', {}))
-        v._elemdict.update(getattr(v, '_privelemdict', {}))
-
-import StdSuites
-
-#
-# Set property and element dictionaries now that all classes have been defined
-#
-getbaseclasses(graphic_group)
-getbaseclasses(oval)
-getbaseclasses(graphic_text)
-getbaseclasses(graphic_shape)
-getbaseclasses(drawing_area)
-getbaseclasses(graphic_line)
-getbaseclasses(polygon)
-getbaseclasses(pixel)
-getbaseclasses(rounded_rectangle)
-getbaseclasses(graphic_object)
-getbaseclasses(arc)
-getbaseclasses(pixel_map)
-getbaseclasses(rectangle)
-getbaseclasses(selection_2d_object)
-getbaseclasses(application)
-getbaseclasses(document)
-getbaseclasses(window)
-getbaseclasses(file)
-getbaseclasses(alias)
-getbaseclasses(insertion_point)
-getbaseclasses(character)
-getbaseclasses(paragraph)
-getbaseclasses(word)
-getbaseclasses(text_flow)
-getbaseclasses(text_style_info)
-getbaseclasses(line)
-getbaseclasses(text)
-getbaseclasses(AppleTalk_address)
-getbaseclasses(address_specification)
-getbaseclasses(Token_Ring_address)
-getbaseclasses(FireWire_address)
-getbaseclasses(bus_slot)
-getbaseclasses(SCSI_address)
-getbaseclasses(ADB_address)
-getbaseclasses(USB_address)
-getbaseclasses(device_specification)
-getbaseclasses(LocalTalk_address)
-getbaseclasses(IP_address)
-getbaseclasses(Ethernet_address)
-getbaseclasses(graphic_group)
-getbaseclasses(drawing_area)
-getbaseclasses(cell)
-getbaseclasses(column)
-getbaseclasses(table)
-getbaseclasses(row)
-getbaseclasses(small_integer)
-getbaseclasses(system_dictionary)
-getbaseclasses(color_table)
-getbaseclasses(fixed_point)
-getbaseclasses(plain_text)
-getbaseclasses(type_element_info)
-getbaseclasses(machine_location)
-getbaseclasses(PostScript_picture)
-getbaseclasses(type_suite_info)
-getbaseclasses(menu_item)
-getbaseclasses(pixel_map_record)
-getbaseclasses(small_real)
-getbaseclasses(null)
-getbaseclasses(rotation)
-getbaseclasses(fixed)
-getbaseclasses(long_point)
-getbaseclasses(target_id)
-getbaseclasses(type_property_info)
-getbaseclasses(type_parameter_info)
-getbaseclasses(long_fixed_point)
-getbaseclasses(bounding_rectangle)
-getbaseclasses(TIFF_picture)
-getbaseclasses(long_fixed)
-getbaseclasses(location_reference)
-getbaseclasses(version)
-getbaseclasses(RGB16_color)
-getbaseclasses(double_integer)
-getbaseclasses(type_event_info)
-getbaseclasses(point)
-getbaseclasses(application_dictionary)
-getbaseclasses(unsigned_integer)
-getbaseclasses(menu)
-getbaseclasses(fixed_rectangle)
-getbaseclasses(long_fixed_rectangle)
-getbaseclasses(type_class_info)
-getbaseclasses(RGB96_color)
-getbaseclasses(dash_style)
-getbaseclasses(scrap_styles)
-getbaseclasses(extended_real)
-getbaseclasses(long_rectangle)
-getbaseclasses(May)
-getbaseclasses(string)
-getbaseclasses(miles)
-getbaseclasses(number_or_date)
-getbaseclasses(October)
-getbaseclasses(event)
-getbaseclasses(Pascal_string)
-getbaseclasses(zone)
-getbaseclasses(picture)
-getbaseclasses(list_or_string)
-getbaseclasses(number)
-getbaseclasses(Tuesday)
-getbaseclasses(version)
-getbaseclasses(December)
-getbaseclasses(square_kilometres)
-getbaseclasses(reference)
-getbaseclasses(vector)
-getbaseclasses(weekday)
-getbaseclasses(Sunday)
-getbaseclasses(international_text)
-getbaseclasses(seconds)
-getbaseclasses(RGB_color)
-getbaseclasses(kilometres)
-getbaseclasses(styled_Unicode_text)
-getbaseclasses(missing_value)
-getbaseclasses(metres)
-getbaseclasses(number_or_string)
-getbaseclasses(list)
-getbaseclasses(linked_list)
-getbaseclasses(real)
-getbaseclasses(encoded_string)
-getbaseclasses(list_or_record)
-getbaseclasses(Monday)
-getbaseclasses(September)
-getbaseclasses(anything)
-getbaseclasses(property)
-getbaseclasses(reference_form)
-getbaseclasses(item)
-getbaseclasses(grams)
-getbaseclasses(record)
-getbaseclasses(empty_ae_name_)
-getbaseclasses(constant)
-getbaseclasses(square_miles)
-getbaseclasses(data)
-getbaseclasses(Unicode_text)
-getbaseclasses(yards)
-getbaseclasses(cubic_yards)
-getbaseclasses(pounds)
-getbaseclasses(cubic_centimetres)
-getbaseclasses(text)
-getbaseclasses(July)
-getbaseclasses(cubic_metres)
-getbaseclasses(styled_text)
-getbaseclasses(number_2c__date_or_text)
-getbaseclasses(feet)
-getbaseclasses(February)
-getbaseclasses(degrees_Celsius)
-getbaseclasses(keystroke)
-getbaseclasses(integer)
-getbaseclasses(degrees_Fahrenheit)
-getbaseclasses(list_2c__record_or_text)
-getbaseclasses(date)
-getbaseclasses(degrees_Kelvin)
-getbaseclasses(centimetres)
-getbaseclasses(writing_code)
-getbaseclasses(alias_or_string)
-getbaseclasses(writing_code_info)
-getbaseclasses(text_item)
-getbaseclasses(machine)
-getbaseclasses(type_class)
-getbaseclasses(preposition)
-getbaseclasses(Wednesday)
-getbaseclasses(upper_case)
-getbaseclasses(March)
-getbaseclasses(square_feet)
-getbaseclasses(November)
-getbaseclasses(quarts)
-getbaseclasses(alias)
-getbaseclasses(January)
-getbaseclasses(month)
-getbaseclasses(June)
-getbaseclasses(August)
-getbaseclasses(styled_Clipboard_text)
-getbaseclasses(gallons)
-getbaseclasses(cubic_inches)
-getbaseclasses(Friday)
-getbaseclasses(sound)
-getbaseclasses(class_)
-getbaseclasses(kilograms)
-getbaseclasses(script)
-getbaseclasses(litres)
-getbaseclasses(boolean)
-getbaseclasses(square_metres)
-getbaseclasses(inches)
-getbaseclasses(character)
-getbaseclasses(April)
-getbaseclasses(ounces)
-getbaseclasses(app)
-getbaseclasses(handler)
-getbaseclasses(C_string)
-getbaseclasses(Thursday)
-getbaseclasses(square_yards)
-getbaseclasses(cubic_feet)
-getbaseclasses(Saturday)
-getbaseclasses(file_specification)
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'cpic' : graphic_group,
-    'covl' : oval,
-    'cgtx' : graphic_text,
-    'cgsh' : graphic_shape,
-    'cdrw' : drawing_area,
-    'glin' : graphic_line,
-    'cpgn' : polygon,
-    'cpxl' : pixel,
-    'crrc' : rounded_rectangle,
-    'cgob' : graphic_object,
-    'carc' : arc,
-    'cpix' : pixel_map,
-    'crec' : rectangle,
-    'csel' : selection_2d_object,
-    'capp' : application,
-    'docu' : document,
-    'cwin' : window,
-    'file' : file,
-    'alis' : alias,
-    'cins' : insertion_point,
-    'cha ' : character,
-    'cpar' : paragraph,
-    'cwor' : word,
-    'cflo' : text_flow,
-    'tsty' : text_style_info,
-    'clin' : line,
-    'ctxt' : text,
-    'cat ' : AppleTalk_address,
-    'cadr' : address_specification,
-    'ctok' : Token_Ring_address,
-    'cfw ' : FireWire_address,
-    'cbus' : bus_slot,
-    'cscs' : SCSI_address,
-    'cadb' : ADB_address,
-    'cusb' : USB_address,
-    'cdev' : device_specification,
-    'clt ' : LocalTalk_address,
-    'cip ' : IP_address,
-    'cen ' : Ethernet_address,
-    'cpic' : graphic_group,
-    'cdrw' : drawing_area,
-    'ccel' : cell,
-    'ccol' : column,
-    'ctbl' : table,
-    'crow' : row,
-    'shor' : small_integer,
-    'aeut' : system_dictionary,
-    'clrt' : color_table,
-    'fpnt' : fixed_point,
-    'TEXT' : plain_text,
-    'elin' : type_element_info,
-    'mLoc' : machine_location,
-    'EPS ' : PostScript_picture,
-    'suin' : type_suite_info,
-    'cmen' : menu_item,
-    'tpmm' : pixel_map_record,
-    'sing' : small_real,
-    'null' : null,
-    'trot' : rotation,
-    'fixd' : fixed,
-    'lpnt' : long_point,
-    'targ' : target_id,
-    'pinf' : type_property_info,
-    'pmin' : type_parameter_info,
-    'lfpt' : long_fixed_point,
-    'qdrt' : bounding_rectangle,
-    'TIFF' : TIFF_picture,
-    'lfxd' : long_fixed,
-    'insl' : location_reference,
-    'vers' : version,
-    'tr16' : RGB16_color,
-    'comp' : double_integer,
-    'evin' : type_event_info,
-    'QDpt' : point,
-    'aete' : application_dictionary,
-    'magn' : unsigned_integer,
-    'cmnu' : menu,
-    'frct' : fixed_rectangle,
-    'lfrc' : long_fixed_rectangle,
-    'gcli' : type_class_info,
-    'tr96' : RGB96_color,
-    'tdas' : dash_style,
-    'styl' : scrap_styles,
-    'exte' : extended_real,
-    'lrct' : long_rectangle,
-    'may ' : May,
-    'TEXT' : string,
-    'mile' : miles,
-    'nd  ' : number_or_date,
-    'oct ' : October,
-    'evnt' : event,
-    'pstr' : Pascal_string,
-    'zone' : zone,
-    'PICT' : picture,
-    'ls  ' : list_or_string,
-    'nmbr' : number,
-    'tue ' : Tuesday,
-    'vers' : version,
-    'dec ' : December,
-    'sqkm' : square_kilometres,
-    'obj ' : reference,
-    'vect' : vector,
-    'wkdy' : weekday,
-    'sun ' : Sunday,
-    'itxt' : international_text,
-    'scnd' : seconds,
-    'cRGB' : RGB_color,
-    'kmtr' : kilometres,
-    'sutx' : styled_Unicode_text,
-    'msng' : missing_value,
-    'metr' : metres,
-    'ns  ' : number_or_string,
-    'list' : list,
-    'llst' : linked_list,
-    'doub' : real,
-    'encs' : encoded_string,
-    'lr  ' : list_or_record,
-    'mon ' : Monday,
-    'sep ' : September,
-    '****' : anything,
-    'prop' : property,
-    'kfrm' : reference_form,
-    'cobj' : item,
-    'gram' : grams,
-    'reco' : record,
-    'undf' : empty_ae_name_,
-    'enum' : constant,
-    'sqmi' : square_miles,
-    'rdat' : data,
-    'utxt' : Unicode_text,
-    'yard' : yards,
-    'cyrd' : cubic_yards,
-    'lbs ' : pounds,
-    'ccmt' : cubic_centimetres,
-    'ctxt' : text,
-    'jul ' : July,
-    'cmet' : cubic_metres,
-    'STXT' : styled_text,
-    'nds ' : number_2c__date_or_text,
-    'feet' : feet,
-    'feb ' : February,
-    'degc' : degrees_Celsius,
-    'kprs' : keystroke,
-    'long' : integer,
-    'degf' : degrees_Fahrenheit,
-    'lrs ' : list_2c__record_or_text,
-    'ldt ' : date,
-    'degk' : degrees_Kelvin,
-    'cmtr' : centimetres,
-    'psct' : writing_code,
-    'sf  ' : alias_or_string,
-    'citl' : writing_code_info,
-    'citm' : text_item,
-    'mach' : machine,
-    'type' : type_class,
-    'prep' : preposition,
-    'wed ' : Wednesday,
-    'case' : upper_case,
-    'mar ' : March,
-    'sqft' : square_feet,
-    'nov ' : November,
-    'qrts' : quarts,
-    'alis' : alias,
-    'jan ' : January,
-    'mnth' : month,
-    'jun ' : June,
-    'aug ' : August,
-    'styl' : styled_Clipboard_text,
-    'galn' : gallons,
-    'cuin' : cubic_inches,
-    'fri ' : Friday,
-    'snd ' : sound,
-    'pcls' : class_,
-    'kgrm' : kilograms,
-    'scpt' : script,
-    'litr' : litres,
-    'bool' : boolean,
-    'sqrm' : square_metres,
-    'inch' : inches,
-    'cha ' : character,
-    'apr ' : April,
-    'ozs ' : ounces,
-    'capp' : app,
-    'hand' : handler,
-    'cstr' : C_string,
-    'thu ' : Thursday,
-    'sqyd' : square_yards,
-    'cfet' : cubic_feet,
-    'sat ' : Saturday,
-    'fss ' : file_specification,
-}
-
-
-class StdSuites(Text_Suite_Events,
-        AppleScript_Suite_Events,
-        Standard_Suite_Events,
-        Macintosh_Connectivity_Clas_Events,
-        QuickDraw_Graphics_Suite_Events,
-        QuickDraw_Graphics_Suppleme_Events,
-        Required_Suite_Events,
-        Table_Suite_Events,
-        Type_Names_Suite_Events,
-        aetools.TalkTo):
-    _signature = 'ascr'
-
-    _moduleName = 'StdSuites'
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py
deleted file mode 100644 (file)
index d1fe899..0000000
+++ /dev/null
@@ -1,386 +0,0 @@
-"""Suite Disk-Folder-File Suite: Terms and Events for controlling Disks, Folders, and Files
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/System Events.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-# Crutch for recursive import
-import sys
-import SystemEvents
-SystemEvents.Disk_Folder_File_Suite = sys.modules[__name__]
-
-import aetools
-import MacOS
-
-_code = 'cdis'
-
-class Disk_Folder_File_Suite_Events:
-
-    _argmap_move = {
-        'to' : 'insh',
-    }
-
-    def move(self, _object, _attributes={}, **_arguments):
-        """move: Move disk item(s) to a new location.
-        Required argument: the object for the command
-        Keyword argument to: The new location for the disk item(s).
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'move'
-
-        aetools.keysubst(_arguments, self._argmap_move)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-
-class application(aetools.ComponentItem):
-    """application - The Disk-Folder-File Suite host program """
-    want = 'capp'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'capp'
-_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
-class _Prop_folder_actions_enabled(aetools.NProperty):
-    """folder actions enabled - Are Folder Actions currently being processed? """
-    which = 'faen'
-    want = 'bool'
-folder_actions_enabled = _Prop_folder_actions_enabled()
-class _Prop_properties(aetools.NProperty):
-    """properties - every property of the Disk-Folder-File Suite host program """
-    which = 'pALL'
-    want = '****'
-properties = _Prop_properties()
-#        element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID  ']
-#        element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'foac' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'logi' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcap' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcda' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'prcs' as ['name', 'indx', 'rele', 'rang', 'test']
-
-applications = application
-
-class disk(aetools.ComponentItem):
-    """disk - A disk in the file system """
-    want = 'cdis'
-class _Prop_POSIX_path(aetools.NProperty):
-    """POSIX path - the POSIX file system path of the disk """
-    which = 'posx'
-    want = 'utxt'
-class _Prop_capacity(aetools.NProperty):
-    """capacity - the total number of bytes (free or used) on the disk """
-    which = 'capa'
-    want = 'magn'
-class _Prop_ejectable(aetools.NProperty):
-    """ejectable - Can the media be ejected (floppies, CD's, and so on)? """
-    which = 'isej'
-    want = 'bool'
-class _Prop_format(aetools.NProperty):
-    """format - the file system format of this disk """
-    which = 'dfmt'
-    want = 'edfm'
-class _Prop_free_space(aetools.NProperty):
-    """free space - the number of free bytes left on the disk """
-    which = 'frsp'
-    want = 'magn'
-class _Prop_ignore_privileges(aetools.NProperty):
-    """ignore privileges - Ignore permissions on this disk? """
-    which = 'igpr'
-    want = 'bool'
-class _Prop_local_volume(aetools.NProperty):
-    """local volume - Is the media a local volume (as opposed to a file server? """
-    which = 'isrv'
-    want = 'bool'
-class _Prop_name(aetools.NProperty):
-    """name - the name of the disk """
-    which = 'pnam'
-    want = 'utxt'
-class _Prop_path(aetools.NProperty):
-    """path - the file system path of the disk """
-    which = 'ppth'
-    want = 'utxt'
-class _Prop_startup(aetools.NProperty):
-    """startup - Is this disk the boot disk? """
-    which = 'istd'
-    want = 'bool'
-class _Prop_volume(aetools.NProperty):
-    """volume - the volume on which the folder resides """
-    which = 'volu'
-    want = 'utxt'
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-
-disks = disk
-
-class folder(aetools.ComponentItem):
-    """folder - A folder in the file system """
-    want = 'cfol'
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-
-folders = folder
-
-class item(aetools.ComponentItem):
-    """item - An item in the file system """
-    want = 'cobj'
-class _Prop_busy_status(aetools.NProperty):
-    """busy status - Is the item busy? """
-    which = 'busy'
-    want = 'bool'
-class _Prop_creation_date(aetools.NProperty):
-    """creation date - the date on which the item was created """
-    which = 'ascd'
-    want = '****'
-class _Prop_modification_date(aetools.NProperty):
-    """modification date - the date on which the item was last modified """
-    which = 'asmo'
-    want = '****'
-class _Prop_name_extension(aetools.NProperty):
-    """name extension - the extension portion of the name """
-    which = 'extn'
-    want = 'utxt'
-class _Prop_package_folder(aetools.NProperty):
-    """package folder - Is the item a package? """
-    which = 'pkgf'
-    want = 'bool'
-class _Prop_url(aetools.NProperty):
-    """url - the url of the item """
-    which = 'url '
-    want = 'utxt'
-class _Prop_visible(aetools.NProperty):
-    """visible - Is the item visible? """
-    which = 'visi'
-    want = 'bool'
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-
-items = item
-
-class file(aetools.ComponentItem):
-    """file - A file in the file system """
-    want = 'file'
-class _Prop_creator_type(aetools.NProperty):
-    """creator type - the OSType identifying the application that created the item """
-    which = 'fcrt'
-    want = 'utxt'
-class _Prop_file_type(aetools.NProperty):
-    """file type - the OSType identifying the type of data contained in the item """
-    which = 'asty'
-    want = 'utxt'
-class _Prop_physical_size(aetools.NProperty):
-    """physical size - the actual space used by the file on disk """
-    which = 'phys'
-    want = 'magn'
-class _Prop_product_version(aetools.NProperty):
-    """product version - the version of the product (visible at the top of the ?et Info?window) """
-    which = 'ver2'
-    want = 'utxt'
-class _Prop_size(aetools.NProperty):
-    """size - the logical size of the file """
-    which = 'ptsz'
-    want = 'magn'
-class _Prop_stationery(aetools.NProperty):
-    """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 ?et Info?window) """
-    which = 'vers'
-    want = 'utxt'
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-
-files = file
-application._superclassnames = []
-from . import Standard_Suite
-from . import Folder_Actions_Suite
-from . import Login_Items_Suite
-from . import Processes_Suite
-application._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'folder_actions_enabled' : _Prop_folder_actions_enabled,
-    'properties' : _Prop_properties,
-}
-application._privelemdict = {
-    'application_process' : Processes_Suite.application_process,
-    'desk_accessory_process' : Processes_Suite.desk_accessory_process,
-    'disk' : disk,
-    'document' : Standard_Suite.document,
-    'file' : file,
-    'folder' : folder,
-    'folder_action' : Folder_Actions_Suite.folder_action,
-    'item' : item,
-    'login_item' : Login_Items_Suite.login_item,
-    'process' : Processes_Suite.process,
-    'window' : Standard_Suite.window,
-}
-disk._superclassnames = ['item']
-disk._privpropdict = {
-    'POSIX_path' : _Prop_POSIX_path,
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'capacity' : _Prop_capacity,
-    'ejectable' : _Prop_ejectable,
-    'format' : _Prop_format,
-    'free_space' : _Prop_free_space,
-    'ignore_privileges' : _Prop_ignore_privileges,
-    'local_volume' : _Prop_local_volume,
-    'name' : _Prop_name,
-    'path' : _Prop_path,
-    'properties' : _Prop_properties,
-    'startup' : _Prop_startup,
-    'volume' : _Prop_volume,
-}
-disk._privelemdict = {
-    'file' : file,
-    'folder' : folder,
-    'item' : item,
-}
-folder._superclassnames = ['item']
-folder._privpropdict = {
-    'POSIX_path' : _Prop_POSIX_path,
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'name' : _Prop_name,
-    'path' : _Prop_path,
-    'properties' : _Prop_properties,
-    'volume' : _Prop_volume,
-}
-folder._privelemdict = {
-    'file' : file,
-    'file' : file,
-    'folder' : folder,
-    'folder' : folder,
-    'item' : item,
-    'item' : item,
-}
-item._superclassnames = []
-item._privpropdict = {
-    'POSIX_path' : _Prop_POSIX_path,
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'busy_status' : _Prop_busy_status,
-    'creation_date' : _Prop_creation_date,
-    'modification_date' : _Prop_modification_date,
-    'name' : _Prop_name,
-    'name_extension' : _Prop_name_extension,
-    'package_folder' : _Prop_package_folder,
-    'path' : _Prop_path,
-    'properties' : _Prop_properties,
-    'url' : _Prop_url,
-    'visible' : _Prop_visible,
-    'volume' : _Prop_volume,
-}
-item._privelemdict = {
-    'file' : file,
-    'folder' : folder,
-    'item' : item,
-}
-file._superclassnames = ['item']
-file._privpropdict = {
-    'POSIX_path' : _Prop_POSIX_path,
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'creator_type' : _Prop_creator_type,
-    'file_type' : _Prop_file_type,
-    'name' : _Prop_name,
-    'path' : _Prop_path,
-    'physical_size' : _Prop_physical_size,
-    'product_version' : _Prop_product_version,
-    'properties' : _Prop_properties,
-    'size' : _Prop_size,
-    'stationery' : _Prop_stationery,
-    'version' : _Prop_version,
-    'volume' : _Prop_volume,
-}
-file._privelemdict = {
-    'file' : file,
-    'folder' : folder,
-    'item' : item,
-}
-_Enum_edfm = {
-    'MS_2d_DOS_format' : 'dfms',        # MS-DOS format
-    'Apple_Photo_format' : 'dfph',      # Apple Photo format
-    'ISO_9660_format' : 'df96', # ISO 9660 format
-    'QuickTake_format' : 'dfqt',        # QuickTake format
-    'AppleShare_format' : 'dfas',       # AppleShare format
-    'High_Sierra_format' : 'dfhs',      # High Sierra format
-    'Mac_OS_Extended_format' : 'dfh+',  # Mac OS Extended format
-    'UDF_format' : 'dfud',      # UDF format
-    'unknown_format' : 'df??',  # unknown format
-    'audio_format' : 'dfau',    # audio format
-    'Mac_OS_format' : 'dfhf',   # Mac OS format
-    'UFS_format' : 'dfuf',      # UFS format
-    'NFS_format' : 'dfnf',      # NFS format
-    'ProDOS_format' : 'dfpr',   # ProDOS format
-    'WebDAV_format' : 'dfwd',   # WebDAV format
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-    'cdis' : disk,
-    'cfol' : folder,
-    'cobj' : item,
-    'file' : file,
-}
-
-_propdeclarations = {
-    'ascd' : _Prop_creation_date,
-    'asmo' : _Prop_modification_date,
-    'asty' : _Prop_file_type,
-    'busy' : _Prop_busy_status,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'capa' : _Prop_capacity,
-    'dfmt' : _Prop_format,
-    'extn' : _Prop_name_extension,
-    'faen' : _Prop_folder_actions_enabled,
-    'fcrt' : _Prop_creator_type,
-    'frsp' : _Prop_free_space,
-    'igpr' : _Prop_ignore_privileges,
-    'isej' : _Prop_ejectable,
-    'isrv' : _Prop_local_volume,
-    'istd' : _Prop_startup,
-    'pALL' : _Prop_properties,
-    'phys' : _Prop_physical_size,
-    'pkgf' : _Prop_package_folder,
-    'pnam' : _Prop_name,
-    'posx' : _Prop_POSIX_path,
-    'ppth' : _Prop_path,
-    'pspd' : _Prop_stationery,
-    'ptsz' : _Prop_size,
-    'url ' : _Prop_url,
-    'ver2' : _Prop_product_version,
-    'vers' : _Prop_version,
-    'visi' : _Prop_visible,
-    'volu' : _Prop_volume,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'edfm' : _Enum_edfm,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Folder_Actions_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Folder_Actions_Suite.py
deleted file mode 100644 (file)
index a94734c..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-"""Suite Folder Actions Suite: Terms and Events for controlling Folder Actions
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/System Events.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-# Crutch for recursive import
-import sys
-import SystemEvents
-SystemEvents.Folder_Actions_Suite = sys.modules[__name__]
-
-import aetools
-import MacOS
-
-_code = 'faco'
-
-class Folder_Actions_Suite_Events:
-
-    _argmap_attach_action_to = {
-        'using' : 'faal',
-    }
-
-    def attach_action_to(self, _object, _attributes={}, **_arguments):
-        """attach action to: Attach an action to a folder
-        Required argument: the object for the command
-        Keyword argument using: a file containing the script to attach
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'faco'
-        _subcode = 'atfa'
-
-        aetools.keysubst(_arguments, self._argmap_attach_action_to)
-        _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 attached_scripts(self, _object, _attributes={}, **_arguments):
-        """attached scripts: List the actions attached to a folder
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'faco'
-        _subcode = 'lact'
-
-        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_folder_action = {
-        'with_window_size' : 'fnsz',
-        'with_item_list' : 'flst',
-        'folder_action_code' : 'actn',
-    }
-
-    def do_folder_action(self, _object, _attributes={}, **_arguments):
-        """do folder action: Event the Finder sends to the Folder Actions FBA
-        Required argument: the object for the command
-        Keyword argument with_window_size: the new window size for the folder action message to process
-        Keyword argument with_item_list: a list of items for the folder action message to process
-        Keyword argument folder_action_code: the folder action message to process
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'faco'
-        _subcode = 'fola'
-
-        aetools.keysubst(_arguments, self._argmap_do_folder_action)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'actn', _Enum_actn)
-
-        _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_edit_action_of = {
-        'using_action_name' : 'snam',
-        'using_action_number' : 'indx',
-    }
-
-    def edit_action_of(self, _object, _attributes={}, **_arguments):
-        """edit action of: Edit as action of a folder
-        Required argument: the object for the command
-        Keyword argument using_action_name: ...or the name of the action to edit
-        Keyword argument using_action_number: the index number of the action to edit...
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'faco'
-        _subcode = 'edfa'
-
-        aetools.keysubst(_arguments, self._argmap_edit_action_of)
-        _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_remove_action_from = {
-        'using_action_name' : 'snam',
-        'using_action_number' : 'indx',
-    }
-
-    def remove_action_from(self, _object, _attributes={}, **_arguments):
-        """remove action from: Remove a folder action from a folder
-        Required argument: the object for the command
-        Keyword argument using_action_name: ...or the name of the action to remove
-        Keyword argument using_action_number: the index number of the action to remove...
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'faco'
-        _subcode = 'rmfa'
-
-        aetools.keysubst(_arguments, self._argmap_remove_action_from)
-        _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 Folder Actions Suite host program """
-    want = 'capp'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'capp'
-_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
-class _Prop_folder_actions_enabled(aetools.NProperty):
-    """folder actions enabled - Are Folder Actions currently being processed? """
-    which = 'faen'
-    want = 'bool'
-folder_actions_enabled = _Prop_folder_actions_enabled()
-class _Prop_properties(aetools.NProperty):
-    """properties - every property of the Folder Actions Suite host program """
-    which = 'pALL'
-    want = '****'
-properties = _Prop_properties()
-#        element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID  ']
-#        element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'foac' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'logi' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcap' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcda' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'prcs' as ['name', 'indx', 'rele', 'rang', 'test']
-
-applications = application
-
-class folder_action(aetools.ComponentItem):
-    """folder action - An action attached to a folder in the file system """
-    want = 'foac'
-class _Prop_name(aetools.NProperty):
-    """name - the name of the folder action, which is also the name of the folder """
-    which = 'pnam'
-    want = 'utxt'
-class _Prop_path(aetools.NProperty):
-    """path - the path to the folder to which the folder action applies """
-    which = 'ppth'
-    want = '****'
-class _Prop_volume(aetools.NProperty):
-    """volume - the volume on which the folder action resides """
-    which = 'volu'
-    want = 'utxt'
-#        element 'scpt' as ['name', 'indx', 'rele', 'rang', 'test']
-
-folder_actions = folder_action
-
-class script(aetools.ComponentItem):
-    """script - A script invoked by a folder action """
-    want = 'scpt'
-class _Prop_POSIX_path(aetools.NProperty):
-    """POSIX path - the POSIX file system path of the disk """
-    which = 'posx'
-    want = 'utxt'
-
-scripts = script
-application._superclassnames = []
-import sys
-from . import Disk_Folder_File_Suite
-from . import Standard_Suite
-from . import Login_Items_Suite
-from . import Processes_Suite
-application._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'folder_actions_enabled' : _Prop_folder_actions_enabled,
-    'properties' : _Prop_properties,
-}
-application._privelemdict = {
-    'application_process' : Processes_Suite.application_process,
-    'desk_accessory_process' : Processes_Suite.desk_accessory_process,
-    'disk' : Disk_Folder_File_Suite.disk,
-    'document' : Standard_Suite.document,
-    'file' : Disk_Folder_File_Suite.file,
-    'folder' : Disk_Folder_File_Suite.folder,
-    'folder_action' : folder_action,
-    'item' : Disk_Folder_File_Suite.item,
-    'login_item' : Login_Items_Suite.login_item,
-    'process' : Processes_Suite.process,
-    'window' : Standard_Suite.window,
-}
-folder_action._superclassnames = ['item']
-folder_action._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'name' : _Prop_name,
-    'path' : _Prop_path,
-    'properties' : _Prop_properties,
-    'volume' : _Prop_volume,
-}
-folder_action._privelemdict = {
-    'script' : script,
-}
-script._superclassnames = ['item']
-script._privpropdict = {
-    'POSIX_path' : _Prop_POSIX_path,
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'name' : _Prop_name,
-    'path' : _Prop_path,
-    'properties' : _Prop_properties,
-}
-script._privelemdict = {
-}
-_Enum_actn = {
-    'items_added' : 'fget',     # items added
-    'items_removed' : 'flos',   # items removed
-    'window_closed' : 'fclo',   # window closed
-    'window_moved' : 'fsiz',    # window moved
-    'window_opened' : 'fopn',   # window opened
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-    'foac' : folder_action,
-    'scpt' : script,
-}
-
-_propdeclarations = {
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'faen' : _Prop_folder_actions_enabled,
-    'pALL' : _Prop_properties,
-    'pnam' : _Prop_name,
-    'posx' : _Prop_POSIX_path,
-    'ppth' : _Prop_path,
-    'volu' : _Prop_volume,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-    'actn' : _Enum_actn,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Hidden_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Hidden_Suite.py
deleted file mode 100644 (file)
index f137bd6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-"""Suite Hidden Suite: Hidden Terms and Events for controlling the System Events application
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/System Events.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'tpnm'
-
-from StdSuites.Type_Names_Suite import *
-class Hidden_Suite_Events(Type_Names_Suite_Events):
-
-    def do_script(self, _object, _attributes={}, **_arguments):
-        """do script: Execute an OSA script.
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'misc'
-        _subcode = 'dosc'
-
-        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['----']
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Login_Items_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Login_Items_Suite.py
deleted file mode 100644 (file)
index 0409558..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-"""Suite Login Items Suite: Terms and Events for controlling the Login Items application
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/System Events.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'logi'
-
-class Login_Items_Suite_Events:
-
-    pass
-
-
-class login_item(aetools.ComponentItem):
-    """login item - an item to be launched or opened at login """
-    want = 'logi'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'cobj'
-class _Prop_hidden(aetools.NProperty):
-    """hidden - Is the Login Item hidden when launched? """
-    which = 'hidn'
-    want = 'bool'
-class _Prop_kind(aetools.NProperty):
-    """kind - the file type of the Login Item """
-    which = 'kind'
-    want = 'utxt'
-class _Prop_name(aetools.NProperty):
-    """name - the name of the Login Item """
-    which = 'pnam'
-    want = 'utxt'
-class _Prop_path(aetools.NProperty):
-    """path - the file system path to the Login Item """
-    which = 'ppth'
-    want = 'utxt'
-
-login_items = login_item
-from . import Standard_Suite
-login_item._superclassnames = ['item']
-login_item._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'hidden' : _Prop_hidden,
-    'kind' : _Prop_kind,
-    'name' : _Prop_name,
-    'path' : _Prop_path,
-}
-login_item._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'logi' : login_item,
-}
-
-_propdeclarations = {
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'hidn' : _Prop_hidden,
-    'kind' : _Prop_kind,
-    'pnam' : _Prop_name,
-    'ppth' : _Prop_path,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Power_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Power_Suite.py
deleted file mode 100644 (file)
index dfe535e..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-"""Suite Power Suite: Terms and Events for controlling System power
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/System Events.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'powr'
-
-class Power_Suite_Events:
-
-    def restart(self, _object, _attributes={}, **_arguments):
-        """restart: Restart the computer
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'rest'
-
-        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 shut_down(self, _object, _attributes={}, **_arguments):
-        """shut down: Shut Down the computer
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'shut'
-
-        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 sleep(self, _object, _attributes={}, **_arguments):
-        """sleep: Put the computer to sleep
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'fndr'
-        _subcode = 'slep'
-
-        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['----']
-
-
-class application(aetools.ComponentItem):
-    """application - The System Events application """
-    want = 'capp'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'capp'
-_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
-class _Prop_folder_actions_enabled(aetools.NProperty):
-    """folder actions enabled - Are Folder Actions currently being processed? """
-    which = 'faen'
-    want = 'bool'
-folder_actions_enabled = _Prop_folder_actions_enabled()
-class _Prop_properties(aetools.NProperty):
-    """properties - every property of the System Events application """
-    which = 'pALL'
-    want = '****'
-properties = _Prop_properties()
-#        element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID  ']
-#        element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'foac' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'logi' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcap' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcda' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'prcs' as ['name', 'indx', 'rele', 'rang', 'test']
-
-applications = application
-application._superclassnames = []
-from . import Disk_Folder_File_Suite
-from . import Standard_Suite
-from . import Folder_Actions_Suite
-from . import Login_Items_Suite
-from . import Processes_Suite
-application._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'folder_actions_enabled' : _Prop_folder_actions_enabled,
-    'properties' : _Prop_properties,
-}
-application._privelemdict = {
-    'application_process' : Processes_Suite.application_process,
-    'desk_accessory_process' : Processes_Suite.desk_accessory_process,
-    'disk' : Disk_Folder_File_Suite.disk,
-    'document' : Standard_Suite.document,
-    'file' : Disk_Folder_File_Suite.file,
-    'folder' : Disk_Folder_File_Suite.folder,
-    'folder_action' : Folder_Actions_Suite.folder_action,
-    'item' : Disk_Folder_File_Suite.item,
-    'login_item' : Login_Items_Suite.login_item,
-    'process' : Processes_Suite.process,
-    'window' : Standard_Suite.window,
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-}
-
-_propdeclarations = {
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'faen' : _Prop_folder_actions_enabled,
-    'pALL' : _Prop_properties,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Processes_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Processes_Suite.py
deleted file mode 100644 (file)
index a55c0a1..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-"""Suite Processes Suite: Terms and Events for controlling Processes
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/System Events.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'prcs'
-
-class Processes_Suite_Events:
-
-    pass
-
-
-class application(aetools.ComponentItem):
-    """application - The Processes Suite host program """
-    want = 'capp'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'capp'
-_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
-class _Prop_folder_actions_enabled(aetools.NProperty):
-    """folder actions enabled - Are Folder Actions currently being processed? """
-    which = 'faen'
-    want = 'bool'
-folder_actions_enabled = _Prop_folder_actions_enabled()
-class _Prop_properties(aetools.NProperty):
-    """properties - every property of the Processes Suite host program """
-    which = 'pALL'
-    want = '****'
-properties = _Prop_properties()
-#        element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID  ']
-#        element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'foac' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'logi' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcap' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcda' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'prcs' as ['name', 'indx', 'rele', 'rang', 'test']
-
-applications = application
-
-class application_process(aetools.ComponentItem):
-    """application process - A process launched from an application file """
-    want = 'pcap'
-class _Prop_application_file(aetools.NProperty):
-    """application file - a reference to the application file from which this process was launched """
-    which = 'appf'
-    want = '****'
-
-application_processes = application_process
-
-class desk_accessory_process(aetools.ComponentItem):
-    """desk accessory process - A process launched from an desk accessory file """
-    want = 'pcda'
-class _Prop_desk_accessory_file(aetools.NProperty):
-    """desk accessory file - a reference to the desk accessory file from which this process was launched """
-    which = 'dafi'
-    want = '****'
-
-desk_accessory_processes = desk_accessory_process
-
-class process(aetools.ComponentItem):
-    """process - A process running on this computer """
-    want = 'prcs'
-class _Prop_accepts_high_level_events(aetools.NProperty):
-    """accepts high level events - Is the process high-level event aware (accepts open application, open document, print document, and quit)? """
-    which = 'isab'
-    want = 'bool'
-class _Prop_accepts_remote_events(aetools.NProperty):
-    """accepts remote events - Does the process accept remote events? """
-    which = 'revt'
-    want = 'bool'
-class _Prop_classic(aetools.NProperty):
-    """classic - Is the process running in the Classic environment? """
-    which = 'clsc'
-    want = 'bool'
-class _Prop_creator_type(aetools.NProperty):
-    """creator type - the OSType of the creator of the process (the signature) """
-    which = 'fcrt'
-    want = 'utxt'
-class _Prop_file(aetools.NProperty):
-    """file - the file from which the process was launched """
-    which = 'file'
-    want = '****'
-class _Prop_file_type(aetools.NProperty):
-    """file type - the OSType of the file type of the process """
-    which = 'asty'
-    want = 'utxt'
-class _Prop_frontmost(aetools.NProperty):
-    """frontmost - Is the process the frontmost process """
-    which = 'pisf'
-    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'
-class _Prop_name(aetools.NProperty):
-    """name - the name of the process """
-    which = 'pnam'
-    want = 'utxt'
-class _Prop_partition_space_used(aetools.NProperty):
-    """partition space used - the number of bytes currently used in the process' partition """
-    which = 'pusd'
-    want = 'magn'
-class _Prop_total_partition_size(aetools.NProperty):
-    """total partition size - the size of the partition with which the process was launched """
-    which = 'appt'
-    want = 'magn'
-class _Prop_visible(aetools.NProperty):
-    """visible - Is the process' layer visible? """
-    which = 'pvis'
-    want = 'bool'
-
-processes = process
-application._superclassnames = []
-from . import Disk_Folder_File_Suite
-from . import Standard_Suite
-from . import Folder_Actions_Suite
-from . import Login_Items_Suite
-application._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'folder_actions_enabled' : _Prop_folder_actions_enabled,
-    'properties' : _Prop_properties,
-}
-application._privelemdict = {
-    'application_process' : application_process,
-    'desk_accessory_process' : desk_accessory_process,
-    'disk' : Disk_Folder_File_Suite.disk,
-    'document' : Standard_Suite.document,
-    'file' : Disk_Folder_File_Suite.file,
-    'folder' : Disk_Folder_File_Suite.folder,
-    'folder_action' : Folder_Actions_Suite.folder_action,
-    'item' : Disk_Folder_File_Suite.item,
-    'login_item' : Login_Items_Suite.login_item,
-    'process' : process,
-    'window' : Standard_Suite.window,
-}
-application_process._superclassnames = ['process']
-application_process._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'application_file' : _Prop_application_file,
-}
-application_process._privelemdict = {
-}
-desk_accessory_process._superclassnames = ['process']
-desk_accessory_process._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'desk_accessory_file' : _Prop_desk_accessory_file,
-}
-desk_accessory_process._privelemdict = {
-}
-process._superclassnames = ['item']
-process._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'accepts_high_level_events' : _Prop_accepts_high_level_events,
-    'accepts_remote_events' : _Prop_accepts_remote_events,
-    'classic' : _Prop_classic,
-    'creator_type' : _Prop_creator_type,
-    'file' : _Prop_file,
-    'file_type' : _Prop_file_type,
-    'frontmost' : _Prop_frontmost,
-    'has_scripting_terminology' : _Prop_has_scripting_terminology,
-    'name' : _Prop_name,
-    'partition_space_used' : _Prop_partition_space_used,
-    'properties' : _Prop_properties,
-    'total_partition_size' : _Prop_total_partition_size,
-    'visible' : _Prop_visible,
-}
-process._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-    'pcap' : application_process,
-    'pcda' : desk_accessory_process,
-    'prcs' : process,
-}
-
-_propdeclarations = {
-    'appf' : _Prop_application_file,
-    'appt' : _Prop_total_partition_size,
-    'asty' : _Prop_file_type,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'clsc' : _Prop_classic,
-    'dafi' : _Prop_desk_accessory_file,
-    'faen' : _Prop_folder_actions_enabled,
-    'fcrt' : _Prop_creator_type,
-    'file' : _Prop_file,
-    'hscr' : _Prop_has_scripting_terminology,
-    'isab' : _Prop_accepts_high_level_events,
-    'pALL' : _Prop_properties,
-    'pisf' : _Prop_frontmost,
-    'pnam' : _Prop_name,
-    'pusd' : _Prop_partition_space_used,
-    'pvis' : _Prop_visible,
-    'revt' : _Prop_accepts_remote_events,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Standard_Suite.py
deleted file mode 100644 (file)
index a0cd3da..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-"""Suite Standard Suite: Common classes and commands for most applications.
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/System Events.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = '????'
-
-class Standard_Suite_Events:
-
-    _argmap_close = {
-        'saving_in' : 'kfil',
-        'saving' : 'savo',
-    }
-
-    def close(self, _object, _attributes={}, **_arguments):
-        """close: Close an object.
-        Required argument: the object for the command
-        Keyword argument saving_in: The file in which to save the object.
-        Keyword argument saving: Specifies whether changes should be saved before closing.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'clos'
-
-        aetools.keysubst(_arguments, self._argmap_close)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_count = {
-        'each' : 'kocl',
-    }
-
-    def count(self, _object, _attributes={}, **_arguments):
-        """count: Return the number of elements of a particular class within an object.
-        Required argument: the object for the command
-        Keyword argument each: The class of objects to be counted.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'cnte'
-
-        aetools.keysubst(_arguments, self._argmap_count)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def delete(self, _object, _attributes={}, **_arguments):
-        """delete: Delete an object.
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'delo'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_duplicate = {
-        'to' : 'insh',
-        'with_properties' : 'prdt',
-    }
-
-    def duplicate(self, _object, _attributes={}, **_arguments):
-        """duplicate: Copy object(s) and put the copies at a new location.
-        Required argument: the object for the command
-        Keyword argument to: The location for the new object(s).
-        Keyword argument with_properties: Properties to be set in the new duplicated object(s).
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'clon'
-
-        aetools.keysubst(_arguments, self._argmap_duplicate)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def exists(self, _object, _attributes={}, **_arguments):
-        """exists: Verify if an object exists.
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'doex'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def get(self, _object, _attributes={}, **_arguments):
-        """get: Get the data for an object.
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'getd'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_make = {
-        'at' : 'insh',
-        'new' : 'kocl',
-        'with_data' : 'data',
-        'with_properties' : 'prdt',
-    }
-
-    def make(self, _no_object=None, _attributes={}, **_arguments):
-        """make: Make a new object.
-        Keyword argument at: The location at which to insert the object.
-        Keyword argument new: The class of the new object.
-        Keyword argument with_data: The initial data for the object.
-        Keyword argument with_properties: The initial values for properties of the object.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'crel'
-
-        aetools.keysubst(_arguments, self._argmap_make)
-        if _no_object is not None: raise TypeError('No direct arg expected')
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_move = {
-        'to' : 'insh',
-    }
-
-    def move(self, _object, _attributes={}, **_arguments):
-        """move: Move object(s) to a new location.
-        Required argument: the object for the command
-        Keyword argument to: The new location for the object(s).
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'move'
-
-        aetools.keysubst(_arguments, self._argmap_move)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def open(self, _object=None, _attributes={}, **_arguments):
-        """open: Open an object.
-        Required argument: list of objects
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'odoc'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def print_(self, _object=None, _attributes={}, **_arguments):
-        """print: Print an object.
-        Required argument: list of objects
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'pdoc'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_quit = {
-        'saving' : 'savo',
-    }
-
-    def quit(self, _object, _attributes={}, **_arguments):
-        """quit: Quit an application.
-        Required argument: the object for the command
-        Keyword argument saving: Specifies whether changes should be saved before quitting.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'quit'
-
-        aetools.keysubst(_arguments, self._argmap_quit)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_save = {
-        'in_' : 'kfil',
-        'as' : 'fltp',
-    }
-
-    def save(self, _object, _attributes={}, **_arguments):
-        """save: Save an object.
-        Required argument: the object for the command
-        Keyword argument in_: The file in which to save the object.
-        Keyword argument as: The file type in which to save the data.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'save'
-
-        aetools.keysubst(_arguments, self._argmap_save)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_set = {
-        'to' : 'data',
-    }
-
-    def set(self, _object, _attributes={}, **_arguments):
-        """set: Set an object's data.
-        Required argument: the object for the command
-        Keyword argument to: The new value.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'setd'
-
-        aetools.keysubst(_arguments, self._argmap_set)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-
-class application(aetools.ComponentItem):
-    """application - An application's top level scripting object. """
-    want = 'capp'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'cobj'
-_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
-class _Prop_frontmost(aetools.NProperty):
-    """frontmost - Is this the frontmost (active) application? """
-    which = 'pisf'
-    want = 'bool'
-frontmost = _Prop_frontmost()
-class _Prop_name(aetools.NProperty):
-    """name - The name of the application. """
-    which = 'pnam'
-    want = 'utxt'
-name = _Prop_name()
-class _Prop_version(aetools.NProperty):
-    """version - The version of the application. """
-    which = 'vers'
-    want = 'utxt'
-version = _Prop_version()
-#        element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID  ']
-#        element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
-
-applications = application
-
-class item(aetools.ComponentItem):
-    """item - A scriptable object. """
-    want = 'cobj'
-class _Prop_class_(aetools.NProperty):
-    """class - The class of the object. """
-    which = 'pcls'
-    want = 'type'
-class _Prop_properties(aetools.NProperty):
-    """properties - All of the object's properties. """
-    which = 'pALL'
-    want = 'reco'
-
-items = item
-
-class color(aetools.ComponentItem):
-    """color - A color. """
-    want = 'colr'
-
-colors = color
-
-class window(aetools.ComponentItem):
-    """window - A window. """
-    want = 'cwin'
-class _Prop_bounds(aetools.NProperty):
-    """bounds - The bounding rectangle of the window. """
-    which = 'pbnd'
-    want = 'qdrt'
-class _Prop_closeable(aetools.NProperty):
-    """closeable - Whether the window has a close box. """
-    which = 'hclb'
-    want = 'bool'
-class _Prop_document(aetools.NProperty):
-    """document - The document whose contents are being displayed in the window. """
-    which = 'docu'
-    want = 'docu'
-class _Prop_floating(aetools.NProperty):
-    """floating - Whether the window floats. """
-    which = 'isfl'
-    want = 'bool'
-class _Prop_id(aetools.NProperty):
-    """id - The unique identifier of the window. """
-    which = 'ID  '
-    want = 'long'
-class _Prop_index(aetools.NProperty):
-    """index - The index of the window in the back-to-front window ordering. """
-    which = 'pidx'
-    want = 'long'
-class _Prop_miniaturizable(aetools.NProperty):
-    """miniaturizable - Whether the window can be miniaturized. """
-    which = 'ismn'
-    want = 'bool'
-class _Prop_miniaturized(aetools.NProperty):
-    """miniaturized - Whether the window is currently miniaturized. """
-    which = 'pmnd'
-    want = 'bool'
-class _Prop_modal(aetools.NProperty):
-    """modal - Whether the window is the application's current modal window. """
-    which = 'pmod'
-    want = 'bool'
-class _Prop_resizable(aetools.NProperty):
-    """resizable - Whether the window can be resized. """
-    which = 'prsz'
-    want = 'bool'
-class _Prop_titled(aetools.NProperty):
-    """titled - Whether the window has a title bar. """
-    which = 'ptit'
-    want = 'bool'
-class _Prop_visible(aetools.NProperty):
-    """visible - Whether the window is currently visible. """
-    which = 'pvis'
-    want = 'bool'
-class _Prop_zoomable(aetools.NProperty):
-    """zoomable - Whether the window can be zoomed. """
-    which = 'iszm'
-    want = 'bool'
-class _Prop_zoomed(aetools.NProperty):
-    """zoomed - Whether the window is currently zoomed. """
-    which = 'pzum'
-    want = 'bool'
-
-windows = window
-
-class document(aetools.ComponentItem):
-    """document - A document. """
-    want = 'docu'
-class _Prop_modified(aetools.NProperty):
-    """modified - Has the document been modified since the last save? """
-    which = 'imod'
-    want = 'bool'
-class _Prop_path(aetools.NProperty):
-    """path - The document's path. """
-    which = 'ppth'
-    want = 'utxt'
-
-documents = document
-application._superclassnames = ['item']
-application._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'frontmost' : _Prop_frontmost,
-    'name' : _Prop_name,
-    'version' : _Prop_version,
-}
-application._privelemdict = {
-    'document' : document,
-    'window' : window,
-}
-item._superclassnames = []
-item._privpropdict = {
-    'class_' : _Prop_class_,
-    'properties' : _Prop_properties,
-}
-item._privelemdict = {
-}
-color._superclassnames = ['item']
-color._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-}
-color._privelemdict = {
-}
-window._superclassnames = ['item']
-window._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'bounds' : _Prop_bounds,
-    'closeable' : _Prop_closeable,
-    'document' : _Prop_document,
-    'floating' : _Prop_floating,
-    'id' : _Prop_id,
-    'index' : _Prop_index,
-    'miniaturizable' : _Prop_miniaturizable,
-    'miniaturized' : _Prop_miniaturized,
-    'modal' : _Prop_modal,
-    'name' : _Prop_name,
-    'resizable' : _Prop_resizable,
-    'titled' : _Prop_titled,
-    'visible' : _Prop_visible,
-    'zoomable' : _Prop_zoomable,
-    'zoomed' : _Prop_zoomed,
-}
-window._privelemdict = {
-}
-document._superclassnames = ['item']
-document._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'modified' : _Prop_modified,
-    'name' : _Prop_name,
-    'path' : _Prop_path,
-}
-document._privelemdict = {
-}
-class _3c_(aetools.NComparison):
-    """< - Less than """
-class _3d_(aetools.NComparison):
-    """= - Equal """
-class _3e_(aetools.NComparison):
-    """> - Greater than """
-class contains(aetools.NComparison):
-    """contains - Contains """
-class ends_with(aetools.NComparison):
-    """ends with - Ends with """
-class starts_with(aetools.NComparison):
-    """starts with - Starts with """
-class _b2_(aetools.NComparison):
-    """\xb2 - Less than or equal to """
-class _b3_(aetools.NComparison):
-    """\xb3 - Greater than or equal to """
-_Enum_savo = {
-    'ask' : 'ask ',     # Ask the user whether or not to save the file.
-    'yes' : 'yes ',     # Save the file.
-    'no' : 'no  ',      # Do not save the file.
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-    'cobj' : item,
-    'colr' : color,
-    'cwin' : window,
-    'docu' : document,
-}
-
-_propdeclarations = {
-    'ID  ' : _Prop_id,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'docu' : _Prop_document,
-    'hclb' : _Prop_closeable,
-    'imod' : _Prop_modified,
-    'isfl' : _Prop_floating,
-    'ismn' : _Prop_miniaturizable,
-    'iszm' : _Prop_zoomable,
-    'pALL' : _Prop_properties,
-    'pbnd' : _Prop_bounds,
-    'pcls' : _Prop_class_,
-    'pidx' : _Prop_index,
-    'pisf' : _Prop_frontmost,
-    'pmnd' : _Prop_miniaturized,
-    'pmod' : _Prop_modal,
-    'pnam' : _Prop_name,
-    'ppth' : _Prop_path,
-    'prsz' : _Prop_resizable,
-    'ptit' : _Prop_titled,
-    'pvis' : _Prop_visible,
-    'pzum' : _Prop_zoomed,
-    'vers' : _Prop_version,
-}
-
-_compdeclarations = {
-    '<   ' : _3c_,
-    '<=  ' : _b2_,
-    '=   ' : _3d_,
-    '>   ' : _3e_,
-    '>=  ' : _b3_,
-    'bgwt' : starts_with,
-    'cont' : contains,
-    'ends' : ends_with,
-}
-
-_enumdeclarations = {
-    'savo' : _Enum_savo,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py
deleted file mode 100644 (file)
index 1f6f8cd..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-"""Suite System Events Suite: Terms and Events for controlling the System Events application
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/System Events.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'sevs'
-
-class System_Events_Suite_Events:
-
-    def do_script(self, _object, _attributes={}, **_arguments):
-        """do script: Execute an OSA script.
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'misc'
-        _subcode = 'dosc'
-
-        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['----']
-
-
-class application(aetools.ComponentItem):
-    """application - The System Events application """
-    want = 'capp'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'capp'
-_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
-class _Prop_folder_actions_enabled(aetools.NProperty):
-    """folder actions enabled - Are Folder Actions currently being processed? """
-    which = 'faen'
-    want = 'bool'
-folder_actions_enabled = _Prop_folder_actions_enabled()
-class _Prop_properties(aetools.NProperty):
-    """properties - every property of the System Events application """
-    which = 'pALL'
-    want = '****'
-properties = _Prop_properties()
-#        element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID  ']
-#        element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'foac' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'logi' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcap' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'pcda' as ['name', 'indx', 'rele', 'rang', 'test']
-#        element 'prcs' as ['name', 'indx', 'rele', 'rang', 'test']
-
-applications = application
-application._superclassnames = []
-from . import Disk_Folder_File_Suite
-from . import Standard_Suite
-from . import Folder_Actions_Suite
-from . import Login_Items_Suite
-from . import Processes_Suite
-application._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'folder_actions_enabled' : _Prop_folder_actions_enabled,
-    'properties' : _Prop_properties,
-}
-application._privelemdict = {
-    'application_process' : Processes_Suite.application_process,
-    'desk_accessory_process' : Processes_Suite.desk_accessory_process,
-    'disk' : Disk_Folder_File_Suite.disk,
-    'document' : Standard_Suite.document,
-    'file' : Disk_Folder_File_Suite.file,
-    'folder' : Disk_Folder_File_Suite.folder,
-    'folder_action' : Folder_Actions_Suite.folder_action,
-    'item' : Disk_Folder_File_Suite.item,
-    'login_item' : Login_Items_Suite.login_item,
-    'process' : Processes_Suite.process,
-    'window' : Standard_Suite.window,
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-}
-
-_propdeclarations = {
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'faen' : _Prop_folder_actions_enabled,
-    'pALL' : _Prop_properties,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Text_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Text_Suite.py
deleted file mode 100644 (file)
index ec66c2c..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-"""Suite Text Suite: A set of basic classes for text processing.
-Level 1, version 1
-
-Generated from /System/Library/CoreServices/System Events.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = '????'
-
-class Text_Suite_Events:
-
-    pass
-
-
-class attachment(aetools.ComponentItem):
-    """attachment - Represents an inline text attachment.  This class is used mainly for make commands. """
-    want = 'atts'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'ctxt'
-class _Prop_file_name(aetools.NProperty):
-    """file name - The path to the file for the attachment """
-    which = 'atfn'
-    want = 'utxt'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-class attribute_run(aetools.ComponentItem):
-    """attribute run - This subdivides the text into chunks that all have the same attributes. """
-    want = 'catr'
-class _Prop_color(aetools.NProperty):
-    """color - The color of the first character. """
-    which = 'colr'
-    want = 'colr'
-class _Prop_font(aetools.NProperty):
-    """font - The name of the font of the first character. """
-    which = 'font'
-    want = 'utxt'
-class _Prop_size(aetools.NProperty):
-    """size - The size in points of the first character. """
-    which = 'ptsz'
-    want = 'long'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-attribute_runs = attribute_run
-
-class character(aetools.ComponentItem):
-    """character - This subdivides the text into characters. """
-    want = 'cha '
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-characters = character
-
-class paragraph(aetools.ComponentItem):
-    """paragraph - This subdivides the text into paragraphs. """
-    want = 'cpar'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-paragraphs = paragraph
-
-class text(aetools.ComponentItem):
-    """text - Rich (styled) text """
-    want = 'ctxt'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-class word(aetools.ComponentItem):
-    """word - This subdivides the text into words. """
-    want = 'cwor'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-words = word
-attachment._superclassnames = ['text']
-attachment._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'file_name' : _Prop_file_name,
-}
-attachment._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-from . import Standard_Suite
-attribute_run._superclassnames = ['item']
-attribute_run._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-attribute_run._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-character._superclassnames = ['item']
-character._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-character._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-paragraph._superclassnames = ['item']
-paragraph._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-paragraph._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-text._superclassnames = ['item']
-text._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-text._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-word._superclassnames = ['item']
-word._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-word._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'atts' : attachment,
-    'catr' : attribute_run,
-    'cha ' : character,
-    'cpar' : paragraph,
-    'ctxt' : text,
-    'cwor' : word,
-}
-
-_propdeclarations = {
-    'atfn' : _Prop_file_name,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'colr' : _Prop_color,
-    'font' : _Prop_font,
-    'ptsz' : _Prop_size,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/__init__.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/__init__.py
deleted file mode 100644 (file)
index ce3b0e2..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-"""
-Package generated from /System/Library/CoreServices/System Events.app
-"""
-import aetools
-Error = aetools.Error
-from . import Standard_Suite
-from . import Text_Suite
-from . import Disk_Folder_File_Suite
-from . import Folder_Actions_Suite
-from . import Login_Items_Suite
-from . import Power_Suite
-from . import Processes_Suite
-from . import System_Events_Suite
-
-
-_code_to_module = {
-    '????' : Standard_Suite,
-    '????' : Text_Suite,
-    'cdis' : Disk_Folder_File_Suite,
-    'faco' : Folder_Actions_Suite,
-    'logi' : Login_Items_Suite,
-    'powr' : Power_Suite,
-    'prcs' : Processes_Suite,
-    'sevs' : System_Events_Suite,
-}
-
-
-
-_code_to_fullname = {
-    '????' : ('SystemEvents.Standard_Suite', 'Standard_Suite'),
-    '????' : ('SystemEvents.Text_Suite', 'Text_Suite'),
-    'cdis' : ('SystemEvents.Disk_Folder_File_Suite', 'Disk_Folder_File_Suite'),
-    'faco' : ('SystemEvents.Folder_Actions_Suite', 'Folder_Actions_Suite'),
-    'logi' : ('SystemEvents.Login_Items_Suite', 'Login_Items_Suite'),
-    'powr' : ('SystemEvents.Power_Suite', 'Power_Suite'),
-    'prcs' : ('SystemEvents.Processes_Suite', 'Processes_Suite'),
-    'sevs' : ('SystemEvents.System_Events_Suite', 'System_Events_Suite'),
-}
-
-from SystemEvents.Standard_Suite import *
-from SystemEvents.Text_Suite import *
-from SystemEvents.Disk_Folder_File_Suite import *
-from SystemEvents.Folder_Actions_Suite import *
-from SystemEvents.Login_Items_Suite import *
-from SystemEvents.Power_Suite import *
-from SystemEvents.Processes_Suite import *
-from SystemEvents.System_Events_Suite import *
-
-def getbaseclasses(v):
-    if not getattr(v, '_propdict', None):
-        v._propdict = {}
-        v._elemdict = {}
-        for superclassname in getattr(v, '_superclassnames', []):
-            superclass = eval(superclassname)
-            getbaseclasses(superclass)
-            v._propdict.update(getattr(superclass, '_propdict', {}))
-            v._elemdict.update(getattr(superclass, '_elemdict', {}))
-        v._propdict.update(getattr(v, '_privpropdict', {}))
-        v._elemdict.update(getattr(v, '_privelemdict', {}))
-
-import StdSuites
-
-#
-# Set property and element dictionaries now that all classes have been defined
-#
-getbaseclasses(login_item)
-getbaseclasses(color)
-getbaseclasses(window)
-getbaseclasses(application)
-getbaseclasses(item)
-getbaseclasses(document)
-getbaseclasses(character)
-getbaseclasses(attachment)
-getbaseclasses(paragraph)
-getbaseclasses(word)
-getbaseclasses(attribute_run)
-getbaseclasses(text)
-getbaseclasses(file)
-getbaseclasses(application)
-getbaseclasses(item)
-getbaseclasses(folder)
-getbaseclasses(disk)
-getbaseclasses(script)
-getbaseclasses(application)
-getbaseclasses(folder_action)
-getbaseclasses(application)
-getbaseclasses(application)
-getbaseclasses(process)
-getbaseclasses(application_process)
-getbaseclasses(desk_accessory_process)
-getbaseclasses(application)
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'logi' : login_item,
-    'colr' : color,
-    'cwin' : window,
-    'capp' : application,
-    'cobj' : item,
-    'docu' : document,
-    'cha ' : character,
-    'atts' : attachment,
-    'cpar' : paragraph,
-    'cwor' : word,
-    'catr' : attribute_run,
-    'ctxt' : text,
-    'file' : file,
-    'capp' : application,
-    'cobj' : item,
-    'cfol' : folder,
-    'cdis' : disk,
-    'scpt' : script,
-    'capp' : application,
-    'foac' : folder_action,
-    'capp' : application,
-    'capp' : application,
-    'prcs' : process,
-    'pcap' : application_process,
-    'pcda' : desk_accessory_process,
-    'capp' : application,
-}
-
-
-class SystemEvents(Standard_Suite_Events,
-        Text_Suite_Events,
-        Disk_Folder_File_Suite_Events,
-        Folder_Actions_Suite_Events,
-        Login_Items_Suite_Events,
-        Power_Suite_Events,
-        Processes_Suite_Events,
-        System_Events_Suite_Events,
-        aetools.TalkTo):
-    _signature = 'sevs'
-
-    _moduleName = 'SystemEvents'
-
-    _elemdict = application._elemdict
-    _propdict = application._propdict
diff --git a/Lib/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py b/Lib/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py
deleted file mode 100644 (file)
index 0020e52..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-"""Suite Standard Suite: Common classes and commands for most applications.
-Level 1, version 1
-
-Generated from /Applications/Utilities/Terminal.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = '????'
-
-class Standard_Suite_Events:
-
-    _argmap_close = {
-        'saving_in' : 'kfil',
-        'saving' : 'savo',
-    }
-
-    def close(self, _object, _attributes={}, **_arguments):
-        """close: Close an object.
-        Required argument: the object for the command
-        Keyword argument saving_in: The file in which to save the object.
-        Keyword argument saving: Specifies whether changes should be saved before closing.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'clos'
-
-        aetools.keysubst(_arguments, self._argmap_close)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_count = {
-        'each' : 'kocl',
-    }
-
-    def count(self, _object, _attributes={}, **_arguments):
-        """count: Return the number of elements of a particular class within an object.
-        Required argument: the object for the command
-        Keyword argument each: The class of objects to be counted.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'cnte'
-
-        aetools.keysubst(_arguments, self._argmap_count)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def delete(self, _object, _attributes={}, **_arguments):
-        """delete: Delete an object.
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'delo'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_duplicate = {
-        'to' : 'insh',
-        'with_properties' : 'prdt',
-    }
-
-    def duplicate(self, _object, _attributes={}, **_arguments):
-        """duplicate: Copy object(s) and put the copies at a new location.
-        Required argument: the object for the command
-        Keyword argument to: The location for the new object(s).
-        Keyword argument with_properties: Properties to be set in the new duplicated object(s).
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'clon'
-
-        aetools.keysubst(_arguments, self._argmap_duplicate)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def exists(self, _object, _attributes={}, **_arguments):
-        """exists: Verify if an object exists.
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'doex'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def get(self, _object, _attributes={}, **_arguments):
-        """get: Get the data for an object.
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'getd'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_make = {
-        'at' : 'insh',
-        'new' : 'kocl',
-        'with_data' : 'data',
-        'with_properties' : 'prdt',
-    }
-
-    def make(self, _no_object=None, _attributes={}, **_arguments):
-        """make: Make a new object.
-        Keyword argument at: The location at which to insert the object.
-        Keyword argument new: The class of the new object.
-        Keyword argument with_data: The initial data for the object.
-        Keyword argument with_properties: The initial values for properties of the object.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'crel'
-
-        aetools.keysubst(_arguments, self._argmap_make)
-        if _no_object is not None: raise TypeError('No direct arg expected')
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_move = {
-        'to' : 'insh',
-    }
-
-    def move(self, _object, _attributes={}, **_arguments):
-        """move: Move object(s) to a new location.
-        Required argument: the object for the command
-        Keyword argument to: The new location for the object(s).
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'move'
-
-        aetools.keysubst(_arguments, self._argmap_move)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def open(self, _object=None, _attributes={}, **_arguments):
-        """open: Open an object.
-        Required argument: list of objects
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'odoc'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    def print_(self, _object=None, _attributes={}, **_arguments):
-        """print: Print an object.
-        Required argument: list of objects
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'pdoc'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_quit = {
-        'saving' : 'savo',
-    }
-
-    def quit(self, _object, _attributes={}, **_arguments):
-        """quit: Quit an application.
-        Required argument: the object for the command
-        Keyword argument saving: Specifies whether changes should be saved before quitting.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'quit'
-
-        aetools.keysubst(_arguments, self._argmap_quit)
-        _arguments['----'] = _object
-
-        aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_save = {
-        'in_' : 'kfil',
-        'as' : 'fltp',
-    }
-
-    def save(self, _object, _attributes={}, **_arguments):
-        """save: Save an object.
-        Required argument: the object for the command
-        Keyword argument in_: The file in which to save the object.
-        Keyword argument as: The file type in which to save the data.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'save'
-
-        aetools.keysubst(_arguments, self._argmap_save)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_set = {
-        'to' : 'data',
-    }
-
-    def set(self, _object, _attributes={}, **_arguments):
-        """set: Set an object's data.
-        Required argument: the object for the command
-        Keyword argument to: The new value.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'core'
-        _subcode = 'setd'
-
-        aetools.keysubst(_arguments, self._argmap_set)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-
-class application(aetools.ComponentItem):
-    """application - An application's top level scripting object. """
-    want = 'capp'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'cobj'
-_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
-class _Prop_frontmost(aetools.NProperty):
-    """frontmost - Is this the frontmost (active) application? """
-    which = 'pisf'
-    want = 'bool'
-frontmost = _Prop_frontmost()
-class _Prop_name(aetools.NProperty):
-    """name - The name of the application. """
-    which = 'pnam'
-    want = 'utxt'
-name = _Prop_name()
-class _Prop_version(aetools.NProperty):
-    """version - The version of the application. """
-    which = 'vers'
-    want = 'utxt'
-version = _Prop_version()
-#        element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID  ']
-#        element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
-
-applications = application
-
-class item(aetools.ComponentItem):
-    """item - A scriptable object. """
-    want = 'cobj'
-class _Prop_class_(aetools.NProperty):
-    """class - The class of the object. """
-    which = 'pcls'
-    want = 'type'
-class _Prop_properties(aetools.NProperty):
-    """properties - All of the object's properties. """
-    which = 'pALL'
-    want = 'reco'
-
-items = item
-
-class color(aetools.ComponentItem):
-    """color - A color. """
-    want = 'colr'
-
-colors = color
-
-class window(aetools.ComponentItem):
-    """window - A window. """
-    want = 'cwin'
-class _Prop_bounds(aetools.NProperty):
-    """bounds - The bounding rectangle of the window. """
-    which = 'pbnd'
-    want = 'qdrt'
-class _Prop_closeable(aetools.NProperty):
-    """closeable - Whether the window has a close box. """
-    which = 'hclb'
-    want = 'bool'
-class _Prop_document(aetools.NProperty):
-    """document - The document whose contents are being displayed in the window. """
-    which = 'docu'
-    want = 'docu'
-class _Prop_floating(aetools.NProperty):
-    """floating - Whether the window floats. """
-    which = 'isfl'
-    want = 'bool'
-class _Prop_id(aetools.NProperty):
-    """id - The unique identifier of the window. """
-    which = 'ID  '
-    want = 'long'
-class _Prop_index(aetools.NProperty):
-    """index - The index of the window in the back-to-front window ordering. """
-    which = 'pidx'
-    want = 'long'
-class _Prop_miniaturizable(aetools.NProperty):
-    """miniaturizable - Whether the window can be miniaturized. """
-    which = 'ismn'
-    want = 'bool'
-class _Prop_miniaturized(aetools.NProperty):
-    """miniaturized - Whether the window is currently miniaturized. """
-    which = 'pmnd'
-    want = 'bool'
-class _Prop_modal(aetools.NProperty):
-    """modal - Whether the window is the application's current modal window. """
-    which = 'pmod'
-    want = 'bool'
-class _Prop_resizable(aetools.NProperty):
-    """resizable - Whether the window can be resized. """
-    which = 'prsz'
-    want = 'bool'
-class _Prop_titled(aetools.NProperty):
-    """titled - Whether the window has a title bar. """
-    which = 'ptit'
-    want = 'bool'
-class _Prop_visible(aetools.NProperty):
-    """visible - Whether the window is currently visible. """
-    which = 'pvis'
-    want = 'bool'
-class _Prop_zoomable(aetools.NProperty):
-    """zoomable - Whether the window can be zoomed. """
-    which = 'iszm'
-    want = 'bool'
-class _Prop_zoomed(aetools.NProperty):
-    """zoomed - Whether the window is currently zoomed. """
-    which = 'pzum'
-    want = 'bool'
-
-windows = window
-
-class document(aetools.ComponentItem):
-    """document - A document. """
-    want = 'docu'
-class _Prop_modified(aetools.NProperty):
-    """modified - Has the document been modified since the last save? """
-    which = 'imod'
-    want = 'bool'
-class _Prop_path(aetools.NProperty):
-    """path - The document's path. """
-    which = 'ppth'
-    want = 'utxt'
-
-documents = document
-application._superclassnames = ['item']
-application._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'frontmost' : _Prop_frontmost,
-    'name' : _Prop_name,
-    'version' : _Prop_version,
-}
-application._privelemdict = {
-    'document' : document,
-    'window' : window,
-}
-item._superclassnames = []
-item._privpropdict = {
-    'class_' : _Prop_class_,
-    'properties' : _Prop_properties,
-}
-item._privelemdict = {
-}
-color._superclassnames = ['item']
-color._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-}
-color._privelemdict = {
-}
-window._superclassnames = ['item']
-window._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'bounds' : _Prop_bounds,
-    'closeable' : _Prop_closeable,
-    'document' : _Prop_document,
-    'floating' : _Prop_floating,
-    'id' : _Prop_id,
-    'index' : _Prop_index,
-    'miniaturizable' : _Prop_miniaturizable,
-    'miniaturized' : _Prop_miniaturized,
-    'modal' : _Prop_modal,
-    'name' : _Prop_name,
-    'resizable' : _Prop_resizable,
-    'titled' : _Prop_titled,
-    'visible' : _Prop_visible,
-    'zoomable' : _Prop_zoomable,
-    'zoomed' : _Prop_zoomed,
-}
-window._privelemdict = {
-}
-document._superclassnames = ['item']
-document._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'modified' : _Prop_modified,
-    'name' : _Prop_name,
-    'path' : _Prop_path,
-}
-document._privelemdict = {
-}
-class _3c_(aetools.NComparison):
-    """< - Less than """
-class _3d_(aetools.NComparison):
-    """= - Equal """
-class _3e_(aetools.NComparison):
-    """> - Greater than """
-class contains(aetools.NComparison):
-    """contains - Contains """
-class ends_with(aetools.NComparison):
-    """ends with - Ends with """
-class starts_with(aetools.NComparison):
-    """starts with - Starts with """
-class _b2_(aetools.NComparison):
-    """\xb2 - Less than or equal to """
-class _b3_(aetools.NComparison):
-    """\xb3 - Greater than or equal to """
-_Enum_savo = {
-    'ask' : 'ask ',     # Ask the user whether or not to save the file.
-    'yes' : 'yes ',     # Save the file.
-    'no' : 'no  ',      # Do not save the file.
-}
-
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-    'cobj' : item,
-    'colr' : color,
-    'cwin' : window,
-    'docu' : document,
-}
-
-_propdeclarations = {
-    'ID  ' : _Prop_id,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'docu' : _Prop_document,
-    'hclb' : _Prop_closeable,
-    'imod' : _Prop_modified,
-    'isfl' : _Prop_floating,
-    'ismn' : _Prop_miniaturizable,
-    'iszm' : _Prop_zoomable,
-    'pALL' : _Prop_properties,
-    'pbnd' : _Prop_bounds,
-    'pcls' : _Prop_class_,
-    'pidx' : _Prop_index,
-    'pisf' : _Prop_frontmost,
-    'pmnd' : _Prop_miniaturized,
-    'pmod' : _Prop_modal,
-    'pnam' : _Prop_name,
-    'ppth' : _Prop_path,
-    'prsz' : _Prop_resizable,
-    'ptit' : _Prop_titled,
-    'pvis' : _Prop_visible,
-    'pzum' : _Prop_zoomed,
-    'vers' : _Prop_version,
-}
-
-_compdeclarations = {
-    '<   ' : _3c_,
-    '<=  ' : _b2_,
-    '=   ' : _3d_,
-    '>   ' : _3e_,
-    '>=  ' : _b3_,
-    'bgwt' : starts_with,
-    'cont' : contains,
-    'ends' : ends_with,
-}
-
-_enumdeclarations = {
-    'savo' : _Enum_savo,
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py b/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py
deleted file mode 100644 (file)
index 158623e..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-"""Suite Terminal Suite: Terms and Events for controlling the Terminal application
-Level 1, version 1
-
-Generated from /Applications/Utilities/Terminal.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = 'trmx'
-
-class Terminal_Suite_Events:
-
-    def GetURL(self, _object, _attributes={}, **_arguments):
-        """GetURL: Opens a telnet: URL
-        Required argument: the object for the command
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'GURL'
-        _subcode = 'GURL'
-
-        if _arguments: raise TypeError('No optional args expected')
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_do_script = {
-        'in_' : 'kfil',
-        'with_command' : 'cmnd',
-    }
-
-    def do_script(self, _object, _attributes={}, **_arguments):
-        """do script: Run a UNIX shell script or command
-        Required argument: the object for the command
-        Keyword argument in_: the window in which to execute the command
-        Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        Returns: the reply for the command
-        """
-        _code = 'core'
-        _subcode = 'dosc'
-
-        aetools.keysubst(_arguments, self._argmap_do_script)
-        _arguments['----'] = _object
-
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-
-class application(aetools.ComponentItem):
-    """application - The Terminal program """
-    want = 'capp'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'capp'
-_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
-class _Prop_properties(aetools.NProperty):
-    """properties - every property of the Terminal program """
-    which = 'pALL'
-    want = '****'
-properties = _Prop_properties()
-#        element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID  ']
-#        element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
-
-applications = application
-
-class window(aetools.ComponentItem):
-    """window - A Terminal window """
-    want = 'cwin'
-class _Prop_background_color(aetools.NProperty):
-    """background color - the background color for the window """
-    which = 'pbcl'
-    want = '****'
-class _Prop_bold_text_color(aetools.NProperty):
-    """bold text color - the bold text color for the window """
-    which = 'pbtc'
-    want = '****'
-class _Prop_bounds(aetools.NProperty):
-    """bounds - the boundary rectangle for the window, relative to the upper left corner of the screen """
-    which = 'pbnd'
-    want = '****'
-class _Prop_busy(aetools.NProperty):
-    """busy - Is the window busy running a process? """
-    which = 'busy'
-    want = 'bool'
-class _Prop_contents(aetools.NProperty):
-    """contents - the currently visible contents of the window """
-    which = 'pcnt'
-    want = 'utxt'
-class _Prop_cursor_color(aetools.NProperty):
-    """cursor color - the cursor color for the window """
-    which = 'pcuc'
-    want = '****'
-class _Prop_custom_title(aetools.NProperty):
-    """custom title - the custom title for the window """
-    which = 'titl'
-    want = 'utxt'
-class _Prop_frame(aetools.NProperty):
-    """frame - the origin and size of the window """
-    which = 'pfra'
-    want = '****'
-class _Prop_frontmost(aetools.NProperty):
-    """frontmost - Is the window in front of the other Terminal windows? """
-    which = 'pisf'
-    want = 'bool'
-class _Prop_history(aetools.NProperty):
-    """history - the contents of the entire scrolling buffer of the window """
-    which = 'hist'
-    want = 'utxt'
-class _Prop_normal_text_color(aetools.NProperty):
-    """normal text color - the normal text color for the window """
-    which = 'ptxc'
-    want = '****'
-class _Prop_number_of_columns(aetools.NProperty):
-    """number of columns - the number of columns in the window """
-    which = 'ccol'
-    want = 'long'
-class _Prop_number_of_rows(aetools.NProperty):
-    """number of rows - the number of rows in the window """
-    which = 'crow'
-    want = 'long'
-class _Prop_origin(aetools.NProperty):
-    """origin - the lower left coordinates of the window, relative to the lower left corner of the screen """
-    which = 'pori'
-    want = '****'
-class _Prop_position(aetools.NProperty):
-    """position - the upper left coordinates of the window, relative to the upper left corner of the screen """
-    which = 'ppos'
-    want = '****'
-class _Prop_processes(aetools.NProperty):
-    """processes - a list of the currently running processes """
-    which = 'prcs'
-    want = 'utxt'
-class _Prop_size(aetools.NProperty):
-    """size - the width and height of the window """
-    which = 'psiz'
-    want = '****'
-class _Prop_title_displays_custom_title(aetools.NProperty):
-    """title displays custom title - Does the title for the window contain a custom title? """
-    which = 'tdct'
-    want = 'bool'
-class _Prop_title_displays_device_name(aetools.NProperty):
-    """title displays device name - Does the title for the window contain the device name? """
-    which = 'tddn'
-    want = 'bool'
-class _Prop_title_displays_file_name(aetools.NProperty):
-    """title displays file name - Does the title for the window contain the file name? """
-    which = 'tdfn'
-    want = 'bool'
-class _Prop_title_displays_shell_path(aetools.NProperty):
-    """title displays shell path - Does the title for the window contain the shell path? """
-    which = 'tdsp'
-    want = 'bool'
-class _Prop_title_displays_window_size(aetools.NProperty):
-    """title displays window size - Does the title for the window contain the window size? """
-    which = 'tdws'
-    want = 'bool'
-
-windows = window
-application._superclassnames = []
-from . import Standard_Suite
-application._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'properties' : _Prop_properties,
-}
-application._privelemdict = {
-    'document' : Standard_Suite.document,
-    'window' : window,
-}
-window._superclassnames = []
-window._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'background_color' : _Prop_background_color,
-    'bold_text_color' : _Prop_bold_text_color,
-    'bounds' : _Prop_bounds,
-    'busy' : _Prop_busy,
-    'contents' : _Prop_contents,
-    'cursor_color' : _Prop_cursor_color,
-    'custom_title' : _Prop_custom_title,
-    'frame' : _Prop_frame,
-    'frontmost' : _Prop_frontmost,
-    'history' : _Prop_history,
-    'normal_text_color' : _Prop_normal_text_color,
-    'number_of_columns' : _Prop_number_of_columns,
-    'number_of_rows' : _Prop_number_of_rows,
-    'origin' : _Prop_origin,
-    'position' : _Prop_position,
-    'processes' : _Prop_processes,
-    'properties' : _Prop_properties,
-    'size' : _Prop_size,
-    'title_displays_custom_title' : _Prop_title_displays_custom_title,
-    'title_displays_device_name' : _Prop_title_displays_device_name,
-    'title_displays_file_name' : _Prop_title_displays_file_name,
-    'title_displays_shell_path' : _Prop_title_displays_shell_path,
-    'title_displays_window_size' : _Prop_title_displays_window_size,
-}
-window._privelemdict = {
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'capp' : application,
-    'cwin' : window,
-}
-
-_propdeclarations = {
-    'busy' : _Prop_busy,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'ccol' : _Prop_number_of_columns,
-    'crow' : _Prop_number_of_rows,
-    'hist' : _Prop_history,
-    'pALL' : _Prop_properties,
-    'pbcl' : _Prop_background_color,
-    'pbnd' : _Prop_bounds,
-    'pbtc' : _Prop_bold_text_color,
-    'pcnt' : _Prop_contents,
-    'pcuc' : _Prop_cursor_color,
-    'pfra' : _Prop_frame,
-    'pisf' : _Prop_frontmost,
-    'pori' : _Prop_origin,
-    'ppos' : _Prop_position,
-    'prcs' : _Prop_processes,
-    'psiz' : _Prop_size,
-    'ptxc' : _Prop_normal_text_color,
-    'tdct' : _Prop_title_displays_custom_title,
-    'tddn' : _Prop_title_displays_device_name,
-    'tdfn' : _Prop_title_displays_file_name,
-    'tdsp' : _Prop_title_displays_shell_path,
-    'tdws' : _Prop_title_displays_window_size,
-    'titl' : _Prop_custom_title,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Terminal/Text_Suite.py b/Lib/plat-mac/lib-scriptpackages/Terminal/Text_Suite.py
deleted file mode 100644 (file)
index 1303208..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-"""Suite Text Suite: A set of basic classes for text processing.
-Level 1, version 1
-
-Generated from /Applications/Utilities/Terminal.app
-AETE/AEUT resource version 1/0, language 0, script 0
-"""
-
-import aetools
-import MacOS
-
-_code = '????'
-
-class Text_Suite_Events:
-
-    pass
-
-
-class attachment(aetools.ComponentItem):
-    """attachment - Represents an inline text attachment.  This class is used mainly for make commands. """
-    want = 'atts'
-class _Prop__3c_Inheritance_3e_(aetools.NProperty):
-    """<Inheritance> - All of the properties of the superclass. """
-    which = 'c@#^'
-    want = 'ctxt'
-class _Prop_file_name(aetools.NProperty):
-    """file name - The path to the file for the attachment """
-    which = 'atfn'
-    want = 'utxt'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-class attribute_run(aetools.ComponentItem):
-    """attribute run - This subdivides the text into chunks that all have the same attributes. """
-    want = 'catr'
-class _Prop_color(aetools.NProperty):
-    """color - The color of the first character. """
-    which = 'colr'
-    want = 'colr'
-class _Prop_font(aetools.NProperty):
-    """font - The name of the font of the first character. """
-    which = 'font'
-    want = 'utxt'
-class _Prop_size(aetools.NProperty):
-    """size - The size in points of the first character. """
-    which = 'ptsz'
-    want = 'long'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-attribute_runs = attribute_run
-
-class character(aetools.ComponentItem):
-    """character - This subdivides the text into characters. """
-    want = 'cha '
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-characters = character
-
-class paragraph(aetools.ComponentItem):
-    """paragraph - This subdivides the text into paragraphs. """
-    want = 'cpar'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-paragraphs = paragraph
-
-class text(aetools.ComponentItem):
-    """text - Rich (styled) text """
-    want = 'ctxt'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-class word(aetools.ComponentItem):
-    """word - This subdivides the text into words. """
-    want = 'cwor'
-#        element 'catr' as ['indx', 'rele', 'rang', 'test']
-#        element 'cha ' as ['indx', 'rele', 'rang', 'test']
-#        element 'cpar' as ['indx', 'rele', 'rang', 'test']
-#        element 'cwor' as ['indx', 'rele', 'rang', 'test']
-
-words = word
-attachment._superclassnames = ['text']
-attachment._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'file_name' : _Prop_file_name,
-}
-attachment._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-from . import Standard_Suite
-attribute_run._superclassnames = ['item']
-attribute_run._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-attribute_run._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-character._superclassnames = ['item']
-character._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-character._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-paragraph._superclassnames = ['item']
-paragraph._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-paragraph._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-text._superclassnames = ['item']
-text._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-text._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-word._superclassnames = ['item']
-word._privpropdict = {
-    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
-    'color' : _Prop_color,
-    'font' : _Prop_font,
-    'size' : _Prop_size,
-}
-word._privelemdict = {
-    'attribute_run' : attribute_run,
-    'character' : character,
-    'paragraph' : paragraph,
-    'word' : word,
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'atts' : attachment,
-    'catr' : attribute_run,
-    'cha ' : character,
-    'cpar' : paragraph,
-    'ctxt' : text,
-    'cwor' : word,
-}
-
-_propdeclarations = {
-    'atfn' : _Prop_file_name,
-    'c@#^' : _Prop__3c_Inheritance_3e_,
-    'colr' : _Prop_color,
-    'font' : _Prop_font,
-    'ptsz' : _Prop_size,
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-}
diff --git a/Lib/plat-mac/lib-scriptpackages/Terminal/__init__.py b/Lib/plat-mac/lib-scriptpackages/Terminal/__init__.py
deleted file mode 100644 (file)
index d400409..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-"""
-Package generated from /Applications/Utilities/Terminal.app
-"""
-import aetools
-Error = aetools.Error
-from . import Standard_Suite
-from . import Text_Suite
-from . import Terminal_Suite
-
-
-_code_to_module = {
-    '????' : Standard_Suite,
-    '????' : Text_Suite,
-    'trmx' : Terminal_Suite,
-}
-
-
-
-_code_to_fullname = {
-    '????' : ('Terminal.Standard_Suite', 'Standard_Suite'),
-    '????' : ('Terminal.Text_Suite', 'Text_Suite'),
-    'trmx' : ('Terminal.Terminal_Suite', 'Terminal_Suite'),
-}
-
-from Terminal.Standard_Suite import *
-from Terminal.Text_Suite import *
-from Terminal.Terminal_Suite import *
-
-def getbaseclasses(v):
-    if not getattr(v, '_propdict', None):
-        v._propdict = {}
-        v._elemdict = {}
-        for superclassname in getattr(v, '_superclassnames', []):
-            superclass = eval(superclassname)
-            getbaseclasses(superclass)
-            v._propdict.update(getattr(superclass, '_propdict', {}))
-            v._elemdict.update(getattr(superclass, '_elemdict', {}))
-        v._propdict.update(getattr(v, '_privpropdict', {}))
-        v._elemdict.update(getattr(v, '_privelemdict', {}))
-
-import StdSuites
-
-#
-# Set property and element dictionaries now that all classes have been defined
-#
-getbaseclasses(color)
-getbaseclasses(window)
-getbaseclasses(application)
-getbaseclasses(item)
-getbaseclasses(document)
-getbaseclasses(window)
-getbaseclasses(application)
-getbaseclasses(character)
-getbaseclasses(attachment)
-getbaseclasses(paragraph)
-getbaseclasses(word)
-getbaseclasses(attribute_run)
-getbaseclasses(text)
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-    'colr' : color,
-    'cwin' : window,
-    'capp' : application,
-    'cobj' : item,
-    'docu' : document,
-    'cwin' : window,
-    'capp' : application,
-    'cha ' : character,
-    'atts' : attachment,
-    'cpar' : paragraph,
-    'cwor' : word,
-    'catr' : attribute_run,
-    'ctxt' : text,
-}
-
-
-class Terminal(Standard_Suite_Events,
-        Text_Suite_Events,
-        Terminal_Suite_Events,
-        aetools.TalkTo):
-    _signature = 'trmx'
-
-    _moduleName = 'Terminal'
-
-    _elemdict = application._elemdict
-    _propdict = application._propdict
diff --git a/Lib/plat-mac/lib-scriptpackages/_builtinSuites/__init__.py b/Lib/plat-mac/lib-scriptpackages/_builtinSuites/__init__.py
deleted file mode 100644 (file)
index b327d58..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Manually generated suite used as base class for StdSuites Required and Standard
-suites. This is needed because the events and enums in this suite belong
-in the Required suite according to the Apple docs, but they often seem to be
-in the Standard suite.
-"""
-import aetools
-from . import builtin_Suite
-
-
-_code_to_module = {
-        'reqd' : builtin_Suite,
-        'core' : builtin_Suite,
-}
-
-
-
-_code_to_fullname = {
-        'reqd' : ('_builtinSuites.builtin_Suite', 'builtin_Suite'),
-        'core' : ('_builtinSuites.builtin_Suite', 'builtin_Suite'),
-}
-
-from _builtinSuites.builtin_Suite import *
-
-class _builtinSuites(builtin_Suite_Events,
-                aetools.TalkTo):
-    _signature = 'ascr'
diff --git a/Lib/plat-mac/lib-scriptpackages/_builtinSuites/builtin_Suite.py b/Lib/plat-mac/lib-scriptpackages/_builtinSuites/builtin_Suite.py
deleted file mode 100644 (file)
index a5ee8c6..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-"""Suite builtin_Suite: Every application supports open, reopen, print, run, and quit
-Level 1, version 1
-"""
-
-import aetools
-import MacOS
-
-_code = 'aevt'
-
-class builtin_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.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: Run an application.      Most applications will open an empty, untitled window.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'oapp'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 reopen(self, _no_object=None, _attributes={}, **_arguments):
-        """reopen: Reactivate a running application.  Some applications will open a new untitled window if no window is open.
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'rapp'
-
-        if _arguments: raise TypeError('No optional args expected')
-        if _no_object is not 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 _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.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_quit = {
-            'saving' : 'savo',
-    }
-
-    def quit(self, _no_object=None, _attributes={}, **_arguments):
-        """quit: Quit an application
-        Keyword argument saving: specifies whether to save currently open documents
-        Keyword argument _attributes: AppleEvent attribute dictionary
-        """
-        _code = 'aevt'
-        _subcode = 'quit'
-
-        aetools.keysubst(_arguments, self._argmap_quit)
-        if _no_object is not None: raise TypeError('No direct arg expected')
-
-        aetools.enumsubst(_arguments, 'savo', _Enum_savo)
-
-        _reply, _arguments, _attributes = self.send(_code, _subcode,
-                        _arguments, _attributes)
-        if _arguments.get('errn', 0):
-            raise aetools.Error(aetools.decodeerror(_arguments))
-        # XXXX Optionally decode result
-        if _arguments.has_key('----'):
-            return _arguments['----']
-
-    _argmap_close = {
-            'saving' : 'savo',
-            'saving_in' : 'kfil',
-    }
-
-_Enum_savo = {
-        'yes' : 'yes ', # Save objects now
-        'no' : 'no      ',      # Do not save objects
-        'ask' : 'ask ', # Ask the user whether to save
-}
-
-#
-# Indices of types declared in this module
-#
-_classdeclarations = {
-}
-
-_propdeclarations = {
-}
-
-_compdeclarations = {
-}
-
-_enumdeclarations = {
-        'savo' : _Enum_savo,
-}
diff --git a/Lib/plat-mac/macerrors.py b/Lib/plat-mac/macerrors.py
deleted file mode 100644 (file)
index 4d7ca60..0000000
+++ /dev/null
@@ -1,1853 +0,0 @@
-# -coding=latin1-
-svTempDisable   =   -32768  #svTempDisable
-svDisabled  =   -32640  #Reserve range -32640 to -32768 for Apple temp disables.
-fontNotOutlineErr   =   -32615  #bitmap font passed to routine that does outlines only
-kURL68kNotSupportedError    =   -30788  #kURL68kNotSupportedError
-kURLAccessNotAvailableError =   -30787  #kURLAccessNotAvailableError
-kURLInvalidConfigurationError   =   -30786  #kURLInvalidConfigurationError
-kURLExtensionFailureError   =   -30785  #kURLExtensionFailureError
-kURLFileEmptyError  =   -30783  #kURLFileEmptyError
-kURLInvalidCallError    =   -30781  #kURLInvalidCallError
-kURLUnsettablePropertyError =   -30780  #kURLUnsettablePropertyError
-kURLPropertyBufferTooSmallError =   -30779  #kURLPropertyBufferTooSmallError
-kURLUnknownPropertyError    =   -30778  #kURLUnknownPropertyError
-kURLPropertyNotYetKnownError    =   -30777  #kURLPropertyNotYetKnownError
-kURLAuthenticationError =   -30776  #kURLAuthenticationError
-kURLServerBusyError =   -30775  #kURLServerBusyError
-kURLUnsupportedSchemeError  =   -30774  #kURLUnsupportedSchemeError
-kURLInvalidURLError =   -30773  #kURLInvalidURLError
-kURLDestinationExistsError  =   -30772  #kURLDestinationExistsError
-kURLProgressAlreadyDisplayedError   =   -30771  #kURLProgressAlreadyDisplayedError
-kURLInvalidURLReferenceError    =   -30770  #kURLInvalidURLReferenceError
-controlHandleInvalidErr =   -30599  #controlHandleInvalidErr
-controlInvalidDataVersionErr    =   -30597  #controlInvalidDataVersionErr
-errItemNotControl   =   -30596  #errItemNotControl
-errCantEmbedRoot    =   -30595  #errCantEmbedRoot
-errCantEmbedIntoSelf    =   -30594  #errCantEmbedIntoSelf
-errWindowRegionCodeInvalid  =   -30593  #errWindowRegionCodeInvalid
-errControlHiddenOrDisabled  =   -30592  #errControlHiddenOrDisabled
-errDataSizeMismatch =   -30591  #errDataSizeMismatch
-errControlIsNotEmbedder =   -30590  #errControlIsNotEmbedder
-errControlsAlreadyExist =   -30589  #errControlsAlreadyExist
-errInvalidPartCode  =   -30588  #errInvalidPartCode
-errRootAlreadyExists    =   -30587  #errRootAlreadyExists
-errNoRootControl    =   -30586  #errNoRootControl
-errCouldntSetFocus  =   -30585  #errCouldntSetFocus
-errUnknownControl   =   -30584  #errUnknownControl
-errWindowDoesntSupportFocus =   -30583  #errWindowDoesntSupportFocus
-errControlDoesntSupportFocus    =   -30582  #errControlDoesntSupportFocus
-errDataNotSupported =   -30581  #errDataNotSupported
-errMessageNotSupported  =   -30580  #errMessageNotSupported
-themeMonitorDepthNotSupportedErr    =   -30567  #theme not supported at monitor depth
-themeScriptFontNotFoundErr  =   -30566  #theme font requested for uninstalled script system
-themeBadCursorIndexErr  =   -30565  #themeBadCursorIndexErr
-themeHasNoAccentsErr    =   -30564  #themeHasNoAccentsErr
-themeBadTextColorErr    =   -30563  #themeBadTextColorErr
-themeProcessNotRegisteredErr    =   -30562  #themeProcessNotRegisteredErr
-themeProcessRegisteredErr   =   -30561  #themeProcessRegisteredErr
-themeInvalidBrushErr    =   -30560  #pattern index invalid
-qtvrUninitialized   =   -30555  #qtvrUninitialized
-qtvrLibraryLoadErr  =   -30554  #qtvrLibraryLoadErr
-streamingNodeNotReadyErr    =   -30553  #streamingNodeNotReadyErr
-noMemoryNodeFailedInitialize    =   -30552  #noMemoryNodeFailedInitialize
-invalidHotSpotIDErr =   -30551  #invalidHotSpotIDErr
-invalidNodeFormatErr    =   -30550  #invalidNodeFormatErr
-limitReachedErr =   -30549  #limitReachedErr
-settingNotSupportedByNodeErr    =   -30548  #settingNotSupportedByNodeErr
-propertyNotSupportedByNodeErr   =   -30547  #propertyNotSupportedByNodeErr
-timeNotInViewErr    =   -30546  #timeNotInViewErr
-invalidViewStateErr =   -30545  #invalidViewStateErr
-invalidNodeIDErr    =   -30544  #invalidNodeIDErr
-selectorNotSupportedByNodeErr   =   -30543  #selectorNotSupportedByNodeErr
-callNotSupportedByNodeErr   =   -30542  #callNotSupportedByNodeErr
-constraintReachedErr    =   -30541  #constraintReachedErr
-notAQTVRMovieErr    =   -30540  #notAQTVRMovieErr
-kFBCnoSuchHit   =   -30532  #kFBCnoSuchHit
-kFBCbadSearchSession    =   -30531  #kFBCbadSearchSession
-kFBCindexDiskIOFailed   =   -30530  #kFBCindexDiskIOFailed
-kFBCsummarizationCanceled   =   -30529  #kFBCsummarizationCanceled
-kFBCbadIndexFileVersion =   -30528  #kFBCbadIndexFileVersion
-kFBCanalysisNotAvailable    =   -30527  #kFBCanalysisNotAvailable
-kFBCillegalSessionChange    =   -30526  #tried to add/remove vols to a session
-kFBCsomeFilesNotIndexed =   -30525  #kFBCsomeFilesNotIndexed
-kFBCsearchFailed    =   -30524  #kFBCsearchFailed
-kFBCindexNotAvailable   =   -30523  #kFBCindexNotAvailable
-kFBCindexFileDestroyed  =   -30522  #kFBCindexFileDestroyed
-kFBCaccessCanceled  =   -30521  #kFBCaccessCanceled
-kFBCindexingCanceled    =   -30520  #kFBCindexingCanceled
-kFBCnoSearchSession =   -30519  #kFBCnoSearchSession
-kFBCindexNotFound   =   -30518  #kFBCindexNotFound
-kFBCflushFailed =   -30517  #kFBCflushFailed
-kFBCaddDocFailed    =   -30516  #kFBCaddDocFailed
-kFBCaccessorStoreFailed =   -30515  #kFBCaccessorStoreFailed
-kFBCindexCreationFailed =   -30514  #couldn't create index
-kFBCmergingFailed   =   -30513  #couldn't merge index files
-kFBCtokenizationFailed  =   -30512  #couldn't read from document or query
-kFBCmoveFailed  =   -30511  #V-Twin exception caught
-kFBCdeletionFailed  =   -30510  #V-Twin exception caught
-kFBCcommitFailed    =   -30509  #V-Twin exception caught
-kFBCindexingFailed  =   -30508  #V-Twin exception caught
-kFBCvalidationFailed    =   -30507  #V-Twin exception caught
-kFBCcompactionFailed    =   -30506  #V-Twin exception caught
-kFBCbadIndexFile    =   -30505  #bad FSSpec, or bad data in file
-kFBCfileNotIndexed  =   -30504  #kFBCfileNotIndexed
-kFBCbadParam    =   -30503  #kFBCbadParam
-kFBCallocFailed =   -30502  #probably low memory
-kFBCnoIndexesFound  =   -30501  #kFBCnoIndexesFound
-kFBCvTwinExceptionErr   =   -30500  #no telling what it was
-kDSpStereoContextErr    =   -30450  #kDSpStereoContextErr
-kDSpInternalErr =   -30449  #kDSpInternalErr
-kDSpConfirmSwitchWarning    =   -30448  #kDSpConfirmSwitchWarning
-kDSpFrameRateNotReadyErr    =   -30447  #kDSpFrameRateNotReadyErr
-kDSpContextNotFoundErr  =   -30446  #kDSpContextNotFoundErr
-kDSpContextNotReservedErr   =   -30445  #kDSpContextNotReservedErr
-kDSpContextAlreadyReservedErr   =   -30444  #kDSpContextAlreadyReservedErr
-kDSpInvalidAttributesErr    =   -30443  #kDSpInvalidAttributesErr
-kDSpInvalidContextErr   =   -30442  #kDSpInvalidContextErr
-kDSpSystemSWTooOldErr   =   -30441  #kDSpSystemSWTooOldErr
-kDSpNotInitializedErr   =   -30440  #kDSpNotInitializedErr
-kISpListBusyErr =   -30429  #kISpListBusyErr
-kISpDeviceActiveErr =   -30428  #kISpDeviceActiveErr
-kISpSystemActiveErr =   -30427  #kISpSystemActiveErr
-kISpDeviceInactiveErr   =   -30426  #kISpDeviceInactiveErr
-kISpSystemInactiveErr   =   -30425  #kISpSystemInactiveErr
-kISpElementNotInListErr =   -30424  #kISpElementNotInListErr
-kISpElementInListErr    =   -30423  #kISpElementInListErr
-kISpBufferToSmallErr    =   -30422  #kISpBufferToSmallErr
-kISpSystemListErr   =   -30421  #kISpSystemListErr
-kISpInternalErr =   -30420  #kISpInternalErr
-kNSpJoinFailedErr   =   -30399  #kNSpJoinFailedErr
-kNSpCantBlockErr    =   -30398  #kNSpCantBlockErr
-kNSpMessageTooBigErr    =   -30397  #kNSpMessageTooBigErr
-kNSpSendFailedErr   =   -30396  #kNSpSendFailedErr
-kNSpConnectFailedErr    =   -30395  #kNSpConnectFailedErr
-kNSpGameTerminatedErr   =   -30394  #kNSpGameTerminatedErr
-kNSpTimeoutErr  =   -30393  #kNSpTimeoutErr
-kNSpInvalidProtocolListErr  =   -30392  #kNSpInvalidProtocolListErr
-kNSpInvalidProtocolRefErr   =   -30391  #kNSpInvalidProtocolRefErr
-kNSpInvalidDefinitionErr    =   -30390  #kNSpInvalidDefinitionErr
-kNSpAddPlayerFailedErr  =   -30389  #kNSpAddPlayerFailedErr
-kNSpCreateGroupFailedErr    =   -30388  #kNSpCreateGroupFailedErr
-kNSpNoHostVolunteersErr =   -30387  #kNSpNoHostVolunteersErr
-kNSpNoGroupsErr =   -30386  #kNSpNoGroupsErr
-kNSpNoPlayersErr    =   -30385  #kNSpNoPlayersErr
-kNSpInvalidGroupIDErr   =   -30384  #kNSpInvalidGroupIDErr
-kNSpInvalidPlayerIDErr  =   -30383  #kNSpInvalidPlayerIDErr
-kNSpNameRequiredErr =   -30382  #kNSpNameRequiredErr
-kNSpFeatureNotImplementedErr    =   -30381  #kNSpFeatureNotImplementedErr
-kNSpAddressInUseErr =   -30380  #kNSpAddressInUseErr
-kNSpRemovePlayerFailedErr   =   -30379  #kNSpRemovePlayerFailedErr
-kNSpFreeQExhaustedErr   =   -30378  #kNSpFreeQExhaustedErr
-kNSpInvalidAddressErr   =   -30377  #kNSpInvalidAddressErr
-kNSpNotAdvertisingErr   =   -30376  #kNSpNotAdvertisingErr
-kNSpAlreadyAdvertisingErr   =   -30374  #kNSpAlreadyAdvertisingErr
-kNSpMemAllocationErr    =   -30373  #kNSpMemAllocationErr
-kNSpOTVersionTooOldErr  =   -30371  #kNSpOTVersionTooOldErr
-kNSpOTNotPresentErr =   -30370  #kNSpOTNotPresentErr
-kNSpInvalidParameterErr =   -30369  #kNSpInvalidParameterErr
-kNSpInvalidGameRefErr   =   -30367  #kNSpInvalidGameRefErr
-kNSpProtocolNotAvailableErr =   -30366  #kNSpProtocolNotAvailableErr
-kNSpHostFailedErr   =   -30365  #kNSpHostFailedErr
-kNSpPipeFullErr =   -30364  #kNSpPipeFullErr
-kNSpTopologyNotSupportedErr =   -30362  #kNSpTopologyNotSupportedErr
-kNSpAlreadyInitializedErr   =   -30361  #kNSpAlreadyInitializedErr
-kNSpInitializationFailedErr =   -30360  #kNSpInitializationFailedErr
-kSSpScaleToZeroErr  =   -30344  #kSSpScaleToZeroErr
-kSSpParallelUpVectorErr =   -30343  #kSSpParallelUpVectorErr
-kSSpCantInstallErr  =   -30342  #kSSpCantInstallErr
-kSSpVersionErr  =   -30341  #kSSpVersionErr
-kSSpInternalErr =   -30340  #kSSpInternalErr
-kALMInternalErr =   -30049  #kALMInternalErr
-kALMGroupNotFoundErr    =   -30048  #kALMGroupNotFoundErr
-kALMNoSuchModuleErr =   -30047  #kALMNoSuchModuleErr
-kALMModuleCommunicationErr  =   -30046  #kALMModuleCommunicationErr
-kALMDuplicateModuleErr  =   -30045  #kALMDuplicateModuleErr
-kALMInstallationErr =   -30044  #kALMInstallationErr
-kALMDeferSwitchErr  =   -30043  #kALMDeferSwitchErr
-kALMRebootFlagsLevelErr =   -30042  #kALMRebootFlagsLevelErr
-kLocalesDefaultDisplayStatus    =   -30029  #Requested display locale unavailable, used default
-kLocalesTableFormatErr  =   -30002  #kLocalesTableFormatErr
-kLocalesBufferTooSmallErr   =   -30001  #kLocalesBufferTooSmallErr
-kFNSNameNotFoundErr =   -29589  #The name with the requested paramters was not found
-kFNSBadFlattenedSizeErr =   -29587  #flattened size didn't match input or was too small
-kFNSInsufficientDataErr =   -29586  #insufficient data for the operation
-kFNSMismatchErr =   -29585  #reference didn't match or wasn't found in profile
-kFNSDuplicateReferenceErr   =   -29584  #the ref. being added is already in the profile
-kFNSBadProfileVersionErr    =   -29583  #profile version is out of known range
-kFNSInvalidProfileErr   =   -29582  #profile is NULL or otherwise bad
-kFNSBadReferenceVersionErr  =   -29581  #ref. version is out of known range
-kFNSInvalidReferenceErr =   -29580  #ref. was NULL or otherwise bad
-kCollateInvalidCollationRef =   -29507  #kCollateInvalidCollationRef
-kCollateBufferTooSmall  =   -29506  #kCollateBufferTooSmall
-kCollateInvalidChar =   -29505  #kCollateInvalidChar
-kCollatePatternNotFoundErr  =   -29504  #kCollatePatternNotFoundErr
-kCollateUnicodeConvertFailedErr =   -29503  #kCollateUnicodeConvertFailedErr
-kCollateMissingUnicodeTableErr  =   -29502  #kCollateMissingUnicodeTableErr
-kCollateInvalidOptions  =   -29501  #kCollateInvalidOptions
-kCollateAttributesNotFoundErr   =   -29500  #kCollateAttributesNotFoundErr
-kMPInvalidIDErr =   -29299  #kMPInvalidIDErr
-kMPInsufficientResourcesErr =   -29298  #kMPInsufficientResourcesErr
-kMPTaskAbortedErr   =   -29297  #kMPTaskAbortedErr
-kMPTimeoutErr   =   -29296  #kMPTimeoutErr
-kMPDeletedErr   =   -29295  #kMPDeletedErr
-kMPBlueBlockingErr  =   -29293  #kMPBlueBlockingErr
-kMPTaskStoppedErr   =   -29292  #A convention used with MPThrowException.
-kMPTaskBlockedErr   =   -29291  #kMPTaskBlockedErr
-kMPTaskCreatedErr   =   -29290  #kMPTaskCreatedErr
-kMPProcessTerminatedErr =   -29289  #kMPProcessTerminatedErr
-kMPProcessCreatedErr    =   -29288  #kMPProcessCreatedErr
-kMPPrivilegedErr    =   -29276  #kMPPrivilegedErr
-kMPIterationEndErr  =   -29275  #kMPIterationEndErr
-kUCTextBreakLocatorMissingType  =   -25341  #Unicode text break error
-kUCOutputBufferTooSmall =   -25340  #Output buffer too small for Unicode string result
-errKCCreateChainFailed  =   -25318  #errKCCreateChainFailed
-errKCDataNotModifiable  =   -25317  #errKCDataNotModifiable
-errKCDataNotAvailable   =   -25316  #errKCDataNotAvailable
-errKCInteractionRequired    =   -25315  #errKCInteractionRequired
-errKCNoPolicyModule =   -25314  #errKCNoPolicyModule
-errKCNoCertificateModule    =   -25313  #errKCNoCertificateModule
-errKCNoStorageModule    =   -25312  #errKCNoStorageModule
-errKCKeySizeNotAllowed  =   -25311  #errKCKeySizeNotAllowed
-errKCWrongKCVersion =   -25310  #errKCWrongKCVersion
-errKCReadOnlyAttr   =   -25309  #errKCReadOnlyAttr
-errKCInteractionNotAllowed  =   -25308  #errKCInteractionNotAllowed
-errKCNoDefaultKeychain  =   -25307  #errKCNoDefaultKeychain
-errKCNoSuchClass    =   -25306  #errKCNoSuchClass
-errKCInvalidSearchRef   =   -25305  #errKCInvalidSearchRef
-errKCInvalidItemRef =   -25304  #errKCInvalidItemRef
-errKCNoSuchAttr =   -25303  #errKCNoSuchAttr
-errKCDataTooLarge   =   -25302  #errKCDataTooLarge
-errKCBufferTooSmall =   -25301  #errKCBufferTooSmall
-errKCItemNotFound   =   -25300  #errKCItemNotFound
-errKCDuplicateItem  =   -25299  #errKCDuplicateItem
-errKCInvalidCallback    =   -25298  #errKCInvalidCallback
-errKCDuplicateCallback  =   -25297  #errKCDuplicateCallback
-errKCDuplicateKeychain  =   -25296  #errKCDuplicateKeychain
-errKCInvalidKeychain    =   -25295  #errKCInvalidKeychain
-errKCNoSuchKeychain =   -25294  #errKCNoSuchKeychain
-errKCAuthFailed =   -25293  #errKCAuthFailed
-errKCReadOnly   =   -25292  #errKCReadOnly
-errKCNotAvailable   =   -25291  #errKCNotAvailable
-printerStatusOpCodeNotSupportedErr  =   -25280  #printerStatusOpCodeNotSupportedErr
-kTXNOutsideOfFrameErr   =   -22018  #kTXNOutsideOfFrameErr
-kTXNOutsideOfLineErr    =   -22017  #kTXNOutsideOfLineErr
-kTXNATSUIIsNotInstalledErr  =   -22016  #kTXNATSUIIsNotInstalledErr
-kTXNDataTypeNotAllowedErr   =   -22015  #kTXNDataTypeNotAllowedErr
-kTXNCopyNotAllowedInEchoModeErr =   -22014  #kTXNCopyNotAllowedInEchoModeErr
-kTXNCannotTurnTSMOffWhenUsingUnicodeErr =   -22013  #kTXNCannotTurnTSMOffWhenUsingUnicodeErr
-kTXNAlreadyInitializedErr   =   -22012  #kTXNAlreadyInitializedErr
-kTXNInvalidRunIndex =   -22011  #kTXNInvalidRunIndex
-kTXNSomeOrAllTagsInvalidForRunErr   =   -22010  #kTXNSomeOrAllTagsInvalidForRunErr
-kTXNAttributeTagInvalidForRunErr    =   -22009  #dataValue is set to this per invalid tag
-kTXNNoMatchErr  =   -22008  #kTXNNoMatchErr
-kTXNRunIndexOutofBoundsErr  =   -22007  #kTXNRunIndexOutofBoundsErr
-kTXNCannotSetAutoIndentErr  =   -22006  #kTXNCannotSetAutoIndentErr
-kTXNBadDefaultFileTypeWarning   =   -22005  #kTXNBadDefaultFileTypeWarning
-kTXNUserCanceledOperationErr    =   -22004  #kTXNUserCanceledOperationErr
-kTXNIllegalToCrossDataBoundariesErr =   -22003  #kTXNIllegalToCrossDataBoundariesErr
-kTXNInvalidFrameIDErr   =   -22002  #kTXNInvalidFrameIDErr
-kTXNCannotAddFrameErr   =   -22001  #kTXNCannotAddFrameErr
-kTXNEndIterationErr =   -22000  #kTXNEndIterationErr
-invalidIndexErr =   -20002  #The recordIndex parameter is not valid.
-recordDataTooBigErr =   -20001  #The record data is bigger than buffer size (1024 bytes).
-unknownInsertModeErr    =   -20000  #There is no such an insert mode.
-kModemScriptMissing =   -14002  #kModemScriptMissing
-kModemPreferencesMissing    =   -14001  #kModemPreferencesMissing
-kModemOutOfMemory   =   -14000  #kModemOutOfMemory
-kHIDBaseError   =   -13950  #kHIDBaseError
-kHIDNullStateErr    =   -13949  #kHIDNullStateErr
-kHIDBufferTooSmallErr   =   -13948  #kHIDBufferTooSmallErr
-kHIDValueOutOfRangeErr  =   -13947  #kHIDValueOutOfRangeErr
-kHIDUsageNotFoundErr    =   -13946  #kHIDUsageNotFoundErr
-kHIDNotValueArrayErr    =   -13945  #kHIDNotValueArrayErr
-kHIDInvalidPreparsedDataErr =   -13944  #kHIDInvalidPreparsedDataErr
-kHIDIncompatibleReportErr   =   -13943  #kHIDIncompatibleReportErr
-kHIDBadLogPhysValuesErr =   -13942  #kHIDBadLogPhysValuesErr
-kHIDInvalidReportTypeErr    =   -13941  #kHIDInvalidReportTypeErr
-kHIDInvalidReportLengthErr  =   -13940  #kHIDInvalidReportLengthErr
-kHIDNullPointerErr  =   -13939  #kHIDNullPointerErr
-kHIDBadParameterErr =   -13938  #kHIDBadParameterErr
-kHIDNotEnoughMemoryErr  =   -13937  #kHIDNotEnoughMemoryErr
-kHIDEndOfDescriptorErr  =   -13936  #kHIDEndOfDescriptorErr
-kHIDUsagePageZeroErr    =   -13935  #kHIDUsagePageZeroErr
-kHIDBadLogicalMinimumErr    =   -13934  #kHIDBadLogicalMinimumErr
-kHIDBadLogicalMaximumErr    =   -13933  #kHIDBadLogicalMaximumErr
-kHIDInvertedLogicalRangeErr =   -13932  #kHIDInvertedLogicalRangeErr
-kHIDInvertedPhysicalRangeErr    =   -13931  #kHIDInvertedPhysicalRangeErr
-kHIDUnmatchedUsageRangeErr  =   -13930  #kHIDUnmatchedUsageRangeErr
-kHIDInvertedUsageRangeErr   =   -13929  #kHIDInvertedUsageRangeErr
-kHIDUnmatchedStringRangeErr =   -13928  #kHIDUnmatchedStringRangeErr
-kHIDUnmatchedDesignatorRangeErr =   -13927  #kHIDUnmatchedDesignatorRangeErr
-kHIDReportSizeZeroErr   =   -13926  #kHIDReportSizeZeroErr
-kHIDReportCountZeroErr  =   -13925  #kHIDReportCountZeroErr
-kHIDReportIDZeroErr =   -13924  #kHIDReportIDZeroErr
-kHIDInvalidRangePageErr =   -13923  #kHIDInvalidRangePageErr
-kHIDDeviceNotReady  =   -13910  #The device is still initializing, try again later
-kHIDVersionIncompatibleErr  =   -13909  #kHIDVersionIncompatibleErr
-debuggingNoMatchErr =   -13887  #debugging component or option not found at this index
-debuggingNoCallbackErr  =   -13886  #debugging component has no callback
-debuggingInvalidNameErr =   -13885  #componentName or optionName is invalid (NULL)
-debuggingInvalidOptionErr   =   -13884  #optionSelectorNum is not registered
-debuggingInvalidSignatureErr    =   -13883  #componentSignature not registered
-debuggingDuplicateOptionErr =   -13882  #optionSelectorNum already registered
-debuggingDuplicateSignatureErr  =   -13881  #componentSignature already registered
-debuggingExecutionContextErr    =   -13880  #routine cannot be called at this time
-kBridgeSoftwareRunningCantSleep =   -13038  #kBridgeSoftwareRunningCantSleep
-kNoSuchPowerSource  =   -13020  #kNoSuchPowerSource
-kProcessorTempRoutineRequiresMPLib2 =   -13014  #kProcessorTempRoutineRequiresMPLib2
-kCantReportProcessorTemperatureErr  =   -13013  #kCantReportProcessorTemperatureErr
-kPowerMgtRequestDenied  =   -13010  #kPowerMgtRequestDenied
-kPowerMgtMessageNotHandled  =   -13009  #kPowerMgtMessageNotHandled
-kPowerHandlerNotFoundForProcErr =   -13008  #kPowerHandlerNotFoundForProcErr
-kPowerHandlerNotFoundForDeviceErr   =   -13007  #kPowerHandlerNotFoundForDeviceErr
-kPowerHandlerExistsForDeviceErr =   -13006  #kPowerHandlerExistsForDeviceErr
-pmRecvEndErr    =   -13005  #during receive, pmgr did not finish hs configured for this connection
-pmRecvStartErr  =   -13004  #during receive, pmgr did not start hs
-pmSendEndErr    =   -13003  #during send, pmgr did not finish hs
-pmSendStartErr  =   -13002  #during send, pmgr did not start hs
-pmReplyTOErr    =   -13001  #Timed out waiting for reply
-pmBusyErr   =   -13000  #Power Mgr never ready to start handshake
-pictureDataErr  =   -11005  #the picture data was invalid
-colorsRequestedErr  =   -11004  #the number of colors requested was illegal
-cantLoadPickMethodErr   =   -11003  #unable to load the custom pick proc
-pictInfoVerbErr =   -11002  #the passed verb was invalid
-pictInfoIDErr   =   -11001  #the internal consistancy check for the PictInfoID is wrong
-pictInfoVersionErr  =   -11000  #wrong version of the PictInfo structure
-errTaskNotFound =   -10780  #no task with that task id exists
-telNotEnoughdspBW   =   -10116  #not enough real-time for allocation
-telBadSampleRate    =   -10115  #incompatible sample rate
-telBadSWErr =   -10114  #Software not installed properly
-telDetAlreadyOn =   -10113  #detection is already turned on
-telAutoAnsNotOn =   -10112  #autoAnswer in not turned on
-telValidateFailed   =   -10111  #telValidate failed
-telBadProcID    =   -10110  #invalid procID
-telDeviceNotFound   =   -10109  #device not found
-telBadCodeResource  =   -10108  #code resource not found
-telInitFailed   =   -10107  #initialization failed
-telNoCommFolder =   -10106  #Communications/Extensions \80 not found
-telUnknownErr   =   -10103  #unable to set config
-telNoSuchTool   =   -10102  #unable to find tool with name specified
-telBadFunction  =   -10091  #bad msgCode specified
-telPBErr    =   -10090  #parameter block error, bad format
-telCANotDeflectable =   -10082  #CA not "deflectable"
-telCANotRejectable  =   -10081  #CA not "rejectable"
-telCANotAcceptable  =   -10080  #CA not "acceptable"
-telTermNotOpen  =   -10072  #terminal not opened via TELOpenTerm
-telStillNeeded  =   -10071  #terminal driver still needed by someone else
-telAlreadyOpen  =   -10070  #terminal already open
-telNoCallbackRef    =   -10064  #no call back reference was specified, but is required
-telDisplayModeNotSupp   =   -10063  #display mode not supported by tool
-telBadDisplayMode   =   -10062  #bad display mode specified
-telFwdTypeNotSupp   =   -10061  #forward type not supported by tool
-telDNTypeNotSupp    =   -10060  #DN type not supported by tool
-telBadRate  =   -10059  #bad rate specified
-telBadBearerType    =   -10058  #bad bearerType specified
-telBadSelect    =   -10057  #unable to select or deselect DN
-telBadParkID    =   -10056  #bad park id specified
-telBadPickupGroupID =   -10055  #bad pickup group ID specified
-telBadFwdType   =   -10054  #bad fwdType specified
-telBadFeatureID =   -10053  #bad feature ID specified
-telBadIntercomID    =   -10052  #bad intercom ID specified
-telBadPageID    =   -10051  #bad page ID specified
-telBadDNType    =   -10050  #DN type invalid
-telConfLimitExceeded    =   -10047  #attempt to exceed switch conference limits
-telCBErr    =   -10046  #call back feature not set previously
-telTransferRej  =   -10045  #transfer request rejected
-telTransferErr  =   -10044  #transfer not prepared
-telConfRej  =   -10043  #conference request was rejected
-telConfErr  =   -10042  #conference was not prepared
-telConfNoLimit  =   -10041  #no limit was specified but required
-telConfLimitErr =   -10040  #limit specified is too high for this configuration
-telFeatNotSupp  =   -10033  #feature program call not supported by this tool
-telFeatActive   =   -10032  #feature already active
-telFeatNotAvail =   -10031  #feature subscribed but not available
-telFeatNotSub   =   -10030  #feature not subscribed
-errAEPropertiesClash    =   -10025  #illegal combination of properties settings for Set Data, make new, or duplicate
-errAECantPutThatThere   =   -10024  #in make new, duplicate, etc. class can't be an element of container
-errAENotAnEnumMember    =   -10023  #enumerated value in SetData is not allowed for this property
-telIntExtNotSupp    =   -10022  #internal external type not supported by this tool
-telBadIntExt    =   -10021  #bad internal external error
-telStateNotSupp =   -10020  #device state not supported by tool
-telBadStateErr  =   -10019  #bad device state specified
-telIndexNotSupp =   -10018  #index not supported by this tool
-telBadIndex =   -10017  #bad index specified
-telAPattNotSupp =   -10016  #alerting pattern not supported by tool
-telBadAPattErr  =   -10015  #bad alerting pattern specified
-telVTypeNotSupp =   -10014  #volume type not supported by this tool
-telBadVTypeErr  =   -10013  #bad volume type error
-telBadLevelErr  =   -10012  #bad volume level setting
-telHTypeNotSupp =   -10011  #hook type not supported by this tool
-telBadHTypeErr  =   -10010  #bad hook type specified
-errAECantSupplyType =   -10009  #errAECantSupplyType
-telNoOpenErr    =   -10008  #unable to open terminal
-telNoMemErr =   -10007  #no memory to allocate handle
-errOSACantAssign    =   -10006  #Signaled when an object cannot be set in a container.
-telBadProcErr   =   -10005  #bad msgProc specified
-telBadHandErr   =   -10004  #bad handle specified
-OSAIllegalAssign    =   -10003  #Signaled when an object can never be set in a container
-telBadDNErr =   -10002  #TELDNHandle not found or invalid
-telBadTermErr   =   -10001  #invalid TELHandle or handle not found
-errAEEventFailed    =   -10000  #errAEEventFailed
-cannotMoveAttachedController    =   -9999   #cannotMoveAttachedController
-controllerHasFixedHeight    =   -9998   #controllerHasFixedHeight
-cannotSetWidthOfAttachedController  =   -9997   #cannotSetWidthOfAttachedController
-controllerBoundsNotExact    =   -9996   #controllerBoundsNotExact
-editingNotAllowed   =   -9995   #editingNotAllowed
-badControllerHeight =   -9994   #badControllerHeight
-deviceCantMeetRequest   =   -9408   #deviceCantMeetRequest
-seqGrabInfoNotAvailable =   -9407   #seqGrabInfoNotAvailable
-badSGChannel    =   -9406   #badSGChannel
-couldntGetRequiredComponent =   -9405   #couldntGetRequiredComponent
-notEnoughDiskSpaceToGrab    =   -9404   #notEnoughDiskSpaceToGrab
-notEnoughMemoryToGrab   =   -9403   #notEnoughMemoryToGrab
-cantDoThatInCurrentMode =   -9402   #cantDoThatInCurrentMode
-grabTimeComplete    =   -9401   #grabTimeComplete
-noDeviceForChannel  =   -9400   #noDeviceForChannel
-kNoCardBusCISErr    =   -9109   #No valid CIS exists for this CardBus card
-kNotZVCapableErr    =   -9108   #This socket does not support Zoomed Video
-kCardPowerOffErr    =   -9107   #Power to the card has been turned off
-kAttemptDupCardEntryErr =   -9106   #The Enabler was asked to create a duplicate card entry
-kAlreadySavedStateErr   =   -9105   #The state has been saved on previous call
-kTooManyIOWindowsErr    =   -9104   #device requested more than one I/O window
-kNotReadyErr    =   -9103   #PC Card failed to go ready
-kClientRequestDenied    =   -9102   #CS Clients should return this code inorder to
-kNoCompatibleNameErr    =   -9101   #There is no compatible driver name for this device
-kNoEnablerForCardErr    =   -9100   #No Enablers were found that can support the card
-kNoCardEnablersFoundErr =   -9099   #No Enablers were found
-kUnsupportedCardErr =   -9098   #Card not supported by generic enabler
-kNoClientTableErr   =   -9097   #The client table has not be initialized yet
-kNoMoreInterruptSlotsErr    =   -9096   #All internal Interrupt slots are in use
-kNoMoreTimerClientsErr  =   -9095   #All timer callbacks are in use
-kNoIOWindowRequestedErr =   -9094   #Request I/O window before calling configuration
-kBadCustomIFIDErr   =   -9093   #Custom interface ID is invalid
-kBadTupleDataErr    =   -9092   #Data in tuple is invalid
-kInvalidCSClientErr =   -9091   #Card Services ClientID is not registered
-kUnsupportedVsErr   =   -9090   #Unsupported Voltage Sense
-kInvalidDeviceNumber    =   -9089   #kInvalidDeviceNumber
-kPostCardEventErr   =   -9088   #_PCCSLPostCardEvent failed and dropped an event
-kCantConfigureCardErr   =   -9087   #kCantConfigureCardErr
-kPassCallToChainErr =   -9086   #kPassCallToChainErr
-kCardBusCardErr =   -9085   #kCardBusCardErr
-k16BitCardErr   =   -9084   #k16BitCardErr
-kBadDeviceErr   =   -9083   #kBadDeviceErr
-kBadLinkErr =   -9082   #kBadLinkErr
-kInvalidRegEntryErr =   -9081   #kInvalidRegEntryErr
-kNoCardSevicesSocketsErr    =   -9080   #kNoCardSevicesSocketsErr
-kOutOfResourceErr   =   -9079   #Card Services has exhausted the resource
-kNoMoreItemsErr =   -9078   #there are no more of the requested item
-kInUseErr   =   -9077   #requested resource is being used by a client
-kConfigurationLockedErr =   -9076   #a configuration has already been locked
-kWriteProtectedErr  =   -9075   #media is write-protected
-kBusyErr    =   -9074   #unable to process request at this time - try later
-kUnsupportedModeErr =   -9073   #mode is not supported
-kUnsupportedFunctionErr =   -9072   #function is not supported by this implementation
-kNoCardErr  =   -9071   #no PC card in the socket
-kGeneralFailureErr  =   -9070   #an undefined error has occurred
-kWriteFailureErr    =   -9069   #unable to complete write request
-kReadFailureErr =   -9068   #unable to complete read request
-kBadSpeedErr    =   -9067   #specified speed is unavailable
-kBadCISErr  =   -9066   #CIS on card is invalid
-kBadHandleErr   =   -9065   #clientHandle is invalid
-kBadArgsErr =   -9064   #values in argument packet are invalid
-kBadArgLengthErr    =   -9063   #ArgLength argument is invalid
-kBadWindowErr   =   -9062   #specified window is invalid
-kBadVppErr  =   -9061   #specified Vpp1 or Vpp2 power level index is invalid
-kBadVccErr  =   -9060   #specified Vcc power level index is invalid
-kBadTypeErr =   -9059   #specified window or interface type is invalid
-kBadSocketErr   =   -9058   #specified logical or physical socket number is invalid
-kBadSizeErr =   -9057   #specified size is invalid
-kBadPageErr =   -9056   #specified page is invalid
-kBadOffsetErr   =   -9055   #specified PC card memory array offset is invalid
-kBadIRQErr  =   -9054   #specified IRQ level is invalid
-kBadEDCErr  =   -9053   #specified EDC generator specified is invalid
-kBadBaseErr =   -9052   #specified base system memory address is invalid
-kBadAttributeErr    =   -9051   #specified attributes field value is invalid
-kBadAdapterErr  =   -9050   #invalid adapter number
-codecOffscreenFailedPleaseRetryErr  =   -8992   #codecOffscreenFailedPleaseRetryErr
-lockPortBitsWrongGDeviceErr =   -8991   #lockPortBitsWrongGDeviceErr
-directXObjectAlreadyExists  =   -8990   #directXObjectAlreadyExists
-codecDroppedFrameErr    =   -8989   #returned from ImageCodecDrawBand
-codecOffscreenFailedErr =   -8988   #codecOffscreenFailedErr
-codecNeedAccessKeyErr   =   -8987   #codec needs password in order to decompress
-codecParameterDialogConfirm =   -8986   #codecParameterDialogConfirm
-lockPortBitsSurfaceLostErr  =   -8985   #lockPortBitsSurfaceLostErr
-lockPortBitsBadPortErr  =   -8984   #lockPortBitsBadPortErr
-lockPortBitsWindowClippedErr    =   -8983   #lockPortBitsWindowClippedErr
-lockPortBitsWindowResizedErr    =   -8982   #lockPortBitsWindowResizedErr
-lockPortBitsWindowMovedErr  =   -8981   #lockPortBitsWindowMovedErr
-lockPortBitsBadSurfaceErr   =   -8980   #lockPortBitsBadSurfaceErr
-codecNeedToFlushChainErr    =   -8979   #codecNeedToFlushChainErr
-codecDisabledErr    =   -8978   #codec disabled itself -- pass codecFlagReenable to reset
-codecNoMemoryPleaseWaitErr  =   -8977   #codecNoMemoryPleaseWaitErr
-codecNothingToBlitErr   =   -8976   #codecNothingToBlitErr
-codecCantQueueErr   =   -8975   #codecCantQueueErr
-codecCantWhenErr    =   -8974   #codecCantWhenErr
-codecOpenErr    =   -8973   #codecOpenErr
-codecConditionErr   =   -8972   #codecConditionErr
-codecExtensionNotFoundErr   =   -8971   #codecExtensionNotFoundErr
-codecDataVersErr    =   -8970   #codecDataVersErr
-codecBadDataErr =   -8969   #codecBadDataErr
-codecWouldOffscreenErr  =   -8968   #codecWouldOffscreenErr
-codecAbortErr   =   -8967   #codecAbortErr
-codecSpoolErr   =   -8966   #codecSpoolErr
-codecImageBufErr    =   -8965   #codecImageBufErr
-codecScreenBufErr   =   -8964   #codecScreenBufErr
-codecSizeErr    =   -8963   #codecSizeErr
-codecUnimpErr   =   -8962   #codecUnimpErr
-noCodecErr  =   -8961   #noCodecErr
-codecErr    =   -8960   #codecErr
-kIllegalClockValueErr   =   -8852   #kIllegalClockValueErr
-kUTCOverflowErr =   -8851   #kUTCOverflowErr
-kUTCUnderflowErr    =   -8850   #kUTCUnderflowErr
-kATSULastErr    =   -8809   #The last ATSUI error code.
-kATSULineBreakInWord    =   -8808   #This is not an error code but is returned by ATSUBreakLine to
-kATSUCoordinateOverflowErr  =   -8807   #Used to indicate the coordinates provided to an ATSUI routine caused
-kATSUNoFontScalerAvailableErr   =   -8806   #Used when no font scaler is available for the font passed
-kATSUNoFontCmapAvailableErr =   -8805   #Used when no CMAP table can be accessed or synthesized for the
-kATSULowLevelErr    =   -8804   #Used when an error was encountered within the low level ATS
-kATSUQuickDrawTextErr   =   -8803   #Used when QuickDraw Text encounters an error rendering or measuring
-kATSUNoStyleRunsAssignedErr =   -8802   #Used when an attempt was made to measure, highlight or draw
-kATSUNotSetErr  =   -8801   #Used when the client attempts to retrieve an attribute,
-kATSUInvalidCacheErr    =   -8800   #Used when an attempt was made to read in style data
-kATSUInvalidAttributeTagErr =   -8799   #Used when an attempt was made to use a tag value that
-kATSUInvalidAttributeSizeErr    =   -8798   #Used when an attempt was made to use an attribute with a
-kATSUInvalidAttributeValueErr   =   -8797   #Used when an attempt was made to use an attribute with
-kATSUInvalidFontErr =   -8796   #Used when an attempt was made to use an invalid font ID.
-kATSUNoCorrespondingFontErr =   -8795   #This value is retrned by font ID conversion
-kATSUFontsNotMatched    =   -8794   #This value is returned by ATSUMatchFontsToText()
-kATSUFontsMatched   =   -8793   #This is not an error code but is returned by
-kATSUInvalidTextRangeErr    =   -8792   #An attempt was made to extract information
-kATSUInvalidStyleErr    =   -8791   #An attempt was made to use a ATSUStyle which
-kATSUInvalidTextLayoutErr   =   -8790   #An attempt was made to use a ATSUTextLayout
-kTECOutputBufferFullStatus  =   -8785   #output buffer has no room for conversion of next input text element (partial conversion)
-kTECNeedFlushStatus =   -8784   #kTECNeedFlushStatus
-kTECUsedFallbacksStatus =   -8783   #kTECUsedFallbacksStatus
-kTECItemUnavailableErr  =   -8771   #item (e.g. name) not available for specified region (& encoding if relevant)
-kTECGlobalsUnavailableErr   =   -8770   #globals have already been deallocated (premature TERM)
-unicodeChecksumErr  =   -8769   #unicodeChecksumErr
-unicodeNoTableErr   =   -8768   #unicodeNoTableErr
-unicodeVariantErr   =   -8767   #unicodeVariantErr
-unicodeFallbacksErr =   -8766   #unicodeFallbacksErr
-unicodePartConvertErr   =   -8765   #unicodePartConvertErr
-unicodeBufErr   =   -8764   #unicodeBufErr
-unicodeCharErr  =   -8763   #unicodeCharErr
-unicodeElementErr   =   -8762   #unicodeElementErr
-unicodeNotFoundErr  =   -8761   #unicodeNotFoundErr
-unicodeTableFormatErr   =   -8760   #unicodeTableFormatErr
-unicodeDirectionErr =   -8759   #unicodeDirectionErr
-unicodeContextualErr    =   -8758   #unicodeContextualErr
-unicodeTextEncodingDataErr  =   -8757   #unicodeTextEncodingDataErr
-kTECDirectionErr    =   -8756   #direction stack overflow, etc.
-kTECIncompleteElementErr    =   -8755   #text element may be incomplete or is too long for internal buffers
-kTECUnmappableElementErr    =   -8754   #kTECUnmappableElementErr
-kTECPartialCharErr  =   -8753   #input buffer ends in the middle of a multibyte character, conversion stopped
-kTECBadTextRunErr   =   -8752   #kTECBadTextRunErr
-kTECArrayFullErr    =   -8751   #supplied name buffer or TextRun, TextEncoding, or UnicodeMapping array is too small
-kTECBufferBelowMinimumSizeErr   =   -8750   #output buffer too small to allow processing of first input text element
-kTECNoConversionPathErr =   -8749   #kTECNoConversionPathErr
-kTECCorruptConverterErr =   -8748   #invalid converter object reference
-kTECTableFormatErr  =   -8747   #kTECTableFormatErr
-kTECTableChecksumErr    =   -8746   #kTECTableChecksumErr
-kTECMissingTableErr =   -8745   #kTECMissingTableErr
-kTextUndefinedElementErr    =   -8740   #text conversion errors
-kTextMalformedInputErr  =   -8739   #in DBCS, for example, high byte followed by invalid low byte
-kTextUnsupportedEncodingErr =   -8738   #specified encoding not supported for this operation
-kRANotEnabled   =   -7139   #kRANotEnabled
-kRACallBackFailed   =   -7138   #kRACallBackFailed
-kRADuplicateIPAddr  =   -7137   #kRADuplicateIPAddr
-kRANCPRejectedbyPeer    =   -7136   #kRANCPRejectedbyPeer
-kRAExtAuthenticationFailed  =   -7135   #kRAExtAuthenticationFailed
-kRAATalkInactive    =   -7134   #kRAATalkInactive
-kRAPeerNotResponding    =   -7133   #kRAPeerNotResponding
-kRAPPPPeerDisconnected  =   -7132   #kRAPPPPeerDisconnected
-kRAPPPUserDisconnected  =   -7131   #kRAPPPUserDisconnected
-kRAPPPNegotiationFailed =   -7130   #kRAPPPNegotiationFailed
-kRAPPPAuthenticationFailed  =   -7129   #kRAPPPAuthenticationFailed
-kRAPPPProtocolRejected  =   -7128   #kRAPPPProtocolRejected
-dcmBufferOverflowErr    =   -7127   #data is larger than buffer size
-kRANotPrimaryInterface  =   -7126   #when IPCP is not primary TCP/IP intf.
-kRATCPIPNotConfigured   =   -7125   #TCP/IP not configured, could be loaded
-kRATCPIPInactive    =   -7124   #TCP/IP inactive, cannot be loaded
-kRARemoteAccessNotReady =   -7123   #kRARemoteAccessNotReady
-kRAInitOpenTransportFailed  =   -7122   #kRAInitOpenTransportFailed
-dcmProtectedErr =   -7121   #need keyword to use dictionary
-kRAUserPwdEntryRequired =   -7120   #kRAUserPwdEntryRequired
-kRAUserPwdChangeRequired    =   -7119   #kRAUserPwdChangeRequired
-dcmBadFindMethodErr =   -7118   #no such find method supported
-kRAInvalidSerialProtocol    =   -7117   #kRAInvalidSerialProtocol
-kRAInvalidPortState =   -7116   #kRAInvalidPortState
-dcmBadKeyErr    =   -7115   #bad key information
-kRAPortBusy =   -7114   #kRAPortBusy
-kRAInstallationDamaged  =   -7113   #kRAInstallationDamaged
-dcmBadFieldTypeErr  =   -7112   #no such field type supported
-dcmBadFieldInfoErr  =   -7111   #incomplete information
-dcmNecessaryFieldErr    =   -7110   #lack required/identify field
-dcmDupRecordErr =   -7109   #same record already exist
-kRANotConnected =   -7108   #kRANotConnected
-dcmBlockFullErr =   -7107   #dictionary block full
-kRAMissingResources =   -7106   #kRAMissingResources
-dcmDictionaryBusyErr    =   -7105   #dictionary is busy
-dcmDictionaryNotOpenErr =   -7104   #dictionary not opened
-dcmPermissionErr    =   -7103   #invalid permission
-dcmBadDictionaryErr =   -7102   #invalid dictionary
-dcmNotDictionaryErr =   -7101   #not dictionary
-kRAInvalidParameter =   -7100   #kRAInvalidParameter
-laEngineNotFoundErr =   -7000   #can't find the engine
-laPropertyErr   =   -6999   #Error in properties
-kUSBUnknownDeviceErr    =   -6998   #device ref not recognised
-laPropertyIsReadOnlyErr =   -6997   #the property is read only
-laPropertyUnknownErr    =   -6996   #the property is unknown to this environment
-laPropertyValueErr  =   -6995   #Invalid property value
-laDictionaryTooManyErr  =   -6994   #too many dictionaries
-laDictionaryUnknownErr  =   -6993   #can't use this dictionary with this environment
-laDictionaryNotOpenedErr    =   -6992   #the dictionary is not opened
-laTextOverFlowErr   =   -6991   #text is too long
-laFailAnalysisErr   =   -6990   #analysis failed
-laNoMoreMorphemeErr =   -6989   #nothing to read
-laInvalidPathErr    =   -6988   #path is not correct
-kUSBNotHandled  =   -6987   #Notification was not handled   (same as NotFound)
-laEnvironmentNotFoundErr    =   -6986   #can't fint the specified environment
-laEnvironmentBusyErr    =   -6985   #specified environment is used
-laTooSmallBufferErr =   -6984   #output buffer is too small to store any result
-kUSBFlagsError  =   -6983   #Unused flags not zeroed
-kUSBAbortedError    =   -6982   #Pipe aborted
-kUSBNoBandwidthError    =   -6981   #Not enough bandwidth available
-kUSBPipeIdleError   =   -6980   #Pipe is Idle, it will not accept transactions
-kUSBPipeStalledError    =   -6979   #Pipe has stalled, error needs to be cleared
-kUSBUnknownInterfaceErr =   -6978   #Interface ref not recognised
-kUSBDeviceBusy  =   -6977   #Device is already being configured
-kUSBDevicePowerProblem  =   -6976   #Device has a power problem
-kUSBInvalidBuffer   =   -6975   #bad buffer, usually nil
-kUSBDeviceSuspended =   -6974   #Device is suspended
-kUSBDeviceNotSuspended  =   -6973   #device is not suspended for resume
-kUSBDeviceDisconnected  =   -6972   #Disconnected during suspend or reset
-kUSBTimedOut    =   -6971   #Transaction timed out.
-kUSBQueueAborted    =   -6970   #Pipe zero stall cleared.
-kUSBPortDisabled    =   -6969   #The port you are attached to is disabled, use USBDeviceReset.
-kUSBBadDispatchTable    =   -6950   #Improper driver dispatch table
-kUSBUnknownNotification =   -6949   #Notification type not defined
-kUSBQueueFull   =   -6948   #Internal queue maxxed
-kUSBLinkErr =   -6916   #kUSBLinkErr
-kUSBCRCErr  =   -6915   #Pipe stall, bad CRC
-kUSBBitstufErr  =   -6914   #Pipe stall, bitstuffing
-kUSBDataToggleErr   =   -6913   #Pipe stall, Bad data toggle
-kUSBEndpointStallErr    =   -6912   #Device didn't understand
-kUSBNotRespondingErr    =   -6911   #Pipe stall, No device, device hung
-kUSBPIDCheckErr =   -6910   #Pipe stall, PID CRC error
-kUSBWrongPIDErr =   -6909   #Pipe stall, Bad or wrong PID
-kUSBOverRunErr  =   -6908   #Packet too large or more data than buffer
-kUSBUnderRunErr =   -6907   #Less data than buffer
-kUSBRes1Err =   -6906   #kUSBRes1Err
-kUSBRes2Err =   -6905   #kUSBRes2Err
-kUSBBufOvrRunErr    =   -6904   #Host hardware failure on data in, PCI busy?
-kUSBBufUnderRunErr  =   -6903   #Host hardware failure on data out, PCI busy?
-kUSBNotSent1Err =   -6902   #Transaction not sent
-kUSBNotSent2Err =   -6901   #Transaction not sent
-kDMFoundErr =   -6232   #Did not proceed because we found an item
-kDMMainDisplayCannotMoveErr =   -6231   #Trying to move main display (or a display mirrored to it)
-kDMDisplayAlreadyInstalledErr   =   -6230   #Attempt to add an already installed display.
-kDMDisplayNotFoundErr   =   -6229   #Could not find item (will someday remove).
-kDMDriverNotDisplayMgrAwareErr  =   -6228   #Video Driver does not support display manager.
-kDMSWNotInitializedErr  =   -6227   #Required software not initialized (eg windowmanager or display mgr).
-kSysSWTooOld    =   -6226   #Missing critical pieces of System Software.
-kDMMirroringNotOn   =   -6225   #Returned by all calls that need mirroring to be on to do their thing.
-kDMCantBlock    =   -6224   #Mirroring is already on, canÕt Block now (call DMUnMirror() first).
-kDMMirroringBlocked =   -6223   #DMBlockMirroring() has been called.
-kDMWrongNumberOfDisplays    =   -6222   #Can only handle 2 displays for now.
-kDMMirroringOnAlready   =   -6221   #Returned by all calls that need mirroring to be off to do their thing.
-kDMGenErr   =   -6220   #Unexpected Error
-kQTSSUnknownErr =   -6150   #kQTSSUnknownErr
-collectionVersionErr    =   -5753   #collectionVersionErr
-collectionIndexRangeErr =   -5752   #collectionIndexRangeErr
-collectionItemNotFoundErr   =   -5751   #collectionItemNotFoundErr
-collectionItemLockedErr =   -5750   #collectionItemLockedErr
-kNavMissingKindStringErr    =   -5699   #kNavMissingKindStringErr
-kNavInvalidCustomControlMessageErr  =   -5698   #kNavInvalidCustomControlMessageErr
-kNavCustomControlMessageFailedErr   =   -5697   #kNavCustomControlMessageFailedErr
-kNavInvalidSystemConfigErr  =   -5696   #kNavInvalidSystemConfigErr
-kNavWrongDialogClassErr =   -5695   #kNavWrongDialogClassErr
-kNavWrongDialogStateErr =   -5694   #kNavWrongDialogStateErr
-dialogNoTimeoutErr  =   -5640   #dialogNoTimeoutErr
-menuInvalidErr  =   -5623   #menu is invalid
-menuItemNotFoundErr =   -5622   #specified menu item wasn't found
-menuUsesSystemDefErr    =   -5621   #GetMenuDefinition failed because the menu uses the system MDEF
-menuNotFoundErr =   -5620   #specified menu or menu ID wasn't found
-windowWrongStateErr =   -5615   #window is not in a state that is valid for the current action
-windowManagerInternalErr    =   -5614   #something really weird happened inside the window manager
-windowAttributesConflictErr =   -5613   #passed some attributes that are mutually exclusive
-windowAttributeImmutableErr =   -5612   #tried to change attributes which can't be changed
-errWindowDoesNotFitOnscreen =   -5611   #ConstrainWindowToScreen could not make the window fit onscreen
-errWindowNotFound   =   -5610   #returned from FindWindowOfClass
-errFloatingWindowsNotInitialized    =   -5609   #called HideFloatingWindows or ShowFloatingWindows without calling InitFloatingWindows
-errWindowsAlreadyInitialized    =   -5608   #tried to call InitFloatingWindows twice, or called InitWindows and then floating windows
-errUserWantsToDragWindow    =   -5607   #if returned from TrackWindowProxyDrag, you should call DragWindow on the window
-errCorruptWindowDescription =   -5606   #tried to load a corrupt window description (size or version fields incorrect)
-errUnrecognizedWindowClass  =   -5605   #tried to create a window with a bad WindowClass
-errWindowPropertyNotFound   =   -5604   #tried to get a nonexistent property
-errInvalidWindowProperty    =   -5603   #tried to access a property tag with private creator
-errWindowDoesNotHaveProxy   =   -5602   #tried to do something requiring a proxy to a window which doesnÕt have a proxy
-errUnsupportedWindowAttributesForClass  =   -5601   #tried to create a window with WindowAttributes not supported by the WindowClass
-errInvalidWindowPtr =   -5600   #tried to pass a bad WindowRef argument
-gestaltLocationErr  =   -5553   #gestalt function ptr wasn't in sysheap
-gestaltDupSelectorErr   =   -5552   #tried to add an entry that already existed
-gestaltUndefSelectorErr =   -5551   #undefined selector was passed to Gestalt
-gestaltUnknownErr   =   -5550   #value returned if Gestalt doesn't know the answer
-envVersTooBig   =   -5502   #Version bigger than call can handle
-envBadVers  =   -5501   #Version non-positive
-envNotPresent   =   -5500   #returned by glue.
-qtsAddressBusyErr   =   -5421   #qtsAddressBusyErr
-qtsConnectionFailedErr  =   -5420   #qtsConnectionFailedErr
-qtsTimeoutErr   =   -5408   #qtsTimeoutErr
-qtsUnknownValueErr  =   -5407   #qtsUnknownValueErr
-qtsTooMuchDataErr   =   -5406   #qtsTooMuchDataErr
-qtsUnsupportedFeatureErr    =   -5405   #qtsUnsupportedFeatureErr
-qtsUnsupportedRateErr   =   -5404   #qtsUnsupportedRateErr
-qtsUnsupportedDataTypeErr   =   -5403   #qtsUnsupportedDataTypeErr
-qtsBadDataErr   =   -5402   #something is wrong with the data
-qtsBadStateErr  =   -5401   #qtsBadStateErr
-qtsBadSelectorErr   =   -5400   #qtsBadSelectorErr
-errIAEndOfTextRun   =   -5388   #errIAEndOfTextRun
-errIATextExtractionErr  =   -5387   #errIATextExtractionErr
-errIAInvalidDocument    =   -5386   #errIAInvalidDocument
-errIACanceled   =   -5385   #errIACanceled
-errIABufferTooSmall =   -5384   #errIABufferTooSmall
-errIANoMoreItems    =   -5383   #errIANoMoreItems
-errIAParamErr   =   -5382   #errIAParamErr
-errIAAllocationErr  =   -5381   #errIAAllocationErr
-errIAUnknownErr =   -5380   #errIAUnknownErr
-hrURLNotHandledErr  =   -5363   #hrURLNotHandledErr
-hrUnableToResizeHandleErr   =   -5362   #hrUnableToResizeHandleErr
-hrMiscellaneousExceptionErr =   -5361   #hrMiscellaneousExceptionErr
-hrHTMLRenderingLibNotInstalledErr   =   -5360   #hrHTMLRenderingLibNotInstalledErr
-errCannotUndo   =   -5253   #errCannotUndo
-errNonContiuousAttribute    =   -5252   #errNonContiuousAttribute
-errUnknownElement   =   -5251   #errUnknownElement
-errReadOnlyText =   -5250   #errReadOnlyText
-errEmptyScrap   =   -5249   #errEmptyScrap
-errNoHiliteText =   -5248   #errNoHiliteText
-errOffsetNotOnElementBounday    =   -5247   #errOffsetNotOnElementBounday
-errInvalidRange =   -5246   #errInvalidRange
-errIteratorReachedEnd   =   -5245   #errIteratorReachedEnd
-errEngineNotFound   =   -5244   #errEngineNotFound
-errAlreadyInImagingMode =   -5243   #errAlreadyInImagingMode
-errNotInImagingMode =   -5242   #errNotInImagingMode
-errMarginWilllNotFit    =   -5241   #errMarginWilllNotFit
-errUnknownAttributeTag  =   -5240   #errUnknownAttributeTag
-afpSameNodeErr  =   -5063   #An Attempt was made to connect to a file server running on the same machine
-afpAlreadyMounted   =   -5062   #The volume is already mounted
-afpCantMountMoreSrvre   =   -5061   #The Maximum number of server connections has been reached
-afpBadDirIDType =   -5060   #afpBadDirIDType
-afpCallNotAllowed   =   -5048   #The server knows what you wanted to do, but won't let you do it just now
-afpAlreadyLoggedInErr   =   -5047   #User has been authenticated but is already logged in from another machine (and that's not allowed on this server)
-afpPwdPolicyErr =   -5046   #Password does not conform to servers password policy
-afpPwdNeedsChangeErr    =   -5045   #The password needs to be changed
-afpInsideTrashErr   =   -5044   #The folder being shared is inside the trash folder OR the shared folder is being moved into the trash folder
-afpInsideSharedErr  =   -5043   #The folder being shared is inside a shared folder OR the folder contains a shared folder and is being moved into a shared folder
-afpPwdExpiredErr    =   -5042   #The password being used is too old: this requires the user to change the password before log-in can continue
-afpPwdTooShortErr   =   -5041   #The password being set is too short: there is a minimum length that must be met or exceeded
-afpPwdSameErr   =   -5040   #Someone tried to change their password to the same password on a mantadory password change
-afpBadIDErr =   -5039   #afpBadIDErr
-afpSameObjectErr    =   -5038   #afpSameObjectErr
-afpCatalogChanged   =   -5037   #afpCatalogChanged
-afpDiffVolErr   =   -5036   #afpDiffVolErr
-afpIDExists =   -5035   #afpIDExists
-afpIDNotFound   =   -5034   #afpIDNotFound
-afpContainsSharedErr    =   -5033   #the folder being shared contains a shared folder
-afpObjectLocked =   -5032   #Object is M/R/D/W inhibited
-afpVolLocked    =   -5031   #Volume is Read-Only
-afpIconTypeError    =   -5030   #Icon size specified different from existing icon size
-afpDirNotFound  =   -5029   #Unknown directory specified
-afpCantRename   =   -5028   #AFPRename cannot rename volume
-afpServerGoingDown  =   -5027   #Server is shutting down
-afpTooManyFilesOpen =   -5026   #Maximum open file count reached
-afpObjectTypeErr    =   -5025   #File/Directory specified where Directory/File expected
-afpCallNotSupported =   -5024   #Unsupported AFP call was made
-afpUserNotAuth  =   -5023   #No AFPLogin call has successfully been made for this session
-afpSessClosed   =   -5022   #Session closed
-afpRangeOverlap =   -5021   #Some or all of range already locked by same user
-afpRangeNotLocked   =   -5020   #Tried to unlock range that was not locked by user
-afpParmErr  =   -5019   #A specified parameter was out of allowable range
-afpObjectNotFound   =   -5018   #Specified file or directory does not exist
-afpObjectExists =   -5017   #Specified destination file or directory already exists
-afpNoServer =   -5016   #Server not responding
-afpNoMoreLocks  =   -5015   #Maximum lock limit reached
-afpMiscErr  =   -5014   #Unexpected error encountered during execution
-afpLockErr  =   -5013   #Some or all of requested range is locked by another user
-afpItemNotFound =   -5012   #Unknown UserName/UserID or missing comment/APPL entry
-afpFlatVol  =   -5011   #Cannot create directory on specified volume
-afpFileBusy =   -5010   #Cannot delete an open file
-afpEofError =   -5009   #Read beyond logical end-of-file
-afpDiskFull =   -5008   #Insufficient free space on volume for operation
-afpDirNotEmpty  =   -5007   #Cannot delete non-empty directory
-afpDenyConflict =   -5006   #Specified open/deny modes conflict with current open modes
-afpCantMove =   -5005   #Move destination is offspring of source, or root was specified
-afpBitmapErr    =   -5004   #Bitmap contained bits undefined for call
-afpBadVersNum   =   -5003   #Unknown AFP protocol version number specified
-afpBadUAM   =   -5002   #Unknown user authentication method specified
-afpAuthContinue =   -5001   #Further information required to complete AFPLogin call
-afpAccessDenied =   -5000   #Insufficient access privileges for operation
-illegalScrapFlavorSizeErr   =   -4999   #illegalScrapFlavorSizeErr
-illegalScrapFlavorTypeErr   =   -4998   #illegalScrapFlavorTypeErr
-illegalScrapFlavorFlagsErr  =   -4997   #illegalScrapFlavorFlagsErr
-scrapFlavorSizeMismatchErr  =   -4996   #scrapFlavorSizeMismatchErr
-scrapFlavorFlagsMismatchErr =   -4995   #scrapFlavorFlagsMismatchErr
-nilScrapFlavorDataErr   =   -4994   #nilScrapFlavorDataErr
-noScrapPromiseKeeperErr =   -4993   #noScrapPromiseKeeperErr
-scrapPromiseNotKeptErr  =   -4992   #scrapPromiseNotKeptErr
-processStateIncorrectErr    =   -4991   #processStateIncorrectErr
-badScrapRefErr  =   -4990   #badScrapRefErr
-duplicateScrapFlavorErr =   -4989   #duplicateScrapFlavorErr
-internalScrapErr    =   -4988   #internalScrapErr
-coreFoundationUnknownErr    =   -4960   #coreFoundationUnknownErr
-badRoutingSizeErr   =   -4276   #badRoutingSizeErr
-routingNotFoundErr  =   -4275   #routingNotFoundErr
-duplicateRoutingErr =   -4274   #duplicateRoutingErr
-invalidFolderTypeErr    =   -4273   #invalidFolderTypeErr
-noMoreFolderDescErr =   -4272   #noMoreFolderDescErr
-duplicateFolderDescErr  =   -4271   #duplicateFolderDescErr
-badFolderDescErr    =   -4270   #badFolderDescErr
-cmCantGamutCheckError   =   -4217   #Gammut checking not supported by this ColorWorld
-cmNamedColorNotFound    =   -4216   #NamedColor not found
-cmCantCopyModifiedV1Profile =   -4215   #Illegal to copy version 1 profiles that have been modified
-cmRangeOverFlow =   -4214   #Color conversion warning that some output color values over/underflowed and were clipped
-cmInvalidProfileComment =   -4213   #Bad Profile comment during drawpicture
-cmNoGDevicesError   =   -4212   #Begin/End Matching -- no gdevices available
-cmInvalidDstMap =   -4211   #Destination pix/bit map was invalid
-cmInvalidSrcMap =   -4210   #Source pix/bit map was invalid
-cmInvalidColorSpace =   -4209   #Profile colorspace does not match bitmap type
-cmErrIncompatibleProfile    =   -4208   #Other ColorSync Errors
-cmSearchError   =   -4207   #cmSearchError
-cmInvalidSearch =   -4206   #Bad Search Handle
-cmInvalidProfileLocation    =   -4205   #Operation not supported for this profile location
-cmInvalidProfile    =   -4204   #A Profile must contain a 'cs1 ' tag to be valid
-cmFatalProfileErr   =   -4203   #cmFatalProfileErr
-cmCantDeleteElement =   -4202   #cmCantDeleteElement
-cmIndexRangeErr =   -4201   #Tag index out of range
-kNSLInitializationFailed    =   -4200   #UNABLE TO INITIALIZE THE MANAGER!!!!! DO NOT CONTINUE!!!!
-kNSLNotInitialized  =   -4199   #kNSLNotInitialized
-kNSLInsufficientSysVer  =   -4198   #kNSLInsufficientSysVer
-kNSLInsufficientOTVer   =   -4197   #kNSLInsufficientOTVer
-kNSLNoElementsInList    =   -4196   #kNSLNoElementsInList
-kNSLBadReferenceErr =   -4195   #kNSLBadReferenceErr
-kNSLBadServiceTypeErr   =   -4194   #kNSLBadServiceTypeErr
-kNSLBadDataTypeErr  =   -4193   #kNSLBadDataTypeErr
-kNSLBadNetConnection    =   -4192   #kNSLBadNetConnection
-kNSLNoSupportForService =   -4191   #kNSLNoSupportForService
-kNSLInvalidPluginSpec   =   -4190   #kNSLInvalidPluginSpec
-kNSLRequestBufferAlreadyInList  =   -4189   #kNSLRequestBufferAlreadyInList
-kNSLNoContextAvailable  =   -4188   #(ContinueLookup function ptr invalid)
-kNSLBufferTooSmallForData   =   -4187   #(Client buffer too small for data from plugin)
-kNSLCannotContinueLookup    =   -4186   #(Can't continue lookup; error or bad state)
-kNSLBadClientInfoPtr    =   -4185   #(nil ClientAsyncInfoPtr; no reference available)
-kNSLNullListPtr =   -4184   #(client is trying to add items to a nil list)
-kNSLBadProtocolTypeErr  =   -4183   #(client is trying to add a null protocol type)
-kNSLPluginLoadFailed    =   -4182   #(manager unable to load one of the plugins)
-kNSLNoPluginsFound  =   -4181   #(manager didn't find any valid plugins to load)
-kNSLSearchAlreadyInProgress =   -4180   #(you can only have one ongoing search per clientRef)
-kNSLNoPluginsForSearch  =   -4179   #(no plugins will respond to search request; bad protocol(s)?)
-kNSLNullNeighborhoodPtr =   -4178   #(client passed a null neighborhood ptr)
-kNSLSomePluginsFailedToLoad =   -4177   #(one or more plugins failed to load, but at least one did load; this error isn't fatal)
-kNSLErrNullPtrError =   -4176   #kNSLErrNullPtrError
-kNSLNotImplementedYet   =   -4175   #kNSLNotImplementedYet
-kNSLUILibraryNotAvailable   =   -4174   #The NSL UI Library needs to be in the Extensions Folder
-kNSLNoCarbonLib =   -4173   #kNSLNoCarbonLib
-kNSLBadURLSyntax    =   -4172   #URL contains illegal characters
-kNSLSchedulerError  =   -4171   #A custom thread routine encountered an error
-kNSL68kContextNotSupported  =   -4170   #no 68k allowed
-noHelpForItem   =   -4009   #noHelpForItem
-badProfileError =   -4008   #badProfileError
-colorSyncNotInstalled   =   -4007   #colorSyncNotInstalled
-pickerCantLive  =   -4006   #pickerCantLive
-cantLoadPackage =   -4005   #cantLoadPackage
-cantCreatePickerWindow  =   -4004   #cantCreatePickerWindow
-cantLoadPicker  =   -4003   #cantLoadPicker
-pickerResourceError =   -4002   #pickerResourceError
-requiredFlagsDontMatch  =   -4001   #requiredFlagsDontMatch
-firstPickerError    =   -4000   #firstPickerError
-kOTPortLostConnection   =   -3285   #
-kOTUserRequestedErr =   -3284   #
-kOTConfigurationChangedErr  =   -3283   #
-kOTBadConfigurationErr  =   -3282   #
-kOTPortWasEjectedErr    =   -3281   #
-kOTPortHasDiedErr   =   -3280   #
-kOTClientNotInittedErr  =   -3279   #
-kENOMSGErr  =   -3278   #
-kESRCHErr   =   -3277   #
-kEINPROGRESSErr =   -3276   #
-kENODATAErr =   -3275   #
-kENOSTRErr  =   -3274   #
-kECANCELErr =   -3273   #
-kEBADMSGErr =   -3272   #
-kENOSRErr   =   -3271   #
-kETIMEErr   =   -3270   #
-kEPROTOErr  =   -3269   #\82\82\82 fill out missing codes \82\82\82
-kEHOSTUNREACHErr    =   -3264   #No route to host
-kEHOSTDOWNErr   =   -3263   #Host is down
-kECONNREFUSEDErr    =   -3260   #Connection refused
-kETIMEDOUTErr   =   -3259   #Connection timed out
-kETOOMANYREFSErr    =   -3258   #Too many references: can't splice
-kESHUTDOWNErr   =   -3257   #Can't send after socket shutdown
-kENOTCONNErr    =   -3256   #Socket is not connected
-kEISCONNErr =   -3255   #Socket is already connected
-kENOBUFSErr =   -3254   #No buffer space available
-kECONNRESETErr  =   -3253   #Connection reset by peer
-kECONNABORTEDErr    =   -3252   #Software caused connection abort
-kENETRESETErr   =   -3251   #Network dropped connection on reset
-kENETUNREACHErr =   -3250   #Network is unreachable
-kENETDOWNErr    =   -3249   #Network is down
-kEADDRNOTAVAILErr   =   -3248   #Can't assign requested address
-kEADDRINUSEErr  =   -3247   #Address already in use
-kEOPNOTSUPPErr  =   -3244   #Operation not supported on socket
-kESOCKTNOSUPPORTErr =   -3243   #Socket type not supported
-kEPROTONOSUPPORTErr =   -3242   #Protocol not supported
-kENOPROTOOPTErr =   -3241   #Protocol not available
-kEPROTOTYPEErr  =   -3240   #Protocol wrong type for socket
-kEMSGSIZEErr    =   -3239   #Message too long
-kEDESTADDRREQErr    =   -3238   #Destination address required
-kENOTSOCKErr    =   -3237   #Socket operation on non-socket
-kEALREADYErr    =   -3236   #
-kEWOULDBLOCKErr =   -3234   #Call would block, so was aborted
-kERANGEErr  =   -3233   #Message size too large for STREAM
-kEPIPEErr   =   -3231   #Broken pipe
-kENOTTYErr  =   -3224   #Not a character device
-kEINVALErr  =   -3221   #Invalid argument
-kENODEVErr  =   -3218   #No such device
-kOTDuplicateFoundErr    =   -3216   #OT generic duplicate found error
-kEBUSYErr   =   -3215   #Device or resource busy
-kEFAULTErr  =   -3213   #Bad address
-kEACCESErr  =   -3212   #Permission denied
-kOTOutOfMemoryErr   =   -3211   #OT ran out of memory, may be a temporary
-kEAGAINErr  =   -3210   #Try operation again later
-kEBADFErr   =   -3208   #Bad file number
-kENXIOErr   =   -3205   #No such device or address
-kEIOErr =   -3204   #I/O error
-kEINTRErr   =   -3203   #Interrupted system service
-kENORSRCErr =   -3202   #No such resource
-kOTNotFoundErr  =   -3201   #OT generic not found error
-kEPERMErr   =   -3200   #Permission denied
-kOTCanceledErr  =   -3180   #XTI2OSStatus(TCANCELED) The command was cancelled
-kOTBadSyncErr   =   -3179   #XTI2OSStatus(TBADSYNC) A synchronous call at interrupt time
-kOTProtocolErr  =   -3178   #XTI2OSStatus(TPROTO) An unspecified provider error occurred
-kOTQFullErr =   -3177   #XTI2OSStatus(TQFULL)
-kOTResAddressErr    =   -3176   #XTI2OSStatus(TRESADDR)
-kOTResQLenErr   =   -3175   #XTI2OSStatus(TRESQLEN)
-kOTProviderMismatchErr  =   -3174   #XTI2OSStatus(TPROVMISMATCH) Tried to accept on incompatible endpoint
-kOTIndOutErr    =   -3173   #XTI2OSStatus(TINDOUT) Accept failed because of pending listen
-kOTAddressBusyErr   =   -3172   #XTI2OSStatus(TADDRBUSY) Address requested is already in use
-kOTBadQLenErr   =   -3171   #XTI2OSStatus(TBADQLEN) A Bind to an in-use addr with qlen > 0
-kOTBadNameErr   =   -3170   #XTI2OSStatus(TBADNAME) A bad endpoint name was supplied
-kOTNoStructureTypeErr   =   -3169   #XTI2OSStatus(TNOSTRUCTYPE) Bad structure type requested for OTAlloc
-kOTStateChangeErr   =   -3168   #XTI2OSStatus(TSTATECHNG) State is changing - try again later
-kOTNotSupportedErr  =   -3167   #XTI2OSStatus(TNOTSUPPORT) Command is not supported
-kOTNoReleaseErr =   -3166   #XTI2OSStatus(TNOREL) No orderly release indication available
-kOTBadFlagErr   =   -3165   #XTI2OSStatus(TBADFLAG) A Bad flag value was supplied
-kOTNoUDErrErr   =   -3164   #XTI2OSStatus(TNOUDERR) No Unit Data Error indication available
-kOTNoDisconnectErr  =   -3163   #XTI2OSStatus(TNODIS) No disconnect indication available
-kOTNoDataErr    =   -3162   #XTI2OSStatus(TNODATA) No data available for reading
-kOTFlowErr  =   -3161   #XTI2OSStatus(TFLOW) Provider is flow-controlled
-kOTBufferOverflowErr    =   -3160   #XTI2OSStatus(TBUFOVFLW) Passed buffer not big enough
-kOTBadDataErr   =   -3159   #XTI2OSStatus(TBADDATA) An illegal amount of data was specified
-kOTLookErr  =   -3158   #XTI2OSStatus(TLOOK) An event occurred - call Look()
-kOTSysErrorErr  =   -3157   #XTI2OSStatus(TSYSERR) A system error occurred
-kOTBadSequenceErr   =   -3156   #XTI2OSStatus(TBADSEQ) Sequence specified does not exist
-kOTOutStateErr  =   -3155   #XTI2OSStatus(TOUTSTATE) Call issued in wrong state
-kOTNoAddressErr =   -3154   #XTI2OSStatus(TNOADDR) No address was specified
-kOTBadReferenceErr  =   -3153   #XTI2OSStatus(TBADF) Bad provider reference
-kOTAccessErr    =   -3152   #XTI2OSStatus(TACCES) Missing access permission
-kOTBadOptionErr =   -3151   #XTI2OSStatus(TBADOPT) A Bad option was specified
-kOTBadAddressErr    =   -3150   #XTI2OSStatus(TBADADDR) A Bad address was specified
-sktClosedErr    =   -3109   #sktClosedErr
-recNotFnd   =   -3108   #recNotFnd
-atpBadRsp   =   -3107   #atpBadRsp
-atpLenErr   =   -3106   #atpLenErr
-readQErr    =   -3105   #readQErr
-extractErr  =   -3104   #extractErr
-ckSumErr    =   -3103   #ckSumErr
-noMPPErr    =   -3102   #noMPPErr
-buf2SmallErr    =   -3101   #buf2SmallErr
-noPrefAppErr    =   -3032   #noPrefAppErr
-badTranslationSpecErr   =   -3031   #badTranslationSpecErr
-noTranslationPathErr    =   -3030   #noTranslationPathErr
-couldNotParseSourceFileErr  =   -3026   #Source document does not contain source type
-invalidTranslationPathErr   =   -3025   #Source type to destination type not a valid path
-retryComponentRegistrationErr   =   -3005   #retryComponentRegistrationErr
-unresolvedComponentDLLErr   =   -3004   #unresolvedComponentDLLErr
-componentDontRegister   =   -3003   #componentDontRegister
-componentNotCaptured    =   -3002   #componentNotCaptured
-validInstancesExist =   -3001   #validInstancesExist
-invalidComponentID  =   -3000   #invalidComponentID
-cfragLastErrCode    =   -2899   #The last value in the range of CFM errors.
-cfragOutputLengthErr    =   -2831   #An output parameter is too small to hold the value.
-cfragAbortClosureErr    =   -2830   #Used by notification handlers to abort a closure.
-cfragClosureIDErr   =   -2829   #The closure ID was not valid.
-cfragContainerIDErr =   -2828   #The fragment container ID was not valid.
-cfragNoRegistrationErr  =   -2827   #The registration name was not found.
-cfragNotClosureErr  =   -2826   #The closure ID was actually a connection ID.
-cfragFileSizeErr    =   -2825   #A file was too large to be mapped.
-cfragFragmentUsageErr   =   -2824   #A semantic error in usage of the fragment.
-cfragArchitectureErr    =   -2823   #A fragment has an unacceptable architecture.
-cfragNoApplicationErr   =   -2822   #No application member found in the cfrg resource.
-cfragInitFunctionErr    =   -2821   #A fragment's initialization routine returned an error.
-cfragFragmentCorruptErr =   -2820   #A fragment's container was corrupt (known format).
-cfragCFMInternalErr =   -2819   #An internal inconstistancy has been detected.
-cfragCFMStartupErr  =   -2818   #Internal error during CFM initialization.
-cfragLibConnErr =   -2817   #
-cfragInitAtBootErr  =   -2816   #A boot library has an initialization function.  (System 7 only)
-cfragInitLoopErr    =   -2815   #Circularity in required initialization order.
-cfragImportTooNewErr    =   -2814   #An import library was too new for a client.
-cfragImportTooOldErr    =   -2813   #An import library was too old for a client.
-cfragInitOrderErr   =   -2812   #
-cfragNoIDsErr   =   -2811   #No more CFM IDs for contexts, connections, etc.
-cfragNoClientMemErr =   -2810   #Out of memory for fragment mapping or section instances.
-cfragNoPrivateMemErr    =   -2809   #Out of memory for internal bookkeeping.
-cfragNoPositionErr  =   -2808   #The registration insertion point was not found.
-cfragUnresolvedErr  =   -2807   #A fragment had "hard" unresolved imports.
-cfragFragmentFormatErr  =   -2806   #A fragment's container format is unknown.
-cfragDupRegistrationErr =   -2805   #The registration name was already in use.
-cfragNoLibraryErr   =   -2804   #The named library was not found.
-cfragNoSectionErr   =   -2803   #The specified section was not found.
-cfragNoSymbolErr    =   -2802   #The specified symbol was not found.
-cfragConnectionIDErr    =   -2801   #The connection ID was not valid.
-cfragFirstErrCode   =   -2800   #The first value in the range of CFM errors.
-errASInconsistentNames  =   -2780   #English errors:
-errASNoResultReturned   =   -2763   #The range -2780 thru -2799 is reserved for dialect specific error codes. (Error codes from different dialects may overlap.)
-errASParameterNotForEvent   =   -2762   #errASParameterNotForEvent
-errASIllegalFormalParameter =   -2761   #errASIllegalFormalParameter
-errASTerminologyNestingTooDeep  =   -2760   #errASTerminologyNestingTooDeep
-OSAControlFlowError =   -2755   #Signaled when illegal control flow occurs in an application (no catcher for throw, non-lexical loop exit, etc.)
-OSAInconsistentDeclarations =   -2754   #Signaled when a variable is declared inconsistently in the same scope, such as both local and global
-OSAUndefinedVariable    =   -2753   #Signaled when a variable is accessed that has no value
-OSADuplicateHandler =   -2752   #Signaled when more than one handler is defined with the same name in a scope where the language doesn't allow it
-OSADuplicateProperty    =   -2751   #Signaled when a formal parameter, local variable, or instance variable is specified more than once.
-OSADuplicateParameter   =   -2750   #Signaled when a formal parameter, local variable, or instance variable is specified more than once
-OSATokenTooLong =   -2742   #Signaled when a name or number is too long to be parsed
-OSASyntaxTypeError  =   -2741   #Signaled when another form of syntax was expected. (e.g. "expected a <type> but found <this>")
-OSASyntaxError  =   -2740   #Signaled when a syntax error occurs. (e.g. "Syntax error" or "<this> can't go after <that>")
-errASCantCompareMoreThan32k =   -2721   #Parser/Compiler errors:
-errASCantConsiderAndIgnore  =   -2720   #errASCantConsiderAndIgnore
-errOSACantCreate    =   -2710   #errOSACantCreate
-errOSACantGetTerminology    =   -2709   #errOSACantGetTerminology
-errOSADataBlockTooLarge =   -2708   #Signaled when an intrinsic limitation is exceeded for the size of a value or data structure.
-errOSAInternalTableOverflow =   -2707   #Signaled when a runtime internal data structure overflows
-errOSAStackOverflow =   -2706   #Signaled when the runtime stack overflows
-errOSACorruptTerminology    =   -2705   #Signaled when an application's terminology resource is not readable
-errOSAAppNotHighLevelEventAware =   -2704   #Signaled when an application can't respond to AppleEvents
-errOSACantLaunch    =   -2703   #Signaled when application can't be launched or when it is remote and program linking is not enabled
-errOSANumericOverflow   =   -2702   #Signaled when integer or real value is too large to be represented
-errOSADivideByZero  =   -2701   #Signaled when there is an attempt to divide by zero
-errOSAGeneralError  =   -2700   #Signaled by user scripts or applications when no actual error code is to be returned.
-noIconDataAvailableErr  =   -2582   #The necessary icon data is not available
-noSuchIconErr   =   -2581   #The requested icon could not be found
-invalidIconRefErr   =   -2580   #The icon ref is not valid
-nrCallNotSupported  =   -2557   #This call is not available or supported on this machine
-nrTransactionAborted    =   -2556   #transaction was aborted
-nrExitedIteratorScope   =   -2555   #outer scope of iterator was exited
-nrIterationDone =   -2554   #iteration operation is done
-nrPropertyAlreadyExists =   -2553   #property already exists
-nrInvalidEntryIterationOp   =   -2552   #invalid entry iteration operation
-nrPathBufferTooSmall    =   -2551   #buffer for path is too small
-nrPathNotFound  =   -2550   #a path component lookup failed
-nrResultCodeBase    =   -2549   #nrResultCodeBase
-nrOverrunErr    =   -2548   #nrOverrunErr
-nrNotModifiedErr    =   -2547   #nrNotModifiedErr
-nrTypeMismatchErr   =   -2546   #nrTypeMismatchErr
-nrPowerSwitchAbortErr   =   -2545   #nrPowerSwitchAbortErr
-nrPowerErr  =   -2544   #nrPowerErr
-nrDataTruncatedErr  =   -2543   #nrDataTruncatedErr
-nrNotSlotDeviceErr  =   -2542   #nrNotSlotDeviceErr
-nrNameErr   =   -2541   #nrNameErr
-nrNotCreatedErr =   -2540   #nrNotCreatedErr
-nrNotFoundErr   =   -2539   #nrNotFoundErr
-nrInvalidNodeErr    =   -2538   #nrInvalidNodeErr
-nrNotEnoughMemoryErr    =   -2537   #nrNotEnoughMemoryErr
-nrLockedErr =   -2536   #nrLockedErr
-mmInternalError =   -2526   #mmInternalError
-tsmDefaultIsNotInputMethodErr   =   -2524   #Current Input source is KCHR or uchr, not Input Method  (GetDefaultInputMethod)
-tsmNoStem   =   -2523   #No stem exists for the token
-tsmNoMoreTokens =   -2522   #No more tokens are available for the source text
-tsmNoHandler    =   -2521   #No Callback Handler exists for callback
-tsmInvalidContext   =   -2520   #Invalid TSMContext specified in call
-tsmUnknownErr   =   -2519   #any other errors
-tsmUnsupportedTypeErr   =   -2518   #unSupported interface type error
-tsmScriptHasNoIMErr =   -2517   #script has no imput method or is using old IM
-tsmInputMethodIsOldErr  =   -2516   #returned by GetDefaultInputMethod
-tsmComponentAlreadyOpenErr  =   -2515   #text service already opened for the document
-tsmTSNotOpenErr =   -2514   #text service is not open
-tsmTSHasNoMenuErr   =   -2513   #the text service has no menu
-tsmUseInputWindowErr    =   -2512   #not TSM aware because we are using input window
-tsmDocumentOpenErr  =   -2511   #there are open documents
-tsmTextServiceNotFoundErr   =   -2510   #no text service found
-tsmCantOpenComponentErr =   -2509   #canÕt open the component
-tsmNoOpenTSErr  =   -2508   #no open text service
-tsmDocNotActiveErr  =   -2507   #document is NOT active
-tsmTSMDocBusyErr    =   -2506   #document is still active
-tsmInvalidDocIDErr  =   -2505   #invalid TSM documentation id
-tsmNeverRegisteredErr   =   -2504   #app never registered error (not TSM aware)
-tsmAlreadyRegisteredErr =   -2503   #want to register again error
-tsmNotAnAppErr  =   -2502   #not an application error
-tsmInputMethodNotFoundErr   =   -2501   #tsmInputMethodNotFoundErr
-tsmUnsupScriptLanguageErr   =   -2500   #tsmUnsupScriptLanguageErr
-kernelUnrecoverableErr  =   -2499   #kernelUnrecoverableErr
-kernelReturnValueErr    =   -2422   #kernelReturnValueErr
-kernelAlreadyFreeErr    =   -2421   #kernelAlreadyFreeErr
-kernelIDErr =   -2419   #kernelIDErr
-kernelExceptionErr  =   -2418   #kernelExceptionErr
-kernelTerminatedErr =   -2417   #kernelTerminatedErr
-kernelInUseErr  =   -2416   #kernelInUseErr
-kernelTimeoutErr    =   -2415   #kernelTimeoutErr
-kernelAsyncReceiveLimitErr  =   -2414   #kernelAsyncReceiveLimitErr
-kernelAsyncSendLimitErr =   -2413   #kernelAsyncSendLimitErr
-kernelAttributeErr  =   -2412   #kernelAttributeErr
-kernelExecutionLevelErr =   -2411   #kernelExecutionLevelErr
-kernelDeletePermissionErr   =   -2410   #kernelDeletePermissionErr
-kernelExecutePermissionErr  =   -2409   #kernelExecutePermissionErr
-kernelReadPermissionErr =   -2408   #kernelReadPermissionErr
-kernelWritePermissionErr    =   -2407   #kernelWritePermissionErr
-kernelObjectExistsErr   =   -2406   #kernelObjectExistsErr
-kernelUnsupportedErr    =   -2405   #kernelUnsupportedErr
-kernelPrivilegeErr  =   -2404   #kernelPrivilegeErr
-kernelOptionsErr    =   -2403   #kernelOptionsErr
-kernelCanceledErr   =   -2402   #kernelCanceledErr
-kernelIncompleteErr =   -2401   #kernelIncompleteErr
-badCallOrderErr =   -2209   #Usually due to a status call being called prior to being setup first
-noDMAErr    =   -2208   #CanÕt do DMA digitizing (i.e. can't go to requested dest
-badDepthErr =   -2207   #CanÕt digitize into this depth
-notExactSizeErr =   -2206   #CanÕt do exact size requested
-noMoreKeyColorsErr  =   -2205   #all key indexes in use
-notExactMatrixErr   =   -2204   #warning of bad matrix, digitizer did its best
-matrixErr   =   -2203   #bad matrix, digitizer did nothing
-qtParamErr  =   -2202   #bad input parameter (out of range, etc)
-digiUnimpErr    =   -2201   #feature unimplemented
-qtXMLApplicationErr =   -2159   #qtXMLApplicationErr
-qtXMLParseErr   =   -2158   #qtXMLParseErr
-qtActionNotHandledErr   =   -2157   #qtActionNotHandledErr
-notEnoughDataErr    =   -2149   #notEnoughDataErr
-urlDataHFTPURLErr   =   -2148   #urlDataHFTPURLErr
-urlDataHFTPServerDisconnectedErr    =   -2147   #urlDataHFTPServerDisconnectedErr
-urlDataHFTPNoPasswordErr    =   -2146   #urlDataHFTPNoPasswordErr
-urlDataHFTPNeedPasswordErr  =   -2145   #urlDataHFTPNeedPasswordErr
-urlDataHFTPBadNameListErr   =   -2144   #urlDataHFTPBadNameListErr
-urlDataHFTPNoNetDriverErr   =   -2143   #urlDataHFTPNoNetDriverErr
-urlDataHFTPFilenameErr  =   -2142   #urlDataHFTPFilenameErr
-urlDataHFTPPermissionsErr   =   -2141   #urlDataHFTPPermissionsErr
-urlDataHFTPQuotaErr =   -2140   #urlDataHFTPQuotaErr
-urlDataHFTPNoDirectoryErr   =   -2139   #urlDataHFTPNoDirectoryErr
-urlDataHFTPDataConnectionErr    =   -2138   #urlDataHFTPDataConnectionErr
-urlDataHFTPServerErr    =   -2137   #urlDataHFTPServerErr
-urlDataHFTPBadPasswordErr   =   -2136   #urlDataHFTPBadPasswordErr
-urlDataHFTPBadUserErr   =   -2135   #urlDataHFTPBadUserErr
-urlDataHFTPShutdownErr  =   -2134   #urlDataHFTPShutdownErr
-urlDataHFTPProtocolErr  =   -2133   #urlDataHFTPProtocolErr
-urlDataHHTTPRedirectErr =   -2132   #urlDataHHTTPRedirectErr
-urlDataHHTTPURLErr  =   -2131   #urlDataHHTTPURLErr
-urlDataHHTTPNoNetDriverErr  =   -2130   #urlDataHHTTPNoNetDriverErr
-urlDataHHTTPProtocolErr =   -2129   #urlDataHHTTPProtocolErr
-qtNetworkAlreadyAllocatedErr    =   -2127   #qtNetworkAlreadyAllocatedErr
-notAllowedToSaveMovieErr    =   -2126   #notAllowedToSaveMovieErr
-fileOffsetTooBigErr =   -2125   #fileOffsetTooBigErr
-ASDEntryNotFoundErr =   -2124   #ASDEntryNotFoundErr
-ASDBadForkErr   =   -2123   #ASDBadForkErr
-ASDBadHeaderErr =   -2122   #ASDBadHeaderErr
-AAPNotFoundErr  =   -2121   #AAPNotFoundErr
-AAPNotCreatedErr    =   -2120   #AAPNotCreatedErr
-qfcbNotCreatedErr   =   -2119   #qfcbNotCreatedErr
-qfcbNotFoundErr =   -2118   #qfcbNotFoundErr
-wackBadMetaDataErr  =   -2117   #wackBadMetaDataErr
-wackForkNotFoundErr =   -2116   #wackForkNotFoundErr
-wackBadFileErr  =   -2115   #wackBadFileErr
-unknownFormatErr    =   -2114   #unknownFormatErr
-pathNotVerifiedErr  =   -2113   #pathNotVerifiedErr
-noPathMappingErr    =   -2112   #noPathMappingErr
-emptyPathErr    =   -2111   #emptyPathErr
-pathTooLongErr  =   -2110   #pathTooLongErr
-cannotBeLeafAtomErr =   -2109   #cannotBeLeafAtomErr
-invalidAtomTypeErr  =   -2108   #invalidAtomTypeErr
-invalidAtomContainerErr =   -2107   #invalidAtomContainerErr
-invalidAtomErr  =   -2106   #invalidAtomErr
-duplicateAtomTypeAndIDErr   =   -2105   #duplicateAtomTypeAndIDErr
-atomIndexInvalidErr =   -2104   #atomIndexInvalidErr
-atomsNotOfSameTypeErr   =   -2103   #atomsNotOfSameTypeErr
-notLeafAtomErr  =   -2102   #notLeafAtomErr
-cannotFindAtomErr   =   -2101   #cannotFindAtomErr
-unsupportedProcessorErr =   -2097   #unsupportedProcessorErr
-unsupportedOSErr    =   -2096   #unsupportedOSErr
-qtmlUninitialized   =   -2095   #qtmlUninitialized
-qtmlDllEntryNotFoundErr =   -2094   #Windows specific errors (when qtml is loading)
-qtmlDllLoadErr  =   -2093   #Windows specific errors (when qtml is loading)
-componentDllEntryNotFoundErr    =   -2092   #Windows specific errors (when component is loading)
-componentDllLoadErr =   -2091   #Windows specific errors (when component is loading)
-videoOutputInUseErr =   -2090   #videoOutputInUseErr
-noExportProcAvailableErr    =   -2089   #noExportProcAvailableErr
-tuneParseOSErr  =   -2087   #tuneParseOSErr
-tunePlayerFullOSErr =   -2086   #tunePlayerFullOSErr
-noteChannelNotAllocatedOSErr    =   -2085   #noteChannelNotAllocatedOSErr
-illegalNoteChannelOSErr =   -2084   #illegalNoteChannelOSErr
-synthesizerOSErr    =   -2083   #synthesizerOSErr
-synthesizerNotRespondingOSErr   =   -2082   #synthesizerNotRespondingOSErr
-midiManagerAbsentOSErr  =   -2081   #midiManagerAbsentOSErr
-illegalControllerOSErr  =   -2080   #illegalControllerOSErr
-illegalInstrumentOSErr  =   -2079   #illegalInstrumentOSErr
-illegalKnobValueOSErr   =   -2078   #illegalKnobValueOSErr
-illegalKnobOSErr    =   -2077   #illegalKnobOSErr
-illegalChannelOSErr =   -2076   #illegalChannelOSErr
-illegalPartOSErr    =   -2075   #illegalPartOSErr
-illegalVoiceAllocationOSErr =   -2074   #illegalVoiceAllocationOSErr
-cantReceiveFromSynthesizerOSErr =   -2073   #cantReceiveFromSynthesizerOSErr
-cantSendToSynthesizerOSErr  =   -2072   #cantSendToSynthesizerOSErr
-notImplementedMusicOSErr    =   -2071   #notImplementedMusicOSErr
-internalComponentErr    =   -2070   #internalComponentErr
-invalidSpriteIDErr  =   -2069   #invalidSpriteIDErr
-invalidImageIndexErr    =   -2068   #invalidImageIndexErr
-invalidSpriteIndexErr   =   -2067   #invalidSpriteIndexErr
-gWorldsNotSameDepthAndSizeErr   =   -2066   #gWorldsNotSameDepthAndSizeErr
-invalidSpritePropertyErr    =   -2065   #invalidSpritePropertyErr
-invalidSpriteWorldPropertyErr   =   -2064   #invalidSpriteWorldPropertyErr
-missingRequiredParameterErr =   -2063   #missingRequiredParameterErr
-movieTextNotFoundErr    =   -2062   #movieTextNotFoundErr
-sourceNotFoundErr   =   -2061   #sourceNotFoundErr
-noSourceTreeFoundErr    =   -2060   #noSourceTreeFoundErr
-samplesAlreadyInMediaErr    =   -2059   #samplesAlreadyInMediaErr
-auxiliaryExportDataUnavailable  =   -2058   #auxiliaryExportDataUnavailable
-unsupportedAuxiliaryImportData  =   -2057   #unsupportedAuxiliaryImportData
-soundSupportNotAvailableErr =   -2056   #QT for Windows error
-noSoundTrackInMovieErr  =   -2055   #QT for Windows error
-noVideoTrackInMovieErr  =   -2054   #QT for Windows error
-featureUnsupported  =   -2053   #featureUnsupported
-couldNotUseAnExistingSample =   -2052   #couldNotUseAnExistingSample
-noDefaultDataRef    =   -2051   #noDefaultDataRef
-badDataRefIndex =   -2050   #badDataRefIndex
-invalidDataRefContainer =   -2049   #invalidDataRefContainer
-noMovieFound    =   -2048   #noMovieFound
-dataNoDataRef   =   -2047   #dataNoDataRef
-endOfDataReached    =   -2046   #endOfDataReached
-dataAlreadyClosed   =   -2045   #dataAlreadyClosed
-dataAlreadyOpenForWrite =   -2044   #dataAlreadyOpenForWrite
-dataNotOpenForWrite =   -2043   #dataNotOpenForWrite
-dataNotOpenForRead  =   -2042   #dataNotOpenForRead
-invalidSampleDescription    =   -2041   #invalidSampleDescription
-invalidChunkCache   =   -2040   #invalidChunkCache
-invalidSampleDescIndex  =   -2039   #invalidSampleDescIndex
-invalidChunkNum =   -2038   #invalidChunkNum
-invalidSampleNum    =   -2037   #invalidSampleNum
-invalidRect =   -2036   #invalidRect
-cantEnableTrack =   -2035   #cantEnableTrack
-internalQuickTimeError  =   -2034   #internalQuickTimeError
-badEditIndex    =   -2033   #badEditIndex
-timeNotInMedia  =   -2032   #timeNotInMedia
-timeNotInTrack  =   -2031   #timeNotInTrack
-trackNotInMovie =   -2030   #trackNotInMovie
-trackIDNotFound =   -2029   #trackIDNotFound
-badTrackIndex   =   -2028   #badTrackIndex
-maxSizeToGrowTooSmall   =   -2027   #maxSizeToGrowTooSmall
-userDataItemNotFound    =   -2026   #userDataItemNotFound
-staleEditState  =   -2025   #staleEditState
-nonMatchingEditState    =   -2024   #nonMatchingEditState
-invalidEditState    =   -2023   #invalidEditState
-cantCreateSingleForkFile    =   -2022   #happens when file already exists
-wfFileNotFound  =   -2021   #wfFileNotFound
-movieToolboxUninitialized   =   -2020   #movieToolboxUninitialized
-progressProcAborted =   -2019   #progressProcAborted
-mediaTypesDontMatch =   -2018   #mediaTypesDontMatch
-badEditList =   -2017   #badEditList
-cantPutPublicMovieAtom  =   -2016   #cantPutPublicMovieAtom
-invalidTime =   -2015   #invalidTime
-invalidDuration =   -2014   #invalidDuration
-invalidHandler  =   -2013   #invalidHandler
-invalidDataRef  =   -2012   #invalidDataRef
-invalidSampleTable  =   -2011   #invalidSampleTable
-invalidMovie    =   -2010   #invalidMovie
-invalidTrack    =   -2009   #invalidTrack
-invalidMedia    =   -2008   #invalidMedia
-noDataHandler   =   -2007   #noDataHandler
-noMediaHandler  =   -2006   #noMediaHandler
-badComponentType    =   -2005   #badComponentType
-cantOpenHandler =   -2004   #cantOpenHandler
-cantFindHandler =   -2003   #cantFindHandler
-badPublicMovieAtom  =   -2002   #badPublicMovieAtom
-badImageDescription =   -2001   #badImageDescription
-couldNotResolveDataRef  =   -2000   #couldNotResolveDataRef
-nonDragOriginatorErr    =   -1862   #illegal attempt at originator only data
-badImageErr =   -1861   #bad translucent image PixMap
-badImageRgnErr  =   -1860   #bad translucent image region
-noSuitableDisplaysErr   =   -1859   #no displays support translucency
-unsupportedForPlatformErr   =   -1858   #call is for PowerPC only
-dragNotAcceptedErr  =   -1857   #drag was not accepted by receiver
-handlerNotFoundErr  =   -1856   #handler not found
-duplicateHandlerErr =   -1855   #handler already exists
-cantGetFlavorErr    =   -1854   #error while trying to get flavor data
-duplicateFlavorErr  =   -1853   #flavor type already exists
-badDragFlavorErr    =   -1852   #unknown flavor type
-badDragItemErr  =   -1851   #unknown drag item reference
-badDragRefErr   =   -1850   #unknown drag reference
-errEndOfBody    =   -1813   #errEndOfBody
-errEndOfDocument    =   -1812   #errEndOfDocument
-errTopOfBody    =   -1811   #errTopOfBody
-errTopOfDocument    =   -1810   #errTopOfDocument
-errOffsetIsOutsideOfView    =   -1801   #errOffsetIsOutsideOfView
-errOffsetInvalid    =   -1800   #errOffsetInvalid
-errOSACantOpenComponent =   -1762   #Can't connect to scripting system with that ID
-errOSAComponentMismatch =   -1761   #Parameters are from 2 different components
-errOSADataFormatTooNew  =   -1759   #errOSADataFormatTooNew
-errOSADataFormatObsolete    =   -1758   #errOSADataFormatObsolete
-errOSANoSuchDialect =   -1757   #errOSANoSuchDialect
-errOSASourceNotAvailable    =   -1756   #errOSASourceNotAvailable
-errOSABadSelector   =   -1754   #errOSABadSelector
-errOSAScriptError   =   -1753   #errOSAScriptError
-errOSABadStorageType    =   -1752   #errOSABadStorageType
-errOSAInvalidID =   -1751   #errOSAInvalidID
-errOSASystemError   =   -1750   #errOSASystemError
-errAEBufferTooSmall =   -1741   #buffer for AEFlattenDesc too small
-errAEBuildSyntaxError   =   -1740   #AEBuildDesc and friends detected a syntax error
-errAEDescIsNull =   -1739   #attempting to perform an invalid operation on a null descriptor
-errAEStreamAlreadyConverted =   -1738   #attempt to convert a stream that has already been converted
-errAEStreamBadNesting   =   -1737   #nesting violation while streaming
-errAEDuplicateHandler   =   -1736   #attempt to install handler in table for identical class and id (1.1 or greater)
-errAEEventFiltered  =   -1735   #event has been filtered, and should not be propogated (1.1 or greater)
-errAEReceiveEscapeCurrent   =   -1734   #break out of only lowest level of AEReceive (1.1 or greater)
-errAEReceiveTerminate   =   -1733   #break out of all levels of AEReceive to the topmost (1.1 or greater)
-errAERecordingIsAlreadyOn   =   -1732   #available only in version 1.0.1 or greater
-errAEUnknownObjectType  =   -1731   #available only in version 1.0.1 or greater
-errAEEmptyListContainer =   -1730   #Attempt to pass empty list as container to accessor
-errAENegativeCount  =   -1729   #CountProc returned negative value
-errAENoSuchObject   =   -1728   #e.g.,: specifier asked for the 3rd, but there are only 2. Basically, this indicates a run-time resolution error.
-errAENotAnObjSpec   =   -1727   #Param to AEResolve not of type 'obj '
-errAEBadTestKey =   -1726   #Test is neither typeLogicalDescriptor nor typeCompDescriptor
-errAENoSuchLogical  =   -1725   #Something other than AND, OR, or NOT
-errAEAccessorNotFound   =   -1723   #Accessor proc matching wantClass and containerType or wildcards not found
-errAEWrongNumberArgs    =   -1721   #Logical op kAENOT used with other than 1 term
-errAEImpossibleRange    =   -1720   #A range like 3rd to 2nd, or 1st to all.
-errAEIllegalIndex   =   -1719   #index is out of range in a put operation
-errAEReplyNotArrived    =   -1718   #the contents of the reply you are accessing have not arrived yet
-errAEHandlerNotFound    =   -1717   #no handler in the dispatch tables fits the parameters to AEGetEventHandler or AEGetCoercionHandler
-errAEUnknownAddressType =   -1716   #the target address type is not known
-errAEParamMissed    =   -1715   #a required parameter was not accessed
-errAENotASpecialFunction    =   -1714   #there is no special function for/with this keyword
-errAENoUserInteraction  =   -1713   #no user interaction is allowed
-errAETimeout    =   -1712   #the AppleEvent timed out
-errAEWaitCanceled   =   -1711   #in AESend, the user cancelled out of wait loop for reply or receipt
-errAEUnknownSendMode    =   -1710   #mode wasn't NoReply, WaitReply, or QueueReply or Interaction level is unknown
-errAEReplyNotValid  =   -1709   #AEResetTimer was passed an invalid reply parameter
-errAEEventNotHandled    =   -1708   #the AppleEvent was not handled by any handler
-errAENotAppleEvent  =   -1707   #the event is not in AppleEvent format
-errAENewerVersion   =   -1706   #need newer version of the AppleEvent manager
-errAEBadListItem    =   -1705   #the specified list item does not exist
-errAENotAEDesc  =   -1704   #errAENotAEDesc
-errAEWrongDataType  =   -1703   #errAEWrongDataType
-errAECorruptData    =   -1702   #errAECorruptData
-errAEDescNotFound   =   -1701   #errAEDescNotFound
-errAECoercionFail   =   -1700   #bad parameter data or unable to coerce the data supplied
-errFSIteratorNotSupported   =   -1424   #The iterator's flags or container are not supported by this call
-errFSIteratorNotFound   =   -1423   #Passed FSIterator is not an open iterator
-errFSBadIteratorFlags   =   -1422   #Flags passed to FSOpenIterator are bad
-errFSForkExists =   -1421   #Named fork already exists.
-errFSRefsDifferent  =   -1420   #FSCompareFSRefs; refs are for different objects
-errFSBadSearchParams    =   -1419   #Something wrong with CatalogSearch searchParams
-errFSBadItemCount   =   -1418   #maximumItems was zero
-errFSNoMoreItems    =   -1417   #Iteration ran out of items to return
-errFSBadAllocFlags  =   -1413   #Invalid bits set in allocationFlags
-errFSBadPosMode =   -1412   #Newline bits set in positionMode
-errFSMissingName    =   -1411   #A Unicode name parameter was NULL or nameLength parameter was zero
-errFSNameTooLong    =   -1410   #File/fork name is too long to create/rename
-errFSForkNotFound   =   -1409   #Named fork does not exist
-errFSNotAFolder =   -1407   #Expected a folder, got a file
-errFSMissingCatInfo =   -1406   #A CatalogInfo parameter was NULL
-errFSBadInfoBitmap  =   -1405   #A CatalogInfoBitmap or VolumeInfoBitmap has reserved or invalid bits set
-errFSBadForkRef =   -1404   #A ForkRefNum parameter was bad
-errFSBadBuffer  =   -1403   #A buffer parameter was bad
-errFSBadForkName    =   -1402   #Fork name parameter is bad
-errFSBadFSRef   =   -1401   #FSRef parameter is bad
-errFSUnknownCall    =   -1400   #selector is not recognized by this filesystem
-badFCBErr   =   -1327   #FCBRecPtr is not valid
-volVMBusyErr    =   -1311   #can't eject because volume is in use by VM
-fsDataTooBigErr =   -1310   #file or volume is too big for system
-fileBoundsErr   =   -1309   #file's EOF, offset, mark or size is too big
-notARemountErr  =   -1308   #when _Mount allows only remounts and doesn't get one
-badFidErr   =   -1307   #file id is dangling or doesn't match with the file number
-sameFileErr =   -1306   #can't exchange a file with itself
-desktopDamagedErr   =   -1305   #desktop database files are corrupted
-catChangedErr   =   -1304   #the catalog has been modified
-diffVolErr  =   -1303   #files on different volumes
-notAFileErr =   -1302   #directory specified
-fidExists   =   -1301   #file id already exists
-fidNotFound =   -1300   #no file thread exists.
-errRefNum   =   -1280   #bad connection refNum
-errAborted  =   -1279   #control call was aborted
-errState    =   -1278   #bad connection state for this operation
-errOpening  =   -1277   #open connection request failed
-errAttention    =   -1276   #attention message too long
-errFwdReset =   -1275   #read terminated by forward reset
-errDSPQueueSize =   -1274   #DSP Read/Write Queue Too small
-errOpenDenied   =   -1273   #open connection request was denied
-reqAborted  =   -1105   #reqAborted
-noDataArea  =   -1104   #noDataArea
-noSendResp  =   -1103   #noSendResp
-cbNotFound  =   -1102   #cbNotFound
-noRelErr    =   -1101   #noRelErr
-badBuffNum  =   -1100   #badBuffNum
-badATPSkt   =   -1099   #badATPSkt
-tooManySkts =   -1098   #tooManySkts
-tooManyReqs =   -1097   #tooManyReqs
-reqFailed   =   -1096   #reqFailed
-aspNoAck    =   -1075   #No ack on attention request (server err)
-aspTooMany  =   -1074   #Too many clients (server error)
-aspSizeErr  =   -1073   #Command block too big
-aspSessClosed   =   -1072   #Session closed
-aspServerBusy   =   -1071   #Server cannot open another session
-aspParamErr =   -1070   #Parameter error
-aspNoServers    =   -1069   #No servers at that address
-aspNoMoreSess   =   -1068   #No more sessions on server
-aspBufTooSmall  =   -1067   #Buffer too small
-aspBadVersNum   =   -1066   #Server cannot support this ASP version
-nbpNISErr   =   -1029   #Error trying to open the NIS
-nbpNotFound =   -1028   #Name not found on remove
-nbpDuplicate    =   -1027   #Duplicate name exists already
-nbpConfDiff =   -1026   #Name confirmed at different socket
-nbpNoConfirm    =   -1025   #nbpNoConfirm
-nbpBuffOvr  =   -1024   #Buffer overflow in LookupName
-noMaskFoundErr  =   -1000   #Icon Utilties Error
-kFMFontContainerAccessErr   =   -985    #kFMFontContainerAccessErr
-kFMFontTableAccessErr   =   -984    #kFMFontTableAccessErr
-kFMIterationScopeModifiedErr    =   -983    #kFMIterationScopeModifiedErr
-kFMInvalidFontErr   =   -982    #kFMInvalidFontErr
-kFMInvalidFontFamilyErr =   -981    #kFMInvalidFontFamilyErr
-kFMIterationCompleted   =   -980    #kFMIterationCompleted
-guestNotAllowedErr  =   -932    #destination port requires authentication
-badLocNameErr   =   -931    #location name malformed
-badServiceMethodErr =   -930    #illegal service type, or not supported
-noUserRecErr    =   -928    #Invalid user reference number
-authFailErr =   -927    #unable to authenticate user at destination
-noInformErr =   -926    #PPCStart failed because destination did not have inform pending
-networkErr  =   -925    #An error has occurred in the network, not too likely
-noUserRefErr    =   -924    #unable to create a new userRefNum
-notLoggedInErr  =   -923    #The default userRefNum does not yet exist
-noDefaultUserErr    =   -922    #user hasn't typed in owners name in Network Setup Control Pannel
-badPortNameErr  =   -919    #PPCPortRec malformed
-sessClosedErr   =   -917    #session was closed
-portClosedErr   =   -916    #port was closed
-noResponseErr   =   -915    #unable to contact destination
-noToolboxNameErr    =   -914    #A system resource is missing, not too likely
-noMachineNameErr    =   -913    #user hasn't named his Macintosh in the Network Setup Control Panel
-userRejectErr   =   -912    #Destination rejected the session request
-noUserNameErr   =   -911    #user name unknown on destination machine
-portNameExistsErr   =   -910    #port is already open (perhaps in another app)
-badReqErr   =   -909    #bad parameter or invalid state for operation
-noSessionErr    =   -908    #Invalid session reference number
-sessTableErr    =   -907    #Out of session tables, try again later
-destPortErr =   -906    #Port does not exist at destination
-localOnlyErr    =   -905    #Network activity is currently disabled
-noGlobalsErr    =   -904    #The system is hosed, better re-boot
-noPortErr   =   -903    #Unable to open port or bad portRefNum.  If you're calling
-nameTypeErr =   -902    #Invalid or inappropriate locationKindSelector in locationName
-notInitErr  =   -900    #PPCToolBox not initialized
-notAppropriateForClassic    =   -877    #This application won't or shouldn't run on Classic (Problem 2481058).
-appVersionTooOld    =   -876    #The application's creator and version are incompatible with the current version of Mac OS.
-wrongApplicationPlatform    =   -875    #The application could not launch because the required platform is not available
-hmCloseViewActive   =   -863    #Returned from HMRemoveBalloon if CloseView was active
-hmNoBalloonUp   =   -862    #Returned from HMRemoveBalloon if no balloon was visible when call was made
-hmOperationUnsupported  =   -861    #Returned from HMShowBalloon call if bad method passed to routine
-hmUnknownHelpType   =   -859    #Returned if help msg record contained a bad type
-hmWrongVersion  =   -858    #Returned if help mgr resource was the wrong version
-hmSkippedBalloon    =   -857    #Returned from calls if helpmsg specified a skip balloon
-hmHelpManagerNotInited  =   -855    #Returned from HMGetHelpMenuHandle if help menu not setup
-hmSameAsLastBalloon =   -854    #Returned from HMShowMenuBalloon if menu & item is same as last time
-hmBalloonAborted    =   -853    #Returned if mouse was moving or mouse wasn't in window port rect
-hmHelpDisabled  =   -850    #Show Balloons mode was off, call to routine ignored
-rcDBPackNotInited   =   -813    #attempt to call other routine before InitDBPack
-rcDBWrongVersion    =   -812    #incompatible versions
-rcDBNoHandler   =   -811    #no app handler for specified data type
-rcDBBadAsyncPB  =   -810    #tried to kill a bad pb
-rcDBAsyncNotSupp    =   -809    #ddev does not support async calls
-rcDBBadDDEV =   -808    #bad ddev specified on DBInit
-rcDBBadSessNum  =   -807    #bad session number for DBGetConnInfo
-rcDBBadSessID   =   -806    #rcDBBadSessID
-rcDBExec    =   -805    #rcDBExec
-rcDBBreak   =   -804    #rcDBBreak
-rcDBBadType =   -803    #rcDBBadType
-rcDBError   =   -802    #rcDBError
-rcDBValue   =   -801    #rcDBValue
-rcDBNull    =   -800    #rcDBNull
-icTooManyProfilesErr    =   -677    #too many profiles in database
-icProfileNotFoundErr    =   -676    #profile not found
-icConfigInappropriateErr    =   -675    #incorrect manufacturer code
-icConfigNotFoundErr =   -674    #no internet configuration was found
-icNoURLErr  =   -673    #no URL found
-icNothingToOverrideErr  =   -672    #no component for the override component to capture
-icNoMoreWritersErr  =   -671    #you cannot begin a write session because someone else is already doing it
-icTruncatedErr  =   -670    #more data was present than was returned
-icInternalErr   =   -669    #Internet Config internal error
-icPrefDataErr   =   -668    #problem with preference data
-icPermErr   =   -667    #cannot set preference
-icPrefNotFoundErr   =   -666    #Internet preference not found
-vmInvalidOwningProcessErr   =   -648    #current process does not own the BackingFileID or FileViewID
-vmAddressNotInFileViewErr   =   -647    #address is not in a FileView
-vmNoMoreFileViewsErr    =   -646    #no more FileViews were found
-vmFileViewAccessErr =   -645    #requested FileViewAccess cannot be obtained
-vmInvalidFileViewIDErr  =   -644    #invalid FileViewID
-vmNoMoreBackingFilesErr =   -643    #no more BackingFiles were found
-vmBusyBackingFileErr    =   -642    #open views found on BackingFile
-vmMappingPrivilegesErr  =   -641    #requested MappingPrivileges cannot be obtained
-vmInvalidBackingFileIDErr   =   -640    #invalid BackingFileID
-noMMUErr    =   -626    #no MMU present
-cannotDeferErr  =   -625    #unable to defer additional functions
-interruptsMaskedErr =   -624    #donÕt call with interrupts masked
-notLockedErr    =   -623    #specified range of memory is not locked
-cannotMakeContiguousErr =   -622    #cannot make specified range contiguous
-notHeldErr  =   -621    #specified range of memory is not held
-notEnoughMemoryErr  =   -620    #insufficient physical memory
-threadProtocolErr   =   -619    #threadProtocolErr
-threadNotFoundErr   =   -618    #threadNotFoundErr
-threadTooManyReqsErr    =   -617    #threadTooManyReqsErr
-noUserInteractionAllowed    =   -610    #no user interaction allowed
-connectionInvalid   =   -609    #connectionInvalid
-noOutstandingHLE    =   -608    #noOutstandingHLE
-bufferIsSmall   =   -607    #error returns from Post and Accept
-appIsDaemon =   -606    #app is BG-only, and launch flags disallow this
-appMemFullErr   =   -605    #application SIZE not big enough for launch
-hardwareConfigErr   =   -604    #hardware configuration not correct for call
-protocolErr =   -603    #app made module calls in improper order
-appModeErr  =   -602    #memory mode is 32-bit, but app not 32-bit clean
-memFragErr  =   -601    #not enough room to launch app w/special requirements
-procNotFound    =   -600    #no eligible process with specified descriptor
-driverHardwareGoneErr   =   -503    #disk driver's hardware was disconnected
-hwParamErr  =   -502    #bad selector for _HWPriv
-teScrapSizeErr  =   -501    #scrap item too big for text edit record
-rgnTooBigErr    =   -500    #rgnTooBigErr
-exUserBreak =   -492    #user debugger break; execute debugger commands on stack
-strUserBreak    =   -491    #user debugger break; display string on stack
-userBreak   =   -490    #user debugger break
-notThePublisherWrn  =   -463    #not the first registered publisher for that container
-containerAlreadyOpenWrn =   -462    #container already opened by this section
-containerNotFoundWrn    =   -461    #could not find editionContainer at this time
-multiplePublisherWrn    =   -460    #A Publisher is already registered for that container
-badSubPartErr   =   -454    #can not use sub parts in this release
-badEditionFileErr   =   -453    #edition file is corrupt
-notRegisteredSectionErr =   -452    #not a registered SectionRecord
-badSectionErr   =   -451    #not a valid SectionRecord
-editionMgrInitErr   =   -450    #edition manager not inited by this app
-fsmUnknownFSMMessageErr =   -438    #unknown message passed to FSM
-fsmNoAlternateStackErr  =   -437    #no alternate stack for HFS CI
-fsmBadFSDVersionErr =   -436    #FSM version incompatible with FSD
-fsmDuplicateFSIDErr =   -435    #FSID already exists on InstallFS
-fsmBadFSDLenErr =   -434    #FSD size incompatible with current FSM vers
-fsmBadFFSNameErr    =   -433    #Name length not 1 <= length <= 31
-fsmBusyFFSErr   =   -432    #File system is busy, cannot be removed
-fsmFFSNotFoundErr   =   -431    #Foreign File system does not exist - new Pack2 could return this error too
-btKeyAttrErr    =   -417    #There is no such a key attribute.
-btKeyLenErr =   -416    #Maximum key length is too long or equal to zero.
-btRecNotFnd =   -415    #Record cannot be found.
-btDupRecErr =   -414    #Record already exists.
-btNoSpace   =   -413    #Can't allocate disk space.
-notBTree    =   -410    #The file is not a dictionary.
-gcrOnMFMErr =   -400    #gcr format on high density media error
-slotNumErr  =   -360    #invalid slot # error
-smRecNotFnd =   -351    #Record not found in the SRT.
-smSRTOvrFlErr   =   -350    #SRT over flow.
-smNoGoodOpens   =   -349    #No opens were successfull in the loop.
-smOffsetErr =   -348    #Offset was too big (temporary error
-smByteLanesErr  =   -347    #NumByteLanes was determined to be zero.
-smBadsPtrErr    =   -346    #Bad pointer was passed to sCalcsPointer
-smsGetDrvrErr   =   -345    #Error occurred during _sGetDriver.
-smNoMoresRsrcs  =   -344    #No more sResources
-smDisDrvrNamErr =   -343    #Error occurred during _sDisDrvrName.
-smGetDrvrNamErr =   -342    #Error occurred during _sGetDrvrName.
-smCkStatusErr   =   -341    #Status of slot = fail.
-smBlkMoveErr    =   -340    #_BlockMove error
-smNewPErr   =   -339    #_NewPtr error
-smSelOOBErr =   -338    #Selector out of bounds error
-smSlotOOBErr    =   -337    #Slot out of bounds error
-smNilsBlockErr  =   -336    #Nil sBlock error (Dont allocate and try to use a nil sBlock)
-smsPointerNil   =   -335    #LPointer is nil From sOffsetData. If this error occurs; check sInfo rec for more information.
-smCPUErr    =   -334    #Code revision is wrong
-smCodeRevErr    =   -333    #Code revision is wrong
-smReservedErr   =   -332    #Reserved field not zero
-smBadsList  =   -331    #Bad sList: Id1 < Id2 < Id3 ...format is not followed.
-smBadRefId  =   -330    #Reference Id not found in List
-smBusErrTO  =   -320    #BusError time out.
-smBadBoardId    =   -319    #BoardId was wrong; re-init the PRAM record.
-smReservedSlot  =   -318    #slot is reserved, VM should not use this address space.
-smInitTblVErr   =   -317    #An error occurred while trying to initialize the Slot Resource Table.
-smInitStatVErr  =   -316    #The InitStatusV field was negative after primary or secondary init.
-smNoBoardId =   -315    #No Board Id.
-smGetPRErr  =   -314    #Error occurred during _sGetPRAMRec (See SIMStatus).
-smNoBoardSRsrc  =   -313    #No Board sResource.
-smDisposePErr   =   -312    #_DisposePointer error
-smFHBlkDispErr  =   -311    #Error occurred during _sDisposePtr (Dispose of FHeader block).
-smFHBlockRdErr  =   -310    #Error occurred during _sGetFHeader.
-smBLFieldBad    =   -309    #ByteLanes field was bad.
-smUnExBusErr    =   -308    #Unexpected BusError
-smResrvErr  =   -307    #Fatal reserved error. Resreved field != 0.
-smNosInfoArray  =   -306    #No sInfoArray. Memory Mgr error.
-smDisabledSlot  =   -305    #This slot is disabled (-305 use to be smLWTstBad)
-smNoDir =   -304    #Directory offset is Nil
-smRevisionErr   =   -303    #Wrong revison level
-smFormatErr =   -302    #FHeader Format is not Apple's
-smCRCFail   =   -301    #CRC check failed for declaration data
-smEmptySlot =   -300    #No card in slot
-nmTypErr    =   -299    #Notification Manager:wrong queue type
-smPriInitErr    =   -293    #Error; Cards could not be initialized.
-smPRAMInitErr   =   -292    #Error; Slot Resource Table could not be initialized.
-smSRTInitErr    =   -291    #Error; Slot Resource Table could not be initialized.
-smSDMInitErr    =   -290    #Error; SDM could not be initialized.
-midiInvalidCmdErr   =   -261    #command not supported for port type
-midiDupIDErr    =   -260    #duplicate client ID
-midiNameLenErr  =   -259    #name supplied is longer than 31 characters
-midiWriteErr    =   -258    #MIDIWritePacket couldn't write to all connected ports
-midiNoConErr    =   -257    #no connection exists between specified ports
-midiVConnectRmvd    =   -256    #pending virtual connection removed
-midiVConnectMade    =   -255    #pending virtual connection resolved
-midiVConnectErr =   -254    #pending virtual connection created
-midiTooManyConsErr  =   -253    #too many connections made
-midiTooManyPortsErr =   -252    #too many ports already installed in the system
-midiNoPortErr   =   -251    #no port with that ID found
-midiNoClientErr =   -250    #no client with that ID found
-badInputText    =   -247    #badInputText
-badDictFormat   =   -246    #badDictFormat
-incompatibleVoice   =   -245    #incompatibleVoice
-voiceNotFound   =   -244    #voiceNotFound
-bufTooSmall =   -243    #bufTooSmall
-synthNotReady   =   -242    #synthNotReady
-synthOpenFailed =   -241    #synthOpenFailed
-noSynthFound    =   -240    #noSynthFound
-siUnknownQuality    =   -232    #invalid quality selector (returned by driver)
-siUnknownInfoType   =   -231    #invalid info type selector (returned by driver)
-siInputDeviceErr    =   -230    #input device hardware failure
-siBadRefNum =   -229    #invalid input device reference number
-siBadDeviceName =   -228    #input device could not be opened
-siDeviceBusyErr =   -227    #input device already in use
-siInvalidSampleSize =   -226    #invalid sample size
-siInvalidSampleRate =   -225    #invalid sample rate
-siHardDriveTooSlow  =   -224    #hard drive too slow to record to disk
-siInvalidCompression    =   -223    #invalid compression type
-siNoBufferSpecified =   -222    #returned by synchronous SPBRecord if nil buffer passed
-siBadSoundInDevice  =   -221    #invalid index passed to SoundInGetIndexedDevice
-siNoSoundInHardware =   -220    #no Sound Input hardware
-siVBRCompressionNotSupported    =   -213    #vbr audio compression not supported for this operation
-noMoreRealTime  =   -212    #not enough CPU cycles left to add another task
-channelNotBusy  =   -211    #channelNotBusy
-buffersTooSmall =   -210    #can not operate in the memory allowed
-channelBusy =   -209    #the Channel is being used for a PFD already
-badFileFormat   =   -208    #was not type AIFF or was of bad format,corrupt
-notEnoughBufferSpace    =   -207    #could not allocate enough memory
-badFormat   =   -206    #Sound Manager Error Returns
-badChannel  =   -205    #Sound Manager Error Returns
-resProblem  =   -204    #Sound Manager Error Returns
-queueFull   =   -203    #Sound Manager Error Returns
-notEnoughHardwareErr    =   -201    #Sound Manager Error Returns
-noHardwareErr   =   -200    #Sound Manager Error Returns
-mapReadErr  =   -199    #map inconsistent with operation
-resAttrErr  =   -198    #attribute inconsistent with operation
-rmvRefFailed    =   -197    #RmveReference failed
-rmvResFailed    =   -196    #RmveResource failed
-addRefFailed    =   -195    #AddReference failed
-addResFailed    =   -194    #AddResource failed
-resFNotFound    =   -193    #Resource file not found
-resNotFound =   -192    #Resource not found
-inputOutOfBounds    =   -190    #Offset of Count out of bounds
-writingPastEnd  =   -189    #Writing past end of file
-resourceInMemory    =   -188    #Resource already in memory
-CantDecompress  =   -186    #resource bent ("the bends") - can't decompress a compressed resource
-badExtResource  =   -185    #extended resource has a bad format.
-cmNoCurrentProfile  =   -182    #Responder error
-cmUnsupportedDataType   =   -181    #Responder error
-cmCantDeleteProfile =   -180    #Responder error
-cmCantXYZ   =   -179    #CMM cant handle XYZ space
-cmCantConcatenateError  =   -178    #Profile can't be concatenated
-cmProfilesIdentical =   -177    #Profiles the same
-cmProfileNotFound   =   -176    #Responder error
-cmMethodNotFound    =   -175    #CMM not present
-cmMethodError   =   -171    #cmMethodError
-cmProfileError  =   -170    #cmProfileError
-cDepthErr   =   -157    #invalid pixel depth
-cResErr =   -156    #invalid resolution for MakeITable
-cDevErr =   -155    #invalid type of graphics device
-cProtectErr =   -154    #colorTable entry protection violation
-cRangeErr   =   -153    #range error on colorTable request
-cNoMemErr   =   -152    #failed to allocate memory for structure
-cTempMemErr =   -151    #failed to allocate memory for temporary structures
-cMatchErr   =   -150    #Color2Index failed to find an index
-insufficientStackErr    =   -149    #insufficientStackErr
-pixMapTooDeepErr    =   -148    #pixMapTooDeepErr
-rgnOverflowErr  =   -147    #rgnOverflowErr
-noMemForPictPlaybackErr =   -145    #noMemForPictPlaybackErr
-userCanceledErr =   -128    #userCanceledErr
-hMenuFindErr    =   -127    #could not find HMenu's parent in MenuKey (wrong error code - obsolete)
-mBarNFnd    =   -126    #system error code for MBDF not found
-updPixMemErr    =   -125    #insufficient memory to update a pixmap
-volGoneErr  =   -124    #Server volume has been disconnected.
-wrgVolTypErr    =   -123    #Wrong volume type error [operation not supported for MFS]
-badMovErr   =   -122    #Move into offspring error
-tmwdoErr    =   -121    #No free WDCB available
-dirNFErr    =   -120    #Directory not found
-memLockedErr    =   -117    #trying to move a locked block (MoveHHi)
-memSCErr    =   -116    #Size Check failed
-memBCErr    =   -115    #Block Check failed
-memPCErr    =   -114    #Pointer Check failed
-memAZErr    =   -113    #Address in zone check failed
-memPurErr   =   -112    #trying to purge a locked or non-purgeable block
-memWZErr    =   -111    #WhichZone failed (applied to free block)
-memAdrErr   =   -110    #address was odd; or out of range
-nilHandleErr    =   -109    #Master Pointer was NIL in HandleZone or other
-memFullErr  =   -108    #Not enough room in heap zone
-noTypeErr   =   -102    #No object of that type in scrap
-noScrapErr  =   -100    #No scrap exists error
-memROZWarn  =   -99 #soft error in ROZ
-portNotCf   =   -98 #driver Open error code (parameter RAM not configured for this connection)
-portInUse   =   -97 #driver Open error code (port is in use)
-portNotPwr  =   -96 #serial port not currently powered
-excessCollsns   =   -95 #excessive collisions on write
-lapProtErr  =   -94 #error in attaching/detaching protocol
-noBridgeErr =   -93 #no network bridge for non-local send
-eLenErr =   -92 #Length error ddpLenErr
-eMultiErr   =   -91 #Multicast address error ddpSktErr
-breakRecd   =   -90 #Break received (SCC)
-rcvrErr =   -89 #SCC receiver error (framing; parity; OR)
-prInitErr   =   -88 #InitUtil found the parameter ram uninitialized
-prWrErr =   -87 #parameter ram written didn't read-verify
-clkWrErr    =   -86 #time written did not verify
-clkRdErr    =   -85 #unable to read same clock value twice
-verErr  =   -84 #track failed to verify
-fmt2Err =   -83 #can't get enough sync
-fmt1Err =   -82 #can't find sector 0 after track format
-sectNFErr   =   -81 #sector number never found on a track
-seekErr =   -80 #track number wrong on address mark
-spdAdjErr   =   -79 #unable to correctly adjust disk speed
-twoSideErr  =   -78 #tried to read 2nd side on a 1-sided drive
-initIWMErr  =   -77 #unable to initialize IWM
-tk0BadErr   =   -76 #track 0 detect doesn't change
-cantStepErr =   -75 #step handshake failed
-wrUnderrun  =   -74 #write underrun occurred
-badDBtSlp   =   -73 #bad data mark bit slip nibbles
-badDCksum   =   -72 #bad data mark checksum
-noDtaMkErr  =   -71 #couldn't find a data mark header
-badBtSlpErr =   -70 #bad addr mark bit slip nibbles
-badCksmErr  =   -69 #addr mark checksum didn't check
-dataVerErr  =   -68 #read verify compare failed
-noAdrMkErr  =   -67 #couldn't find valid addr mark
-noNybErr    =   -66 #couldn't find 5 nybbles in 200 tries
-offLinErr   =   -65 #r/w requested for an off-line drive
-fontDecError    =   -64 #error during font declaration
-wrPermErr   =   -61 #write permissions error
-badMDBErr   =   -60 #bad master directory block
-fsRnErr =   -59 #file system internal error:during rename the old entry was deleted but could not be restored.
-extFSErr    =   -58 #volume in question belongs to an external fs
-noMacDskErr =   -57 #not a mac diskette (sig bytes are wrong)
-nsDrvErr    =   -56 #no such drive (tried to mount a bad drive num)
-volOnLinErr =   -55 #drive volume already on-line at MountVol
-permErr =   -54 #permissions error (on file open)
-volOffLinErr    =   -53 #volume not on line error (was Ejected)
-gfpErr  =   -52 #get file position error
-rfNumErr    =   -51 #refnum error
-paramErr    =   -50 #error in user parameter list
-opWrErr =   -49 #file already open with with write permission
-dupFNErr    =   -48 #duplicate filename (rename)
-fBsyErr =   -47 #File is busy (delete)
-vLckdErr    =   -46 #volume is locked
-fLckdErr    =   -45 #file is locked
-wPrErr  =   -44 #diskette is write protected.
-fnfErr  =   -43 #File not found
-tmfoErr =   -42 #too many files open
-mFulErr =   -41 #memory full (open) or file won't fit (load)
-posErr  =   -40 #tried to position to before start of file (r/w)
-eofErr  =   -39 #End of file
-fnOpnErr    =   -38 #File not open
-bdNamErr    =   -37 #there may be no bad names in the final system!
-ioErr   =   -36 #I/O error (bummers)
-nsvErr  =   -35 #no such volume
-dskFulErr   =   -34 #disk full
-dirFulErr   =   -33 #Directory full
-dceExtErr   =   -30 #dce extension error
-unitTblFullErr  =   -29 #unit table has no more entries
-notOpenErr  =   -28 #Couldn't rd/wr/ctl/sts cause driver not opened
-iIOAbortErr =   -27 #IO abort error (Printing Manager)
-dInstErr    =   -26 #DrvrInstall couldn't find driver in resources
-dRemovErr   =   -25 #tried to remove an open driver
-closErr =   -24 #I/O System Errors
-openErr =   -23 #I/O System Errors
-unitEmptyErr    =   -22 #I/O System Errors
-badUnitErr  =   -21 #I/O System Errors
-writErr =   -20 #I/O System Errors
-readErr =   -19 #I/O System Errors
-statusErr   =   -18 #I/O System Errors
-controlErr  =   -17 #I/O System Errors
-dsExtensionsDisabled    =   -13 #say \96Extensions Disabled\94
-dsHD20Installed =   -12 #say \96HD20 Startup\94
-dsDisassemblerInstalled =   -11 #say \96Disassembler Installed\94
-dsMacsBugInstalled  =   -10 #say \96MacsBug Installed\94
-seNoDB  =   -8  #no debugger installed to handle debugger command
-SlpTypeErr  =   -5  #invalid queue element
-unimpErr    =   -4  #unimplemented core routine
-corErr  =   -3  #core routine number out of range
-dsNoExtsDisassembler    =   -2  #not a SysErr, just a placeholder
-qErr    =   -1  #queue element not found during deletion
-tsmComponentNoErr   =   0   #component result = no error
-EPERM   =   1   #Operation not permitted
-ENOENT  =   2   #No such file or directory
-ESRCH   =   3   #No such process
-EINTR   =   4   #Interrupted system call
-EIO =   5   #Input/output error
-ENXIO   =   6   #Device not configured
-E2BIG   =   7   #Argument list too long
-ENOEXEC =   8   #Exec format error
-EBADF   =   9   #Bad file descriptor
-ECHILD  =   10  #No child processes
-EDEADLK =   11  #Resource deadlock avoided
-ENOMEM  =   12  #Cannot allocate memory
-EACCES  =   13  #Permission denied
-EFAULT  =   14  #Bad address
-ECANCELED   =   15  #Operation cancelled
-EBUSY   =   16  #Device busy
-EEXIST  =   17  #File exists
-EXDEV   =   18  #Cross-device link
-ENODEV  =   19  #Operation not supported by device
-ENOTDIR =   20  #Not a directory
-EISDIR  =   21  #Is a directory
-EINVAL  =   22  #Invalid argument
-ENFILE  =   23  #Too many open files in system
-EMFILE  =   24  #Too many open files
-ENOTTY  =   25  #Inappropriate ioctl for device
-ESIGPARM    =   26  #Signal error
-EFBIG   =   27  #File too large
-ENOSPC  =   28  #No space left on device
-ESPIPE  =   29  #Illegal seek
-EROFS   =   30  #Read-only file system
-EMLINK  =   31  #Too many links
-EPIPE   =   32  #Broken pipe
-EDOM    =   33  #Numerical argument out of domain
-ERANGE  =   34  #Result too large
-EAGAIN  =   35  #Resource temporarily unavailable
-EINPROGRESS =   36  #Operation now in progress
-EALREADY    =   37  #Operation already in progress
-ENOTSOCK    =   38  #Socket operation on non-socket
-EDESTADDRREQ    =   39  #Destination address required
-EMSGSIZE    =   40  #Message too long
-EPROTOTYPE  =   41  #Protocol wrong type for socket
-ENOPROTOOPT =   42  #Protocol not available
-EPROTONOSUPPORT =   43  #Protocol not supported
-ESOCKTNOSUPPORT =   44  #Socket type not supported
-EOPNOTSUPP  =   45  #Operation not supported
-EPFNOSUPPORT    =   46  #Protocol family not supported
-EAFNOSUPPORT    =   47  #Address family not supported by protocol family
-EADDRINUSE  =   48  #Address already in use
-EADDRNOTAVAIL   =   49  #Can't assign requested address
-ENETDOWN    =   50  #Network is down
-ENETUNREACH =   51  #Network is unreachable
-ENETRESET   =   52  #Network dropped connection on reset
-ECONNABORTED    =   53  #Software caused connection abort
-ECONNRESET  =   54  #Connection reset by peer
-ENOBUFS =   55  #No buffer space available
-EISCONN =   56  #Socket is already connected
-ENOTCONN    =   57  #Socket is not connected
-ESHUTDOWN   =   58  #Can't send after socket shutdown
-ETOOMANYREFS    =   59  #Too many references: can't splice
-ETIMEDOUT   =   60  #Operation timed out
-ECONNREFUSED    =   61  #Connection refused
-ELOOP   =   62  #Too many levels of symbolic links
-ENAMETOOLONG    =   63  #File name too long
-EHOSTDOWN   =   64  #Host is down
-EHOSTUNREACH    =   65  #No route to host
-ENOTEMPTY   =   66  #Directory not empty
-ELOOK   =   67  #Internal mapping for kOTLookErr, don't return to client
-ENOLCK  =   77  #No locks available
-ENOSYS  =   78  #Function not implemented
-EILSEQ  =   88  #Wide character encoding error
-EUNKNOWN    =   99  #Unknown error
diff --git a/Lib/plat-mac/macostools.py b/Lib/plat-mac/macostools.py
deleted file mode 100644 (file)
index 3d5b6f8..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-"""macostools - Various utility functions for MacOS.
-
-mkalias(src, dst) - Create a finder alias 'dst' pointing to 'src'
-copy(src, dst) - Full copy of 'src' to 'dst'
-"""
-
-from Carbon import Res
-from Carbon import File, Files
-import os
-import MacOS
-try:
-    openrf = MacOS.openrf
-except AttributeError:
-    # Backward compatibility
-    openrf = open
-
-Error = 'macostools.Error'
-
-BUFSIZ=0x80000      # Copy in 0.5Mb chunks
-
-COPY_FLAGS = (Files.kIsStationary|Files.kNameLocked|Files.kHasBundle|
-              Files.kIsInvisible|Files.kIsAlias)
-
-#
-# Not guaranteed to be correct or stay correct (Apple doesn't tell you
-# how to do this), but it seems to work.
-#
-def mkalias(src, dst, relative=None):
-    """Create a finder alias"""
-    srcfsr = File.FSRef(src)
-    # The next line will fail under unix-Python if the destination
-    # doesn't exist yet. We should change this code to be fsref-based.
-    dstdir, dstname = os.path.split(dst)
-    if not dstdir: dstdir = os.curdir
-    dstdirfsr = File.FSRef(dstdir)
-    if relative:
-        relativefsr = File.FSRef(relative)
-        # ik mag er geen None in stoppen :-(
-        alias = File.FSNewAlias(relativefsr, srcfsr)
-    else:
-        alias = srcfsr.FSNewAliasMinimal()
-
-    dstfsr, dstfss = Res.FSCreateResourceFile(dstdirfsr, str(dstname),
-        File.FSGetResourceForkName())
-    h = Res.FSOpenResourceFile(dstfsr, File.FSGetResourceForkName(), 3)
-    resource = Res.Resource(alias.data)
-    resource.AddResource('alis', 0, '')
-    Res.CloseResFile(h)
-
-    dstfinfo = dstfss.FSpGetFInfo()
-    dstfinfo.Flags = dstfinfo.Flags|0x8000    # Alias flag
-    dstfss.FSpSetFInfo(dstfinfo)
-
-def mkdirs(dst):
-    """Make directories leading to 'dst' if they don't exist yet"""
-    if dst == '' or os.path.exists(dst):
-        return
-    head, tail = os.path.split(dst)
-    if os.sep == ':' and not ':' in head:
-        head = head + ':'
-    mkdirs(head)
-    os.mkdir(dst, 0o777)
-
-def touched(dst):
-    """Tell the finder a file has changed. No-op on MacOSX."""
-    import warnings
-    warnings.warn("macostools.touched() has been deprecated",
-                    DeprecationWarning, 2)
-
-def touched_ae(dst):
-    """Tell the finder a file has changed"""
-    pardir = os.path.split(dst)[0]
-    if not pardir:
-        pardir = os.curdir
-    import Finder
-    f = Finder.Finder()
-    f.update(File.FSRef(pardir))
-
-def copy(src, dst, createpath=0, copydates=1, forcetype=None):
-    """Copy a file, including finder info, resource fork, etc"""
-    src = File.pathname(src)
-    dst = File.pathname(dst)
-    if createpath:
-        mkdirs(os.path.split(dst)[0])
-
-    ifp = open(src, 'rb')
-    ofp = open(dst, 'wb')
-    d = ifp.read(BUFSIZ)
-    while d:
-        ofp.write(d)
-        d = ifp.read(BUFSIZ)
-    ifp.close()
-    ofp.close()
-
-    ifp = openrf(src, '*rb')
-    ofp = openrf(dst, '*wb')
-    d = ifp.read(BUFSIZ)
-    while d:
-        ofp.write(d)
-        d = ifp.read(BUFSIZ)
-    ifp.close()
-    ofp.close()
-
-    srcfss = File.FSSpec(src)
-    dstfss = File.FSSpec(dst)
-    sf = srcfss.FSpGetFInfo()
-    df = dstfss.FSpGetFInfo()
-    df.Creator, df.Type = sf.Creator, sf.Type
-    if forcetype is not None:
-        df.Type = forcetype
-    df.Flags = (sf.Flags & COPY_FLAGS)
-    dstfss.FSpSetFInfo(df)
-    if copydates:
-        srcfsr = File.FSRef(src)
-        dstfsr = File.FSRef(dst)
-        catinfo, _, _, _ = srcfsr.FSGetCatalogInfo(Files.kFSCatInfoAllDates)
-        dstfsr.FSSetCatalogInfo(Files.kFSCatInfoAllDates, catinfo)
-
-def copytree(src, dst, copydates=1):
-    """Copy a complete file tree to a new destination"""
-    if os.path.isdir(src):
-        mkdirs(dst)
-        files = os.listdir(src)
-        for f in files:
-            copytree(os.path.join(src, f), os.path.join(dst, f), copydates)
-    else:
-        copy(src, dst, 1, copydates)
diff --git a/Lib/plat-mac/macresource.py b/Lib/plat-mac/macresource.py
deleted file mode 100644 (file)
index f670ad7..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-"""macresource - Locate and open the resources needed for a script."""
-
-from Carbon import Res
-import os
-import sys
-import MacOS
-import macostools
-
-class ArgumentError(TypeError): pass
-class ResourceFileNotFoundError(ImportError): pass
-
-def need(restype, resid, filename=None, modname=None):
-    """Open a resource file, if needed. restype and resid
-    are required parameters, and identify the resource for which to test. If it
-    is available we are done. If it is not available we look for a file filename
-    (default: modname with .rsrc appended) either in the same folder as
-    where modname was loaded from, or otherwise across sys.path.
-
-    Returns the refno of the resource file opened (or None)"""
-
-    if modname is None and filename is None:
-        raise ArgumentError("Either filename or modname argument (or both) must be given")
-
-    if type(resid) is type(1):
-        try:
-            h = Res.GetResource(restype, resid)
-        except Res.Error:
-            pass
-        else:
-            return None
-    else:
-        try:
-            h = Res.GetNamedResource(restype, resid)
-        except Res.Error:
-            pass
-        else:
-            return None
-
-    # Construct a filename if we don't have one
-    if not filename:
-        if '.' in modname:
-            filename = modname.split('.')[-1] + '.rsrc'
-        else:
-            filename = modname + '.rsrc'
-
-    # Now create a list of folders to search
-    searchdirs = []
-    if modname == '__main__':
-        # If we're main we look in the current directory
-        searchdirs = [os.curdir]
-    if modname in sys.modules:
-        mod = sys.modules[modname]
-        if hasattr(mod, '__file__'):
-            searchdirs = [os.path.dirname(mod.__file__)]
-    searchdirs.extend(sys.path)
-
-    # And look for the file
-    for dir in searchdirs:
-        pathname = os.path.join(dir, filename)
-        if os.path.exists(pathname):
-            break
-    else:
-        raise ResourceFileNotFoundError(filename)
-
-    refno = open_pathname(pathname)
-
-    # And check that the resource exists now
-    if type(resid) is type(1):
-        h = Res.GetResource(restype, resid)
-    else:
-        h = Res.GetNamedResource(restype, resid)
-    return refno
-
-def open_pathname(pathname, verbose=0):
-    """Open a resource file given by pathname, possibly decoding an
-    AppleSingle file"""
-    try:
-        refno = Res.FSpOpenResFile(pathname, 1)
-    except Res.Error as error:
-        if error.args[0] in (-37, -39):
-            # No resource fork. We may be on OSX, and this may be either
-            # a data-fork based resource file or a AppleSingle file
-            # from the CVS repository.
-            try:
-                refno = Res.FSOpenResourceFile(pathname, '', 1)
-            except Res.Error as error:
-                if error.args[0] != -199:
-                    # -199 is "bad resource map"
-                    raise
-            else:
-                return refno
-            # Finally try decoding an AppleSingle file
-            pathname = _decode(pathname, verbose=verbose)
-            refno = Res.FSOpenResourceFile(pathname, '', 1)
-        else:
-            raise
-    return refno
-
-def resource_pathname(pathname, verbose=0):
-    """Return the pathname for a resource file (either DF or RF based).
-    If the pathname given already refers to such a file simply return it,
-    otherwise first decode it."""
-    try:
-        refno = Res.FSpOpenResFile(pathname, 1)
-        Res.CloseResFile(refno)
-    except Res.Error as error:
-        if error.args[0] in (-37, -39):
-            # No resource fork. We may be on OSX, and this may be either
-            # a data-fork based resource file or a AppleSingle file
-            # from the CVS repository.
-            try:
-                refno = Res.FSOpenResourceFile(pathname, '', 1)
-            except Res.Error as error:
-                if error.args[0] != -199:
-                    # -199 is "bad resource map"
-                    raise
-            else:
-                return refno
-            # Finally try decoding an AppleSingle file
-            pathname = _decode(pathname, verbose=verbose)
-        else:
-            raise
-    return pathname
-
-def open_error_resource():
-    """Open the resource file containing the error code to error message
-    mapping."""
-    need('Estr', 1, filename="errors.rsrc", modname=__name__)
-
-def _decode(pathname, verbose=0):
-    # Decode an AppleSingle resource file, return the new pathname.
-    newpathname = pathname + '.df.rsrc'
-    if os.path.exists(newpathname) and \
-        os.stat(newpathname).st_mtime >= os.stat(pathname).st_mtime:
-        return newpathname
-    if hasattr(os, 'access') and not \
-        os.access(os.path.dirname(pathname), os.W_OK|os.X_OK):
-        # The destination directory isn't writable. Create the file in
-        # a temporary directory
-        import tempfile
-        fd, newpathname = tempfile.mkstemp(".rsrc")
-    if verbose:
-        print('Decoding', pathname, 'to', newpathname)
-    import applesingle
-    applesingle.decode(pathname, newpathname, resonly=1)
-    return newpathname
diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py
deleted file mode 100644 (file)
index e52d0dc..0000000
+++ /dev/null
@@ -1,1178 +0,0 @@
-"""Package Install Manager for Python.
-
-This is currently a MacOSX-only strawman implementation.
-Despite other rumours the name stands for "Packman IMPlementation".
-
-Tools to allow easy installation of packages. The idea is that there is
-an online XML database per (platform, python-version) containing packages
-known to work with that combination. This module contains tools for getting
-and parsing the database, testing whether packages are installed, computing
-dependencies and installing packages.
-
-There is a minimal main program that works as a command line tool, but the
-intention is that the end user will use this through a GUI.
-"""
-import sys
-import os
-import subprocess
-import urllib
-import urllib2
-import urlparse
-import plistlib
-import distutils.util
-import distutils.sysconfig
-import hashlib
-import tarfile
-import tempfile
-import shutil
-import time
-
-__all__ = ["PimpPreferences", "PimpDatabase", "PimpPackage", "main",
-    "getDefaultDatabase", "PIMP_VERSION", "main"]
-
-_scriptExc_NotInstalled = "pimp._scriptExc_NotInstalled"
-_scriptExc_OldInstalled = "pimp._scriptExc_OldInstalled"
-_scriptExc_BadInstalled = "pimp._scriptExc_BadInstalled"
-
-NO_EXECUTE=0
-
-PIMP_VERSION="0.5"
-
-# Flavors:
-# source: setup-based package
-# binary: tar (or other) archive created with setup.py bdist.
-# installer: something that can be opened
-DEFAULT_FLAVORORDER=['source', 'binary', 'installer']
-DEFAULT_DOWNLOADDIR='/tmp'
-DEFAULT_BUILDDIR='/tmp'
-DEFAULT_INSTALLDIR=distutils.sysconfig.get_python_lib()
-DEFAULT_PIMPDATABASE_FMT="http://www.python.org/packman/version-%s/%s-%s-%s-%s-%s.plist"
-
-def getDefaultDatabase(experimental=False):
-    if experimental:
-        status = "exp"
-    else:
-        status = "prod"
-
-    major, minor, micro, state, extra = sys.version_info
-    pyvers = '%d.%d' % (major, minor)
-    if micro == 0 and state != 'final':
-        pyvers = pyvers + '%s%d' % (state, extra)
-
-    longplatform = distutils.util.get_platform()
-    osname, release, machine = longplatform.split('-')
-    # For some platforms we may want to differentiate between
-    # installation types
-    if osname == 'darwin':
-        if sys.prefix.startswith('/System/Library/Frameworks/Python.framework'):
-            osname = 'darwin_apple'
-        elif sys.prefix.startswith('/Library/Frameworks/Python.framework'):
-            osname = 'darwin_macpython'
-        # Otherwise we don't know...
-    # Now we try various URLs by playing with the release string.
-    # We remove numbers off the end until we find a match.
-    rel = release
-    while True:
-        url = DEFAULT_PIMPDATABASE_FMT % (PIMP_VERSION, status, pyvers, osname, rel, machine)
-        try:
-            urllib2.urlopen(url)
-        except urllib2.HTTPError as arg:
-            pass
-        else:
-            break
-        if not rel:
-            # We're out of version numbers to try. Use the
-            # full release number, this will give a reasonable
-            # error message later
-            url = DEFAULT_PIMPDATABASE_FMT % (PIMP_VERSION, status, pyvers, osname, release, machine)
-            break
-        idx = rel.rfind('.')
-        if idx < 0:
-            rel = ''
-        else:
-            rel = rel[:idx]
-    return url
-
-def _cmd(output, dir, *cmditems):
-    """Internal routine to run a shell command in a given directory."""
-
-    cmd = ("cd \"%s\"; " % dir) + " ".join(cmditems)
-    if output:
-        output.write("+ %s\n" % cmd)
-    if NO_EXECUTE:
-        return 0
-    child = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
-                             stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-    child.stdin.close()
-    while 1:
-        line = child.stdout.readline()
-        if not line:
-            break
-        if output:
-            output.write(line)
-    return child.wait()
-
-class PimpDownloader:
-    """Abstract base class - Downloader for archives"""
-
-    def __init__(self, argument,
-            dir="",
-            watcher=None):
-        self.argument = argument
-        self._dir = dir
-        self._watcher = watcher
-
-    def download(self, url, filename, output=None):
-        return None
-
-    def update(self, str):
-        if self._watcher:
-            return self._watcher.update(str)
-        return True
-
-class PimpCurlDownloader(PimpDownloader):
-
-    def download(self, url, filename, output=None):
-        self.update("Downloading %s..." % url)
-        exitstatus = _cmd(output, self._dir,
-                    "curl",
-                    "--output", filename,
-                    url)
-        self.update("Downloading %s: finished" % url)
-        return (not exitstatus)
-
-class PimpUrllibDownloader(PimpDownloader):
-
-    def download(self, url, filename, output=None):
-        output = open(filename, 'wb')
-        self.update("Downloading %s: opening connection" % url)
-        keepgoing = True
-        download = urllib2.urlopen(url)
-        if "content-length" in download.headers:
-            length = int(download.headers['content-length'])
-        else:
-            length = -1
-
-        data = download.read(4096) #read 4K at a time
-        dlsize = 0
-        lasttime = 0
-        while keepgoing:
-            dlsize = dlsize + len(data)
-            if len(data) == 0:
-                #this is our exit condition
-                break
-            output.write(data)
-            if int(time.time()) != lasttime:
-                # Update at most once per second
-                lasttime = int(time.time())
-                if length == -1:
-                    keepgoing = self.update("Downloading %s: %d bytes..." % (url, dlsize))
-                else:
-                    keepgoing = self.update("Downloading %s: %d%% (%d bytes)..." % (url, int(100.0*dlsize/length), dlsize))
-            data = download.read(4096)
-        if keepgoing:
-            self.update("Downloading %s: finished" % url)
-        return keepgoing
-
-class PimpUnpacker:
-    """Abstract base class - Unpacker for archives"""
-
-    _can_rename = False
-
-    def __init__(self, argument,
-            dir="",
-            renames=[],
-            watcher=None):
-        self.argument = argument
-        if renames and not self._can_rename:
-            raise RuntimeError("This unpacker cannot rename files")
-        self._dir = dir
-        self._renames = renames
-        self._watcher = watcher
-
-    def unpack(self, archive, output=None, package=None):
-        return None
-
-    def update(self, str):
-        if self._watcher:
-            return self._watcher.update(str)
-        return True
-
-class PimpCommandUnpacker(PimpUnpacker):
-    """Unpack archives by calling a Unix utility"""
-
-    _can_rename = False
-
-    def unpack(self, archive, output=None, package=None):
-        cmd = self.argument % archive
-        if _cmd(output, self._dir, cmd):
-            return "unpack command failed"
-
-class PimpTarUnpacker(PimpUnpacker):
-    """Unpack tarfiles using the builtin tarfile module"""
-
-    _can_rename = True
-
-    def unpack(self, archive, output=None, package=None):
-        tf = tarfile.open(archive, "r")
-        members = tf.getmembers()
-        skip = []
-        if self._renames:
-            for member in members:
-                for oldprefix, newprefix in self._renames:
-                    if oldprefix[:len(self._dir)] == self._dir:
-                        oldprefix2 = oldprefix[len(self._dir):]
-                    else:
-                        oldprefix2 = None
-                    if member.name[:len(oldprefix)] == oldprefix:
-                        if newprefix is None:
-                            skip.append(member)
-                            #print 'SKIP', member.name
-                        else:
-                            member.name = newprefix + member.name[len(oldprefix):]
-                            print('    ', member.name)
-                        break
-                    elif oldprefix2 and member.name[:len(oldprefix2)] == oldprefix2:
-                        if newprefix is None:
-                            skip.append(member)
-                            #print 'SKIP', member.name
-                        else:
-                            member.name = newprefix + member.name[len(oldprefix2):]
-                            #print '    ', member.name
-                        break
-                else:
-                    skip.append(member)
-                    #print '????', member.name
-        for member in members:
-            if member in skip:
-                self.update("Skipping %s" % member.name)
-                continue
-            self.update("Extracting %s" % member.name)
-            tf.extract(member, self._dir)
-        if skip:
-            names = [member.name for member in skip if member.name[-1] != '/']
-            if package:
-                names = package.filterExpectedSkips(names)
-            if names:
-                return "Not all files were unpacked: %s" % " ".join(names)
-
-ARCHIVE_FORMATS = [
-    (".tar.Z", PimpTarUnpacker, None),
-    (".taz", PimpTarUnpacker, None),
-    (".tar.gz", PimpTarUnpacker, None),
-    (".tgz", PimpTarUnpacker, None),
-    (".tar.bz", PimpTarUnpacker, None),
-    (".zip", PimpCommandUnpacker, "unzip \"%s\""),
-]
-
-class PimpPreferences:
-    """Container for per-user preferences, such as the database to use
-    and where to install packages."""
-
-    def __init__(self,
-            flavorOrder=None,
-            downloadDir=None,
-            buildDir=None,
-            installDir=None,
-            pimpDatabase=None):
-        if not flavorOrder:
-            flavorOrder = DEFAULT_FLAVORORDER
-        if not downloadDir:
-            downloadDir = DEFAULT_DOWNLOADDIR
-        if not buildDir:
-            buildDir = DEFAULT_BUILDDIR
-        if not pimpDatabase:
-            pimpDatabase = getDefaultDatabase()
-        self.setInstallDir(installDir)
-        self.flavorOrder = flavorOrder
-        self.downloadDir = downloadDir
-        self.buildDir = buildDir
-        self.pimpDatabase = pimpDatabase
-        self.watcher = None
-
-    def setWatcher(self, watcher):
-        self.watcher = watcher
-
-    def setInstallDir(self, installDir=None):
-        if installDir:
-            # Installing to non-standard location.
-            self.installLocations = [
-                ('--install-lib', installDir),
-                ('--install-headers', None),
-                ('--install-scripts', None),
-                ('--install-data', None)]
-        else:
-            installDir = DEFAULT_INSTALLDIR
-            self.installLocations = []
-        self.installDir = installDir
-
-    def isUserInstall(self):
-        return self.installDir != DEFAULT_INSTALLDIR
-
-    def check(self):
-        """Check that the preferences make sense: directories exist and are
-        writable, the install directory is on sys.path, etc."""
-
-        rv = ""
-        RWX_OK = os.R_OK|os.W_OK|os.X_OK
-        if not os.path.exists(self.downloadDir):
-            rv += "Warning: Download directory \"%s\" does not exist\n" % self.downloadDir
-        elif not os.access(self.downloadDir, RWX_OK):
-            rv += "Warning: Download directory \"%s\" is not writable or not readable\n" % self.downloadDir
-        if not os.path.exists(self.buildDir):
-            rv += "Warning: Build directory \"%s\" does not exist\n" % self.buildDir
-        elif not os.access(self.buildDir, RWX_OK):
-            rv += "Warning: Build directory \"%s\" is not writable or not readable\n" % self.buildDir
-        if not os.path.exists(self.installDir):
-            rv += "Warning: Install directory \"%s\" does not exist\n" % self.installDir
-        elif not os.access(self.installDir, RWX_OK):
-            rv += "Warning: Install directory \"%s\" is not writable or not readable\n" % self.installDir
-        else:
-            installDir = os.path.realpath(self.installDir)
-            for p in sys.path:
-                try:
-                    realpath = os.path.realpath(p)
-                except:
-                    pass
-                if installDir == realpath:
-                    break
-            else:
-                rv += "Warning: Install directory \"%s\" is not on sys.path\n" % self.installDir
-        return rv
-
-    def compareFlavors(self, left, right):
-        """Compare two flavor strings. This is part of your preferences
-        because whether the user prefers installing from source or binary is."""
-        if left in self.flavorOrder:
-            if right in self.flavorOrder:
-                return cmp(self.flavorOrder.index(left), self.flavorOrder.index(right))
-            return -1
-        if right in self.flavorOrder:
-            return 1
-        return cmp(left, right)
-
-class PimpDatabase:
-    """Class representing a pimp database. It can actually contain
-    information from multiple databases through inclusion, but the
-    toplevel database is considered the master, as its maintainer is
-    "responsible" for the contents."""
-
-    def __init__(self, prefs):
-        self._packages = []
-        self.preferences = prefs
-        self._url = ""
-        self._urllist = []
-        self._version = ""
-        self._maintainer = ""
-        self._description = ""
-
-    # Accessor functions
-    def url(self): return self._url
-    def version(self): return self._version
-    def maintainer(self): return self._maintainer
-    def description(self): return self._description
-
-    def close(self):
-        """Clean up"""
-        self._packages = []
-        self.preferences = None
-
-    def appendURL(self, url, included=0):
-        """Append packages from the database with the given URL.
-        Only the first database should specify included=0, so the
-        global information (maintainer, description) get stored."""
-
-        if url in self._urllist:
-            return
-        self._urllist.append(url)
-        fp = urllib2.urlopen(url).fp
-        plistdata = plistlib.Plist.fromFile(fp)
-        # Test here for Pimp version, etc
-        if included:
-            version = plistdata.get('Version')
-            if version and version > self._version:
-                sys.stderr.write("Warning: included database %s is for pimp version %s\n" %
-                    (url, version))
-        else:
-            self._version = plistdata.get('Version')
-            if not self._version:
-                sys.stderr.write("Warning: database has no Version information\n")
-            elif self._version > PIMP_VERSION:
-                sys.stderr.write("Warning: database version %s newer than pimp version %s\n"
-                    % (self._version, PIMP_VERSION))
-            self._maintainer = plistdata.get('Maintainer', '')
-            self._description = plistdata.get('Description', '').strip()
-            self._url = url
-        self._appendPackages(plistdata['Packages'], url)
-        others = plistdata.get('Include', [])
-        for o in others:
-            o = urllib.basejoin(url, o)
-            self.appendURL(o, included=1)
-
-    def _appendPackages(self, packages, url):
-        """Given a list of dictionaries containing package
-        descriptions create the PimpPackage objects and append them
-        to our internal storage."""
-
-        for p in packages:
-            p = dict(p)
-            if 'Download-URL' in p:
-                p['Download-URL'] = urllib.basejoin(url, p['Download-URL'])
-            flavor = p.get('Flavor')
-            if flavor == 'source':
-                pkg = PimpPackage_source(self, p)
-            elif flavor == 'binary':
-                pkg = PimpPackage_binary(self, p)
-            elif flavor == 'installer':
-                pkg = PimpPackage_installer(self, p)
-            elif flavor == 'hidden':
-                pkg = PimpPackage_installer(self, p)
-            else:
-                pkg = PimpPackage(self, dict(p))
-            self._packages.append(pkg)
-
-    def list(self):
-        """Return a list of all PimpPackage objects in the database."""
-
-        return self._packages
-
-    def listnames(self):
-        """Return a list of names of all packages in the database."""
-
-        rv = []
-        for pkg in self._packages:
-            rv.append(pkg.fullname())
-        rv.sort()
-        return rv
-
-    def dump(self, pathOrFile):
-        """Dump the contents of the database to an XML .plist file.
-
-        The file can be passed as either a file object or a pathname.
-        All data, including included databases, is dumped."""
-
-        packages = []
-        for pkg in self._packages:
-            packages.append(pkg.dump())
-        plistdata = {
-            'Version': self._version,
-            'Maintainer': self._maintainer,
-            'Description': self._description,
-            'Packages': packages
-            }
-        plist = plistlib.Plist(**plistdata)
-        plist.write(pathOrFile)
-
-    def find(self, ident):
-        """Find a package. The package can be specified by name
-        or as a dictionary with name, version and flavor entries.
-
-        Only name is obligatory. If there are multiple matches the
-        best one (higher version number, flavors ordered according to
-        users' preference) is returned."""
-
-        if type(ident) == str:
-            # Remove ( and ) for pseudo-packages
-            if ident[0] == '(' and ident[-1] == ')':
-                ident = ident[1:-1]
-            # Split into name-version-flavor
-            fields = ident.split('-')
-            if len(fields) < 1 or len(fields) > 3:
-                return None
-            name = fields[0]
-            if len(fields) > 1:
-                version = fields[1]
-            else:
-                version = None
-            if len(fields) > 2:
-                flavor = fields[2]
-            else:
-                flavor = None
-        else:
-            name = ident['Name']
-            version = ident.get('Version')
-            flavor = ident.get('Flavor')
-        found = None
-        for p in self._packages:
-            if name == p.name() and \
-                    (not version or version == p.version()) and \
-                    (not flavor or flavor == p.flavor()):
-                if not found or found < p:
-                    found = p
-        return found
-
-ALLOWED_KEYS = [
-    "Name",
-    "Version",
-    "Flavor",
-    "Description",
-    "Home-page",
-    "Download-URL",
-    "Install-test",
-    "Install-command",
-    "Pre-install-command",
-    "Post-install-command",
-    "Prerequisites",
-    "MD5Sum",
-    "User-install-skips",
-    "Systemwide-only",
-]
-
-class PimpPackage:
-    """Class representing a single package."""
-
-    def __init__(self, db, plistdata):
-        self._db = db
-        name = plistdata["Name"]
-        for k in plistdata.keys():
-            if not k in ALLOWED_KEYS:
-                sys.stderr.write("Warning: %s: unknown key %s\n" % (name, k))
-        self._dict = plistdata
-
-    def __getitem__(self, key):
-        return self._dict[key]
-
-    def name(self): return self._dict['Name']
-    def version(self): return self._dict.get('Version')
-    def flavor(self): return self._dict.get('Flavor')
-    def description(self): return self._dict['Description'].strip()
-    def shortdescription(self): return self.description().splitlines()[0]
-    def homepage(self): return self._dict.get('Home-page')
-    def downloadURL(self): return self._dict.get('Download-URL')
-    def systemwideOnly(self): return self._dict.get('Systemwide-only')
-
-    def fullname(self):
-        """Return the full name "name-version-flavor" of a package.
-
-        If the package is a pseudo-package, something that cannot be
-        installed through pimp, return the name in (parentheses)."""
-
-        rv = self._dict['Name']
-        if 'Version' in self._dict:
-            rv = rv + '-%s' % self._dict['Version']
-        if 'Flavor' in self._dict:
-            rv = rv + '-%s' % self._dict['Flavor']
-        if self._dict.get('Flavor') == 'hidden':
-            # Pseudo-package, show in parentheses
-            rv = '(%s)' % rv
-        return rv
-
-    def dump(self):
-        """Return a dict object containing the information on the package."""
-        return self._dict
-
-    def __cmp__(self, other):
-        """Compare two packages, where the "better" package sorts lower."""
-
-        if not isinstance(other, PimpPackage):
-            return cmp(id(self), id(other))
-        if self.name() != other.name():
-            return cmp(self.name(), other.name())
-        if self.version() != other.version():
-            return -cmp(self.version(), other.version())
-        return self._db.preferences.compareFlavors(self.flavor(), other.flavor())
-
-    def installed(self):
-        """Test wheter the package is installed.
-
-        Returns two values: a status indicator which is one of
-        "yes", "no", "old" (an older version is installed) or "bad"
-        (something went wrong during the install test) and a human
-        readable string which may contain more details."""
-
-        namespace = {
-            "NotInstalled": _scriptExc_NotInstalled,
-            "OldInstalled": _scriptExc_OldInstalled,
-            "BadInstalled": _scriptExc_BadInstalled,
-            "os": os,
-            "sys": sys,
-            }
-        installTest = self._dict['Install-test'].strip() + '\n'
-        try:
-            exec(installTest, namespace)
-        except ImportError as arg:
-            return "no", str(arg)
-        except _scriptExc_NotInstalled as arg:
-            return "no", str(arg)
-        except _scriptExc_OldInstalled as arg:
-            return "old", str(arg)
-        except _scriptExc_BadInstalled as arg:
-            return "bad", str(arg)
-        except:
-            sys.stderr.write("-------------------------------------\n")
-            sys.stderr.write("---- %s: install test got exception\n" % self.fullname())
-            sys.stderr.write("---- source:\n")
-            sys.stderr.write(installTest)
-            sys.stderr.write("---- exception:\n")
-            import traceback
-            traceback.print_exc(file=sys.stderr)
-            if self._db._maintainer:
-                sys.stderr.write("---- Please copy this and mail to %s\n" % self._db._maintainer)
-            sys.stderr.write("-------------------------------------\n")
-            return "bad", "Package install test got exception"
-        return "yes", ""
-
-    def prerequisites(self):
-        """Return a list of prerequisites for this package.
-
-        The list contains 2-tuples, of which the first item is either
-        a PimpPackage object or None, and the second is a descriptive
-        string. The first item can be None if this package depends on
-        something that isn't pimp-installable, in which case the descriptive
-        string should tell the user what to do."""
-
-        rv = []
-        if not self._dict.get('Download-URL'):
-            # For pseudo-packages that are already installed we don't
-            # return an error message
-            status, _  = self.installed()
-            if status == "yes":
-                return []
-            return [(None,
-                "Package %s cannot be installed automatically, see the description" %
-                    self.fullname())]
-        if self.systemwideOnly() and self._db.preferences.isUserInstall():
-            return [(None,
-                "Package %s can only be installed system-wide" %
-                    self.fullname())]
-        if not self._dict.get('Prerequisites'):
-            return []
-        for item in self._dict['Prerequisites']:
-            if type(item) == str:
-                pkg = None
-                descr = str(item)
-            else:
-                name = item['Name']
-                if 'Version' in item:
-                    name = name + '-' + item['Version']
-                if 'Flavor' in item:
-                    name = name + '-' + item['Flavor']
-                pkg = self._db.find(name)
-                if not pkg:
-                    descr = "Requires unknown %s"%name
-                else:
-                    descr = pkg.shortdescription()
-            rv.append((pkg, descr))
-        return rv
-
-
-    def downloadPackageOnly(self, output=None):
-        """Download a single package, if needed.
-
-        An MD5 signature is used to determine whether download is needed,
-        and to test that we actually downloaded what we expected.
-        If output is given it is a file-like object that will receive a log
-        of what happens.
-
-        If anything unforeseen happened the method returns an error message
-        string.
-        """
-
-        scheme, loc, path, query, frag = urlparse.urlsplit(self._dict['Download-URL'])
-        path = urllib.url2pathname(path)
-        filename = os.path.split(path)[1]
-        self.archiveFilename = os.path.join(self._db.preferences.downloadDir, filename)
-        if not self._archiveOK():
-            if scheme == 'manual':
-                return "Please download package manually and save as %s" % self.archiveFilename
-            downloader = PimpUrllibDownloader(None, self._db.preferences.downloadDir,
-                watcher=self._db.preferences.watcher)
-            if not downloader.download(self._dict['Download-URL'],
-                    self.archiveFilename, output):
-                return "download command failed"
-        if not os.path.exists(self.archiveFilename) and not NO_EXECUTE:
-            return "archive not found after download"
-        if not self._archiveOK():
-            return "archive does not have correct MD5 checksum"
-
-    def _archiveOK(self):
-        """Test an archive. It should exist and the MD5 checksum should be correct."""
-
-        if not os.path.exists(self.archiveFilename):
-            return 0
-        if not self._dict.get('MD5Sum'):
-            sys.stderr.write("Warning: no MD5Sum for %s\n" % self.fullname())
-            return 1
-        data = open(self.archiveFilename, 'rb').read()
-        checksum = hashlib.md5(data).hexdigest()
-        return checksum == self._dict['MD5Sum']
-
-    def unpackPackageOnly(self, output=None):
-        """Unpack a downloaded package archive."""
-
-        filename = os.path.split(self.archiveFilename)[1]
-        for ext, unpackerClass, arg in ARCHIVE_FORMATS:
-            if filename[-len(ext):] == ext:
-                break
-        else:
-            return "unknown extension for archive file: %s" % filename
-        self.basename = filename[:-len(ext)]
-        unpacker = unpackerClass(arg, dir=self._db.preferences.buildDir,
-                watcher=self._db.preferences.watcher)
-        rv = unpacker.unpack(self.archiveFilename, output=output)
-        if rv:
-            return rv
-
-    def installPackageOnly(self, output=None):
-        """Default install method, to be overridden by subclasses"""
-        return "%s: This package needs to be installed manually (no support for flavor=\"%s\")" \
-            % (self.fullname(), self._dict.get(flavor, ""))
-
-    def installSinglePackage(self, output=None):
-        """Download, unpack and install a single package.
-
-        If output is given it should be a file-like object and it
-        will receive a log of what happened."""
-
-        if not self._dict.get('Download-URL'):
-            return "%s: This package needs to be installed manually (no Download-URL field)" % self.fullname()
-        msg = self.downloadPackageOnly(output)
-        if msg:
-            return "%s: download: %s" % (self.fullname(), msg)
-
-        msg = self.unpackPackageOnly(output)
-        if msg:
-            return "%s: unpack: %s" % (self.fullname(), msg)
-
-        return self.installPackageOnly(output)
-
-    def beforeInstall(self):
-        """Bookkeeping before installation: remember what we have in site-packages"""
-        self._old_contents = os.listdir(self._db.preferences.installDir)
-
-    def afterInstall(self):
-        """Bookkeeping after installation: interpret any new .pth files that have
-        appeared"""
-
-        new_contents = os.listdir(self._db.preferences.installDir)
-        for fn in new_contents:
-            if fn in self._old_contents:
-                continue
-            if fn[-4:] != '.pth':
-                continue
-            fullname = os.path.join(self._db.preferences.installDir, fn)
-            f = open(fullname)
-            for line in f.readlines():
-                if not line:
-                    continue
-                if line[0] == '#':
-                    continue
-                if line[:6] == 'import':
-                    exec(line)
-                    continue
-                if line[-1] == '\n':
-                    line = line[:-1]
-                if not os.path.isabs(line):
-                    line = os.path.join(self._db.preferences.installDir, line)
-                line = os.path.realpath(line)
-                if not line in sys.path:
-                    sys.path.append(line)
-
-    def filterExpectedSkips(self, names):
-        """Return a list that contains only unpexpected skips"""
-        if not self._db.preferences.isUserInstall():
-            return names
-        expected_skips = self._dict.get('User-install-skips')
-        if not expected_skips:
-            return names
-        newnames = []
-        for name in names:
-            for skip in expected_skips:
-                if name[:len(skip)] == skip:
-                    break
-            else:
-                newnames.append(name)
-        return newnames
-
-class PimpPackage_binary(PimpPackage):
-
-    def unpackPackageOnly(self, output=None):
-        """We don't unpack binary packages until installing"""
-        pass
-
-    def installPackageOnly(self, output=None):
-        """Install a single source package.
-
-        If output is given it should be a file-like object and it
-        will receive a log of what happened."""
-
-        if 'Install-command' in self._dict:
-            return "%s: Binary package cannot have Install-command" % self.fullname()
-
-        if 'Pre-install-command' in self._dict:
-            if _cmd(output, '/tmp', self._dict['Pre-install-command']):
-                return "pre-install %s: running \"%s\" failed" % \
-                    (self.fullname(), self._dict['Pre-install-command'])
-
-        self.beforeInstall()
-
-        # Install by unpacking
-        filename = os.path.split(self.archiveFilename)[1]
-        for ext, unpackerClass, arg in ARCHIVE_FORMATS:
-            if filename[-len(ext):] == ext:
-                break
-        else:
-            return "%s: unknown extension for archive file: %s" % (self.fullname(), filename)
-        self.basename = filename[:-len(ext)]
-
-        install_renames = []
-        for k, newloc in self._db.preferences.installLocations:
-            if not newloc:
-                continue
-            if k == "--install-lib":
-                oldloc = DEFAULT_INSTALLDIR
-            else:
-                return "%s: Don't know installLocation %s" % (self.fullname(), k)
-            install_renames.append((oldloc, newloc))
-
-        unpacker = unpackerClass(arg, dir="/", renames=install_renames)
-        rv = unpacker.unpack(self.archiveFilename, output=output, package=self)
-        if rv:
-            return rv
-
-        self.afterInstall()
-
-        if 'Post-install-command' in self._dict:
-            if _cmd(output, '/tmp', self._dict['Post-install-command']):
-                return "%s: post-install: running \"%s\" failed" % \
-                    (self.fullname(), self._dict['Post-install-command'])
-
-        return None
-
-
-class PimpPackage_source(PimpPackage):
-
-    def unpackPackageOnly(self, output=None):
-        """Unpack a source package and check that setup.py exists"""
-        PimpPackage.unpackPackageOnly(self, output)
-        # Test that a setup script has been create
-        self._buildDirname = os.path.join(self._db.preferences.buildDir, self.basename)
-        setupname = os.path.join(self._buildDirname, "setup.py")
-        if not os.path.exists(setupname) and not NO_EXECUTE:
-            return "no setup.py found after unpack of archive"
-
-    def installPackageOnly(self, output=None):
-        """Install a single source package.
-
-        If output is given it should be a file-like object and it
-        will receive a log of what happened."""
-
-        if 'Pre-install-command' in self._dict:
-            if _cmd(output, self._buildDirname, self._dict['Pre-install-command']):
-                return "pre-install %s: running \"%s\" failed" % \
-                    (self.fullname(), self._dict['Pre-install-command'])
-
-        self.beforeInstall()
-        installcmd = self._dict.get('Install-command')
-        if installcmd and self._install_renames:
-            return "Package has install-command and can only be installed to standard location"
-        # This is the "bit-bucket" for installations: everything we don't
-        # want. After installation we check that it is actually empty
-        unwanted_install_dir = None
-        if not installcmd:
-            extra_args = ""
-            for k, v in self._db.preferences.installLocations:
-                if not v:
-                    # We don't want these files installed. Send them
-                    # to the bit-bucket.
-                    if not unwanted_install_dir:
-                        unwanted_install_dir = tempfile.mkdtemp()
-                    v = unwanted_install_dir
-                extra_args = extra_args + " %s \"%s\"" % (k, v)
-            installcmd = '"%s" setup.py install %s' % (sys.executable, extra_args)
-        if _cmd(output, self._buildDirname, installcmd):
-            return "install %s: running \"%s\" failed" % \
-                (self.fullname(), installcmd)
-        if unwanted_install_dir and os.path.exists(unwanted_install_dir):
-            unwanted_files = os.listdir(unwanted_install_dir)
-            if unwanted_files:
-                rv = "Warning: some files were not installed: %s" % " ".join(unwanted_files)
-            else:
-                rv = None
-            shutil.rmtree(unwanted_install_dir)
-            return rv
-
-        self.afterInstall()
-
-        if 'Post-install-command' in self._dict:
-            if _cmd(output, self._buildDirname, self._dict['Post-install-command']):
-                return "post-install %s: running \"%s\" failed" % \
-                    (self.fullname(), self._dict['Post-install-command'])
-        return None
-
-class PimpPackage_installer(PimpPackage):
-
-    def unpackPackageOnly(self, output=None):
-        """We don't unpack dmg packages until installing"""
-        pass
-
-    def installPackageOnly(self, output=None):
-        """Install a single source package.
-
-        If output is given it should be a file-like object and it
-        will receive a log of what happened."""
-
-        if 'Post-install-command' in self._dict:
-            return "%s: Installer package cannot have Post-install-command" % self.fullname()
-
-        if 'Pre-install-command' in self._dict:
-            if _cmd(output, '/tmp', self._dict['Pre-install-command']):
-                return "pre-install %s: running \"%s\" failed" % \
-                    (self.fullname(), self._dict['Pre-install-command'])
-
-        self.beforeInstall()
-
-        installcmd = self._dict.get('Install-command')
-        if installcmd:
-            if '%' in installcmd:
-                installcmd = installcmd % self.archiveFilename
-        else:
-            installcmd = 'open \"%s\"' % self.archiveFilename
-        if _cmd(output, "/tmp", installcmd):
-            return '%s: install command failed (use verbose for details)' % self.fullname()
-        return '%s: downloaded and opened. Install manually and restart Package Manager' % self.archiveFilename
-
-class PimpInstaller:
-    """Installer engine: computes dependencies and installs
-    packages in the right order."""
-
-    def __init__(self, db):
-        self._todo = []
-        self._db = db
-        self._curtodo = []
-        self._curmessages = []
-
-    def __contains__(self, package):
-        return package in self._todo
-
-    def _addPackages(self, packages):
-        for package in packages:
-            if not package in self._todo:
-                self._todo.append(package)
-
-    def _prepareInstall(self, package, force=0, recursive=1):
-        """Internal routine, recursive engine for prepareInstall.
-
-        Test whether the package is installed and (if not installed
-        or if force==1) prepend it to the temporary todo list and
-        call ourselves recursively on all prerequisites."""
-
-        if not force:
-            status, message = package.installed()
-            if status == "yes":
-                return
-        if package in self._todo or package in self._curtodo:
-            return
-        self._curtodo.insert(0, package)
-        if not recursive:
-            return
-        prereqs = package.prerequisites()
-        for pkg, descr in prereqs:
-            if pkg:
-                self._prepareInstall(pkg, False, recursive)
-            else:
-                self._curmessages.append("Problem with dependency: %s" % descr)
-
-    def prepareInstall(self, package, force=0, recursive=1):
-        """Prepare installation of a package.
-
-        If the package is already installed and force is false nothing
-        is done. If recursive is true prerequisites are installed first.
-
-        Returns a list of packages (to be passed to install) and a list
-        of messages of any problems encountered.
-        """
-
-        self._curtodo = []
-        self._curmessages = []
-        self._prepareInstall(package, force, recursive)
-        rv = self._curtodo, self._curmessages
-        self._curtodo = []
-        self._curmessages = []
-        return rv
-
-    def install(self, packages, output):
-        """Install a list of packages."""
-
-        self._addPackages(packages)
-        status = []
-        for pkg in self._todo:
-            msg = pkg.installSinglePackage(output)
-            if msg:
-                status.append(msg)
-        return status
-
-
-
-def _run(mode, verbose, force, args, prefargs, watcher):
-    """Engine for the main program"""
-
-    prefs = PimpPreferences(**prefargs)
-    if watcher:
-        prefs.setWatcher(watcher)
-    rv = prefs.check()
-    if rv:
-        sys.stdout.write(rv)
-    db = PimpDatabase(prefs)
-    db.appendURL(prefs.pimpDatabase)
-
-    if mode == 'dump':
-        db.dump(sys.stdout)
-    elif mode =='list':
-        if not args:
-            args = db.listnames()
-        print("%-20.20s\t%s" % ("Package", "Description"))
-        print()
-        for pkgname in args:
-            pkg = db.find(pkgname)
-            if pkg:
-                description = pkg.shortdescription()
-                pkgname = pkg.fullname()
-            else:
-                description = 'Error: no such package'
-            print("%-20.20s\t%s" % (pkgname, description))
-            if verbose:
-                print("\tHome page:\t", pkg.homepage())
-                try:
-                    print("\tDownload URL:\t", pkg.downloadURL())
-                except KeyError:
-                    pass
-                description = pkg.description()
-                description = '\n\t\t\t\t\t'.join(description.splitlines())
-                print("\tDescription:\t%s" % description)
-    elif mode =='status':
-        if not args:
-            args = db.listnames()
-            print("%-20.20s\t%s\t%s" % ("Package", "Installed", "Message"))
-            print()
-        for pkgname in args:
-            pkg = db.find(pkgname)
-            if pkg:
-                status, msg = pkg.installed()
-                pkgname = pkg.fullname()
-            else:
-                status = 'error'
-                msg = 'No such package'
-            print("%-20.20s\t%-9.9s\t%s" % (pkgname, status, msg))
-            if verbose and status == "no":
-                prereq = pkg.prerequisites()
-                for pkg, msg in prereq:
-                    if not pkg:
-                        pkg = ''
-                    else:
-                        pkg = pkg.fullname()
-                    print("%-20.20s\tRequirement: %s %s" % ("", pkg, msg))
-    elif mode == 'install':
-        if not args:
-            print('Please specify packages to install')
-            sys.exit(1)
-        inst = PimpInstaller(db)
-        for pkgname in args:
-            pkg = db.find(pkgname)
-            if not pkg:
-                print('%s: No such package' % pkgname)
-                continue
-            list, messages = inst.prepareInstall(pkg, force)
-            if messages and not force:
-                print("%s: Not installed:" % pkgname)
-                for m in messages:
-                    print("\t", m)
-            else:
-                if verbose:
-                    output = sys.stdout
-                else:
-                    output = None
-                messages = inst.install(list, output)
-                if messages:
-                    print("%s: Not installed:" % pkgname)
-                    for m in messages:
-                        print("\t", m)
-
-def main():
-    """Minimal commandline tool to drive pimp."""
-
-    import getopt
-    def _help():
-        print("Usage: pimp [options] -s [package ...]  List installed status")
-        print("       pimp [options] -l [package ...]  Show package information")
-        print("       pimp [options] -i package ...    Install packages")
-        print("       pimp -d                          Dump database to stdout")
-        print("       pimp -V                          Print version number")
-        print("Options:")
-        print("       -v     Verbose")
-        print("       -f     Force installation")
-        print("       -D dir Set destination directory")
-        print("              (default: %s)" % DEFAULT_INSTALLDIR)
-        print("       -u url URL for database")
-        sys.exit(1)
-
-    class _Watcher:
-        def update(self, msg):
-            sys.stderr.write(msg + '\r')
-            return 1
-
-    try:
-        opts, args = getopt.getopt(sys.argv[1:], "slifvdD:Vu:")
-    except getopt.GetoptError:
-        _help()
-    if not opts and not args:
-        _help()
-    mode = None
-    force = 0
-    verbose = 0
-    prefargs = {}
-    watcher = None
-    for o, a in opts:
-        if o == '-s':
-            if mode:
-                _help()
-            mode = 'status'
-        if o == '-l':
-            if mode:
-                _help()
-            mode = 'list'
-        if o == '-d':
-            if mode:
-                _help()
-            mode = 'dump'
-        if o == '-V':
-            if mode:
-                _help()
-            mode = 'version'
-        if o == '-i':
-            mode = 'install'
-        if o == '-f':
-            force = 1
-        if o == '-v':
-            verbose = 1
-            watcher = _Watcher()
-        if o == '-D':
-            prefargs['installDir'] = a
-        if o == '-u':
-            prefargs['pimpDatabase'] = a
-    if not mode:
-        _help()
-    if mode == 'version':
-        print('Pimp version %s; module name is %s' % (PIMP_VERSION, __name__))
-    else:
-        _run(mode, verbose, force, args, prefargs, watcher)
-
-# Finally, try to update ourselves to a newer version.
-# If the end-user updates pimp through pimp the new version
-# will be called pimp_update and live in site-packages
-# or somewhere similar
-if __name__ != 'pimp_update':
-    try:
-        import pimp_update
-    except ImportError:
-        pass
-    else:
-        if pimp_update.PIMP_VERSION <= PIMP_VERSION:
-            import warnings
-            warnings.warn("pimp_update is version %s, not newer than pimp version %s" %
-                (pimp_update.PIMP_VERSION, PIMP_VERSION))
-        else:
-            from pimp_update import *
-
-if __name__ == '__main__':
-    main()
diff --git a/Lib/plat-mac/terminalcommand.py b/Lib/plat-mac/terminalcommand.py
deleted file mode 100644 (file)
index 0e6e26d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-"""terminalcommand.py -- A minimal interface to Terminal.app.
-
-To run a shell command in a new Terminal.app window:
-
-    import terminalcommand
-    terminalcommand.run("ls -l")
-
-No result is returned; it is purely meant as a quick way to run a script
-with a decent input/output window.
-"""
-
-#
-# This module is a fairly straightforward translation of Jack Jansen's
-# Mac/OSX/PythonLauncher/doscript.m.
-#
-
-import time
-import os
-from Carbon import AE
-from Carbon.AppleEvents import *
-
-
-TERMINAL_SIG = "trmx"
-START_TERMINAL = "/usr/bin/open /Applications/Utilities/Terminal.app"
-SEND_MODE = kAENoReply  # kAEWaitReply hangs when run from Terminal.app itself
-
-
-def run(command):
-    """Run a shell command in a new Terminal.app window."""
-    termAddress = AE.AECreateDesc(typeApplicationBundleID, "com.apple.Terminal")
-    theEvent = AE.AECreateAppleEvent(kAECoreSuite, kAEDoScript, termAddress,
-                                     kAutoGenerateReturnID, kAnyTransactionID)
-    commandDesc = AE.AECreateDesc(typeChar, command)
-    theEvent.AEPutParamDesc(kAECommandClass, commandDesc)
-
-    try:
-        theEvent.AESend(SEND_MODE, kAENormalPriority, kAEDefaultTimeout)
-    except AE.Error as why:
-        if why.args[0] != -600:  # Terminal.app not yet running
-            raise
-        os.system(START_TERMINAL)
-        time.sleep(1)
-        theEvent.AESend(SEND_MODE, kAENormalPriority, kAEDefaultTimeout)
-
-
-if __name__ == "__main__":
-    run("ls -l")
diff --git a/Lib/plat-mac/videoreader.py b/Lib/plat-mac/videoreader.py
deleted file mode 100644 (file)
index 50f9299..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-# Video file reader, using QuickTime
-#
-# This module was quickly ripped out of another software package, so there is a good
-# chance that it does not work as-is and it needs some hacking.
-#
-# Jack Jansen, August 2000
-#
-import sys
-from Carbon import Qt
-from Carbon import QuickTime
-from Carbon import Qd
-from Carbon import Qdoffs
-from Carbon import QDOffscreen
-from Carbon import Res
-try:
-    import MediaDescr
-except ImportError:
-    def _audiodescr(data):
-        return None
-else:
-    def _audiodescr(data):
-        return MediaDescr.SoundDescription.decode(data)
-try:
-    from imgformat import macrgb
-except ImportError:
-    macrgb = "Macintosh RGB format"
-import os
-# import audio.format
-
-class VideoFormat:
-    def __init__(self, name, descr, width, height, format):
-        self.__name = name
-        self.__descr = descr
-        self.__width = width
-        self.__height = height
-        self.__format = format
-
-    def getname(self):
-        return self.__name
-
-    def getdescr(self):
-        return self.__descr
-
-    def getsize(self):
-        return self.__width, self.__height
-
-    def getformat(self):
-        return self.__format
-
-class _Reader:
-    def __init__(self, path):
-        fd = Qt.OpenMovieFile(path, 0)
-        self.movie, d1, d2 = Qt.NewMovieFromFile(fd, 0, 0)
-        self.movietimescale = self.movie.GetMovieTimeScale()
-        try:
-            self.audiotrack = self.movie.GetMovieIndTrackType(1,
-                QuickTime.AudioMediaCharacteristic, QuickTime.movieTrackCharacteristic)
-            self.audiomedia = self.audiotrack.GetTrackMedia()
-        except Qt.Error:
-            self.audiotrack = self.audiomedia = None
-            self.audiodescr = {}
-        else:
-            handle = Res.Handle('')
-            n = self.audiomedia.GetMediaSampleDescriptionCount()
-            self.audiomedia.GetMediaSampleDescription(1, handle)
-            self.audiodescr = _audiodescr(handle.data)
-            self.audiotimescale = self.audiomedia.GetMediaTimeScale()
-            del handle
-
-        try:
-            self.videotrack = self.movie.GetMovieIndTrackType(1,
-                QuickTime.VisualMediaCharacteristic, QuickTime.movieTrackCharacteristic)
-            self.videomedia = self.videotrack.GetTrackMedia()
-        except Qt.Error:
-            self.videotrack = self.videomedia = self.videotimescale = None
-        if self.videotrack:
-            self.videotimescale = self.videomedia.GetMediaTimeScale()
-            x0, y0, x1, y1 = self.movie.GetMovieBox()
-            self.videodescr = {'width':(x1-x0), 'height':(y1-y0)}
-            self._initgworld()
-        self.videocurtime = None
-        self.audiocurtime = None
-
-
-    def __del__(self):
-        self.audiomedia = None
-        self.audiotrack = None
-        self.videomedia = None
-        self.videotrack = None
-        self.movie = None
-
-    def _initgworld(self):
-        old_port, old_dev = Qdoffs.GetGWorld()
-        try:
-            movie_w = self.videodescr['width']
-            movie_h = self.videodescr['height']
-            movie_rect = (0, 0, movie_w, movie_h)
-            self.gworld = Qdoffs.NewGWorld(32,  movie_rect, None, None, QDOffscreen.keepLocal)
-            self.pixmap = self.gworld.GetGWorldPixMap()
-            Qdoffs.LockPixels(self.pixmap)
-            Qdoffs.SetGWorld(self.gworld.as_GrafPtr(), None)
-            Qd.EraseRect(movie_rect)
-            self.movie.SetMovieGWorld(self.gworld.as_GrafPtr(), None)
-            self.movie.SetMovieBox(movie_rect)
-            self.movie.SetMovieActive(1)
-            self.movie.MoviesTask(0)
-            self.movie.SetMoviePlayHints(QuickTime.hintsHighQuality, QuickTime.hintsHighQuality)
-            # XXXX framerate
-        finally:
-            Qdoffs.SetGWorld(old_port, old_dev)
-
-    def _gettrackduration_ms(self, track):
-        tracktime = track.GetTrackDuration()
-        return self._movietime_to_ms(tracktime)
-
-    def _movietime_to_ms(self, time):
-        value, d1, d2 = Qt.ConvertTimeScale((time, self.movietimescale, None), 1000)
-        return value
-
-    def _videotime_to_ms(self, time):
-        value, d1, d2 = Qt.ConvertTimeScale((time, self.videotimescale, None), 1000)
-        return value
-
-    def _audiotime_to_ms(self, time):
-        value, d1, d2 = Qt.ConvertTimeScale((time, self.audiotimescale, None), 1000)
-        return value
-
-    def _videotime_to_movietime(self, time):
-        value, d1, d2 = Qt.ConvertTimeScale((time, self.videotimescale, None),
-                self.movietimescale)
-        return value
-
-    def HasAudio(self):
-        return not self.audiotrack is None
-
-    def HasVideo(self):
-        return not self.videotrack is None
-
-    def GetAudioDuration(self):
-        if not self.audiotrack:
-            return 0
-        return self._gettrackduration_ms(self.audiotrack)
-
-    def GetVideoDuration(self):
-        if not self.videotrack:
-            return 0
-        return self._gettrackduration_ms(self.videotrack)
-
-    def GetAudioFormat(self):
-        if not self.audiodescr:
-            return None, None, None, None, None
-        bps = self.audiodescr['sampleSize']
-        nch = self.audiodescr['numChannels']
-        if nch == 1:
-            channels = ['mono']
-        elif nch == 2:
-            channels = ['left', 'right']
-        else:
-            channels = map(lambda x: str(x+1), range(nch))
-        if bps % 8:
-            # Funny bits-per sample. We pretend not to understand
-            blocksize = 0
-            fpb = 0
-        else:
-            # QuickTime is easy (for as far as we support it): samples are always a whole
-            # number of bytes, so frames are nchannels*samplesize, and there's one frame per block.
-            blocksize = (bps/8)*nch
-            fpb = 1
-        if self.audiodescr['dataFormat'] == 'raw ':
-            encoding = 'linear-excess'
-        elif self.audiodescr['dataFormat'] == 'twos':
-            encoding = 'linear-signed'
-        else:
-            encoding = 'quicktime-coding-%s'%self.audiodescr['dataFormat']
-##      return audio.format.AudioFormatLinear('quicktime_audio', 'QuickTime Audio Format',
-##          channels, encoding, blocksize=blocksize, fpb=fpb, bps=bps)
-        return channels, encoding, blocksize, fpb, bps
-
-    def GetAudioFrameRate(self):
-        if not self.audiodescr:
-            return None
-        return int(self.audiodescr['sampleRate'])
-
-    def GetVideoFormat(self):
-        width = self.videodescr['width']
-        height = self.videodescr['height']
-        return VideoFormat('dummy_format', 'Dummy Video Format', width, height, macrgb)
-
-    def GetVideoFrameRate(self):
-        tv = self.videocurtime
-        if tv is None:
-            tv = 0
-        flags = QuickTime.nextTimeStep|QuickTime.nextTimeEdgeOK
-        tv, dur = self.videomedia.GetMediaNextInterestingTime(flags, tv, 1.0)
-        dur = self._videotime_to_ms(dur)
-        return int((1000.0/dur)+0.5)
-
-    def ReadAudio(self, nframes, time=None):
-        if not time is None:
-            self.audiocurtime = time
-        flags = QuickTime.nextTimeStep|QuickTime.nextTimeEdgeOK
-        if self.audiocurtime is None:
-            self.audiocurtime = 0
-        tv = self.audiomedia.GetMediaNextInterestingTimeOnly(flags, self.audiocurtime, 1.0)
-        if tv < 0 or (self.audiocurtime and tv < self.audiocurtime):
-            return self._audiotime_to_ms(self.audiocurtime), None
-        h = Res.Handle('')
-        desc_h = Res.Handle('')
-        size, actualtime, sampleduration, desc_index, actualcount, flags = \
-            self.audiomedia.GetMediaSample(h, 0, tv, desc_h, nframes)
-        self.audiocurtime = actualtime + actualcount*sampleduration
-        return self._audiotime_to_ms(actualtime), h.data
-
-    def ReadVideo(self, time=None):
-        if not time is None:
-            self.videocurtime = time
-        flags = QuickTime.nextTimeStep
-        if self.videocurtime is None:
-            flags = flags | QuickTime.nextTimeEdgeOK
-            self.videocurtime = 0
-        tv = self.videomedia.GetMediaNextInterestingTimeOnly(flags, self.videocurtime, 1.0)
-        if tv < 0 or (self.videocurtime and tv <= self.videocurtime):
-            return self._videotime_to_ms(self.videocurtime), None
-        self.videocurtime = tv
-        moviecurtime = self._videotime_to_movietime(self.videocurtime)
-        self.movie.SetMovieTimeValue(moviecurtime)
-        self.movie.MoviesTask(0)
-        return self._videotime_to_ms(self.videocurtime), self._getpixmapcontent()
-
-    def _getpixmapcontent(self):
-        """Shuffle the offscreen PixMap data, because it may have funny stride values"""
-        rowbytes = Qdoffs.GetPixRowBytes(self.pixmap)
-        width = self.videodescr['width']
-        height = self.videodescr['height']
-        start = 0
-        rv = ''
-        for i in range(height):
-            nextline = Qdoffs.GetPixMapBytes(self.pixmap, start, width*4)
-            start = start + rowbytes
-            rv = rv + nextline
-        return rv
-
-def reader(url):
-    try:
-        rdr = _Reader(url)
-    except IOError:
-        return None
-    return rdr
-
-def _test():
-    import EasyDialogs
-    try:
-        import img
-    except ImportError:
-        img = None
-    import MacOS
-    Qt.EnterMovies()
-    path = EasyDialogs.AskFileForOpen(message='Video to convert')
-    if not path: sys.exit(0)
-    rdr = reader(path)
-    if not rdr:
-        sys.exit(1)
-    dstdir = EasyDialogs.AskFileForSave(message='Name for output folder')
-    if not dstdir: sys.exit(0)
-    num = 0
-    os.mkdir(dstdir)
-    videofmt = rdr.GetVideoFormat()
-    imgfmt = videofmt.getformat()
-    imgw, imgh = videofmt.getsize()
-    timestamp, data = rdr.ReadVideo()
-    while data:
-        fname = 'frame%04.4d.jpg'%num
-        num = num+1
-        pname = os.path.join(dstdir, fname)
-        if not img: print('Not', end=' ')
-        print('Writing %s, size %dx%d, %d bytes'%(fname, imgw, imgh, len(data)))
-        if img:
-            wrt = img.writer(imgfmt, pname)
-            wrt.width = imgw
-            wrt.height = imgh
-            wrt.write(data)
-            timestamp, data = rdr.ReadVideo()
-            MacOS.SetCreatorAndType(pname, 'ogle', 'JPEG')
-            if num > 20:
-                print('stopping at 20 frames so your disk does not fill up:-)')
-                break
-    print('Total frames:', num)
-
-if __name__ == '__main__':
-    _test()
-    sys.exit(1)
index db5eea1346f2b922eaecb1fb9da5e545b507b07b..b7753246a5bc90fecc9785e0dfaf5b3275874bdb 100644 (file)
@@ -53,7 +53,6 @@ Parse Plist example:
 
 __all__ = [
     "readPlist", "writePlist", "readPlistFromBytes", "writePlistToBytes",
-    "readPlistFromResource", "writePlistToResource",
     "Plist", "Data", "Dict"
 ]
 # Note: the Plist and Dict classes have been deprecated.
@@ -110,40 +109,6 @@ def writePlistToBytes(rootObject):
     return f.getvalue()
 
 
-def readPlistFromResource(path, restype='plst', resid=0):
-    """Read plst resource from the resource fork of path.
-    """
-    from Carbon.File import FSRef, FSGetResourceForkName
-    from Carbon.Files import fsRdPerm
-    from Carbon import Res
-    fsRef = FSRef(path)
-    resNum = Res.FSOpenResourceFile(fsRef, FSGetResourceForkName(), fsRdPerm)
-    Res.UseResFile(resNum)
-    plistData = Res.Get1Resource(restype, resid).data
-    Res.CloseResFile(resNum)
-    return readPlistFromString(plistData)
-
-
-def writePlistToResource(rootObject, path, restype='plst', resid=0):
-    """Write 'rootObject' as a plst resource to the resource fork of path.
-    """
-    from Carbon.File import FSRef, FSGetResourceForkName
-    from Carbon.Files import fsRdWrPerm
-    from Carbon import Res
-    plistData = writePlistToString(rootObject)
-    fsRef = FSRef(path)
-    resNum = Res.FSOpenResourceFile(fsRef, FSGetResourceForkName(), fsRdWrPerm)
-    Res.UseResFile(resNum)
-    try:
-        Res.Get1Resource(restype, resid).RemoveResource()
-    except Res.Error:
-        pass
-    res = Res.Resource(plistData)
-    res.AddResource(restype, resid, '')
-    res.WriteResource()
-    Res.CloseResFile(resNum)
-
-
 class DumbXMLWriter:
     def __init__(self, file, indentLevel=0, indent="\t"):
         self.file = file
diff --git a/Lib/test/test_aepack.py b/Lib/test/test_aepack.py
deleted file mode 100755 (executable)
index 79e59a1..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright (C) 2003 Python Software Foundation
-
-import unittest
-import aepack
-import aetypes
-import os
-from test import test_support
-
-class TestAepack(unittest.TestCase):
-    OBJECTS = [
-        aetypes.Enum(b'enum'),
-        aetypes.Type(b'type'),
-        aetypes.Keyword(b'kwrd'),
-        aetypes.Range(1, 10),
-        aetypes.Comparison(1, b'<   ', 10),
-        aetypes.Logical(b'not ', 1),
-        aetypes.IntlText(0, 0, b'international text'),
-        aetypes.IntlWritingCode(0,0),
-        aetypes.QDPoint(50,100),
-        aetypes.QDRectangle(50,100,150,200),
-        aetypes.RGBColor(0x7000, 0x6000, 0x5000),
-        aetypes.Unknown(b'xxxx', b'unknown type data'),
-        aetypes.Character(1),
-        aetypes.Character(2, aetypes.Line(2)),
-    ]
-
-    def test_roundtrip_string(self):
-        o = 'a string'
-        packed = aepack.pack(o)
-        unpacked = aepack.unpack(packed)
-        self.assertEqual(o, unpacked)
-
-    def test_roundtrip_int(self):
-        o = 12
-        packed = aepack.pack(o)
-        unpacked = aepack.unpack(packed)
-        self.assertEqual(o, unpacked)
-
-    def test_roundtrip_float(self):
-        o = 12.1
-        packed = aepack.pack(o)
-        unpacked = aepack.unpack(packed)
-        self.assertEqual(o, unpacked)
-
-    def test_roundtrip_None(self):
-        o = None
-        packed = aepack.pack(o)
-        unpacked = aepack.unpack(packed)
-        self.assertEqual(o, unpacked)
-
-    def test_roundtrip_aeobjects(self):
-        for o in self.OBJECTS:
-            packed = aepack.pack(o)
-            unpacked = aepack.unpack(packed)
-            self.assertEqual(repr(o), repr(unpacked))
-
-    def test_roundtrip_FSSpec(self):
-        try:
-            import Carbon.File
-        except:
-            return
-        o = Carbon.File.FSSpec(os.curdir)
-        packed = aepack.pack(o)
-        unpacked = aepack.unpack(packed)
-        self.assertEqual(o.as_pathname(), unpacked.as_pathname())
-
-    def test_roundtrip_Alias(self):
-        try:
-            import Carbon.File
-        except:
-            return
-        o = Carbon.File.FSSpec(os.curdir).NewAliasMinimal()
-        packed = aepack.pack(o)
-        unpacked = aepack.unpack(packed)
-        self.assertEqual(o.FSResolveAlias(None)[0].as_pathname(),
-            unpacked.FSResolveAlias(None)[0].as_pathname())
-
-
-def test_main():
-    test_support.run_unittest(TestAepack)
-
-
-if __name__ == '__main__':
-    test_main()
diff --git a/Lib/test/test_applesingle.py b/Lib/test/test_applesingle.py
deleted file mode 100644 (file)
index 9dfcb19..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright (C) 2003 Python Software Foundation
-
-import unittest
-import macostools
-import Carbon.File
-import MacOS
-import os
-from test import test_support
-import struct
-import applesingle
-
-AS_MAGIC=0x00051600
-AS_VERSION=0x00020000
-dataforkdata = b'hello\r\0world\n'
-resourceforkdata = b'goodbye\ncruel\0world\r'
-
-applesingledata = struct.pack(">ll16sh", AS_MAGIC, AS_VERSION, "foo", 2) + \
-    struct.pack(">llllll", 1, 50, len(dataforkdata),
-        2, 50+len(dataforkdata), len(resourceforkdata)) + \
-    dataforkdata + \
-    resourceforkdata
-TESTFN2 = test_support.TESTFN + '2'
-
-class TestApplesingle(unittest.TestCase):
-
-    def setUp(self):
-        fp = open(test_support.TESTFN, 'wb')
-        fp.write(applesingledata)
-        fp.close()
-
-    def tearDown(self):
-        try:
-            os.unlink(test_support.TESTFN)
-        except:
-            pass
-        try:
-            os.unlink(TESTFN2)
-        except:
-            pass
-
-    def compareData(self, isrf, data):
-        if isrf:
-            fp = MacOS.openrf(TESTFN2, '*rb')
-        else:
-            fp = open(TESTFN2, 'rb')
-        filedata = fp.read(1000)
-        self.assertEqual(data, filedata)
-
-    def test_applesingle(self):
-        try:
-            os.unlink(TESTFN2)
-        except:
-            pass
-        applesingle.decode(test_support.TESTFN, TESTFN2)
-        self.compareData(False, dataforkdata)
-        self.compareData(True, resourceforkdata)
-
-    def test_applesingle_resonly(self):
-        try:
-            os.unlink(TESTFN2)
-        except:
-            pass
-        applesingle.decode(test_support.TESTFN, TESTFN2, resonly=True)
-        self.compareData(False, resourceforkdata)
-
-def test_main():
-    test_support.run_unittest(TestApplesingle)
-
-
-if __name__ == '__main__':
-    test_main()
diff --git a/Lib/test/test_macostools.py b/Lib/test/test_macostools.py
deleted file mode 100644 (file)
index eea3601..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright (C) 2003 Python Software Foundation
-
-import unittest
-import macostools
-import Carbon.File
-import MacOS
-import os
-import sys
-from test import test_support
-
-TESTFN2 = test_support.TESTFN + '2'
-
-class TestMacostools(unittest.TestCase):
-
-    def setUp(self):
-        fp = open(test_support.TESTFN, 'w')
-        fp.write('hello world\n')
-        fp.close()
-        rfp = MacOS.openrf(test_support.TESTFN, '*wb')
-        rfp.write('goodbye world\n')
-        rfp.close()
-
-    def tearDown(self):
-        try:
-            os.unlink(test_support.TESTFN)
-        except:
-            pass
-        try:
-            os.unlink(TESTFN2)
-        except:
-            pass
-
-    def compareData(self):
-        fp = open(test_support.TESTFN, 'r')
-        data1 = fp.read()
-        fp.close()
-        fp = open(TESTFN2, 'r')
-        data2 = fp.read()
-        fp.close()
-        if data1 != data2:
-            return 'Data forks differ'
-        rfp = MacOS.openrf(test_support.TESTFN, '*rb')
-        data1 = rfp.read(1000)
-        rfp.close()
-        rfp = MacOS.openrf(TESTFN2, '*rb')
-        data2 = rfp.read(1000)
-        rfp.close()
-        if data1 != data2:
-            return 'Resource forks differ'
-        return ''
-
-    def test_touched(self):
-        # This really only tests that nothing unforeseen happens.
-        import warnings
-        with test_support.catch_warning():
-            warnings.filterwarnings('ignore', 'macostools.touched*',
-                                    DeprecationWarning)
-            macostools.touched(test_support.TESTFN)
-
-    def test_copy(self):
-        try:
-            os.unlink(TESTFN2)
-        except:
-            pass
-        macostools.copy(test_support.TESTFN, TESTFN2)
-        self.assertEqual(self.compareData(), '')
-
-    def test_mkalias(self):
-        try:
-            os.unlink(TESTFN2)
-        except:
-            pass
-        macostools.mkalias(test_support.TESTFN, TESTFN2)
-        fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0)
-        self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN))
-
-    def test_mkalias_relative(self):
-        try:
-            os.unlink(TESTFN2)
-        except:
-            pass
-        # If the directory doesn't exist, then chances are this is a new
-        # install of Python so don't create it since the user might end up
-        # running ``sudo make install`` and creating the directory here won't
-        # leave it with the proper permissions.
-        if not os.path.exists(sys.prefix):
-            return
-        macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix)
-        fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0)
-        self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN))
-
-
-def test_main():
-    test_support.run_unittest(TestMacostools)
-
-
-if __name__ == '__main__':
-    test_main()
diff --git a/Lib/test/test_scriptpackages.py b/Lib/test/test_scriptpackages.py
deleted file mode 100644 (file)
index ee14be2..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (C) 2003 Python Software Foundation
-
-import unittest
-from test import test_support
-import aetools
-
-class TestScriptpackages(unittest.TestCase):
-
-    def _test_scriptpackage(self, package, testobject=1):
-        # Check that we can import the package
-        mod = __import__(package)
-        # Test that we can get the main event class
-        klass = getattr(mod, package)
-        # Test that we can instantiate that class
-        talker = klass()
-        if testobject:
-            # Test that we can get an application object
-            obj = mod.application(0)
-
-    def test__builtinSuites(self):
-        self._test_scriptpackage('_builtinSuites', testobject=0)
-
-    def test_StdSuites(self):
-        self._test_scriptpackage('StdSuites')
-
-    def test_SystemEvents(self):
-        self._test_scriptpackage('SystemEvents')
-
-    def test_Finder(self):
-        self._test_scriptpackage('Finder')
-
-    def test_Terminal(self):
-        self._test_scriptpackage('Terminal')
-
-    def test_Netscape(self):
-        self._test_scriptpackage('Netscape')
-
-    def test_Explorer(self):
-        self._test_scriptpackage('Explorer')
-
-    def test_CodeWarrior(self):
-        self._test_scriptpackage('CodeWarrior')
-
-def test_main():
-    test_support.run_unittest(TestScriptpackages)
-
-
-if __name__ == '__main__':
-    test_main()
diff --git a/Mac/Modules/ColorPickermodule.c b/Mac/Modules/ColorPickermodule.c
deleted file mode 100644 (file)
index 62b4d5f..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/******************************************************************
-Copyright 1998 by Just van Rossum, Den Haag, The Netherlands.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Just van Rossum not be 
-used in advertising or publicity pertaining to distribution of the 
-software without specific, written prior permission.
-
-JUST VAN ROSSUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 
-EVENT SHALL JUST VAN ROSSUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR 
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-******************************************************************/
-
-#include <Carbon/Carbon.h>
-#include "Python.h"
-#include "pymactoolbox.h"
-
-/* ----------------------------------------------------- */
-
-static char cp_GetColor__doc__[] =
-"GetColor(prompt, (r, g, b)) -> (r, g, b), ok"
-;
-
-static PyObject *
-cp_GetColor(PyObject *self, PyObject *args)
-{
-       RGBColor inColor, outColor;
-       Boolean ok;
-       Point where = {0, 0};
-       Str255 prompt;
-       
-       if (!PyArg_ParseTuple(args, "O&O&", PyMac_GetStr255, prompt, QdRGB_Convert, &inColor))
-               return NULL;
-       
-       ok = GetColor(where, prompt, &inColor, &outColor);
-       
-       return Py_BuildValue("O&h", QdRGB_New, &outColor, ok);
-}
-
-/* List of methods defined in the module */
-
-static struct PyMethodDef cp_methods[] = {
-       {"GetColor",    (PyCFunction)cp_GetColor,       METH_VARARGS,   cp_GetColor__doc__},
-       {NULL,                  (PyCFunction)NULL,                      0,                              NULL}           /* sentinel */
-};
-
-
-/* Initialization function for the module (*must* be called initColorPicker) */
-
-static char cp_module_documentation[] = 
-""
-;
-
-void initColorPicker(void)
-{
-       PyObject *m;
-
-       /* Create the module and add the functions */
-       m = Py_InitModule4("ColorPicker", cp_methods,
-               cp_module_documentation,
-               (PyObject*)NULL,PYTHON_API_VERSION);
-
-       /* Add symbolic constants to the module here */
-       
-       /* XXXX Add constants here */
-       
-       /* Check for errors */
-       if (PyErr_Occurred())
-               Py_FatalError("can't initialize module ColorPicker");
-}
-
diff --git a/Mac/Modules/MacOS.c b/Mac/Modules/MacOS.c
deleted file mode 100644 (file)
index 4b86cf0..0000000
+++ /dev/null
@@ -1,643 +0,0 @@
-/***********************************************************
-Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam,
-The Netherlands.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Stichting Mathematisch
-Centrum or CWI not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior permission.
-
-STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
-THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
-FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
-OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-******************************************************************/
-
-/* Macintosh OS-specific interface */
-
-#include "Python.h"
-#include "pymactoolbox.h"
-
-#include <Carbon/Carbon.h>
-#include <ApplicationServices/ApplicationServices.h>
-
-static PyObject *MacOS_Error; /* Exception MacOS.Error */
-
-#define PATHNAMELEN 1024
-
-/* ----------------------------------------------------- */
-
-/* Declarations for objects of type Resource fork */
-
-typedef struct {
-       PyObject_HEAD
-       short fRefNum;
-       int isclosed;
-} rfobject;
-
-static PyTypeObject Rftype;
-
-
-
-/* ---------------------------------------------------------------- */
-
-static void
-do_close(rfobject *self)
-{
-       if (self->isclosed ) return;
-       (void)FSClose(self->fRefNum);
-       self->isclosed = 1;
-}
-
-static char rf_read__doc__[] = 
-"Read data from resource fork"
-;
-
-static PyObject *
-rf_read(rfobject *self, PyObject *args)
-{
-       long n;
-       PyObject *v;
-       OSErr err;
-       
-       if (self->isclosed) {
-               PyErr_SetString(PyExc_ValueError, "Operation on closed file");
-               return NULL;
-       }
-       
-       if (!PyArg_ParseTuple(args, "l", &n))
-               return NULL;
-               
-       v = PyString_FromStringAndSize((char *)NULL, n);
-       if (v == NULL)
-               return NULL;
-               
-       err = FSRead(self->fRefNum, &n, PyString_AsString(v));
-       if (err && err != eofErr) {
-               PyMac_Error(err);
-               Py_DECREF(v);
-               return NULL;
-       }
-       _PyString_Resize(&v, n);
-       return v;
-}
-
-
-static char rf_write__doc__[] = 
-"Write to resource fork"
-;
-
-static PyObject *
-rf_write(rfobject *self, PyObject *args)
-{
-       char *buffer;
-       long size;
-       OSErr err;
-       
-       if (self->isclosed) {
-               PyErr_SetString(PyExc_ValueError, "Operation on closed file");
-               return NULL;
-       }
-       if (!PyArg_ParseTuple(args, "s#", &buffer, &size))
-               return NULL;
-       err = FSWrite(self->fRefNum, &size, buffer);
-       if (err) {
-               PyMac_Error(err);
-               return NULL;
-       }
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char rf_seek__doc__[] = 
-"Set file position"
-;
-
-static PyObject *
-rf_seek(rfobject *self, PyObject *args)
-{
-       long amount, pos;
-       int whence = SEEK_SET;
-       long eof;
-       OSErr err;
-       
-       if (self->isclosed) {
-               PyErr_SetString(PyExc_ValueError, "Operation on closed file");
-               return NULL;
-       }
-       if (!PyArg_ParseTuple(args, "l|i", &amount, &whence))
-               return NULL;
-       
-       if ((err = GetEOF(self->fRefNum, &eof)))
-               goto ioerr;
-       
-       switch (whence) {
-       case SEEK_CUR:
-               if ((err = GetFPos(self->fRefNum, &pos)))
-                       goto ioerr; 
-               break;
-       case SEEK_END:
-               pos = eof;
-               break;
-       case SEEK_SET:
-               pos = 0;
-               break;
-       default:
-               PyErr_BadArgument();
-               return NULL;
-       }
-       
-       pos += amount;
-       
-       /* Don't bother implementing seek past EOF */
-       if (pos > eof || pos < 0) {
-               PyErr_BadArgument();
-               return NULL;
-       }
-       
-       if ((err = SetFPos(self->fRefNum, fsFromStart, pos)) ) {
-ioerr:
-               PyMac_Error(err);
-               return NULL;
-       }
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char rf_tell__doc__[] = 
-"Get file position"
-;
-
-static PyObject *
-rf_tell(rfobject *self, PyObject *args)
-{
-       long where;
-       OSErr err;
-       
-       if (self->isclosed) {
-               PyErr_SetString(PyExc_ValueError, "Operation on closed file");
-               return NULL;
-       }
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       if ((err = GetFPos(self->fRefNum, &where)) ) {
-               PyMac_Error(err);
-               return NULL;
-       }
-       return PyLong_FromLong(where);
-}
-
-static char rf_close__doc__[] = 
-"Close resource fork"
-;
-
-static PyObject *
-rf_close(rfobject *self, PyObject *args)
-{
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       do_close(self);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static struct PyMethodDef rf_methods[] = {
- {"read",      (PyCFunction)rf_read,   METH_VARARGS,   rf_read__doc__},
- {"write",     (PyCFunction)rf_write,  METH_VARARGS,   rf_write__doc__},
- {"seek",      (PyCFunction)rf_seek,   METH_VARARGS,   rf_seek__doc__},
- {"tell",      (PyCFunction)rf_tell,   METH_VARARGS,   rf_tell__doc__},
- {"close",     (PyCFunction)rf_close,  METH_VARARGS,   rf_close__doc__},
-       {NULL,          NULL}           /* sentinel */
-};
-
-/* ---------- */
-
-
-static rfobject *
-newrfobject(void)
-{
-       rfobject *self;
-       
-       self = PyObject_NEW(rfobject, &Rftype);
-       if (self == NULL)
-               return NULL;
-       self->isclosed = 1;
-       return self;
-}
-
-
-static void
-rf_dealloc(rfobject *self)
-{
-       do_close(self);
-       PyObject_DEL(self);
-}
-
-static PyObject *
-rf_getattr(rfobject *self, char *name)
-{
-       return Py_FindMethod(rf_methods, (PyObject *)self, name);
-}
-
-static char Rftype__doc__[] = 
-"Resource fork file object"
-;
-
-static PyTypeObject Rftype = {
-       PyVarObject_HEAD_INIT(&PyType_Type, 0)
-       "MacOS.ResourceFork",           /*tp_name*/
-       sizeof(rfobject),               /*tp_basicsize*/
-       0,                              /*tp_itemsize*/
-       /* methods */
-       (destructor)rf_dealloc, /*tp_dealloc*/
-       (printfunc)0,           /*tp_print*/
-       (getattrfunc)rf_getattr,        /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc)0,             /*tp_compare*/
-       (reprfunc)0,            /*tp_repr*/
-       0,                      /*tp_as_number*/
-       0,              /*tp_as_sequence*/
-       0,              /*tp_as_mapping*/
-       (hashfunc)0,            /*tp_hash*/
-       (ternaryfunc)0,         /*tp_call*/
-       (reprfunc)0,            /*tp_str*/
-
-       /* Space for future expansion */
-       0L,0L,0L,0L,
-       Rftype__doc__ /* Documentation string */
-};
-
-/* End of code for Resource fork objects */
-/* -------------------------------------------------------- */
-
-/*----------------------------------------------------------------------*/
-/* Miscellaneous File System Operations */
-
-static char getcrtp_doc[] = "Get MacOS 4-char creator and type for a file";
-
-static PyObject *
-MacOS_GetCreatorAndType(PyObject *self, PyObject *args)
-{
-       FSSpec fss;
-       FInfo info;
-       PyObject *creator, *type, *res;
-       OSErr err;
-       
-       if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSSpec, &fss))
-               return NULL;
-       if ((err = FSpGetFInfo(&fss, &info)) != noErr)
-               return PyErr_Mac(MacOS_Error, err);
-       creator = PyString_FromStringAndSize((char *)&info.fdCreator, 4);
-       type = PyString_FromStringAndSize((char *)&info.fdType, 4);
-       res = Py_BuildValue("OO", creator, type);
-       Py_DECREF(creator);
-       Py_DECREF(type);
-       return res;
-}
-
-static char setcrtp_doc[] = "Set MacOS 4-char creator and type for a file";
-
-static PyObject *
-MacOS_SetCreatorAndType(PyObject *self, PyObject *args)
-{
-       FSSpec fss;
-       ResType creator, type;
-       FInfo info;
-       OSErr err;
-       
-       if (!PyArg_ParseTuple(args, "O&O&O&",
-                       PyMac_GetFSSpec, &fss, PyMac_GetOSType, &creator, PyMac_GetOSType, &type))
-               return NULL;
-       if ((err = FSpGetFInfo(&fss, &info)) != noErr)
-               return PyErr_Mac(MacOS_Error, err);
-       info.fdCreator = creator;
-       info.fdType = type;
-       if ((err = FSpSetFInfo(&fss, &info)) != noErr)
-               return PyErr_Mac(MacOS_Error, err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char geterr_doc[] = "Convert OSErr number to string";
-
-static PyObject *
-MacOS_GetErrorString(PyObject *self, PyObject *args)
-{
-       int err;
-       char buf[256];
-       Handle h;
-       char *str;
-       static int errors_loaded;
-       
-       if (!PyArg_ParseTuple(args, "i", &err))
-               return NULL;
-
-       h = GetResource('Estr', err);
-       if (!h && !errors_loaded) {
-               /*
-               ** Attempt to open the resource file containing the
-               ** Estr resources. We ignore all errors. We also try
-               ** this only once.
-               */
-               PyObject *m, *rv;
-               errors_loaded = 1;
-               
-               m = PyImport_ImportModuleNoBlock("macresource");
-               if (!m) {
-                       if (Py_VerboseFlag)
-                               PyErr_Print();
-                       PyErr_Clear();
-               }
-               else {
-                       rv = PyObject_CallMethod(m, "open_error_resource", "");
-                       if (!rv) {
-                               if (Py_VerboseFlag)
-                                       PyErr_Print();
-                               PyErr_Clear();
-                       }
-                       else {
-                               Py_DECREF(rv);
-                               /* And try again... */
-                               h = GetResource('Estr', err);
-                       }
-                       Py_DECREF(m);
-               }
-       }
-       /*
-       ** Whether the code above succeeded or not, we won't try
-       ** again.
-       */
-       errors_loaded = 1;
-               
-       if (h) {
-               HLock(h);
-               str = (char *)*h;
-               memcpy(buf, str+1, (unsigned char)str[0]);
-               buf[(unsigned char)str[0]] = '\0';
-               HUnlock(h);
-               ReleaseResource(h);
-       }
-       else {
-               PyOS_snprintf(buf, sizeof(buf), "Mac OS error code %d", err);
-       }
-
-       return Py_BuildValue("s", buf);
-}
-
-static char splash_doc[] = "Open a splash-screen dialog by resource-id (0=close)";
-
-static PyObject *
-MacOS_splash(PyObject *self, PyObject *args)
-{
-       int resid = -1;
-       static DialogPtr curdialog = NULL;
-       DialogPtr olddialog;
-       WindowRef theWindow;
-       CGrafPtr thePort;
-#if 0
-       short xpos, ypos, width, height, swidth, sheight;
-#endif
-       
-       if (!PyArg_ParseTuple(args, "|i", &resid))
-               return NULL;
-       olddialog = curdialog;
-       curdialog = NULL;
-               
-       if ( resid != -1 ) {
-               curdialog = GetNewDialog(resid, NULL, (WindowPtr)-1);
-               if ( curdialog ) {
-                       theWindow = GetDialogWindow(curdialog);
-                       thePort = GetWindowPort(theWindow);
-#if 0
-                       width = thePort->portRect.right - thePort->portRect.left;
-                       height = thePort->portRect.bottom - thePort->portRect.top;
-                       swidth = qd.screenBits.bounds.right - qd.screenBits.bounds.left;
-                       sheight = qd.screenBits.bounds.bottom - qd.screenBits.bounds.top - LMGetMBarHeight();
-                       xpos = (swidth-width)/2;
-                       ypos = (sheight-height)/5 + LMGetMBarHeight();
-                       MoveWindow(theWindow, xpos, ypos, 0);
-                       ShowWindow(theWindow);
-#endif
-                       DrawDialog(curdialog);
-               }
-       }
-       if (olddialog)
-               DisposeDialog(olddialog);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char DebugStr_doc[] = "Switch to low-level debugger with a message";
-
-static PyObject *
-MacOS_DebugStr(PyObject *self, PyObject *args)
-{
-       Str255 message;
-       PyObject *object = 0;
-       
-       if (!PyArg_ParseTuple(args, "O&|O", PyMac_GetStr255, message, &object))
-               return NULL;
-       DebugStr(message);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char SysBeep_doc[] = "BEEEEEP!!!";
-
-static PyObject *
-MacOS_SysBeep(PyObject *self, PyObject *args)
-{
-       int duration = 6;
-       
-       if (!PyArg_ParseTuple(args, "|i", &duration))
-               return NULL;
-       SysBeep(duration);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char WMAvailable_doc[] = 
-       "True if this process can interact with the display."
-       "Will foreground the application on the first call as a side-effect."
-       ;
-
-static PyObject *
-MacOS_WMAvailable(PyObject *self, PyObject *args)
-{
-       static PyObject *rv = NULL;
-       
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       if (!rv) {
-               ProcessSerialNumber psn;
-               
-               /*
-               ** This is a fairly innocuous call to make if we don't have a window
-               ** manager, or if we have no permission to talk to it. It will print
-               ** a message on stderr, but at least it won't abort the process.
-               ** It appears the function caches the result itself, and it's cheap, so
-               ** no need for us to cache.
-               */
-#ifdef kCGNullDirectDisplay
-               /* On 10.1 CGMainDisplayID() isn't available, and
-               ** kCGNullDirectDisplay isn't defined.
-               */
-               if (CGMainDisplayID() == 0) {
-                       rv = Py_False;
-               } else {
-#else
-               {
-#endif
-                       if (GetCurrentProcess(&psn) < 0 ||
-                               SetFrontProcess(&psn) < 0) {
-                               rv = Py_False;
-                       } else {
-                               rv = Py_True;
-                       }
-               }
-       }
-       Py_INCREF(rv);
-       return rv;
-}
-
-static char GetTicks_doc[] = "Return number of ticks since bootup";
-
-static PyObject *
-MacOS_GetTicks(PyObject *self, PyObject *args)
-{
-       return Py_BuildValue("i", (int)TickCount());
-}
-
-static char openrf_doc[] = "Open resource fork of a file";
-
-static PyObject *
-MacOS_openrf(PyObject *self, PyObject *args)
-{
-       OSErr err;
-       char *mode = "r";
-       FSSpec fss;
-       SignedByte permission = 1;
-       rfobject *fp;
-               
-       if (!PyArg_ParseTuple(args, "O&|s", PyMac_GetFSSpec, &fss, &mode))
-               return NULL;
-       while (*mode) {
-               switch (*mode++) {
-               case '*': break;
-               case 'r': permission = 1; break;
-               case 'w': permission = 2; break;
-               case 'b': break;
-               default:
-                       PyErr_BadArgument();
-                       return NULL;
-               }
-       }
-       
-       if ( (fp = newrfobject()) == NULL )
-               return NULL;
-               
-       err = HOpenRF(fss.vRefNum, fss.parID, fss.name, permission, &fp->fRefNum);
-       
-       if ( err == fnfErr ) {
-               /* In stead of doing complicated things here to get creator/type
-               ** correct we let the standard i/o library handle it
-               */
-               FILE *tfp;
-               char pathname[PATHNAMELEN];
-               
-               if ( (err=PyMac_GetFullPathname(&fss, pathname, PATHNAMELEN)) ) {
-                       PyMac_Error(err);
-                       Py_DECREF(fp);
-                       return NULL;
-               }
-               
-               if ( (tfp = fopen(pathname, "w")) == NULL ) {
-                       PyMac_Error(fnfErr); /* What else... */
-                       Py_DECREF(fp);
-                       return NULL;
-               }
-               fclose(tfp);
-               err = HOpenRF(fss.vRefNum, fss.parID, fss.name, permission, &fp->fRefNum);
-       }
-       if ( err ) {
-               Py_DECREF(fp);
-               PyMac_Error(err);
-               return NULL;
-       }
-       fp->isclosed = 0;
-       return (PyObject *)fp;
-}
-
-
-static PyMethodDef MacOS_Methods[] = {
-       {"GetCreatorAndType",           MacOS_GetCreatorAndType, METH_VARARGS,  getcrtp_doc},
-       {"SetCreatorAndType",           MacOS_SetCreatorAndType, METH_VARARGS,  setcrtp_doc},
-       {"GetErrorString",              MacOS_GetErrorString,   METH_VARARGS,   geterr_doc},
-       {"openrf",                      MacOS_openrf,           METH_VARARGS,   openrf_doc},
-       {"splash",                      MacOS_splash,           METH_VARARGS,   splash_doc},
-       {"DebugStr",                    MacOS_DebugStr,         METH_VARARGS,   DebugStr_doc},
-       {"GetTicks",                    MacOS_GetTicks,         METH_VARARGS,   GetTicks_doc},
-       {"SysBeep",                     MacOS_SysBeep,          METH_VARARGS,   SysBeep_doc},
-       {"WMAvailable",                 MacOS_WMAvailable,              METH_VARARGS,   WMAvailable_doc},
-       {NULL,                          NULL}            /* Sentinel */
-};
-
-
-void
-initMacOS(void)
-{
-       PyObject *m, *d;
-       
-       m = Py_InitModule("MacOS", MacOS_Methods);
-       d = PyModule_GetDict(m);
-       
-       /* Initialize MacOS.Error exception */
-       MacOS_Error = PyMac_GetOSErrException();
-       if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0)
-               return;
-       Py_TYPE(&Rftype) = &PyType_Type;
-       Py_INCREF(&Rftype);
-       if (PyDict_SetItemString(d, "ResourceForkType", (PyObject *)&Rftype) != 0)
-               return;
-       /*
-       ** This is a hack: the following constant added to the id() of a string
-       ** object gives you the address of the data. Unfortunately, it is needed for
-       ** some of the image and sound processing interfaces on the mac:-(
-       */
-       {
-               PyStringObject *p = 0;
-               long off = (long)&(p->ob_sval[0]);
-               
-               if( PyDict_SetItemString(d, "string_id_to_buffer", Py_BuildValue("i", off)) != 0)
-                       return;
-       }
-#define PY_RUNTIMEMODEL "macho"
-       if (PyDict_SetItemString(d, "runtimemodel", 
-                               Py_BuildValue("s", PY_RUNTIMEMODEL)) != 0)
-               return;
-#if defined(WITH_NEXT_FRAMEWORK)
-#define PY_LINKMODEL "framework"
-#elif defined(Py_ENABLE_SHARED)
-#define PY_LINKMODEL "shared"
-#else
-#define PY_LINKMODEL "static"
-#endif
-       if (PyDict_SetItemString(d, "linkmodel", 
-                               Py_BuildValue("s", PY_LINKMODEL)) != 0)
-               return;
-
-}
diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c
deleted file mode 100644 (file)
index f3d8a48..0000000
+++ /dev/null
@@ -1,942 +0,0 @@
-/***********************************************************
-Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
-The Netherlands.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Stichting Mathematisch
-Centrum or CWI or Corporation for National Research Initiatives or
-CNRI not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-While CWI is the initial source for this software, a modified version
-is made available by the Corporation for National Research Initiatives
-(CNRI) at the Internet address ftp://ftp.python.org.
-
-STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
-CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-******************************************************************/
-
-#include "Python.h"
-#include "pymactoolbox.h"
-#include <Carbon/Carbon.h>
-
-static PyObject *ErrorObject;
-
-static NavEventUPP my_eventProcUPP;
-static NavPreviewUPP my_previewProcUPP;
-static NavObjectFilterUPP my_filterProcUPP;
-
-/* Callback functions */
-static pascal void
-my_eventProc(NavEventCallbackMessage callBackSelector,
-                        NavCBRecPtr callBackParms,
-                        NavCallBackUserData callbackUD)
-{
-       PyObject *dict = (PyObject *)callbackUD;
-       PyObject *pyfunc;
-       PyObject *rv;
-       
-       if (!dict) return;
-       if ( (pyfunc = PyDict_GetItemString(dict, "eventProc")) == NULL ) {
-               PyErr_Print();
-               return;
-       }
-       if ( pyfunc == Py_None ) {
-               return;
-       }
-       rv = PyObject_CallFunction(pyfunc, "ls#", (long)callBackSelector,
-                       (void *)callBackParms, sizeof(NavCBRec));
-       if ( rv )
-               Py_DECREF(rv);
-       else {
-               PySys_WriteStderr("Nav: exception in eventProc callback\n");
-               PyErr_Print();
-       }
-}
-
-static pascal Boolean
-my_previewProc(NavCBRecPtr callBackParms,
-                          NavCallBackUserData callbackUD)
-{
-       PyObject *dict = (PyObject *)callbackUD;
-       PyObject *pyfunc;
-       PyObject *rv;
-       Boolean c_rv = false;
-       
-       if (!dict) return false;
-       if ( (pyfunc = PyDict_GetItemString(dict, "previewProc")) == NULL ) {
-               PyErr_Print();
-               return false;
-       }
-       rv = PyObject_CallFunction(pyfunc, "s#", (void *)callBackParms, sizeof(NavCBRec));
-       if ( rv ) {
-               c_rv = PyObject_IsTrue(rv);
-               Py_DECREF(rv);
-       } else {
-               PySys_WriteStderr("Nav: exception in previewProc callback\n");
-               PyErr_Print();
-       }
-       return c_rv;
-}
-
-static pascal Boolean
-my_filterProc(AEDesc *theItem, void *info,
-                         NavCallBackUserData callbackUD,
-                         NavFilterModes filterMode)
-{
-       PyObject *dict = (PyObject *)callbackUD;
-       PyObject *pyfunc;
-       PyObject *rv;
-       Boolean c_rv = false;
-       
-       if (!dict) return false;
-       if ( (pyfunc = PyDict_GetItemString(dict, "filterProc")) == NULL ) {
-               PyErr_Print();
-               return false;
-       }
-       rv = PyObject_CallFunction(pyfunc, "O&s#h",
-               AEDesc_NewBorrowed, theItem, info, sizeof(NavFileOrFolderInfo), (short)filterMode);
-       if ( rv ) {
-               c_rv = PyObject_IsTrue(rv);
-               Py_DECREF(rv);
-       } else {
-               PySys_WriteStderr("Nav: exception in filterProc callback\n");
-               PyErr_Print();
-       }
-       return c_rv;
-}
-
-/* ----------------------------------------------------- */
-static int
-filldialogoptions(PyObject *d,
-               AEDesc **defaultLocationP,
-               NavDialogOptions *opt,
-               NavEventUPP *eventProcP,
-               NavPreviewUPP *previewProcP,
-               NavObjectFilterUPP *filterProcP,
-               NavTypeListHandle *typeListP,
-               OSType *fileTypeP,
-               OSType *fileCreatorP)
-{
-       Py_ssize_t pos = 0;
-       PyObject *key, *value;
-       char *keystr;
-       AEDesc *defaultLocation_storage;
-       
-       NavGetDefaultDialogOptions(opt);
-
-       while ( PyDict_Next(d, &pos, &key, &value) ) {
-               if ( !key || !value || !PyString_Check(key) ) {
-                       PyErr_SetString(ErrorObject, "DialogOption has non-string key");
-                       return 0;
-               }
-               keystr = PyString_AsString(key);
-               if( strcmp(keystr, "defaultLocation") == 0 ) {
-                       if ( (defaultLocation_storage = PyMem_NEW(AEDesc, 1)) == NULL ) {
-                               PyErr_NoMemory();
-                               return 0;
-                       }
-                       if ( !PyArg_Parse(value, "O&", AEDesc_Convert, defaultLocation_storage) ) {
-                               PyMem_DEL(defaultLocation_storage);
-                               return 0;
-                       }
-                       *defaultLocationP = defaultLocation_storage;
-               } else if( strcmp(keystr, "version") == 0 ) {
-                       if ( !PyArg_Parse(value, "H", &opt->version) )
-                               return 0;
-               } else if( strcmp(keystr, "dialogOptionFlags") == 0 ) {
-                       if ( !PyArg_Parse(value, "k", &opt->dialogOptionFlags) )
-                               return 0;
-               } else if( strcmp(keystr, "location") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetPoint, &opt->location) )
-                               return 0;
-               } else if( strcmp(keystr, "clientName") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->clientName) )
-                               return 0;
-               } else if( strcmp(keystr, "windowTitle") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->windowTitle) )
-                               return 0;
-               } else if( strcmp(keystr, "actionButtonLabel") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->actionButtonLabel) )
-                               return 0;
-               } else if( strcmp(keystr, "cancelButtonLabel") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->cancelButtonLabel) )
-                               return 0;
-               } else if( strcmp(keystr, "savedFileName") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->savedFileName) )
-                               return 0;
-               } else if( strcmp(keystr, "message") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->message) )
-                               return 0;
-               } else if( strcmp(keystr, "preferenceKey") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, &opt->preferenceKey) )
-                               return 0;
-               } else if( strcmp(keystr, "popupExtension") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", ResObj_Convert, &opt->popupExtension) )
-                               return 0;
-               } else if( eventProcP && strcmp(keystr, "eventProc") == 0 ) {
-                       *eventProcP = my_eventProcUPP;
-               } else if( previewProcP && strcmp(keystr, "previewProc") == 0 ) {
-                       *previewProcP = my_previewProcUPP;
-               } else if( filterProcP && strcmp(keystr, "filterProc") == 0 ) {
-                       *filterProcP = my_filterProcUPP;
-               } else if( typeListP && strcmp(keystr, "typeList") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", ResObj_Convert, typeListP) )
-                               return 0;
-               } else if( fileTypeP && strcmp(keystr, "fileType") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, fileTypeP) )
-                               return 0;
-               } else if( fileCreatorP && strcmp(keystr, "fileCreator") == 0 ) {
-                       if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, fileCreatorP) )
-                               return 0;
-               } else {
-                       PyErr_Format(ErrorObject, "Unknown DialogOption key: %s", keystr);
-                       return 0;
-               }
-       }
-       return 1;
-}
-
-/* ----------------------------------------------------- */
-
-/* Declarations for objects of type NavReplyRecord */
-
-typedef struct {
-       PyObject_HEAD
-       NavReplyRecord itself;
-} navrrobject;
-
-static PyTypeObject Navrrtype;
-
-
-
-/* ---------------------------------------------------------------- */
-
-static char nav_NavTranslateFile__doc__[] =
-"(NavTranslationOptions)->None"
-;
-
-static PyObject *
-nav_NavTranslateFile(navrrobject *self, PyObject *args)
-{
-       NavTranslationOptions howToTranslate;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "k", &howToTranslate))
-               return NULL;
-       err = NavTranslateFile(&self->itself, howToTranslate);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char nav_NavCompleteSave__doc__[] =
-"(NavTranslationOptions)->None"
-;
-
-static PyObject *
-nav_NavCompleteSave(navrrobject *self, PyObject *args)
-{
-       NavTranslationOptions howToTranslate;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "k", &howToTranslate))
-               return NULL;
-       err = NavCompleteSave(&self->itself, howToTranslate);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static struct PyMethodDef navrr_methods[] = {
- {"NavTranslateFile",  (PyCFunction)nav_NavTranslateFile,      METH_VARARGS,   nav_NavTranslateFile__doc__},
- {"NavCompleteSave",   (PyCFunction)nav_NavCompleteSave,       METH_VARARGS,   nav_NavCompleteSave__doc__},
-       
-       {NULL,          NULL}           /* sentinel */
-};
-
-/* ---------- */
-
-
-static navrrobject *
-newnavrrobject(NavReplyRecord *itself)
-{
-       navrrobject *self;
-       
-       self = PyObject_NEW(navrrobject, &Navrrtype);
-       if (self == NULL)
-               return NULL;
-       self->itself = *itself;
-       return self;
-}
-
-
-static void
-navrr_dealloc(navrrobject *self)
-{
-       NavDisposeReply(&self->itself);
-       PyObject_DEL(self);
-}
-
-static PyObject *
-navrr_getattr(navrrobject *self, char *name)
-{
-       FSSpec fss;
-       FSRef fsr;
-       
-       if( strcmp(name, "__members__") == 0 )
-               return Py_BuildValue("ssssssssss", "version", "validRecord", "replacing",
-                       "isStationery", "translationNeeded", "selection", "selection_fsr",
-                       "fileTranslation", "keyScript", "saveFileName");
-       if( strcmp(name, "version") == 0 )
-               return Py_BuildValue("h", self->itself.version);
-       if( strcmp(name, "validRecord") == 0 )
-               return Py_BuildValue("l", (long)self->itself.validRecord);
-       if( strcmp(name, "replacing") == 0 )
-               return Py_BuildValue("l", (long)self->itself.replacing);
-       if( strcmp(name, "isStationery") == 0 )
-               return Py_BuildValue("l", (long)self->itself.isStationery);
-       if( strcmp(name, "translationNeeded") == 0 )
-               return Py_BuildValue("l", (long)self->itself.translationNeeded);
-       if( strcmp(name, "selection") == 0 ) {
-               SInt32 i, count;
-               OSErr err;
-               PyObject *rv, *rvitem;
-               AEDesc desc;
-               
-               if ((err=AECountItems(&self->itself.selection, &count))) {
-                       PyErr_Mac(ErrorObject, err);
-                       return NULL;
-               }
-               if ( (rv=PyList_New(count)) == NULL )
-                       return NULL;
-               for(i=0; i<count; i++) {
-                       desc.dataHandle = NULL;
-                       if ((err=AEGetNthDesc(&self->itself.selection, i+1, typeFSS, NULL, &desc))) {
-                               Py_DECREF(rv);
-                               PyErr_Mac(ErrorObject, err);
-                               return NULL;
-                       }
-                       if ((err=AEGetDescData(&desc, &fss, sizeof(FSSpec)))) {
-                               Py_DECREF(rv);
-                               PyErr_Mac(ErrorObject, err);
-                               return NULL;
-                       }
-                       rvitem = PyMac_BuildFSSpec(&fss);
-                       PyList_SetItem(rv, i, rvitem);
-                       AEDisposeDesc(&desc);
-               }
-               return rv;
-       }
-       if( strcmp(name, "selection_fsr") == 0 ) {
-               SInt32 i, count;
-               OSErr err;
-               PyObject *rv, *rvitem;
-               AEDesc desc;
-               
-               if ((err=AECountItems(&self->itself.selection, &count))) {
-                       PyErr_Mac(ErrorObject, err);
-                       return NULL;
-               }
-               if ( (rv=PyList_New(count)) == NULL )
-                       return NULL;
-               for(i=0; i<count; i++) {
-                       desc.dataHandle = NULL;
-                       if ((err=AEGetNthDesc(&self->itself.selection, i+1, typeFSRef, NULL, &desc))) {
-                               Py_DECREF(rv);
-                               PyErr_Mac(ErrorObject, err);
-                               return NULL;
-                       }
-                       if ((err=AEGetDescData(&desc, &fsr, sizeof(FSRef)))) {
-                               Py_DECREF(rv);
-                               PyErr_Mac(ErrorObject, err);
-                               return NULL;
-                       }
-                       rvitem = PyMac_BuildFSRef(&fsr);
-                       PyList_SetItem(rv, i, rvitem);
-                       AEDisposeDesc(&desc);
-               }
-               return rv;
-       }
-       if( strcmp(name, "fileTranslation") == 0 )
-               return ResObj_New((Handle)self->itself.fileTranslation);
-       if( strcmp(name, "keyScript") == 0 )
-               return Py_BuildValue("h", (short)self->itself.keyScript);
-       if( strcmp(name, "saveFileName") == 0 )
-               return Py_BuildValue("O&", CFStringRefObj_New, self->itself.saveFileName);
-
-
-       return Py_FindMethod(navrr_methods, (PyObject *)self, name);
-}
-
-static int
-navrr_setattr(navrrobject *self, char *name, PyObject *v)
-{
-       /* Set attribute 'name' to value 'v'. v==NULL means delete */
-       
-       /* XXXX Add your own setattr code here */
-       return -1;
-}
-
-static char Navrrtype__doc__[] = 
-"Record containing result of a Nav file selection call. Use dir() for member names."
-;
-
-static PyTypeObject Navrrtype = {
-       PyVarObject_HEAD_INIT(&PyType_Type, 0)
-       "Nav.NavReplyRecord",                   /*tp_name*/
-       sizeof(navrrobject),            /*tp_basicsize*/
-       0,                              /*tp_itemsize*/
-       /* methods */
-       (destructor)navrr_dealloc,      /*tp_dealloc*/
-       (printfunc)0,           /*tp_print*/
-       (getattrfunc)navrr_getattr,     /*tp_getattr*/
-       (setattrfunc)navrr_setattr,     /*tp_setattr*/
-       (cmpfunc)0,             /*tp_compare*/
-       (reprfunc)0,            /*tp_repr*/
-       0,                      /*tp_as_number*/
-       0,              /*tp_as_sequence*/
-       0,              /*tp_as_mapping*/
-       (hashfunc)0,            /*tp_hash*/
-       (ternaryfunc)0,         /*tp_call*/
-       (reprfunc)0,            /*tp_str*/
-
-       /* Space for future expansion */
-       0L,0L,0L,0L,
-       Navrrtype__doc__ /* Documentation string */
-};
-
-/* End of code for NavReplyRecord objects */
-               
-/* ----------------------------------------------------- */
-
-static char nav_NavGetFile__doc__[] =
-"(DialogOptions dict or kwargs+defaultLocation,eventProc,previewProc,filterProc,typeList) -> NavReplyRecord"
-;
-
-static PyObject *
-nav_NavGetFile(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       AEDesc  *defaultLocation = NULL;
-       NavReplyRecord reply;
-       NavDialogOptions dialogOptions;
-       NavEventUPP eventProc = NULL;
-       NavPreviewUPP previewProc = NULL;
-       NavObjectFilterUPP filterProc = NULL;
-       NavTypeListHandle typeList = NULL;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, &previewProc, &filterProc, &typeList, NULL, NULL))
-               return NULL;
-       err = NavGetFile(defaultLocation, &reply, &dialogOptions,
-                       eventProc, previewProc, filterProc, typeList, (void *)dict);
-       PyMem_DEL(defaultLocation);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return (PyObject *)newnavrrobject(&reply);
-}
-
-static char nav_NavPutFile__doc__[] =
-"(DialogOptions dict or kwargs+defaultLocation,eventProc,fileCreator,fileType) -> NavReplyRecord"
-;
-
-static PyObject *
-nav_NavPutFile(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       AEDesc  *defaultLocation = NULL;
-       NavReplyRecord reply;
-       NavDialogOptions dialogOptions;
-       NavEventUPP eventProc = NULL;
-       OSType fileType;
-       OSType fileCreator;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, NULL, NULL, &fileType, &fileCreator))
-               return NULL;
-       err = NavPutFile(defaultLocation, &reply, &dialogOptions,
-                       eventProc, fileType, fileCreator, (void *)dict);
-       PyMem_DEL(defaultLocation);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return (PyObject *)newnavrrobject(&reply);
-}
-
-static char nav_NavAskSaveChanges__doc__[] =
-"(NavAskSaveChangesAction, DialogOptions dict or kwargs+eventProc) -> NavAskSaveChangesResult"
-
-;
-
-static PyObject *
-nav_NavAskSaveChanges(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       NavDialogOptions dialogOptions;
-       NavAskSaveChangesAction action;
-       NavAskSaveChangesResult reply;
-       NavEventUPP eventProc = NULL;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, "k", &action))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "lO!", &action, &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, NULL, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
-               return NULL;
-       err = NavAskSaveChanges(&dialogOptions, action, &reply, eventProc, (void *)dict);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return Py_BuildValue("l", (long)reply);
-}
-
-static char nav_NavCustomAskSaveChanges__doc__[] =
-"(DialogOptions dict or kwargs+eventProc) -> NavAskSaveChangesResult"
-;
-
-static PyObject *
-nav_NavCustomAskSaveChanges(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       NavDialogOptions dialogOptions;
-       NavAskSaveChangesResult reply;
-       NavEventUPP eventProc = NULL;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, NULL, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
-               return NULL;
-       err = NavCustomAskSaveChanges(&dialogOptions, &reply, eventProc, (void *)dict);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return Py_BuildValue("l", (long)reply);
-}
-
-static char nav_NavAskDiscardChanges__doc__[] =
-"(DialogOptions dict or kwargs+eventProc) -> NavAskSaveChangesResult"
-;
-
-static PyObject *
-nav_NavAskDiscardChanges(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       NavDialogOptions dialogOptions;
-       NavAskSaveChangesResult reply;
-       NavEventUPP eventProc = NULL;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, NULL, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
-               return NULL;
-       err = NavAskDiscardChanges(&dialogOptions, &reply, eventProc, (void *)dict);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return Py_BuildValue("l", (long)reply);
-}
-
-static char nav_NavChooseFile__doc__[] =
-"(DialogOptions dict or kwargs+defaultLocation,eventProc,previewProc,filterProc,typeList) -> NavReplyRecord"
-;
-
-static PyObject *
-nav_NavChooseFile(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       AEDesc  *defaultLocation = NULL;
-       NavReplyRecord reply;
-       NavDialogOptions dialogOptions;
-       NavEventUPP eventProc = NULL;
-       NavPreviewUPP previewProc = NULL;
-       NavObjectFilterUPP filterProc = NULL;
-       NavTypeListHandle typeList = NULL;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, &previewProc, &filterProc, &typeList, NULL, NULL))
-               return NULL;
-       err = NavChooseFile(defaultLocation, &reply, &dialogOptions,
-                       eventProc, previewProc, filterProc, typeList, (void *)dict);
-       PyMem_DEL(defaultLocation);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return (PyObject *)newnavrrobject(&reply);
-}
-
-static char nav_NavChooseFolder__doc__[] =
-"(DialogOptions dict or kwargs+defaultLocation,eventProc,filterProc) -> NavReplyRecord"
-;
-
-static PyObject *
-nav_NavChooseFolder(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       AEDesc  *defaultLocation = NULL;
-       NavReplyRecord reply;
-       NavDialogOptions dialogOptions;
-       NavEventUPP eventProc = NULL;
-       NavObjectFilterUPP filterProc = NULL;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, &filterProc, NULL, NULL, NULL))
-               return NULL;
-       err = NavChooseFolder(defaultLocation, &reply, &dialogOptions,
-                       eventProc, filterProc, (void *)dict);
-       PyMem_DEL(defaultLocation);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return (PyObject *)newnavrrobject(&reply);
-}
-
-static char nav_NavChooseVolume__doc__[] =
-"(DialogOptions dict or kwargs+defaultLocation,eventProc,filterProc) -> NavReplyRecord"
-;
-
-static PyObject *
-nav_NavChooseVolume(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       AEDesc  *defaultLocation = NULL;
-       NavReplyRecord reply;
-       NavDialogOptions dialogOptions;
-       NavEventUPP eventProc = NULL;
-       NavObjectFilterUPP filterProc = NULL;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, &filterProc, NULL, NULL, NULL))
-               return NULL;
-       err = NavChooseVolume(defaultLocation, &reply, &dialogOptions,
-                       eventProc, filterProc, (void *)dict);
-       PyMem_DEL(defaultLocation);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return (PyObject *)newnavrrobject(&reply);
-}
-
-static char nav_NavChooseObject__doc__[] =
-"(DialogOptions dict or kwargs+defaultLocation,eventProc,filterProc) -> NavReplyRecord"
-;
-
-static PyObject *
-nav_NavChooseObject(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       AEDesc  *defaultLocation = NULL;
-       NavReplyRecord reply;
-       NavDialogOptions dialogOptions;
-       NavEventUPP eventProc = NULL;
-       NavObjectFilterUPP filterProc = NULL;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, &filterProc, NULL, NULL, NULL))
-               return NULL;
-       err = NavChooseObject(defaultLocation, &reply, &dialogOptions,
-                       eventProc, filterProc, (void *)dict);
-       PyMem_DEL(defaultLocation);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return (PyObject *)newnavrrobject(&reply);
-}
-
-static char nav_NavNewFolder__doc__[] =
-"(DialogOptions dict or kwargs+defaultLocation,eventProc) -> NavReplyRecord"
-;
-
-static PyObject *
-nav_NavNewFolder(PyObject *self, PyObject *args, PyObject *kw)
-{
-       PyObject *dict;
-       AEDesc  *defaultLocation = NULL;
-       NavReplyRecord reply;
-       NavDialogOptions dialogOptions;
-       NavEventUPP eventProc = NULL;
-       OSErr err;
-
-       if ( kw && PyObject_IsTrue(kw) ) {
-               if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
-                       return NULL;
-               dict = kw;
-       } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
-               return NULL;
-       if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
-               return NULL;
-       err = NavNewFolder(defaultLocation, &reply, &dialogOptions, eventProc, (void *)dict);
-       PyMem_DEL(defaultLocation);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return (PyObject *)newnavrrobject(&reply);
-}
-
-#if 0
-/* XXXX I don't know what to do with the void * argument */
-static char nav_NavCustomControl__doc__[] =
-""
-;
-
-
-static PyObject *
-nav_NavCustomControl(PyObject *self, PyObject *args)
-{
-
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-#endif
-
-static char nav_NavServicesCanRun__doc__[] =
-"()->int"
-;
-
-static PyObject *
-nav_NavServicesCanRun(PyObject *self, PyObject *args)
-{
-       Boolean rv;
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       rv = NavServicesCanRun();
-       return Py_BuildValue("l", (long)rv);
-}
-
-static char nav_NavServicesAvailable__doc__[] =
-"()->int"
-;
-
-static PyObject *
-nav_NavServicesAvailable(PyObject *self, PyObject *args)
-{
-       Boolean rv;
-       
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       rv = NavServicesAvailable();
-       return Py_BuildValue("l", (long)rv);
-}
-/* XX */
-static char nav_NavLoad__doc__[] =
-"()->None"
-;
-
-static PyObject *
-nav_NavLoad(PyObject *self, PyObject *args)
-{
-
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       NavLoad();
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char nav_NavUnload__doc__[] =
-"()->None"
-;
-
-static PyObject *
-nav_NavUnload(PyObject *self, PyObject *args)
-{
-
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       NavUnload();
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char nav_NavLibraryVersion__doc__[] =
-"()->int"
-;
-
-static PyObject *
-nav_NavLibraryVersion(PyObject *self, PyObject *args)
-{
-       UInt32 rv;
-       
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       rv = NavLibraryVersion();
-       return Py_BuildValue("l", (long)rv);
-}
-
-static char nav_NavGetDefaultDialogOptions__doc__[] =
-"()->dict\nPass dict or keyword args with same names to other calls."
-;
-
-static PyObject *
-nav_NavGetDefaultDialogOptions(PyObject *self, PyObject *args)
-{
-       NavDialogOptions dialogOptions;
-       OSErr err;
-       
-       err = NavGetDefaultDialogOptions(&dialogOptions);
-       if ( err ) {
-               PyErr_Mac(ErrorObject, err);
-               return NULL;
-       }
-       return Py_BuildValue("{s:h,s:l,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&}",
-               "version", dialogOptions.version,
-               "dialogOptionFlags", dialogOptions.dialogOptionFlags,
-               "location", PyMac_BuildPoint, dialogOptions.location,
-               "clientName", PyMac_BuildStr255, &dialogOptions.clientName,
-               "windowTitle", PyMac_BuildStr255, &dialogOptions.windowTitle,
-               "actionButtonLabel", PyMac_BuildStr255, &dialogOptions.actionButtonLabel,
-               "cancelButtonLabel", PyMac_BuildStr255, &dialogOptions.cancelButtonLabel,
-               "savedFileName", PyMac_BuildStr255, &dialogOptions.savedFileName,
-               "message", PyMac_BuildStr255, &dialogOptions.message,
-               "preferenceKey", PyMac_BuildOSType, dialogOptions.preferenceKey,
-               "popupExtension", OptResObj_New, dialogOptions.popupExtension);
-}
-
-/* List of methods defined in the module */
-
-static struct PyMethodDef nav_methods[] = {
-       {"NavGetFile",  (PyCFunction)nav_NavGetFile,    METH_VARARGS|METH_KEYWORDS,     nav_NavGetFile__doc__},
- {"NavPutFile",        (PyCFunction)nav_NavPutFile,    METH_VARARGS|METH_KEYWORDS,     nav_NavPutFile__doc__},
- {"NavAskSaveChanges", (PyCFunction)nav_NavAskSaveChanges,     METH_VARARGS|METH_KEYWORDS,     nav_NavAskSaveChanges__doc__},
- {"NavCustomAskSaveChanges",   (PyCFunction)nav_NavCustomAskSaveChanges,       METH_VARARGS|METH_KEYWORDS,     nav_NavCustomAskSaveChanges__doc__},
- {"NavAskDiscardChanges",      (PyCFunction)nav_NavAskDiscardChanges,  METH_VARARGS|METH_KEYWORDS,     nav_NavAskDiscardChanges__doc__},
- {"NavChooseFile",     (PyCFunction)nav_NavChooseFile, METH_VARARGS|METH_KEYWORDS,     nav_NavChooseFile__doc__},
- {"NavChooseFolder",   (PyCFunction)nav_NavChooseFolder,       METH_VARARGS|METH_KEYWORDS,     nav_NavChooseFolder__doc__},
- {"NavChooseVolume",   (PyCFunction)nav_NavChooseVolume,       METH_VARARGS|METH_KEYWORDS,     nav_NavChooseVolume__doc__},
- {"NavChooseObject",   (PyCFunction)nav_NavChooseObject,       METH_VARARGS|METH_KEYWORDS,     nav_NavChooseObject__doc__},
- {"NavNewFolder",      (PyCFunction)nav_NavNewFolder,  METH_VARARGS|METH_KEYWORDS,     nav_NavNewFolder__doc__},
-#if 0
- {"NavCustomControl",  (PyCFunction)nav_NavCustomControl,      METH_VARARGS,   nav_NavCustomControl__doc__},
-#endif
- {"NavServicesCanRun", (PyCFunction)nav_NavServicesCanRun,     METH_VARARGS,   nav_NavServicesCanRun__doc__},
- {"NavServicesAvailable",      (PyCFunction)nav_NavServicesAvailable,  METH_VARARGS,   nav_NavServicesAvailable__doc__},
- {"NavLoad",   (PyCFunction)nav_NavLoad,       METH_VARARGS,   nav_NavLoad__doc__},
- {"NavUnload", (PyCFunction)nav_NavUnload,     METH_VARARGS,   nav_NavUnload__doc__},
- {"NavLibraryVersion", (PyCFunction)nav_NavLibraryVersion,     METH_VARARGS,   nav_NavLibraryVersion__doc__},
- {"NavGetDefaultDialogOptions",        (PyCFunction)nav_NavGetDefaultDialogOptions,    METH_VARARGS,   nav_NavGetDefaultDialogOptions__doc__},
-       {NULL,   (PyCFunction)NULL, 0, NULL}            /* sentinel */
-};
-
-
-/* Initialization function for the module (*must* be called initNav) */
-
-static char Nav_module_documentation[] = 
-"Interface to Navigation Services\n"
-"Most calls accept a NavDialogOptions dictionary or keywords with the same names, pass {}\n"
-"if you want the default options.\n"
-"Use NavGetDefaultDialogOptions() to find out common option names.\n"
-"See individual docstrings for additional keyword args/dictentries supported by each call.\n"
-"Pass None as eventProc to get movable-modal dialogs that process updates through the standard Python mechanism."
-;
-
-void
-initNav(void)
-{
-       PyObject *m, *d;
-
-       /* Test that we have NavServices */
-       if ( !NavServicesAvailable() ) {
-               PyErr_SetString(PyExc_ImportError, "Navigation Services not available");
-               return;
-       }
-       /* Create the module and add the functions */
-       m = Py_InitModule4("Nav", nav_methods,
-               Nav_module_documentation,
-               (PyObject*)NULL,PYTHON_API_VERSION);
-
-       /* Add some symbolic constants to the module */
-       d = PyModule_GetDict(m);
-       ErrorObject = PyString_FromString("Nav.error");
-       PyDict_SetItemString(d, "error", ErrorObject);
-
-       /* XXXX Add constants here */
-       
-       /* Set UPPs */
-       my_eventProcUPP = NewNavEventUPP(my_eventProc);
-       my_previewProcUPP = NewNavPreviewUPP(my_previewProc);
-       my_filterProcUPP = NewNavObjectFilterUPP(my_filterProc);
-       
-}
-
diff --git a/Mac/Modules/OSATerminology.c b/Mac/Modules/OSATerminology.c
deleted file mode 100644 (file)
index 85ad425..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-** This module is a one-trick pony: given an FSSpec it gets the aeut
-** resources. It was written by Donovan Preston and slightly modified
-** by Jack.
-**
-** It should be considered a placeholder, it will probably be replaced
-** by a full interface to OpenScripting.
-*/
-#include "Python.h"
-#include "pymactoolbox.h"
-
-#include <Carbon/Carbon.h>
-
-static PyObject *
-PyOSA_GetAppTerminology(PyObject* self, PyObject* args)
-{
-       AEDesc theDesc = {0,0};
-       FSSpec fss;
-       ComponentInstance defaultComponent = NULL;
-       SInt16 defaultTerminology = 0;
-       Boolean didLaunch = 0;
-       OSAError err;
-       long modeFlags = 0;
-       
-       if (!PyArg_ParseTuple(args, "O&|i", PyMac_GetFSSpec, &fss, &modeFlags))
-                return NULL;
-       
-       defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr');
-       err = GetComponentInstanceError (defaultComponent);
-       if (err) return PyMac_Error(err);
-       err = OSAGetAppTerminology (
-       defaultComponent, 
-       modeFlags,
-       &fss, 
-       defaultTerminology, 
-       &didLaunch, 
-       &theDesc
-       );
-       if (err) return PyMac_Error(err);
-       return Py_BuildValue("O&i", AEDesc_New, &theDesc, didLaunch);
-}
-
-static PyObject *
-PyOSA_GetSysTerminology(PyObject* self, PyObject* args)
-{
-       AEDesc theDesc = {0,0};
-       FSSpec fss;
-       ComponentInstance defaultComponent = NULL;
-       SInt16 defaultTerminology = 0;
-       Boolean didLaunch = 0;
-       OSAError err;
-       long modeFlags = 0;
-       
-       if (!PyArg_ParseTuple(args, "O&|i", PyMac_GetFSSpec, &fss, &modeFlags))
-                return NULL;
-       
-       defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr');
-       err = GetComponentInstanceError (defaultComponent);
-       if (err) return PyMac_Error(err);
-       err = OSAGetAppTerminology (
-       defaultComponent, 
-       modeFlags,
-       &fss, 
-       defaultTerminology, 
-       &didLaunch, 
-       &theDesc
-       );
-       if (err) return PyMac_Error(err);
-       return Py_BuildValue("O&i", AEDesc_New, &theDesc, didLaunch);
-}
-
-/* 
- * List of methods defined in the module
- */
-static struct PyMethodDef OSATerminology_methods[] =
-{
-       {"GetAppTerminology", 
-               (PyCFunction) PyOSA_GetAppTerminology,
-               METH_VARARGS,
-               "Get an applications terminology, as an AEDesc object."},
-       {"GetSysTerminology", 
-               (PyCFunction) PyOSA_GetSysTerminology,
-               METH_VARARGS,
-               "Get an applications system terminology, as an AEDesc object."},
-       {NULL, (PyCFunction) NULL, 0, NULL}
-};
-
-
-void
-initOSATerminology(void)
-{
-       Py_InitModule("OSATerminology", OSATerminology_methods);
-}
\ No newline at end of file
diff --git a/Mac/Modules/ae/README b/Mac/Modules/ae/README
deleted file mode 100644 (file)
index f91c44f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-A quick note on what all the files here are, currently (16-7-95),
-and whether they really are source or generated.
-
-aegen.py               Generated by aescan, temporary file
-AEModule.c             Generated by aescan, from AppleEvents.h
-AEObjects.py   Generated by aescan, from AEObjects.h
-aepack.py              Routines to convert python objects <-> AEDesc record
-                               (formerly part of aetools, now imported there)
-AERegistry.py  Generated by aescan, from AERegistry.h
-aescan.py              Program to scan headers and generate AE modules
-aesupport.py   Helper code for aescan
-aetools.py             Routines/classes to create and send appleevents
-aetypes.py             Classes for python objects corresponding to AEDesc types
-                               (formerly part of aetools, now imported there)
-AppleEvents.py Generated by aescan, from AppleEvents.h
-AppleScript_Suite.py   Generated by gensuitemodule
-echo.py                        Old test program (may still work) to echo events back to sender
-gensuitemodule.py      Program to scan aete/aeut resources and generate python
-                               interface modules
-Required_Suite.py      Generated by gensuitemodule
-Standard_Suite.py      Generated by gensuitemodule
-tae.py                 Old test program (may still work) to send an appleevent
-tell.py                        Old test program (may still work) to send an appleevent
-test_suite.py  Test program to test bits of the _Suite modules and aetools/etc
diff --git a/Mac/Modules/ae/_AEmodule.c b/Mac/Modules/ae/_AEmodule.c
deleted file mode 100644 (file)
index 9a4de36..0000000
+++ /dev/null
@@ -1,1453 +0,0 @@
-
-/* =========================== Module _AE =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_AEDesc_New(AEDesc *);
-extern int _AEDesc_Convert(PyObject *, AEDesc *);
-
-#define AEDesc_New _AEDesc_New
-#define AEDesc_NewBorrowed _AEDesc_NewBorrowed
-#define AEDesc_Convert _AEDesc_Convert
-#endif
-
-typedef long refcontype;
-
-static pascal OSErr GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon); /* Forward */
-
-AEEventHandlerUPP upp_GenericEventHandler;
-
-static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHandle *mouseRgn)
-{
-        if ( PyOS_InterruptOccurred() )
-                return 1;
-        return 0;
-}
-
-AEIdleUPP upp_AEIdleProc;
-
-static PyObject *AE_Error;
-
-/* ----------------------- Object type AEDesc ----------------------- */
-
-PyTypeObject AEDesc_Type;
-
-#define AEDesc_Check(x) (Py_TYPE(x) == &AEDesc_Type || PyObject_TypeCheck((x), &AEDesc_Type))
-
-typedef struct AEDescObject {
-       PyObject_HEAD
-       AEDesc ob_itself;
-       int ob_owned;
-} AEDescObject;
-
-PyObject *AEDesc_New(AEDesc *itself)
-{
-       AEDescObject *it;
-       it = PyObject_NEW(AEDescObject, &AEDesc_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = *itself;
-       it->ob_owned = 1;
-       return (PyObject *)it;
-}
-
-int AEDesc_Convert(PyObject *v, AEDesc *p_itself)
-{
-       if (!AEDesc_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "AEDesc required");
-               return 0;
-       }
-       *p_itself = ((AEDescObject *)v)->ob_itself;
-       return 1;
-}
-
-static void AEDesc_dealloc(AEDescObject *self)
-{
-       if (self->ob_owned) AEDisposeDesc(&self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *AEDesc_AECoerceDesc(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DescType toType;
-       AEDesc result;
-#ifndef AECoerceDesc
-       PyMac_PRECHECK(AECoerceDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &toType))
-               return NULL;
-       _err = AECoerceDesc(&_self->ob_itself,
-                           toType,
-                           &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &result);
-       return _res;
-}
-
-static PyObject *AEDesc_AEDuplicateDesc(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEDesc result;
-#ifndef AEDuplicateDesc
-       PyMac_PRECHECK(AEDuplicateDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AEDuplicateDesc(&_self->ob_itself,
-                              &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &result);
-       return _res;
-}
-
-static PyObject *AEDesc_AECountItems(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long theCount;
-#ifndef AECountItems
-       PyMac_PRECHECK(AECountItems);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AECountItems(&_self->ob_itself,
-                           &theCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            theCount);
-       return _res;
-}
-
-static PyObject *AEDesc_AEPutPtr(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long index;
-       DescType typeCode;
-       char *dataPtr__in__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-#ifndef AEPutPtr
-       PyMac_PRECHECK(AEPutPtr);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&s#",
-                             &index,
-                             PyMac_GetOSType, &typeCode,
-                             &dataPtr__in__, &dataPtr__in_len__))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AEPutPtr(&_self->ob_itself,
-                       index,
-                       typeCode,
-                       dataPtr__in__, dataPtr__len__);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEPutDesc(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long index;
-       AEDesc theAEDesc;
-#ifndef AEPutDesc
-       PyMac_PRECHECK(AEPutDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &index,
-                             AEDesc_Convert, &theAEDesc))
-               return NULL;
-       _err = AEPutDesc(&_self->ob_itself,
-                        index,
-                        &theAEDesc);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEGetNthPtr(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long index;
-       DescType desiredType;
-       AEKeyword theAEKeyword;
-       DescType typeCode;
-       char *dataPtr__out__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-#ifndef AEGetNthPtr
-       PyMac_PRECHECK(AEGetNthPtr);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&i",
-                             &index,
-                             PyMac_GetOSType, &desiredType,
-                             &dataPtr__in_len__))
-               return NULL;
-       if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
-       {
-               PyErr_NoMemory();
-               goto dataPtr__error__;
-       }
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AEGetNthPtr(&_self->ob_itself,
-                          index,
-                          desiredType,
-                          &theAEKeyword,
-                          &typeCode,
-                          dataPtr__out__, dataPtr__len__, &dataPtr__len__);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&s#",
-                            PyMac_BuildOSType, theAEKeyword,
-                            PyMac_BuildOSType, typeCode,
-                            dataPtr__out__, (int)dataPtr__len__);
-       free(dataPtr__out__);
- dataPtr__error__: ;
-       return _res;
-}
-
-static PyObject *AEDesc_AEGetNthDesc(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long index;
-       DescType desiredType;
-       AEKeyword theAEKeyword;
-       AEDesc result;
-#ifndef AEGetNthDesc
-       PyMac_PRECHECK(AEGetNthDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &index,
-                             PyMac_GetOSType, &desiredType))
-               return NULL;
-       _err = AEGetNthDesc(&_self->ob_itself,
-                           index,
-                           desiredType,
-                           &theAEKeyword,
-                           &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildOSType, theAEKeyword,
-                            AEDesc_New, &result);
-       return _res;
-}
-
-static PyObject *AEDesc_AESizeOfNthItem(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long index;
-       DescType typeCode;
-       Size dataSize;
-#ifndef AESizeOfNthItem
-       PyMac_PRECHECK(AESizeOfNthItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &index))
-               return NULL;
-       _err = AESizeOfNthItem(&_self->ob_itself,
-                              index,
-                              &typeCode,
-                              &dataSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&l",
-                            PyMac_BuildOSType, typeCode,
-                            dataSize);
-       return _res;
-}
-
-static PyObject *AEDesc_AEDeleteItem(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long index;
-#ifndef AEDeleteItem
-       PyMac_PRECHECK(AEDeleteItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &index))
-               return NULL;
-       _err = AEDeleteItem(&_self->ob_itself,
-                           index);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEPutParamPtr(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       DescType typeCode;
-       char *dataPtr__in__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-#ifndef AEPutParamPtr
-       PyMac_PRECHECK(AEPutParamPtr);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&s#",
-                             PyMac_GetOSType, &theAEKeyword,
-                             PyMac_GetOSType, &typeCode,
-                             &dataPtr__in__, &dataPtr__in_len__))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AEPutParamPtr(&_self->ob_itself,
-                            theAEKeyword,
-                            typeCode,
-                            dataPtr__in__, dataPtr__len__);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEPutParamDesc(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       AEDesc theAEDesc;
-#ifndef AEPutParamDesc
-       PyMac_PRECHECK(AEPutParamDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theAEKeyword,
-                             AEDesc_Convert, &theAEDesc))
-               return NULL;
-       _err = AEPutParamDesc(&_self->ob_itself,
-                             theAEKeyword,
-                             &theAEDesc);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEGetParamPtr(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       DescType desiredType;
-       DescType typeCode;
-       char *dataPtr__out__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-#ifndef AEGetParamPtr
-       PyMac_PRECHECK(AEGetParamPtr);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&i",
-                             PyMac_GetOSType, &theAEKeyword,
-                             PyMac_GetOSType, &desiredType,
-                             &dataPtr__in_len__))
-               return NULL;
-       if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
-       {
-               PyErr_NoMemory();
-               goto dataPtr__error__;
-       }
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AEGetParamPtr(&_self->ob_itself,
-                            theAEKeyword,
-                            desiredType,
-                            &typeCode,
-                            dataPtr__out__, dataPtr__len__, &dataPtr__len__);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&s#",
-                            PyMac_BuildOSType, typeCode,
-                            dataPtr__out__, (int)dataPtr__len__);
-       free(dataPtr__out__);
- dataPtr__error__: ;
-       return _res;
-}
-
-static PyObject *AEDesc_AEGetParamDesc(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       DescType desiredType;
-       AEDesc result;
-#ifndef AEGetParamDesc
-       PyMac_PRECHECK(AEGetParamDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theAEKeyword,
-                             PyMac_GetOSType, &desiredType))
-               return NULL;
-       _err = AEGetParamDesc(&_self->ob_itself,
-                             theAEKeyword,
-                             desiredType,
-                             &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &result);
-       return _res;
-}
-
-static PyObject *AEDesc_AESizeOfParam(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       DescType typeCode;
-       Size dataSize;
-#ifndef AESizeOfParam
-       PyMac_PRECHECK(AESizeOfParam);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &theAEKeyword))
-               return NULL;
-       _err = AESizeOfParam(&_self->ob_itself,
-                            theAEKeyword,
-                            &typeCode,
-                            &dataSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&l",
-                            PyMac_BuildOSType, typeCode,
-                            dataSize);
-       return _res;
-}
-
-static PyObject *AEDesc_AEDeleteParam(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-#ifndef AEDeleteParam
-       PyMac_PRECHECK(AEDeleteParam);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &theAEKeyword))
-               return NULL;
-       _err = AEDeleteParam(&_self->ob_itself,
-                            theAEKeyword);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEGetAttributePtr(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       DescType desiredType;
-       DescType typeCode;
-       char *dataPtr__out__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-#ifndef AEGetAttributePtr
-       PyMac_PRECHECK(AEGetAttributePtr);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&i",
-                             PyMac_GetOSType, &theAEKeyword,
-                             PyMac_GetOSType, &desiredType,
-                             &dataPtr__in_len__))
-               return NULL;
-       if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
-       {
-               PyErr_NoMemory();
-               goto dataPtr__error__;
-       }
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AEGetAttributePtr(&_self->ob_itself,
-                                theAEKeyword,
-                                desiredType,
-                                &typeCode,
-                                dataPtr__out__, dataPtr__len__, &dataPtr__len__);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&s#",
-                            PyMac_BuildOSType, typeCode,
-                            dataPtr__out__, (int)dataPtr__len__);
-       free(dataPtr__out__);
- dataPtr__error__: ;
-       return _res;
-}
-
-static PyObject *AEDesc_AEGetAttributeDesc(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       DescType desiredType;
-       AEDesc result;
-#ifndef AEGetAttributeDesc
-       PyMac_PRECHECK(AEGetAttributeDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theAEKeyword,
-                             PyMac_GetOSType, &desiredType))
-               return NULL;
-       _err = AEGetAttributeDesc(&_self->ob_itself,
-                                 theAEKeyword,
-                                 desiredType,
-                                 &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &result);
-       return _res;
-}
-
-static PyObject *AEDesc_AESizeOfAttribute(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       DescType typeCode;
-       Size dataSize;
-#ifndef AESizeOfAttribute
-       PyMac_PRECHECK(AESizeOfAttribute);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &theAEKeyword))
-               return NULL;
-       _err = AESizeOfAttribute(&_self->ob_itself,
-                                theAEKeyword,
-                                &typeCode,
-                                &dataSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&l",
-                            PyMac_BuildOSType, typeCode,
-                            dataSize);
-       return _res;
-}
-
-static PyObject *AEDesc_AEPutAttributePtr(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       DescType typeCode;
-       char *dataPtr__in__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-#ifndef AEPutAttributePtr
-       PyMac_PRECHECK(AEPutAttributePtr);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&s#",
-                             PyMac_GetOSType, &theAEKeyword,
-                             PyMac_GetOSType, &typeCode,
-                             &dataPtr__in__, &dataPtr__in_len__))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AEPutAttributePtr(&_self->ob_itself,
-                                theAEKeyword,
-                                typeCode,
-                                dataPtr__in__, dataPtr__len__);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEPutAttributeDesc(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword theAEKeyword;
-       AEDesc theAEDesc;
-#ifndef AEPutAttributeDesc
-       PyMac_PRECHECK(AEPutAttributeDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theAEKeyword,
-                             AEDesc_Convert, &theAEDesc))
-               return NULL;
-       _err = AEPutAttributeDesc(&_self->ob_itself,
-                                 theAEKeyword,
-                                 &theAEDesc);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEGetDescDataSize(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Size _rv;
-#ifndef AEGetDescDataSize
-       PyMac_PRECHECK(AEGetDescDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = AEGetDescDataSize(&_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *AEDesc_AESend(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AppleEvent reply;
-       AESendMode sendMode;
-       AESendPriority sendPriority;
-       long timeOutInTicks;
-#ifndef AESend
-       PyMac_PRECHECK(AESend);
-#endif
-       if (!PyArg_ParseTuple(_args, "lhl",
-                             &sendMode,
-                             &sendPriority,
-                             &timeOutInTicks))
-               return NULL;
-       _err = AESend(&_self->ob_itself,
-                     &reply,
-                     sendMode,
-                     sendPriority,
-                     timeOutInTicks,
-                     upp_AEIdleProc,
-                     (AEFilterUPP)0);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &reply);
-       return _res;
-}
-
-static PyObject *AEDesc_AEResetTimer(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef AEResetTimer
-       PyMac_PRECHECK(AEResetTimer);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AEResetTimer(&_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AESuspendTheCurrentEvent(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef AESuspendTheCurrentEvent
-       PyMac_PRECHECK(AESuspendTheCurrentEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AESuspendTheCurrentEvent(&_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEResumeTheCurrentEvent(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AppleEvent reply;
-       AEEventHandlerUPP dispatcher__proc__ = upp_GenericEventHandler;
-       PyObject *dispatcher;
-#ifndef AEResumeTheCurrentEvent
-       PyMac_PRECHECK(AEResumeTheCurrentEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O",
-                             AEDesc_Convert, &reply,
-                             &dispatcher))
-               return NULL;
-       _err = AEResumeTheCurrentEvent(&_self->ob_itself,
-                                      &reply,
-                                      dispatcher__proc__, (long)dispatcher);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       Py_INCREF(dispatcher); /* XXX leak, but needed */
-       return _res;
-}
-
-static PyObject *AEDesc_AEGetTheCurrentEvent(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef AEGetTheCurrentEvent
-       PyMac_PRECHECK(AEGetTheCurrentEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AEGetTheCurrentEvent(&_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AESetTheCurrentEvent(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef AESetTheCurrentEvent
-       PyMac_PRECHECK(AESetTheCurrentEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AESetTheCurrentEvent(&_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AEDesc_AEResolve(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short callbackFlags;
-       AEDesc theToken;
-#ifndef AEResolve
-       PyMac_PRECHECK(AEResolve);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &callbackFlags))
-               return NULL;
-       _err = AEResolve(&_self->ob_itself,
-                        callbackFlags,
-                        &theToken);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &theToken);
-       return _res;
-}
-
-static PyObject *AEDesc_AutoDispose(AEDescObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       int onoff, old;
-       if (!PyArg_ParseTuple(_args, "i", &onoff))
-               return NULL;
-       old = _self->ob_owned;
-       _self->ob_owned = onoff;
-       _res = Py_BuildValue("i", old);
-       return _res;
-
-}
-
-static PyMethodDef AEDesc_methods[] = {
-       {"AECoerceDesc", (PyCFunction)AEDesc_AECoerceDesc, 1,
-        PyDoc_STR("(DescType toType) -> (AEDesc result)")},
-       {"AEDuplicateDesc", (PyCFunction)AEDesc_AEDuplicateDesc, 1,
-        PyDoc_STR("() -> (AEDesc result)")},
-       {"AECountItems", (PyCFunction)AEDesc_AECountItems, 1,
-        PyDoc_STR("() -> (long theCount)")},
-       {"AEPutPtr", (PyCFunction)AEDesc_AEPutPtr, 1,
-        PyDoc_STR("(long index, DescType typeCode, Buffer dataPtr) -> None")},
-       {"AEPutDesc", (PyCFunction)AEDesc_AEPutDesc, 1,
-        PyDoc_STR("(long index, AEDesc theAEDesc) -> None")},
-       {"AEGetNthPtr", (PyCFunction)AEDesc_AEGetNthPtr, 1,
-        PyDoc_STR("(long index, DescType desiredType, Buffer dataPtr) -> (AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr)")},
-       {"AEGetNthDesc", (PyCFunction)AEDesc_AEGetNthDesc, 1,
-        PyDoc_STR("(long index, DescType desiredType) -> (AEKeyword theAEKeyword, AEDesc result)")},
-       {"AESizeOfNthItem", (PyCFunction)AEDesc_AESizeOfNthItem, 1,
-        PyDoc_STR("(long index) -> (DescType typeCode, Size dataSize)")},
-       {"AEDeleteItem", (PyCFunction)AEDesc_AEDeleteItem, 1,
-        PyDoc_STR("(long index) -> None")},
-       {"AEPutParamPtr", (PyCFunction)AEDesc_AEPutParamPtr, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None")},
-       {"AEPutParamDesc", (PyCFunction)AEDesc_AEPutParamDesc, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None")},
-       {"AEGetParamPtr", (PyCFunction)AEDesc_AEGetParamPtr, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType, Buffer dataPtr) -> (DescType typeCode, Buffer dataPtr)")},
-       {"AEGetParamDesc", (PyCFunction)AEDesc_AEGetParamDesc, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType) -> (AEDesc result)")},
-       {"AESizeOfParam", (PyCFunction)AEDesc_AESizeOfParam, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword) -> (DescType typeCode, Size dataSize)")},
-       {"AEDeleteParam", (PyCFunction)AEDesc_AEDeleteParam, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword) -> None")},
-       {"AEGetAttributePtr", (PyCFunction)AEDesc_AEGetAttributePtr, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType, Buffer dataPtr) -> (DescType typeCode, Buffer dataPtr)")},
-       {"AEGetAttributeDesc", (PyCFunction)AEDesc_AEGetAttributeDesc, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType) -> (AEDesc result)")},
-       {"AESizeOfAttribute", (PyCFunction)AEDesc_AESizeOfAttribute, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword) -> (DescType typeCode, Size dataSize)")},
-       {"AEPutAttributePtr", (PyCFunction)AEDesc_AEPutAttributePtr, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None")},
-       {"AEPutAttributeDesc", (PyCFunction)AEDesc_AEPutAttributeDesc, 1,
-        PyDoc_STR("(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None")},
-       {"AEGetDescDataSize", (PyCFunction)AEDesc_AEGetDescDataSize, 1,
-        PyDoc_STR("() -> (Size _rv)")},
-       {"AESend", (PyCFunction)AEDesc_AESend, 1,
-        PyDoc_STR("(AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks) -> (AppleEvent reply)")},
-       {"AEResetTimer", (PyCFunction)AEDesc_AEResetTimer, 1,
-        PyDoc_STR("() -> None")},
-       {"AESuspendTheCurrentEvent", (PyCFunction)AEDesc_AESuspendTheCurrentEvent, 1,
-        PyDoc_STR("() -> None")},
-       {"AEResumeTheCurrentEvent", (PyCFunction)AEDesc_AEResumeTheCurrentEvent, 1,
-        PyDoc_STR("(AppleEvent reply, EventHandler dispatcher) -> None")},
-       {"AEGetTheCurrentEvent", (PyCFunction)AEDesc_AEGetTheCurrentEvent, 1,
-        PyDoc_STR("() -> None")},
-       {"AESetTheCurrentEvent", (PyCFunction)AEDesc_AESetTheCurrentEvent, 1,
-        PyDoc_STR("() -> None")},
-       {"AEResolve", (PyCFunction)AEDesc_AEResolve, 1,
-        PyDoc_STR("(short callbackFlags) -> (AEDesc theToken)")},
-       {"AutoDispose", (PyCFunction)AEDesc_AutoDispose, 1,
-        PyDoc_STR("(int)->int. Automatically AEDisposeDesc the object on Python object cleanup")},
-       {NULL, NULL, 0}
-};
-
-static PyObject *AEDesc_get_type(AEDescObject *self, void *closure)
-{
-       return PyMac_BuildOSType(self->ob_itself.descriptorType);
-}
-
-#define AEDesc_set_type NULL
-
-static PyObject *AEDesc_get_data(AEDescObject *self, void *closure)
-{
-       PyObject *res;
-       Size size;
-       char *ptr;
-       OSErr err;
-
-       size = AEGetDescDataSize(&self->ob_itself);
-       if ( (res = PyString_FromStringAndSize(NULL, size)) == NULL )
-               return NULL;
-       if ( (ptr = PyString_AS_STRING(res)) == NULL )
-               return NULL;
-       if ( (err=AEGetDescData(&self->ob_itself, ptr, size)) < 0 )
-               return PyMac_Error(err);
-       return res;
-}
-
-#define AEDesc_set_data NULL
-
-static PyGetSetDef AEDesc_getsetlist[] = {
-       {"type", (getter)AEDesc_get_type, (setter)AEDesc_set_type, "Type of this AEDesc"},
-       {"data", (getter)AEDesc_get_data, (setter)AEDesc_set_data, "The raw data in this AEDesc"},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define AEDesc_compare NULL
-
-#define AEDesc_repr NULL
-
-#define AEDesc_hash NULL
-#define AEDesc_tp_init 0
-
-#define AEDesc_tp_alloc PyType_GenericAlloc
-
-static PyObject *AEDesc_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       AEDesc itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, AEDesc_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((AEDescObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define AEDesc_tp_free PyObject_Del
-
-
-PyTypeObject AEDesc_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_AE.AEDesc", /*tp_name*/
-       sizeof(AEDescObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) AEDesc_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) AEDesc_compare, /*tp_compare*/
-       (reprfunc) AEDesc_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) AEDesc_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       AEDesc_methods, /* tp_methods */
-       0, /*tp_members*/
-       AEDesc_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       AEDesc_tp_init, /* tp_init */
-       AEDesc_tp_alloc, /* tp_alloc */
-       AEDesc_tp_new, /* tp_new */
-       AEDesc_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type AEDesc --------------------- */
-
-
-static PyObject *AE_AECoercePtr(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DescType typeCode;
-       char *dataPtr__in__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-       DescType toType;
-       AEDesc result;
-#ifndef AECoercePtr
-       PyMac_PRECHECK(AECoercePtr);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#O&",
-                             PyMac_GetOSType, &typeCode,
-                             &dataPtr__in__, &dataPtr__in_len__,
-                             PyMac_GetOSType, &toType))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AECoercePtr(typeCode,
-                          dataPtr__in__, dataPtr__len__,
-                          toType,
-                          &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &result);
-       return _res;
-}
-
-static PyObject *AE_AECreateDesc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DescType typeCode;
-       char *dataPtr__in__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-       AEDesc result;
-#ifndef AECreateDesc
-       PyMac_PRECHECK(AECreateDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#",
-                             PyMac_GetOSType, &typeCode,
-                             &dataPtr__in__, &dataPtr__in_len__))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AECreateDesc(typeCode,
-                           dataPtr__in__, dataPtr__len__,
-                           &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &result);
-       return _res;
-}
-
-static PyObject *AE_AECreateList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       char *factoringPtr__in__;
-       long factoringPtr__len__;
-       int factoringPtr__in_len__;
-       Boolean isRecord;
-       AEDescList resultList;
-#ifndef AECreateList
-       PyMac_PRECHECK(AECreateList);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#b",
-                             &factoringPtr__in__, &factoringPtr__in_len__,
-                             &isRecord))
-               return NULL;
-       factoringPtr__len__ = factoringPtr__in_len__;
-       _err = AECreateList(factoringPtr__in__, factoringPtr__len__,
-                           isRecord,
-                           &resultList);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultList);
-       return _res;
-}
-
-static PyObject *AE_AECreateAppleEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEEventClass theAEEventClass;
-       AEEventID theAEEventID;
-       AEAddressDesc target;
-       AEReturnID returnID;
-       AETransactionID transactionID;
-       AppleEvent result;
-#ifndef AECreateAppleEvent
-       PyMac_PRECHECK(AECreateAppleEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&hl",
-                             PyMac_GetOSType, &theAEEventClass,
-                             PyMac_GetOSType, &theAEEventID,
-                             AEDesc_Convert, &target,
-                             &returnID,
-                             &transactionID))
-               return NULL;
-       _err = AECreateAppleEvent(theAEEventClass,
-                                 theAEEventID,
-                                 &target,
-                                 returnID,
-                                 transactionID,
-                                 &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &result);
-       return _res;
-}
-
-static PyObject *AE_AEReplaceDescData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DescType typeCode;
-       char *dataPtr__in__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-       AEDesc theAEDesc;
-#ifndef AEReplaceDescData
-       PyMac_PRECHECK(AEReplaceDescData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#",
-                             PyMac_GetOSType, &typeCode,
-                             &dataPtr__in__, &dataPtr__in_len__))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AEReplaceDescData(typeCode,
-                                dataPtr__in__, dataPtr__len__,
-                                &theAEDesc);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &theAEDesc);
-       return _res;
-}
-
-static PyObject *AE_AEProcessAppleEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       EventRecord theEventRecord;
-#ifndef AEProcessAppleEvent
-       PyMac_PRECHECK(AEProcessAppleEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &theEventRecord))
-               return NULL;
-       _err = AEProcessAppleEvent(&theEventRecord);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AE_AEGetInteractionAllowed(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEInteractAllowed level;
-#ifndef AEGetInteractionAllowed
-       PyMac_PRECHECK(AEGetInteractionAllowed);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AEGetInteractionAllowed(&level);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            level);
-       return _res;
-}
-
-static PyObject *AE_AESetInteractionAllowed(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEInteractAllowed level;
-#ifndef AESetInteractionAllowed
-       PyMac_PRECHECK(AESetInteractionAllowed);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &level))
-               return NULL;
-       _err = AESetInteractionAllowed(level);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AE_AEInteractWithUser(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long timeOutInTicks;
-#ifndef AEInteractWithUser
-       PyMac_PRECHECK(AEInteractWithUser);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &timeOutInTicks))
-               return NULL;
-       _err = AEInteractWithUser(timeOutInTicks,
-                                 (NMRecPtr)0,
-                                 upp_AEIdleProc);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AE_AEInstallEventHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEEventClass theAEEventClass;
-       AEEventID theAEEventID;
-       AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
-       PyObject *handler;
-#ifndef AEInstallEventHandler
-       PyMac_PRECHECK(AEInstallEventHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O",
-                             PyMac_GetOSType, &theAEEventClass,
-                             PyMac_GetOSType, &theAEEventID,
-                             &handler))
-               return NULL;
-       _err = AEInstallEventHandler(theAEEventClass,
-                                    theAEEventID,
-                                    handler__proc__, (long)handler,
-                                    0);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       Py_INCREF(handler); /* XXX leak, but needed */
-       return _res;
-}
-
-static PyObject *AE_AERemoveEventHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEEventClass theAEEventClass;
-       AEEventID theAEEventID;
-#ifndef AERemoveEventHandler
-       PyMac_PRECHECK(AERemoveEventHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theAEEventClass,
-                             PyMac_GetOSType, &theAEEventID))
-               return NULL;
-       _err = AERemoveEventHandler(theAEEventClass,
-                                   theAEEventID,
-                                   upp_GenericEventHandler,
-                                   0);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AE_AEGetEventHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEEventClass theAEEventClass;
-       AEEventID theAEEventID;
-       AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
-       PyObject *handler;
-#ifndef AEGetEventHandler
-       PyMac_PRECHECK(AEGetEventHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theAEEventClass,
-                             PyMac_GetOSType, &theAEEventID))
-               return NULL;
-       _err = AEGetEventHandler(theAEEventClass,
-                                theAEEventID,
-                                &handler__proc__, (long *)&handler,
-                                0);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O",
-                            handler);
-       Py_INCREF(handler); /* XXX leak, but needed */
-       return _res;
-}
-
-static PyObject *AE_AEInstallSpecialHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword functionClass;
-#ifndef AEInstallSpecialHandler
-       PyMac_PRECHECK(AEInstallSpecialHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &functionClass))
-               return NULL;
-       _err = AEInstallSpecialHandler(functionClass,
-                                      upp_GenericEventHandler,
-                                      0);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AE_AERemoveSpecialHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword functionClass;
-#ifndef AERemoveSpecialHandler
-       PyMac_PRECHECK(AERemoveSpecialHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &functionClass))
-               return NULL;
-       _err = AERemoveSpecialHandler(functionClass,
-                                     upp_GenericEventHandler,
-                                     0);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AE_AEManagerInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEKeyword keyWord;
-       long result;
-#ifndef AEManagerInfo
-       PyMac_PRECHECK(AEManagerInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &keyWord))
-               return NULL;
-       _err = AEManagerInfo(keyWord,
-                            &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            result);
-       return _res;
-}
-
-static PyObject *AE_AEObjectInit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef AEObjectInit
-       PyMac_PRECHECK(AEObjectInit);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AEObjectInit();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *AE_AEDisposeToken(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEDesc theToken;
-#ifndef AEDisposeToken
-       PyMac_PRECHECK(AEDisposeToken);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AEDisposeToken(&theToken);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &theToken);
-       return _res;
-}
-
-static PyObject *AE_AECallObjectAccessor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DescType desiredClass;
-       AEDesc containerToken;
-       DescType containerClass;
-       DescType keyForm;
-       AEDesc keyData;
-       AEDesc token;
-#ifndef AECallObjectAccessor
-       PyMac_PRECHECK(AECallObjectAccessor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
-                             PyMac_GetOSType, &desiredClass,
-                             AEDesc_Convert, &containerToken,
-                             PyMac_GetOSType, &containerClass,
-                             PyMac_GetOSType, &keyForm,
-                             AEDesc_Convert, &keyData))
-               return NULL;
-       _err = AECallObjectAccessor(desiredClass,
-                                   &containerToken,
-                                   containerClass,
-                                   keyForm,
-                                   &keyData,
-                                   &token);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &token);
-       return _res;
-}
-
-static PyMethodDef AE_methods[] = {
-       {"AECoercePtr", (PyCFunction)AE_AECoercePtr, 1,
-        PyDoc_STR("(DescType typeCode, Buffer dataPtr, DescType toType) -> (AEDesc result)")},
-       {"AECreateDesc", (PyCFunction)AE_AECreateDesc, 1,
-        PyDoc_STR("(DescType typeCode, Buffer dataPtr) -> (AEDesc result)")},
-       {"AECreateList", (PyCFunction)AE_AECreateList, 1,
-        PyDoc_STR("(Buffer factoringPtr, Boolean isRecord) -> (AEDescList resultList)")},
-       {"AECreateAppleEvent", (PyCFunction)AE_AECreateAppleEvent, 1,
-        PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID, AEAddressDesc target, AEReturnID returnID, AETransactionID transactionID) -> (AppleEvent result)")},
-       {"AEReplaceDescData", (PyCFunction)AE_AEReplaceDescData, 1,
-        PyDoc_STR("(DescType typeCode, Buffer dataPtr) -> (AEDesc theAEDesc)")},
-       {"AEProcessAppleEvent", (PyCFunction)AE_AEProcessAppleEvent, 1,
-        PyDoc_STR("(EventRecord theEventRecord) -> None")},
-       {"AEGetInteractionAllowed", (PyCFunction)AE_AEGetInteractionAllowed, 1,
-        PyDoc_STR("() -> (AEInteractAllowed level)")},
-       {"AESetInteractionAllowed", (PyCFunction)AE_AESetInteractionAllowed, 1,
-        PyDoc_STR("(AEInteractAllowed level) -> None")},
-       {"AEInteractWithUser", (PyCFunction)AE_AEInteractWithUser, 1,
-        PyDoc_STR("(long timeOutInTicks) -> None")},
-       {"AEInstallEventHandler", (PyCFunction)AE_AEInstallEventHandler, 1,
-        PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID, EventHandler handler) -> None")},
-       {"AERemoveEventHandler", (PyCFunction)AE_AERemoveEventHandler, 1,
-        PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID) -> None")},
-       {"AEGetEventHandler", (PyCFunction)AE_AEGetEventHandler, 1,
-        PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID) -> (EventHandler handler)")},
-       {"AEInstallSpecialHandler", (PyCFunction)AE_AEInstallSpecialHandler, 1,
-        PyDoc_STR("(AEKeyword functionClass) -> None")},
-       {"AERemoveSpecialHandler", (PyCFunction)AE_AERemoveSpecialHandler, 1,
-        PyDoc_STR("(AEKeyword functionClass) -> None")},
-       {"AEManagerInfo", (PyCFunction)AE_AEManagerInfo, 1,
-        PyDoc_STR("(AEKeyword keyWord) -> (long result)")},
-       {"AEObjectInit", (PyCFunction)AE_AEObjectInit, 1,
-        PyDoc_STR("() -> None")},
-       {"AEDisposeToken", (PyCFunction)AE_AEDisposeToken, 1,
-        PyDoc_STR("() -> (AEDesc theToken)")},
-       {"AECallObjectAccessor", (PyCFunction)AE_AECallObjectAccessor, 1,
-        PyDoc_STR("(DescType desiredClass, AEDesc containerToken, DescType containerClass, DescType keyForm, AEDesc keyData) -> (AEDesc token)")},
-       {NULL, NULL, 0}
-};
-
-
-
-static pascal OSErr
-GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon)
-{
-        PyObject *handler = (PyObject *)refcon;
-        AEDescObject *requestObject, *replyObject;
-        PyObject *args, *res;
-        if ((requestObject = (AEDescObject *)AEDesc_New((AppleEvent *)request)) == NULL) {
-                return -1;
-        }
-        if ((replyObject = (AEDescObject *)AEDesc_New(reply)) == NULL) {
-                Py_DECREF(requestObject);
-                return -1;
-        }
-        if ((args = Py_BuildValue("OO", requestObject, replyObject)) == NULL) {
-                Py_DECREF(requestObject);
-                Py_DECREF(replyObject);
-                return -1;
-        }
-        res = PyEval_CallObject(handler, args);
-        requestObject->ob_itself.descriptorType = 'null';
-        requestObject->ob_itself.dataHandle = NULL;
-        replyObject->ob_itself.descriptorType = 'null';
-        replyObject->ob_itself.dataHandle = NULL;
-        Py_DECREF(args);
-        if (res == NULL) {
-                PySys_WriteStderr("Exception in AE event handler function\n");
-                PyErr_Print();
-                return -1;
-        }
-        Py_DECREF(res);
-        return noErr;
-}
-
-PyObject *AEDesc_NewBorrowed(AEDesc *itself)
-{
-        PyObject *it;
-
-        it = AEDesc_New(itself);
-        if (it)
-                ((AEDescObject *)it)->ob_owned = 0;
-        return (PyObject *)it;
-}
-
-
-
-void init_AE(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-        upp_AEIdleProc = NewAEIdleUPP(AEIdleProc);
-        upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_NewBorrowed);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);
-
-       m = Py_InitModule("_AE", AE_methods);
-       d = PyModule_GetDict(m);
-       AE_Error = PyMac_GetOSErrException();
-       if (AE_Error == NULL ||
-           PyDict_SetItemString(d, "Error", AE_Error) != 0)
-               return;
-       Py_TYPE(&AEDesc_Type) = &PyType_Type;
-       if (PyType_Ready(&AEDesc_Type) < 0) return;
-       Py_INCREF(&AEDesc_Type);
-       PyModule_AddObject(m, "AEDesc", (PyObject *)&AEDesc_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&AEDesc_Type);
-       PyModule_AddObject(m, "AEDescType", (PyObject *)&AEDesc_Type);
-}
-
-/* ========================= End module _AE ========================= */
-
diff --git a/Mac/Modules/ae/aescan.py b/Mac/Modules/ae/aescan.py
deleted file mode 100644 (file)
index 868b56e..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-# Scan AppleEvents.h header file, generate aegen.py and AppleEvents.py files.
-# Then run aesupport to generate AEmodule.c.
-# (Should learn how to tell the compiler to compile it as well.)
-
-import sys
-import MacOS
-
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-def main():
-    print("=== Scanning AEDataModel.h, AppleEvents.h, AERegistry.h, AEObjects.h ===")
-    input = ["AEDataModel.h", "AEInteraction.h", "AppleEvents.h", "AERegistry.h", "AEObjects.h"]
-    output = "aegen.py"
-    defsoutput = TOOLBOXDIR + "AppleEvents.py"
-    scanner = AppleEventsScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done Scanning and Generating, now doing 'import aesupport' ===")
-    import aesupport
-    print("=== Done 'import aesupport'.  It's up to you to compile AEmodule.c ===")
-
-class AppleEventsScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "AEFunction"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t[-4:] == "_ptr" and m == "InMode" and \
-               t[:-4] in ("AEDesc", "AEAddressDesc", "AEDescList",
-                     "AERecord", "AppleEvent"):
-                classname = "AEMethod"
-                listname = "aedescmethods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "AEDisposeDesc",
-#                       "AEGetEventHandler",
-                "AEGetDescData", # Use object.data
-                "AEGetSpecialHandler",
-                # Constants with funny definitions
-                "kAEDontDisposeOnResume",
-                "kAEUseStandardDispatch",
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "ProcPtr",
-                "AEArrayType",
-                "AECoercionHandlerUPP",
-                "UniversalProcPtr",
-                "OSLCompareUPP",
-                "OSLAccessorUPP",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("Boolean", "isSysHandler", "InMode")],
-                 [("AlwaysFalse", "*", "*")]),
-
-                ([("void_ptr", "*", "InMode"), ("Size", "*", "InMode")],
-                 [("InBuffer", "*", "*")]),
-
-                ([("EventHandlerProcPtr", "*", "InMode"), ("long", "*", "InMode")],
-                 [("EventHandler", "*", "*")]),
-
-                ([("EventHandlerProcPtr", "*", "OutMode"), ("long", "*", "OutMode")],
-                 [("EventHandler", "*", "*")]),
-
-                ([("AEEventHandlerUPP", "*", "InMode"), ("long", "*", "InMode")],
-                 [("EventHandler", "*", "*")]),
-
-                ([("AEEventHandlerUPP", "*", "OutMode"), ("long", "*", "OutMode")],
-                 [("EventHandler", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("Size", "*", "InMode"),
-                                            ("Size", "*", "OutMode")],
-                 [("VarVarOutBuffer", "*", "InOutMode")]),
-
-                ([("AppleEvent", "theAppleEvent", "OutMode")],
-                 [("AppleEvent_ptr", "*", "InMode")]),
-
-                ([("AEDescList", "theAEDescList", "OutMode")],
-                 [("AEDescList_ptr", "*", "InMode")]),
-                ]
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py
deleted file mode 100644 (file)
index d3e1dfd..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-# This script will generate the AppleEvents interface for Python.
-# It uses the "bgen" package to generate C code.
-# It execs the file aegen.py which contain the function definitions
-# (aegen.py was generated by aescan.py, scanning the <AppleEvents.h> header file).
-
-
-from macsupport import *
-
-
-AEArrayType = Type("AEArrayType", "c")
-AESendMode = Type("AESendMode", "l")
-AESendPriority = Type("AESendPriority", "h")
-AEInteractAllowed = Type("AEInteractAllowed", "b")
-AEReturnID = Type("AEReturnID", "h")
-AETransactionID = Type("AETransactionID", "l")
-
-
-
-AEEventClass = OSTypeType('AEEventClass')
-AEEventID = OSTypeType('AEEventID')
-AEKeyword = OSTypeType('AEKeyword')
-DescType = OSTypeType('DescType')
-
-
-AEDesc = OpaqueType('AEDesc')
-AEDesc_ptr = OpaqueType('AEDesc')
-
-AEAddressDesc = OpaqueType('AEAddressDesc', 'AEDesc')
-AEAddressDesc_ptr = OpaqueType('AEAddressDesc', 'AEDesc')
-
-AEDescList = OpaqueType('AEDescList', 'AEDesc')
-AEDescList_ptr = OpaqueType('AEDescList', 'AEDesc')
-
-AERecord = OpaqueType('AERecord', 'AEDesc')
-AERecord_ptr = OpaqueType('AERecord', 'AEDesc')
-
-AppleEvent = OpaqueType('AppleEvent', 'AEDesc')
-AppleEvent_ptr = OpaqueType('AppleEvent', 'AEDesc')
-
-
-class EHType(Type):
-    def __init__(self, name = 'EventHandler', format = ''):
-        Type.__init__(self, name, format)
-    def declare(self, name):
-        Output("AEEventHandlerUPP %s__proc__ = upp_GenericEventHandler;", name)
-        Output("PyObject *%s;", name)
-    def getargsFormat(self):
-        return "O"
-    def getargsArgs(self, name):
-        return "&%s" % name
-    def passInput(self, name):
-        return "%s__proc__, (long)%s" % (name, name)
-    def passOutput(self, name):
-        return "&%s__proc__, (long *)&%s" % (name, name)
-    def mkvalueFormat(self):
-        return "O"
-    def mkvalueArgs(self, name):
-        return name
-    def cleanup(self, name):
-        Output("Py_INCREF(%s); /* XXX leak, but needed */", name)
-
-class EHNoRefConType(EHType):
-    def passInput(self, name):
-        return "upp_GenericEventHandler"
-
-EventHandler = EHType()
-EventHandlerNoRefCon = EHNoRefConType()
-
-
-IdleProcPtr = FakeType("upp_AEIdleProc")
-AEIdleUPP = IdleProcPtr
-EventFilterProcPtr = FakeType("(AEFilterUPP)0")
-AEFilterUPP = EventFilterProcPtr
-NMRecPtr = FakeType("(NMRecPtr)0")
-EventHandlerProcPtr = FakeType("upp_GenericEventHandler")
-AEEventHandlerUPP = EventHandlerProcPtr
-AlwaysFalse = FakeType("0")
-
-
-AEFunction = OSErrWeakLinkFunctionGenerator
-AEMethod = OSErrWeakLinkMethodGenerator
-
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_AEDesc_New(AEDesc *);
-extern int _AEDesc_Convert(PyObject *, AEDesc *);
-
-#define AEDesc_New _AEDesc_New
-#define AEDesc_NewBorrowed _AEDesc_NewBorrowed
-#define AEDesc_Convert _AEDesc_Convert
-#endif
-
-typedef long refcontype;
-
-static pascal OSErr GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon); /* Forward */
-
-AEEventHandlerUPP upp_GenericEventHandler;
-
-static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHandle *mouseRgn)
-{
-        if ( PyOS_InterruptOccurred() )
-                return 1;
-        return 0;
-}
-
-AEIdleUPP upp_AEIdleProc;
-"""
-
-finalstuff = finalstuff + """
-static pascal OSErr
-GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon)
-{
-        PyObject *handler = (PyObject *)refcon;
-        AEDescObject *requestObject, *replyObject;
-        PyObject *args, *res;
-        if ((requestObject = (AEDescObject *)AEDesc_New((AppleEvent *)request)) == NULL) {
-                return -1;
-        }
-        if ((replyObject = (AEDescObject *)AEDesc_New(reply)) == NULL) {
-                Py_DECREF(requestObject);
-                return -1;
-        }
-        if ((args = Py_BuildValue("OO", requestObject, replyObject)) == NULL) {
-                Py_DECREF(requestObject);
-                Py_DECREF(replyObject);
-                return -1;
-        }
-        res = PyEval_CallObject(handler, args);
-        requestObject->ob_itself.descriptorType = 'null';
-        requestObject->ob_itself.dataHandle = NULL;
-        replyObject->ob_itself.descriptorType = 'null';
-        replyObject->ob_itself.dataHandle = NULL;
-        Py_DECREF(args);
-        if (res == NULL) {
-                PySys_WriteStderr("Exception in AE event handler function\\n");
-                PyErr_Print();
-                return -1;
-        }
-        Py_DECREF(res);
-        return noErr;
-}
-
-PyObject *AEDesc_NewBorrowed(AEDesc *itself)
-{
-        PyObject *it;
-
-        it = AEDesc_New(itself);
-        if (it)
-                ((AEDescObject *)it)->ob_owned = 0;
-        return (PyObject *)it;
-}
-
-"""
-
-initstuff = initstuff + """
-        upp_AEIdleProc = NewAEIdleUPP(AEIdleProc);
-        upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_NewBorrowed);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);
-"""
-
-module = MacModule('_AE', 'AE', includestuff, finalstuff, initstuff)
-
-class AEDescDefinition(PEP253Mixin, GlobalObjectDefinition):
-    getsetlist = [(
-            'type',
-            'return PyMac_BuildOSType(self->ob_itself.descriptorType);',
-            None,
-            'Type of this AEDesc'
-            ), (
-            'data',
-            """
-            PyObject *res;
-            Size size;
-            char *ptr;
-            OSErr err;
-
-            size = AEGetDescDataSize(&self->ob_itself);
-            if ( (res = PyString_FromStringAndSize(NULL, size)) == NULL )
-                    return NULL;
-            if ( (ptr = PyString_AsString(res)) == NULL )
-                    return NULL;
-            if ( (err=AEGetDescData(&self->ob_itself, ptr, size)) < 0 )
-                    return PyMac_Error(err);
-            return res;
-            """,
-            None,
-            'The raw data in this AEDesc'
-            )]
-
-    def __init__(self, name, prefix = None, itselftype = None):
-        GlobalObjectDefinition.__init__(self, name, prefix or name, itselftype or name)
-        self.argref = "*"
-
-    def outputStructMembers(self):
-        GlobalObjectDefinition.outputStructMembers(self)
-        Output("int ob_owned;")
-
-    def outputInitStructMembers(self):
-        GlobalObjectDefinition.outputInitStructMembers(self)
-        Output("it->ob_owned = 1;")
-
-    def outputCleanupStructMembers(self):
-        Output("if (self->ob_owned) AEDisposeDesc(&self->ob_itself);")
-
-aedescobject = AEDescDefinition('AEDesc')
-module.addobject(aedescobject)
-
-functions = []
-aedescmethods = []
-
-exec(open('aegen.py').read())
-##exec(open('aedatamodelgen.py').read())
-
-# Manual generator
-AutoDispose_body = """
-int onoff, old;
-if (!PyArg_ParseTuple(_args, "i", &onoff))
-        return NULL;
-old = _self->ob_owned;
-_self->ob_owned = onoff;
-_res = Py_BuildValue("i", old);
-return _res;
-"""
-f = ManualGenerator("AutoDispose", AutoDispose_body)
-f.docstring = lambda: "(int)->int. Automatically AEDisposeDesc the object on Python object cleanup"
-aedescmethods.append(f)
-
-for f in functions: module.add(f)
-for f in aedescmethods: aedescobject.add(f)
-
-SetOutputFileName('_AEmodule.c')
-module.generate()
diff --git a/Mac/Modules/ah/_AHmodule.c b/Mac/Modules/ah/_AHmodule.c
deleted file mode 100644 (file)
index 160a845..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-
-/* =========================== Module _AH =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-
-static PyObject *Ah_Error;
-
-static PyObject *Ah_AHSearch(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef bookname;
-       CFStringRef query;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFStringRefObj_Convert, &bookname,
-                             CFStringRefObj_Convert, &query))
-               return NULL;
-       _err = AHSearch(bookname,
-                       query);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ah_AHGotoMainTOC(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       AHTOCType toctype;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &toctype))
-               return NULL;
-       _err = AHGotoMainTOC(toctype);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ah_AHGotoPage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef bookname;
-       CFStringRef path;
-       CFStringRef anchor;
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CFStringRefObj_Convert, &bookname,
-                             CFStringRefObj_Convert, &path,
-                             CFStringRefObj_Convert, &anchor))
-               return NULL;
-       _err = AHGotoPage(bookname,
-                         path,
-                         anchor);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ah_AHLookupAnchor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef bookname;
-       CFStringRef anchor;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFStringRefObj_Convert, &bookname,
-                             CFStringRefObj_Convert, &anchor))
-               return NULL;
-       _err = AHLookupAnchor(bookname,
-                             anchor);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ah_AHRegisterHelpBook(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSRef appBundleRef;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSRef, &appBundleRef))
-               return NULL;
-       _err = AHRegisterHelpBook(&appBundleRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef Ah_methods[] = {
-       {"AHSearch", (PyCFunction)Ah_AHSearch, 1,
-        PyDoc_STR("(CFStringRef bookname, CFStringRef query) -> None")},
-       {"AHGotoMainTOC", (PyCFunction)Ah_AHGotoMainTOC, 1,
-        PyDoc_STR("(AHTOCType toctype) -> None")},
-       {"AHGotoPage", (PyCFunction)Ah_AHGotoPage, 1,
-        PyDoc_STR("(CFStringRef bookname, CFStringRef path, CFStringRef anchor) -> None")},
-       {"AHLookupAnchor", (PyCFunction)Ah_AHLookupAnchor, 1,
-        PyDoc_STR("(CFStringRef bookname, CFStringRef anchor) -> None")},
-       {"AHRegisterHelpBook", (PyCFunction)Ah_AHRegisterHelpBook, 1,
-        PyDoc_STR("(FSRef appBundleRef) -> None")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_AH(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_AH", Ah_methods);
-       d = PyModule_GetDict(m);
-       Ah_Error = PyMac_GetOSErrException();
-       if (Ah_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Ah_Error) != 0)
-               return;
-}
-
-/* ========================= End module _AH ========================= */
-
diff --git a/Mac/Modules/ah/ahscan.py b/Mac/Modules/ah/ahscan.py
deleted file mode 100644 (file)
index e92d12f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner_OSX
-
-LONG = "AppleHelp"
-SHORT = "ah"
-OBJECT = "NOTUSED"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner_OSX):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            # This is non-functional today
-            if t == OBJECT and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/ah/ahsupport.py b/Mac/Modules/ah/ahsupport.py
deleted file mode 100644 (file)
index 9fa9dde..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'AppleHelp.h'           # The Apple header file
-MODNAME = '_AH'                         # The name of the module
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Ah'                        # The prefix for module-wide routines
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-AHTOCType = Type("AHTOCType", "h")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-"""
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-
-# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-
-# Create and populate the lists
-functions = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/app/_Appmodule.c b/Mac/Modules/app/_Appmodule.c
deleted file mode 100644 (file)
index 782df63..0000000
+++ /dev/null
@@ -1,1820 +0,0 @@
-
-/* ========================== Module _App =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-
-int ThemeButtonDrawInfo_Convert(PyObject *v, ThemeButtonDrawInfo *p_itself)
-{
-        return PyArg_Parse(v, "(iHH)", &p_itself->state, &p_itself->value, &p_itself->adornment);
-}
-
-
-static PyObject *App_Error;
-
-/* ----------------- Object type ThemeDrawingState ------------------ */
-
-PyTypeObject ThemeDrawingState_Type;
-
-#define ThemeDrawingStateObj_Check(x) (Py_TYPE(x) == &ThemeDrawingState_Type || PyObject_TypeCheck((x), &ThemeDrawingState_Type))
-
-typedef struct ThemeDrawingStateObject {
-       PyObject_HEAD
-       ThemeDrawingState ob_itself;
-} ThemeDrawingStateObject;
-
-PyObject *ThemeDrawingStateObj_New(ThemeDrawingState itself)
-{
-       ThemeDrawingStateObject *it;
-       it = PyObject_NEW(ThemeDrawingStateObject, &ThemeDrawingState_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int ThemeDrawingStateObj_Convert(PyObject *v, ThemeDrawingState *p_itself)
-{
-       if (!ThemeDrawingStateObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "ThemeDrawingState required");
-               return 0;
-       }
-       *p_itself = ((ThemeDrawingStateObject *)v)->ob_itself;
-       return 1;
-}
-
-static void ThemeDrawingStateObj_dealloc(ThemeDrawingStateObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *ThemeDrawingStateObj_SetThemeDrawingState(ThemeDrawingStateObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _rv;
-       Boolean inDisposeNow;
-#ifndef SetThemeDrawingState
-       PyMac_PRECHECK(SetThemeDrawingState);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &inDisposeNow))
-               return NULL;
-       _rv = SetThemeDrawingState(_self->ob_itself,
-                                  inDisposeNow);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ThemeDrawingStateObj_DisposeThemeDrawingState(ThemeDrawingStateObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _rv;
-#ifndef DisposeThemeDrawingState
-       PyMac_PRECHECK(DisposeThemeDrawingState);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = DisposeThemeDrawingState(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyMethodDef ThemeDrawingStateObj_methods[] = {
-       {"SetThemeDrawingState", (PyCFunction)ThemeDrawingStateObj_SetThemeDrawingState, 1,
-        PyDoc_STR("(Boolean inDisposeNow) -> (OSStatus _rv)")},
-       {"DisposeThemeDrawingState", (PyCFunction)ThemeDrawingStateObj_DisposeThemeDrawingState, 1,
-        PyDoc_STR("() -> (OSStatus _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define ThemeDrawingStateObj_getsetlist NULL
-
-
-#define ThemeDrawingStateObj_compare NULL
-
-#define ThemeDrawingStateObj_repr NULL
-
-#define ThemeDrawingStateObj_hash NULL
-#define ThemeDrawingStateObj_tp_init 0
-
-#define ThemeDrawingStateObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *ThemeDrawingStateObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       ThemeDrawingState itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, ThemeDrawingStateObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((ThemeDrawingStateObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define ThemeDrawingStateObj_tp_free PyObject_Del
-
-
-PyTypeObject ThemeDrawingState_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_App.ThemeDrawingState", /*tp_name*/
-       sizeof(ThemeDrawingStateObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) ThemeDrawingStateObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) ThemeDrawingStateObj_compare, /*tp_compare*/
-       (reprfunc) ThemeDrawingStateObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) ThemeDrawingStateObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       ThemeDrawingStateObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       ThemeDrawingStateObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       ThemeDrawingStateObj_tp_init, /* tp_init */
-       ThemeDrawingStateObj_tp_alloc, /* tp_alloc */
-       ThemeDrawingStateObj_tp_new, /* tp_new */
-       ThemeDrawingStateObj_tp_free, /* tp_free */
-};
-
-/* --------------- End object type ThemeDrawingState ---------------- */
-
-
-static PyObject *App_RegisterAppearanceClient(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef RegisterAppearanceClient
-       PyMac_PRECHECK(RegisterAppearanceClient);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = RegisterAppearanceClient();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_UnregisterAppearanceClient(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef UnregisterAppearanceClient
-       PyMac_PRECHECK(UnregisterAppearanceClient);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = UnregisterAppearanceClient();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_SetThemePen(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeBrush inBrush;
-       SInt16 inDepth;
-       Boolean inIsColorDevice;
-#ifndef SetThemePen
-       PyMac_PRECHECK(SetThemePen);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhb",
-                             &inBrush,
-                             &inDepth,
-                             &inIsColorDevice))
-               return NULL;
-       _err = SetThemePen(inBrush,
-                          inDepth,
-                          inIsColorDevice);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_SetThemeBackground(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeBrush inBrush;
-       SInt16 inDepth;
-       Boolean inIsColorDevice;
-#ifndef SetThemeBackground
-       PyMac_PRECHECK(SetThemeBackground);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhb",
-                             &inBrush,
-                             &inDepth,
-                             &inIsColorDevice))
-               return NULL;
-       _err = SetThemeBackground(inBrush,
-                                 inDepth,
-                                 inIsColorDevice);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_SetThemeTextColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeTextColor inColor;
-       SInt16 inDepth;
-       Boolean inIsColorDevice;
-#ifndef SetThemeTextColor
-       PyMac_PRECHECK(SetThemeTextColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhb",
-                             &inColor,
-                             &inDepth,
-                             &inIsColorDevice))
-               return NULL;
-       _err = SetThemeTextColor(inColor,
-                                inDepth,
-                                inIsColorDevice);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_SetThemeWindowBackground(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       ThemeBrush inBrush;
-       Boolean inUpdate;
-#ifndef SetThemeWindowBackground
-       PyMac_PRECHECK(SetThemeWindowBackground);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hb",
-                             WinObj_Convert, &inWindow,
-                             &inBrush,
-                             &inUpdate))
-               return NULL;
-       _err = SetThemeWindowBackground(inWindow,
-                                       inBrush,
-                                       inUpdate);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeWindowHeader(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemeWindowHeader
-       PyMac_PRECHECK(DrawThemeWindowHeader);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemeWindowHeader(&inRect,
-                                    inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeWindowListViewHeader(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemeWindowListViewHeader
-       PyMac_PRECHECK(DrawThemeWindowListViewHeader);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemeWindowListViewHeader(&inRect,
-                                            inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemePlacard(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemePlacard
-       PyMac_PRECHECK(DrawThemePlacard);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemePlacard(&inRect,
-                               inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeEditTextFrame(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemeEditTextFrame
-       PyMac_PRECHECK(DrawThemeEditTextFrame);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemeEditTextFrame(&inRect,
-                                     inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeListBoxFrame(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemeListBoxFrame
-       PyMac_PRECHECK(DrawThemeListBoxFrame);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemeListBoxFrame(&inRect,
-                                    inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeFocusRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       Boolean inHasFocus;
-#ifndef DrawThemeFocusRect
-       PyMac_PRECHECK(DrawThemeFocusRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetRect, &inRect,
-                             &inHasFocus))
-               return NULL;
-       _err = DrawThemeFocusRect(&inRect,
-                                 inHasFocus);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemePrimaryGroup(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemePrimaryGroup
-       PyMac_PRECHECK(DrawThemePrimaryGroup);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemePrimaryGroup(&inRect,
-                                    inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeSecondaryGroup(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemeSecondaryGroup
-       PyMac_PRECHECK(DrawThemeSecondaryGroup);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemeSecondaryGroup(&inRect,
-                                      inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeSeparator(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemeSeparator
-       PyMac_PRECHECK(DrawThemeSeparator);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemeSeparator(&inRect,
-                                 inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeModelessDialogFrame(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemeModelessDialogFrame
-       PyMac_PRECHECK(DrawThemeModelessDialogFrame);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemeModelessDialogFrame(&inRect,
-                                           inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeGenericWell(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-       Boolean inFillCenter;
-#ifndef DrawThemeGenericWell
-       PyMac_PRECHECK(DrawThemeGenericWell);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lb",
-                             PyMac_GetRect, &inRect,
-                             &inState,
-                             &inFillCenter))
-               return NULL;
-       _err = DrawThemeGenericWell(&inRect,
-                                   inState,
-                                   inFillCenter);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeFocusRegion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean inHasFocus;
-#ifndef DrawThemeFocusRegion
-       PyMac_PRECHECK(DrawThemeFocusRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &inHasFocus))
-               return NULL;
-       _err = DrawThemeFocusRegion((RgnHandle)0,
-                                   inHasFocus);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_IsThemeInColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       SInt16 inDepth;
-       Boolean inIsColorDevice;
-#ifndef IsThemeInColor
-       PyMac_PRECHECK(IsThemeInColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &inDepth,
-                             &inIsColorDevice))
-               return NULL;
-       _rv = IsThemeInColor(inDepth,
-                            inIsColorDevice);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *App_GetThemeAccentColors(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CTabHandle outColors;
-#ifndef GetThemeAccentColors
-       PyMac_PRECHECK(GetThemeAccentColors);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetThemeAccentColors(&outColors);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, outColors);
-       return _res;
-}
-
-static PyObject *App_DrawThemeMenuBarBackground(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inBounds;
-       ThemeMenuBarState inState;
-       UInt32 inAttributes;
-#ifndef DrawThemeMenuBarBackground
-       PyMac_PRECHECK(DrawThemeMenuBarBackground);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&Hl",
-                             PyMac_GetRect, &inBounds,
-                             &inState,
-                             &inAttributes))
-               return NULL;
-       _err = DrawThemeMenuBarBackground(&inBounds,
-                                         inState,
-                                         inAttributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_GetThemeMenuBarHeight(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt16 outHeight;
-#ifndef GetThemeMenuBarHeight
-       PyMac_PRECHECK(GetThemeMenuBarHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetThemeMenuBarHeight(&outHeight);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outHeight);
-       return _res;
-}
-
-static PyObject *App_DrawThemeMenuBackground(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inMenuRect;
-       ThemeMenuType inMenuType;
-#ifndef DrawThemeMenuBackground
-       PyMac_PRECHECK(DrawThemeMenuBackground);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&H",
-                             PyMac_GetRect, &inMenuRect,
-                             &inMenuType))
-               return NULL;
-       _err = DrawThemeMenuBackground(&inMenuRect,
-                                      inMenuType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_GetThemeMenuBackgroundRegion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inMenuRect;
-       ThemeMenuType menuType;
-#ifndef GetThemeMenuBackgroundRegion
-       PyMac_PRECHECK(GetThemeMenuBackgroundRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&H",
-                             PyMac_GetRect, &inMenuRect,
-                             &menuType))
-               return NULL;
-       _err = GetThemeMenuBackgroundRegion(&inMenuRect,
-                                           menuType,
-                                           (RgnHandle)0);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeMenuSeparator(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inItemRect;
-#ifndef DrawThemeMenuSeparator
-       PyMac_PRECHECK(DrawThemeMenuSeparator);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &inItemRect))
-               return NULL;
-       _err = DrawThemeMenuSeparator(&inItemRect);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_GetThemeMenuSeparatorHeight(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt16 outHeight;
-#ifndef GetThemeMenuSeparatorHeight
-       PyMac_PRECHECK(GetThemeMenuSeparatorHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetThemeMenuSeparatorHeight(&outHeight);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outHeight);
-       return _res;
-}
-
-static PyObject *App_GetThemeMenuItemExtra(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeMenuItemType inItemType;
-       SInt16 outHeight;
-       SInt16 outWidth;
-#ifndef GetThemeMenuItemExtra
-       PyMac_PRECHECK(GetThemeMenuItemExtra);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &inItemType))
-               return NULL;
-       _err = GetThemeMenuItemExtra(inItemType,
-                                    &outHeight,
-                                    &outWidth);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hh",
-                            outHeight,
-                            outWidth);
-       return _res;
-}
-
-static PyObject *App_GetThemeMenuTitleExtra(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt16 outWidth;
-       Boolean inIsSquished;
-#ifndef GetThemeMenuTitleExtra
-       PyMac_PRECHECK(GetThemeMenuTitleExtra);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &inIsSquished))
-               return NULL;
-       _err = GetThemeMenuTitleExtra(&outWidth,
-                                     inIsSquished);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outWidth);
-       return _res;
-}
-
-static PyObject *App_DrawThemeTabPane(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeDrawState inState;
-#ifndef DrawThemeTabPane
-       PyMac_PRECHECK(DrawThemeTabPane);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &inRect,
-                             &inState))
-               return NULL;
-       _err = DrawThemeTabPane(&inRect,
-                               inState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_GetThemeTabRegion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inRect;
-       ThemeTabStyle inStyle;
-       ThemeTabDirection inDirection;
-#ifndef GetThemeTabRegion
-       PyMac_PRECHECK(GetThemeTabRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&HH",
-                             PyMac_GetRect, &inRect,
-                             &inStyle,
-                             &inDirection))
-               return NULL;
-       _err = GetThemeTabRegion(&inRect,
-                                inStyle,
-                                inDirection,
-                                (RgnHandle)0);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_SetThemeCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeCursor inCursor;
-#ifndef SetThemeCursor
-       PyMac_PRECHECK(SetThemeCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inCursor))
-               return NULL;
-       _err = SetThemeCursor(inCursor);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_SetAnimatedThemeCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeCursor inCursor;
-       UInt32 inAnimationStep;
-#ifndef SetAnimatedThemeCursor
-       PyMac_PRECHECK(SetAnimatedThemeCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &inCursor,
-                             &inAnimationStep))
-               return NULL;
-       _err = SetAnimatedThemeCursor(inCursor,
-                                     inAnimationStep);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_GetThemeScrollBarThumbStyle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeScrollBarThumbStyle outStyle;
-#ifndef GetThemeScrollBarThumbStyle
-       PyMac_PRECHECK(GetThemeScrollBarThumbStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetThemeScrollBarThumbStyle(&outStyle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            outStyle);
-       return _res;
-}
-
-static PyObject *App_GetThemeScrollBarArrowStyle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeScrollBarArrowStyle outStyle;
-#ifndef GetThemeScrollBarArrowStyle
-       PyMac_PRECHECK(GetThemeScrollBarArrowStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetThemeScrollBarArrowStyle(&outStyle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            outStyle);
-       return _res;
-}
-
-static PyObject *App_GetThemeCheckBoxStyle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeCheckBoxStyle outStyle;
-#ifndef GetThemeCheckBoxStyle
-       PyMac_PRECHECK(GetThemeCheckBoxStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetThemeCheckBoxStyle(&outStyle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            outStyle);
-       return _res;
-}
-
-static PyObject *App_UseThemeFont(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeFontID inFontID;
-       ScriptCode inScript;
-#ifndef UseThemeFont
-       PyMac_PRECHECK(UseThemeFont);
-#endif
-       if (!PyArg_ParseTuple(_args, "Hh",
-                             &inFontID,
-                             &inScript))
-               return NULL;
-       _err = UseThemeFont(inFontID,
-                           inScript);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeTextBox(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inString;
-       ThemeFontID inFontID;
-       ThemeDrawState inState;
-       Boolean inWrapToWidth;
-       Rect inBoundingBox;
-       SInt16 inJust;
-#ifndef DrawThemeTextBox
-       PyMac_PRECHECK(DrawThemeTextBox);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&HlbO&h",
-                             CFStringRefObj_Convert, &inString,
-                             &inFontID,
-                             &inState,
-                             &inWrapToWidth,
-                             PyMac_GetRect, &inBoundingBox,
-                             &inJust))
-               return NULL;
-       _err = DrawThemeTextBox(inString,
-                               inFontID,
-                               inState,
-                               inWrapToWidth,
-                               &inBoundingBox,
-                               inJust,
-                               NULL);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_TruncateThemeText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFMutableStringRef inString;
-       ThemeFontID inFontID;
-       ThemeDrawState inState;
-       SInt16 inPixelWidthLimit;
-       TruncCode inTruncWhere;
-       Boolean outTruncated;
-#ifndef TruncateThemeText
-       PyMac_PRECHECK(TruncateThemeText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&Hlhh",
-                             CFMutableStringRefObj_Convert, &inString,
-                             &inFontID,
-                             &inState,
-                             &inPixelWidthLimit,
-                             &inTruncWhere))
-               return NULL;
-       _err = TruncateThemeText(inString,
-                                inFontID,
-                                inState,
-                                inPixelWidthLimit,
-                                inTruncWhere,
-                                &outTruncated);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            outTruncated);
-       return _res;
-}
-
-static PyObject *App_GetThemeTextDimensions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inString;
-       ThemeFontID inFontID;
-       ThemeDrawState inState;
-       Boolean inWrapToWidth;
-       Point ioBounds;
-       SInt16 outBaseline;
-#ifndef GetThemeTextDimensions
-       PyMac_PRECHECK(GetThemeTextDimensions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&HlbO&",
-                             CFStringRefObj_Convert, &inString,
-                             &inFontID,
-                             &inState,
-                             &inWrapToWidth,
-                             PyMac_GetPoint, &ioBounds))
-               return NULL;
-       _err = GetThemeTextDimensions(inString,
-                                     inFontID,
-                                     inState,
-                                     inWrapToWidth,
-                                     &ioBounds,
-                                     &outBaseline);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&h",
-                            PyMac_BuildPoint, ioBounds,
-                            outBaseline);
-       return _res;
-}
-
-static PyObject *App_GetThemeTextShadowOutset(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeFontID inFontID;
-       ThemeDrawState inState;
-       Rect outOutset;
-#ifndef GetThemeTextShadowOutset
-       PyMac_PRECHECK(GetThemeTextShadowOutset);
-#endif
-       if (!PyArg_ParseTuple(_args, "Hl",
-                             &inFontID,
-                             &inState))
-               return NULL;
-       _err = GetThemeTextShadowOutset(inFontID,
-                                       inState,
-                                       &outOutset);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &outOutset);
-       return _res;
-}
-
-static PyObject *App_DrawThemeScrollBarArrows(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect bounds;
-       ThemeTrackEnableState enableState;
-       ThemeTrackPressState pressState;
-       Boolean isHoriz;
-       Rect trackBounds;
-#ifndef DrawThemeScrollBarArrows
-       PyMac_PRECHECK(DrawThemeScrollBarArrows);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&bbb",
-                             PyMac_GetRect, &bounds,
-                             &enableState,
-                             &pressState,
-                             &isHoriz))
-               return NULL;
-       _err = DrawThemeScrollBarArrows(&bounds,
-                                       enableState,
-                                       pressState,
-                                       isHoriz,
-                                       &trackBounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &trackBounds);
-       return _res;
-}
-
-static PyObject *App_GetThemeScrollBarTrackRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect bounds;
-       ThemeTrackEnableState enableState;
-       ThemeTrackPressState pressState;
-       Boolean isHoriz;
-       Rect trackBounds;
-#ifndef GetThemeScrollBarTrackRect
-       PyMac_PRECHECK(GetThemeScrollBarTrackRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&bbb",
-                             PyMac_GetRect, &bounds,
-                             &enableState,
-                             &pressState,
-                             &isHoriz))
-               return NULL;
-       _err = GetThemeScrollBarTrackRect(&bounds,
-                                         enableState,
-                                         pressState,
-                                         isHoriz,
-                                         &trackBounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &trackBounds);
-       return _res;
-}
-
-static PyObject *App_HitTestThemeScrollBarArrows(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Rect scrollBarBounds;
-       ThemeTrackEnableState enableState;
-       ThemeTrackPressState pressState;
-       Boolean isHoriz;
-       Point ptHit;
-       Rect trackBounds;
-       ControlPartCode partcode;
-#ifndef HitTestThemeScrollBarArrows
-       PyMac_PRECHECK(HitTestThemeScrollBarArrows);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&bbbO&",
-                             PyMac_GetRect, &scrollBarBounds,
-                             &enableState,
-                             &pressState,
-                             &isHoriz,
-                             PyMac_GetPoint, &ptHit))
-               return NULL;
-       _rv = HitTestThemeScrollBarArrows(&scrollBarBounds,
-                                         enableState,
-                                         pressState,
-                                         isHoriz,
-                                         ptHit,
-                                         &trackBounds,
-                                         &partcode);
-       _res = Py_BuildValue("bO&h",
-                            _rv,
-                            PyMac_BuildRect, &trackBounds,
-                            partcode);
-       return _res;
-}
-
-static PyObject *App_DrawThemeScrollBarDelimiters(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeWindowType flavor;
-       Rect inContRect;
-       ThemeDrawState state;
-       ThemeWindowAttributes attributes;
-#ifndef DrawThemeScrollBarDelimiters
-       PyMac_PRECHECK(DrawThemeScrollBarDelimiters);
-#endif
-       if (!PyArg_ParseTuple(_args, "HO&ll",
-                             &flavor,
-                             PyMac_GetRect, &inContRect,
-                             &state,
-                             &attributes))
-               return NULL;
-       _err = DrawThemeScrollBarDelimiters(flavor,
-                                           &inContRect,
-                                           state,
-                                           attributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeButton(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inBounds;
-       UInt16 inKind;
-       ThemeButtonDrawInfo inNewInfo;
-       ThemeButtonDrawInfo inPrevInfo;
-       UInt32 inUserData;
-#ifndef DrawThemeButton
-       PyMac_PRECHECK(DrawThemeButton);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&HO&O&l",
-                             PyMac_GetRect, &inBounds,
-                             &inKind,
-                             ThemeButtonDrawInfo_Convert, &inNewInfo,
-                             ThemeButtonDrawInfo_Convert, &inPrevInfo,
-                             &inUserData))
-               return NULL;
-       _err = DrawThemeButton(&inBounds,
-                              inKind,
-                              &inNewInfo,
-                              &inPrevInfo,
-                              NULL,
-                              NULL,
-                              inUserData);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_GetThemeButtonRegion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inBounds;
-       UInt16 inKind;
-       ThemeButtonDrawInfo inNewInfo;
-#ifndef GetThemeButtonRegion
-       PyMac_PRECHECK(GetThemeButtonRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&HO&",
-                             PyMac_GetRect, &inBounds,
-                             &inKind,
-                             ThemeButtonDrawInfo_Convert, &inNewInfo))
-               return NULL;
-       _err = GetThemeButtonRegion(&inBounds,
-                                   inKind,
-                                   &inNewInfo,
-                                   (RgnHandle)0);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_GetThemeButtonContentBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inBounds;
-       UInt16 inKind;
-       ThemeButtonDrawInfo inDrawInfo;
-       Rect outBounds;
-#ifndef GetThemeButtonContentBounds
-       PyMac_PRECHECK(GetThemeButtonContentBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&HO&",
-                             PyMac_GetRect, &inBounds,
-                             &inKind,
-                             ThemeButtonDrawInfo_Convert, &inDrawInfo))
-               return NULL;
-       _err = GetThemeButtonContentBounds(&inBounds,
-                                          inKind,
-                                          &inDrawInfo,
-                                          &outBounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &outBounds);
-       return _res;
-}
-
-static PyObject *App_GetThemeButtonBackgroundBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inBounds;
-       UInt16 inKind;
-       ThemeButtonDrawInfo inDrawInfo;
-       Rect outBounds;
-#ifndef GetThemeButtonBackgroundBounds
-       PyMac_PRECHECK(GetThemeButtonBackgroundBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&HO&",
-                             PyMac_GetRect, &inBounds,
-                             &inKind,
-                             ThemeButtonDrawInfo_Convert, &inDrawInfo))
-               return NULL;
-       _err = GetThemeButtonBackgroundBounds(&inBounds,
-                                             inKind,
-                                             &inDrawInfo,
-                                             &outBounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &outBounds);
-       return _res;
-}
-
-static PyObject *App_PlayThemeSound(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeSoundKind kind;
-#ifndef PlayThemeSound
-       PyMac_PRECHECK(PlayThemeSound);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &kind))
-               return NULL;
-       _err = PlayThemeSound(kind);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_BeginThemeDragSound(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeDragSoundKind kind;
-#ifndef BeginThemeDragSound
-       PyMac_PRECHECK(BeginThemeDragSound);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &kind))
-               return NULL;
-       _err = BeginThemeDragSound(kind);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_EndThemeDragSound(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef EndThemeDragSound
-       PyMac_PRECHECK(EndThemeDragSound);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = EndThemeDragSound();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeTickMark(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect bounds;
-       ThemeDrawState state;
-#ifndef DrawThemeTickMark
-       PyMac_PRECHECK(DrawThemeTickMark);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &bounds,
-                             &state))
-               return NULL;
-       _err = DrawThemeTickMark(&bounds,
-                                state);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeChasingArrows(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect bounds;
-       UInt32 index;
-       ThemeDrawState state;
-       UInt32 eraseData;
-#ifndef DrawThemeChasingArrows
-       PyMac_PRECHECK(DrawThemeChasingArrows);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lll",
-                             PyMac_GetRect, &bounds,
-                             &index,
-                             &state,
-                             &eraseData))
-               return NULL;
-       _err = DrawThemeChasingArrows(&bounds,
-                                     index,
-                                     state,
-                                     NULL,
-                                     eraseData);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemePopupArrow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect bounds;
-       ThemeArrowOrientation orientation;
-       ThemePopupArrowSize size;
-       ThemeDrawState state;
-       UInt32 eraseData;
-#ifndef DrawThemePopupArrow
-       PyMac_PRECHECK(DrawThemePopupArrow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&HHll",
-                             PyMac_GetRect, &bounds,
-                             &orientation,
-                             &size,
-                             &state,
-                             &eraseData))
-               return NULL;
-       _err = DrawThemePopupArrow(&bounds,
-                                  orientation,
-                                  size,
-                                  state,
-                                  NULL,
-                                  eraseData);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeStandaloneGrowBox(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point origin;
-       ThemeGrowDirection growDirection;
-       Boolean isSmall;
-       ThemeDrawState state;
-#ifndef DrawThemeStandaloneGrowBox
-       PyMac_PRECHECK(DrawThemeStandaloneGrowBox);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&Hbl",
-                             PyMac_GetPoint, &origin,
-                             &growDirection,
-                             &isSmall,
-                             &state))
-               return NULL;
-       _err = DrawThemeStandaloneGrowBox(origin,
-                                         growDirection,
-                                         isSmall,
-                                         state);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_DrawThemeStandaloneNoGrowBox(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point origin;
-       ThemeGrowDirection growDirection;
-       Boolean isSmall;
-       ThemeDrawState state;
-#ifndef DrawThemeStandaloneNoGrowBox
-       PyMac_PRECHECK(DrawThemeStandaloneNoGrowBox);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&Hbl",
-                             PyMac_GetPoint, &origin,
-                             &growDirection,
-                             &isSmall,
-                             &state))
-               return NULL;
-       _err = DrawThemeStandaloneNoGrowBox(origin,
-                                           growDirection,
-                                           isSmall,
-                                           state);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_GetThemeStandaloneGrowBoxBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point origin;
-       ThemeGrowDirection growDirection;
-       Boolean isSmall;
-       Rect bounds;
-#ifndef GetThemeStandaloneGrowBoxBounds
-       PyMac_PRECHECK(GetThemeStandaloneGrowBoxBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&Hb",
-                             PyMac_GetPoint, &origin,
-                             &growDirection,
-                             &isSmall))
-               return NULL;
-       _err = GetThemeStandaloneGrowBoxBounds(origin,
-                                              growDirection,
-                                              isSmall,
-                                              &bounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *App_NormalizeThemeDrawingState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef NormalizeThemeDrawingState
-       PyMac_PRECHECK(NormalizeThemeDrawingState);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = NormalizeThemeDrawingState();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_GetThemeDrawingState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeDrawingState outState;
-#ifndef GetThemeDrawingState
-       PyMac_PRECHECK(GetThemeDrawingState);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetThemeDrawingState(&outState);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ThemeDrawingStateObj_New, outState);
-       return _res;
-}
-
-static PyObject *App_ApplyThemeBackground(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeBackgroundKind inKind;
-       Rect bounds;
-       ThemeDrawState inState;
-       SInt16 inDepth;
-       Boolean inColorDev;
-#ifndef ApplyThemeBackground
-       PyMac_PRECHECK(ApplyThemeBackground);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&lhb",
-                             &inKind,
-                             PyMac_GetRect, &bounds,
-                             &inState,
-                             &inDepth,
-                             &inColorDev))
-               return NULL;
-       _err = ApplyThemeBackground(inKind,
-                                   &bounds,
-                                   inState,
-                                   inDepth,
-                                   inColorDev);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_SetThemeTextColorForWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Boolean isActive;
-       SInt16 depth;
-       Boolean isColorDev;
-#ifndef SetThemeTextColorForWindow
-       PyMac_PRECHECK(SetThemeTextColorForWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&bhb",
-                             WinObj_Convert, &window,
-                             &isActive,
-                             &depth,
-                             &isColorDev))
-               return NULL;
-       _err = SetThemeTextColorForWindow(window,
-                                         isActive,
-                                         depth,
-                                         isColorDev);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *App_IsValidAppearanceFileType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       OSType fileType;
-#ifndef IsValidAppearanceFileType
-       PyMac_PRECHECK(IsValidAppearanceFileType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &fileType))
-               return NULL;
-       _rv = IsValidAppearanceFileType(fileType);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *App_GetThemeBrushAsColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeBrush inBrush;
-       SInt16 inDepth;
-       Boolean inColorDev;
-       RGBColor outColor;
-#ifndef GetThemeBrushAsColor
-       PyMac_PRECHECK(GetThemeBrushAsColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhb",
-                             &inBrush,
-                             &inDepth,
-                             &inColorDev))
-               return NULL;
-       _err = GetThemeBrushAsColor(inBrush,
-                                   inDepth,
-                                   inColorDev,
-                                   &outColor);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &outColor);
-       return _res;
-}
-
-static PyObject *App_GetThemeTextColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeTextColor inColor;
-       SInt16 inDepth;
-       Boolean inColorDev;
-       RGBColor outColor;
-#ifndef GetThemeTextColor
-       PyMac_PRECHECK(GetThemeTextColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhb",
-                             &inColor,
-                             &inDepth,
-                             &inColorDev))
-               return NULL;
-       _err = GetThemeTextColor(inColor,
-                                inDepth,
-                                inColorDev,
-                                &outColor);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &outColor);
-       return _res;
-}
-
-static PyObject *App_GetThemeMetric(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ThemeMetric inMetric;
-       SInt32 outMetric;
-#ifndef GetThemeMetric
-       PyMac_PRECHECK(GetThemeMetric);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inMetric))
-               return NULL;
-       _err = GetThemeMetric(inMetric,
-                             &outMetric);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outMetric);
-       return _res;
-}
-
-static PyMethodDef App_methods[] = {
-       {"RegisterAppearanceClient", (PyCFunction)App_RegisterAppearanceClient, 1,
-        PyDoc_STR("() -> None")},
-       {"UnregisterAppearanceClient", (PyCFunction)App_UnregisterAppearanceClient, 1,
-        PyDoc_STR("() -> None")},
-       {"SetThemePen", (PyCFunction)App_SetThemePen, 1,
-        PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
-       {"SetThemeBackground", (PyCFunction)App_SetThemeBackground, 1,
-        PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
-       {"SetThemeTextColor", (PyCFunction)App_SetThemeTextColor, 1,
-        PyDoc_STR("(ThemeTextColor inColor, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
-       {"SetThemeWindowBackground", (PyCFunction)App_SetThemeWindowBackground, 1,
-        PyDoc_STR("(WindowPtr inWindow, ThemeBrush inBrush, Boolean inUpdate) -> None")},
-       {"DrawThemeWindowHeader", (PyCFunction)App_DrawThemeWindowHeader, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"DrawThemeWindowListViewHeader", (PyCFunction)App_DrawThemeWindowListViewHeader, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"DrawThemePlacard", (PyCFunction)App_DrawThemePlacard, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"DrawThemeEditTextFrame", (PyCFunction)App_DrawThemeEditTextFrame, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"DrawThemeListBoxFrame", (PyCFunction)App_DrawThemeListBoxFrame, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"DrawThemeFocusRect", (PyCFunction)App_DrawThemeFocusRect, 1,
-        PyDoc_STR("(Rect inRect, Boolean inHasFocus) -> None")},
-       {"DrawThemePrimaryGroup", (PyCFunction)App_DrawThemePrimaryGroup, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"DrawThemeSecondaryGroup", (PyCFunction)App_DrawThemeSecondaryGroup, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"DrawThemeSeparator", (PyCFunction)App_DrawThemeSeparator, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"DrawThemeModelessDialogFrame", (PyCFunction)App_DrawThemeModelessDialogFrame, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"DrawThemeGenericWell", (PyCFunction)App_DrawThemeGenericWell, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState, Boolean inFillCenter) -> None")},
-       {"DrawThemeFocusRegion", (PyCFunction)App_DrawThemeFocusRegion, 1,
-        PyDoc_STR("(Boolean inHasFocus) -> None")},
-       {"IsThemeInColor", (PyCFunction)App_IsThemeInColor, 1,
-        PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> (Boolean _rv)")},
-       {"GetThemeAccentColors", (PyCFunction)App_GetThemeAccentColors, 1,
-        PyDoc_STR("() -> (CTabHandle outColors)")},
-       {"DrawThemeMenuBarBackground", (PyCFunction)App_DrawThemeMenuBarBackground, 1,
-        PyDoc_STR("(Rect inBounds, ThemeMenuBarState inState, UInt32 inAttributes) -> None")},
-       {"GetThemeMenuBarHeight", (PyCFunction)App_GetThemeMenuBarHeight, 1,
-        PyDoc_STR("() -> (SInt16 outHeight)")},
-       {"DrawThemeMenuBackground", (PyCFunction)App_DrawThemeMenuBackground, 1,
-        PyDoc_STR("(Rect inMenuRect, ThemeMenuType inMenuType) -> None")},
-       {"GetThemeMenuBackgroundRegion", (PyCFunction)App_GetThemeMenuBackgroundRegion, 1,
-        PyDoc_STR("(Rect inMenuRect, ThemeMenuType menuType) -> None")},
-       {"DrawThemeMenuSeparator", (PyCFunction)App_DrawThemeMenuSeparator, 1,
-        PyDoc_STR("(Rect inItemRect) -> None")},
-       {"GetThemeMenuSeparatorHeight", (PyCFunction)App_GetThemeMenuSeparatorHeight, 1,
-        PyDoc_STR("() -> (SInt16 outHeight)")},
-       {"GetThemeMenuItemExtra", (PyCFunction)App_GetThemeMenuItemExtra, 1,
-        PyDoc_STR("(ThemeMenuItemType inItemType) -> (SInt16 outHeight, SInt16 outWidth)")},
-       {"GetThemeMenuTitleExtra", (PyCFunction)App_GetThemeMenuTitleExtra, 1,
-        PyDoc_STR("(Boolean inIsSquished) -> (SInt16 outWidth)")},
-       {"DrawThemeTabPane", (PyCFunction)App_DrawThemeTabPane, 1,
-        PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
-       {"GetThemeTabRegion", (PyCFunction)App_GetThemeTabRegion, 1,
-        PyDoc_STR("(Rect inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection) -> None")},
-       {"SetThemeCursor", (PyCFunction)App_SetThemeCursor, 1,
-        PyDoc_STR("(ThemeCursor inCursor) -> None")},
-       {"SetAnimatedThemeCursor", (PyCFunction)App_SetAnimatedThemeCursor, 1,
-        PyDoc_STR("(ThemeCursor inCursor, UInt32 inAnimationStep) -> None")},
-       {"GetThemeScrollBarThumbStyle", (PyCFunction)App_GetThemeScrollBarThumbStyle, 1,
-        PyDoc_STR("() -> (ThemeScrollBarThumbStyle outStyle)")},
-       {"GetThemeScrollBarArrowStyle", (PyCFunction)App_GetThemeScrollBarArrowStyle, 1,
-        PyDoc_STR("() -> (ThemeScrollBarArrowStyle outStyle)")},
-       {"GetThemeCheckBoxStyle", (PyCFunction)App_GetThemeCheckBoxStyle, 1,
-        PyDoc_STR("() -> (ThemeCheckBoxStyle outStyle)")},
-       {"UseThemeFont", (PyCFunction)App_UseThemeFont, 1,
-        PyDoc_STR("(ThemeFontID inFontID, ScriptCode inScript) -> None")},
-       {"DrawThemeTextBox", (PyCFunction)App_DrawThemeTextBox, 1,
-        PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Rect inBoundingBox, SInt16 inJust) -> None")},
-       {"TruncateThemeText", (PyCFunction)App_TruncateThemeText, 1,
-        PyDoc_STR("(CFMutableStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, SInt16 inPixelWidthLimit, TruncCode inTruncWhere) -> (Boolean outTruncated)")},
-       {"GetThemeTextDimensions", (PyCFunction)App_GetThemeTextDimensions, 1,
-        PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Point ioBounds) -> (Point ioBounds, SInt16 outBaseline)")},
-       {"GetThemeTextShadowOutset", (PyCFunction)App_GetThemeTextShadowOutset, 1,
-        PyDoc_STR("(ThemeFontID inFontID, ThemeDrawState inState) -> (Rect outOutset)")},
-       {"DrawThemeScrollBarArrows", (PyCFunction)App_DrawThemeScrollBarArrows, 1,
-        PyDoc_STR("(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)")},
-       {"GetThemeScrollBarTrackRect", (PyCFunction)App_GetThemeScrollBarTrackRect, 1,
-        PyDoc_STR("(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)")},
-       {"HitTestThemeScrollBarArrows", (PyCFunction)App_HitTestThemeScrollBarArrows, 1,
-        PyDoc_STR("(Rect scrollBarBounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Point ptHit) -> (Boolean _rv, Rect trackBounds, ControlPartCode partcode)")},
-       {"DrawThemeScrollBarDelimiters", (PyCFunction)App_DrawThemeScrollBarDelimiters, 1,
-        PyDoc_STR("(ThemeWindowType flavor, Rect inContRect, ThemeDrawState state, ThemeWindowAttributes attributes) -> None")},
-       {"DrawThemeButton", (PyCFunction)App_DrawThemeButton, 1,
-        PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inNewInfo, ThemeButtonDrawInfo inPrevInfo, UInt32 inUserData) -> None")},
-       {"GetThemeButtonRegion", (PyCFunction)App_GetThemeButtonRegion, 1,
-        PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inNewInfo) -> None")},
-       {"GetThemeButtonContentBounds", (PyCFunction)App_GetThemeButtonContentBounds, 1,
-        PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inDrawInfo) -> (Rect outBounds)")},
-       {"GetThemeButtonBackgroundBounds", (PyCFunction)App_GetThemeButtonBackgroundBounds, 1,
-        PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inDrawInfo) -> (Rect outBounds)")},
-       {"PlayThemeSound", (PyCFunction)App_PlayThemeSound, 1,
-        PyDoc_STR("(ThemeSoundKind kind) -> None")},
-       {"BeginThemeDragSound", (PyCFunction)App_BeginThemeDragSound, 1,
-        PyDoc_STR("(ThemeDragSoundKind kind) -> None")},
-       {"EndThemeDragSound", (PyCFunction)App_EndThemeDragSound, 1,
-        PyDoc_STR("() -> None")},
-       {"DrawThemeTickMark", (PyCFunction)App_DrawThemeTickMark, 1,
-        PyDoc_STR("(Rect bounds, ThemeDrawState state) -> None")},
-       {"DrawThemeChasingArrows", (PyCFunction)App_DrawThemeChasingArrows, 1,
-        PyDoc_STR("(Rect bounds, UInt32 index, ThemeDrawState state, UInt32 eraseData) -> None")},
-       {"DrawThemePopupArrow", (PyCFunction)App_DrawThemePopupArrow, 1,
-        PyDoc_STR("(Rect bounds, ThemeArrowOrientation orientation, ThemePopupArrowSize size, ThemeDrawState state, UInt32 eraseData) -> None")},
-       {"DrawThemeStandaloneGrowBox", (PyCFunction)App_DrawThemeStandaloneGrowBox, 1,
-        PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state) -> None")},
-       {"DrawThemeStandaloneNoGrowBox", (PyCFunction)App_DrawThemeStandaloneNoGrowBox, 1,
-        PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state) -> None")},
-       {"GetThemeStandaloneGrowBoxBounds", (PyCFunction)App_GetThemeStandaloneGrowBoxBounds, 1,
-        PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall) -> (Rect bounds)")},
-       {"NormalizeThemeDrawingState", (PyCFunction)App_NormalizeThemeDrawingState, 1,
-        PyDoc_STR("() -> None")},
-       {"GetThemeDrawingState", (PyCFunction)App_GetThemeDrawingState, 1,
-        PyDoc_STR("() -> (ThemeDrawingState outState)")},
-       {"ApplyThemeBackground", (PyCFunction)App_ApplyThemeBackground, 1,
-        PyDoc_STR("(ThemeBackgroundKind inKind, Rect bounds, ThemeDrawState inState, SInt16 inDepth, Boolean inColorDev) -> None")},
-       {"SetThemeTextColorForWindow", (PyCFunction)App_SetThemeTextColorForWindow, 1,
-        PyDoc_STR("(WindowPtr window, Boolean isActive, SInt16 depth, Boolean isColorDev) -> None")},
-       {"IsValidAppearanceFileType", (PyCFunction)App_IsValidAppearanceFileType, 1,
-        PyDoc_STR("(OSType fileType) -> (Boolean _rv)")},
-       {"GetThemeBrushAsColor", (PyCFunction)App_GetThemeBrushAsColor, 1,
-        PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
-       {"GetThemeTextColor", (PyCFunction)App_GetThemeTextColor, 1,
-        PyDoc_STR("(ThemeTextColor inColor, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
-       {"GetThemeMetric", (PyCFunction)App_GetThemeMetric, 1,
-        PyDoc_STR("(ThemeMetric inMetric) -> (SInt32 outMetric)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_App(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_App", App_methods);
-       d = PyModule_GetDict(m);
-       App_Error = PyMac_GetOSErrException();
-       if (App_Error == NULL ||
-           PyDict_SetItemString(d, "Error", App_Error) != 0)
-               return;
-       Py_TYPE(&ThemeDrawingState_Type) = &PyType_Type;
-       if (PyType_Ready(&ThemeDrawingState_Type) < 0) return;
-       Py_INCREF(&ThemeDrawingState_Type);
-       PyModule_AddObject(m, "ThemeDrawingState", (PyObject *)&ThemeDrawingState_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&ThemeDrawingState_Type);
-       PyModule_AddObject(m, "ThemeDrawingStateType", (PyObject *)&ThemeDrawingState_Type);
-}
-
-/* ======================== End module _App ========================= */
-
diff --git a/Mac/Modules/app/appscan.py b/Mac/Modules/app/appscan.py
deleted file mode 100644 (file)
index 02ec13e..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "Appearance"
-SHORT = "app"
-OBJECT = "ThemeDrawingState"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            # This is non-functional today
-            if t == OBJECT and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-    def makeblacklistnames(self):
-        return [
-                "GetThemeFont",         # Funny stringbuffer in/out parameter, I think...
-                # Constants with funny definitions
-                "appearanceBadBrushIndexErr",
-                "appearanceProcessRegisteredErr",
-                "appearanceProcessNotRegisteredErr",
-                "appearanceBadTextColorIndexErr",
-                "appearanceThemeHasNoAccents",
-                "appearanceBadCursorIndexErr",
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "MenuTitleDrawingUPP",
-                "MenuItemDrawingUPP",
-                "ThemeIteratorUPP",
-                "ThemeTabTitleDrawUPP",
-#                       "ThemeEraseUPP",
-#                       "ThemeButtonDrawUPP",
-                "WindowTitleDrawingUPP",
-                "ProcessSerialNumber_ptr",              # Too much work for now.
-                "ThemeTrackDrawInfo_ptr",       # Too much work
-#                       "ThemeButtonDrawInfo_ptr",      # ditto
-                "ThemeWindowMetrics_ptr",       # ditto
-#                       "ThemeDrawingState",    # This is an opaque pointer, so it should be simple. Later.
-                "Collection",           # No interface to collection mgr yet.
-                "BytePtr",              # Not yet.
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("void", 'inContext', "OutMode")],
-                 [("NULL", 'inContext', "InMode")]),
-                ([("Point", 'ioBounds', "OutMode")],
-                 [("Point", 'ioBounds', "InOutMode")]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/app/appsupport.py b/Mac/Modules/app/appsupport.py
deleted file mode 100644 (file)
index 73f5f11..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Appearance.h'          # The Apple header file
-MODNAME = '_App'                                # The name of the module
-OBJECTNAME = 'ThemeDrawingState'                        # The basic name of the objects used here
-KIND = ''                               # Usually 'Ptr' or 'Handle'
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'App'                       # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + KIND          # The C type used to represent them
-OBJECTPREFIX = OBJECTNAME + 'Obj'       # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-#MenuRef = OpaqueByValueType("MenuRef", "MenuObj")
-
-
-#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
-
-RgnHandle = FakeType("(RgnHandle)0")
-NULL = FakeType("NULL")
-
-# XXXX Should be next, but this will break a lot of code...
-# RgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
-
-#KeyMap = ArrayOutputBufferType("KeyMap")
-#MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
-#MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
-#EventMask = Type("EventMask", "h")
-#EventKind = Type("EventKind", "h")
-ThemeBrush = Type("ThemeBrush", "h")
-ThemeColor = Type("ThemeColor", "h")
-ThemeTextColor = Type("ThemeTextColor", "h")
-ThemeMenuBarState = Type("ThemeMenuBarState", "H")
-ThemeMenuState = Type("ThemeMenuState", "H")
-ThemeMenuType = Type("ThemeMenuType", "H")
-ThemeMenuItemType = Type("ThemeMenuItemType", "H")
-ThemeFontID = Type("ThemeFontID", "H")
-ThemeTabStyle = Type("ThemeTabStyle", "H")
-ThemeTabDirection = Type("ThemeTabDirection", "H")
-ThemeDrawState = Type("ThemeDrawState", "l")
-ThemeCursor = Type("ThemeCursor", "l")
-ThemeCheckBoxStyle = Type("ThemeCheckBoxStyle", "H")
-ThemeScrollBarArrowStyle = Type("ThemeScrollBarArrowStyle", "H")
-ThemeScrollBarThumbStyle = Type("ThemeScrollBarThumbStyle", "H")
-CTabHandle = OpaqueByValueType("CTabHandle", "ResObj")
-ThemeTrackEnableState = Type("ThemeTrackEnableState", "b")
-ThemeTrackPressState = Type("ThemeTrackPressState", "b")
-ThemeThumbDirection = Type("ThemeThumbDirection", "b")
-ThemeTrackAttributes = Type("ThemeTrackAttributes", "H")
-ControlPartCode = Type("ControlPartCode", "h")
-ThemeWindowAttributes = Type("ThemeWindowAttributes", "l")
-ThemeWindowType = Type("ThemeWindowType", "H")
-ThemeTitleBarWidget = Type("ThemeTitleBarWidget", "H")
-ThemeArrowOrientation = Type("ThemeArrowOrientation", "H")
-ThemePopupArrowSize = Type("ThemePopupArrowSize", "H")
-ThemeGrowDirection = Type("ThemeGrowDirection", "H")
-ThemeSoundKind = OSTypeType("ThemeSoundKind")
-ThemeDragSoundKind = OSTypeType("ThemeDragSoundKind")
-ThemeBackgroundKind = Type("ThemeBackgroundKind", "l")
-ThemeMetric = Type("ThemeMetric", "l")
-RGBColor = OpaqueType("RGBColor", "QdRGB")
-TruncCode = Type("TruncCode", "h")
-
-
-ThemeButtonKind = UInt16
-ThemeButtonDrawInfo_ptr = OpaqueType("ThemeButtonDrawInfo", "ThemeButtonDrawInfo")
-ThemeEraseUPP = FakeType("NULL")
-ThemeButtonDrawUPP = FakeType("NULL")
-
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-
-int ThemeButtonDrawInfo_Convert(PyObject *v, ThemeButtonDrawInfo *p_itself)
-{
-        return PyArg_Parse(v, "(iHH)", &p_itself->state, &p_itself->value, &p_itself->adornment);
-}
-
-"""
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    pass
-##      def outputCheckNewArg(self):
-##              Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-##      def outputCheckConvertArg(self):
-##              OutLbrace("if (DlgObj_Check(v))")
-##              Output("*p_itself = ((WindowObject *)v)->ob_itself;")
-##              Output("return 1;")
-##              OutRbrace()
-##              Out("""
-##              if (v == Py_None) { *p_itself = NULL; return 1; }
-##              if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }
-##              """)
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-module.addobject(object)
-
-ThemeDrawingState = OpaqueByValueType("ThemeDrawingState", "ThemeDrawingStateObj")
-Method = WeakLinkMethodGenerator
-
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-##Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/autoGIL.c b/Mac/Modules/autoGIL.c
deleted file mode 100644 (file)
index 3108816..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-#include "Python.h"
-#include <CoreFoundation/CFRunLoop.h>
-
-/* These macros are defined in Python 2.3 but not 2.2 */
-#ifndef PyMODINIT_FUNC
-#define PyMODINIT_FUNC void
-#endif
-#ifndef PyDoc_STRVAR
-#define PyDoc_STRVAR(Var,Str) static char Var[] = Str
-#endif
-
-
-#undef AUTOGIL_DEBUG
-
-static PyObject *AutoGILError;
-
-
-static void autoGILCallback(CFRunLoopObserverRef observer,
-                           CFRunLoopActivity activity,
-                           void *info) {
-       PyThreadState **p_tstate = (PyThreadState **)info;
-
-       switch (activity) {
-       case kCFRunLoopBeforeWaiting:
-               /* going to sleep, release GIL */
-#ifdef AUTOGIL_DEBUG
-               fprintf(stderr, "going to sleep, release GIL\n");
-#endif
-               *p_tstate = PyEval_SaveThread();
-               break;
-       case kCFRunLoopAfterWaiting:
-               /* waking up, acquire GIL */
-#ifdef AUTOGIL_DEBUG
-               fprintf(stderr, "waking up, acquire GIL\n");
-#endif
-               PyEval_RestoreThread(*p_tstate);
-               *p_tstate = NULL;
-               break;
-       default:
-               break;
-       }
-}
-
-static void infoRelease(const void *info) {
-       /* XXX This should get called when the run loop is deallocated,
-          but this doesn't seem to happen. So for now: leak. */
-       PyMem_Free((void *)info);
-}
-
-static PyObject *
-autoGIL_installAutoGIL(PyObject *self)
-{
-       PyObject *tstate_dict = PyThreadState_GetDict();
-       PyObject *v;
-       CFRunLoopRef rl;
-       PyThreadState **p_tstate;  /* for use in the info field */
-       CFRunLoopObserverContext context = {0, NULL, NULL, NULL, NULL};
-       CFRunLoopObserverRef observer;
-
-       if (tstate_dict == NULL)
-               return NULL;
-       v = PyDict_GetItemString(tstate_dict, "autoGIL.InstalledAutoGIL");
-       if (v != NULL) {
-               /* we've already installed a callback for this thread */
-               Py_INCREF(Py_None);
-               return Py_None;
-       }
-
-       rl = CFRunLoopGetCurrent();
-       if (rl == NULL) {
-               PyErr_SetString(AutoGILError,
-                               "can't get run loop for current thread");
-               return NULL;
-       }
-
-       p_tstate = PyMem_Malloc(sizeof(PyThreadState *));
-       if (p_tstate == NULL) {
-               PyErr_SetString(PyExc_MemoryError,
-                               "not enough memory to allocate "
-                               "tstate pointer");
-               return NULL;
-       }
-       *p_tstate = NULL;
-       context.info = (void *)p_tstate;
-       context.release = infoRelease;
-
-       observer = CFRunLoopObserverCreate(
-               NULL,
-               kCFRunLoopBeforeWaiting | kCFRunLoopAfterWaiting,
-               1, 0, autoGILCallback, &context);
-       if (observer == NULL) {
-               PyErr_SetString(AutoGILError,
-                               "can't create event loop observer");
-               return NULL;
-       }
-       CFRunLoopAddObserver(rl, observer, kCFRunLoopDefaultMode);
-       /* XXX how to check for errors? */
-
-       /* register that we have installed a callback for this thread */
-       if (PyDict_SetItemString(tstate_dict, "autoGIL.InstalledAutoGIL",
-                                Py_None) < 0)
-               return NULL;
-
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-PyDoc_STRVAR(autoGIL_installAutoGIL_doc,
-"installAutoGIL() -> None\n\
-Install an observer callback in the event loop (CFRunLoop) for the\n\
-current thread, that will lock and unlock the Global Interpreter Lock\n\
-(GIL) at appropriate times, allowing other Python threads to run while\n\
-the event loop is idle."
-);
-
-static PyMethodDef autoGIL_methods[] = {
-       {
-               "installAutoGIL",
-               (PyCFunction)autoGIL_installAutoGIL,
-               METH_NOARGS,
-               autoGIL_installAutoGIL_doc
-       },
-       { 0, 0, 0, 0 } /* sentinel */
-};
-
-PyDoc_STRVAR(autoGIL_docs,
-"The autoGIL module provides a function (installAutoGIL) that\n\
-automatically locks and unlocks Python's Global Interpreter Lock\n\
-when running an event loop."
-);
-
-PyMODINIT_FUNC
-initautoGIL(void)
-{
-       PyObject *mod;
-
-       mod = Py_InitModule4("autoGIL", autoGIL_methods, autoGIL_docs,
-                            NULL, PYTHON_API_VERSION);
-       if (mod == NULL)
-               return;
-       AutoGILError = PyErr_NewException("autoGIL.AutoGILError",
-                                         PyExc_Exception, NULL);
-       if (AutoGILError == NULL)
-               return;
-       Py_INCREF(AutoGILError);
-       if (PyModule_AddObject(mod, "AutoGILError",
-                              AutoGILError) < 0)
-               return;
-}
diff --git a/Mac/Modules/carbonevt/CarbonEvtscan.py b/Mac/Modules/carbonevt/CarbonEvtscan.py
deleted file mode 100644 (file)
index 9b5f023..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-# IBCarbonscan.py
-
-import sys
-import MacOS
-import sys
-
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner, Scanner_OSX
-
-def main():
-    print("---Scanning CarbonEvents.h---")
-    input = ["CarbonEvents.h"]
-    output = "CarbonEventsgen.py"
-    defsoutput = TOOLBOXDIR + "CarbonEvents.py"
-    scanner = CarbonEvents_Scanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("--done scanning, importing--")
-    import CarbonEvtsupport
-    print("done")
-
-RefObjectTypes = ["EventRef",
-                                "EventQueueRef",
-                                "EventLoopRef",
-                                "EventLoopTimerRef",
-                                "EventHandlerRef",
-                                "EventHandlerCallRef",
-                                "EventTargetRef",
-                                "EventHotKeyRef",
-                                ]
-
-class CarbonEvents_Scanner(Scanner_OSX):
-    def destination(self, type, name, arglist):
-        classname = "CarbonEventsFunction"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in RefObjectTypes and m == "InMode":
-                if t == "EventHandlerRef":
-                    classname = "EventHandlerRefMethod"
-                else:
-                    classname = "CarbonEventsMethod"
-                listname = t + "methods"
-            #else:
-            #       print "not method"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("false = 0\n")
-        self.defsfile.write("true = 1\n")
-        self.defsfile.write("keyAEEventClass = FOUR_CHAR_CODE('evcl')\n")
-        self.defsfile.write("keyAEEventID = FOUR_CHAR_CODE('evti')\n")
-
-    def makeblacklistnames(self):
-        return [
-                "sHandler",
-                "MacCreateEvent",
-#                       "TrackMouseLocationWithOptions",
-#                       "TrackMouseLocation",
-#                       "TrackMouseRegion",
-                "RegisterToolboxObjectClass",
-                "UnregisterToolboxObjectClass",
-                "ProcessHICommand",
-                "GetCFRunLoopFromEventLoop",
-
-                "InvokeEventHandlerUPP",
-                "InvokeEventComparatorUPP",
-                "InvokeEventLoopTimerUPP",
-                "NewEventComparatorUPP",
-                "NewEventLoopTimerUPP",
-                "NewEventHandlerUPP",
-                "DisposeEventComparatorUPP",
-                "DisposeEventLoopTimerUPP",
-                "DisposeEventHandlerUPP",
-
-                # Wrote by hand
-                "InstallEventHandler",
-                "RemoveEventHandler",
-
-                # Write by hand?
-                "GetEventParameter",
-                "FlushSpecificEventsFromQueue",
-                "FindSpecificEventInQueue",
-                "InstallEventLoopTimer",
-
-                # Don't do these because they require a CFRelease
-                "CreateTypeStringWithOSType",
-                "CopyEvent",
-                ]
-
-#       def makeblacklisttypes(self):
-#               return ["EventComparatorUPP",
-#                               "EventLoopTimerUPP",
-#                               #"EventHandlerUPP",
-#                               "EventComparatorProcPtr",
-#                               "EventLoopTimerProcPtr",
-#                               "EventHandlerProcPtr",
-#                               ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("UInt32", 'inSize', "InMode"), ("void_ptr", 'inDataPtr', "InMode")],
-                 [("MyInBuffer", 'inDataPtr', "InMode")]),
-                ([("Boolean", 'ioWasInRgn', "OutMode")],
-                 [("Boolean", 'ioWasInRgn', "InOutMode")]),
-        ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/carbonevt/CarbonEvtsupport.py b/Mac/Modules/carbonevt/CarbonEvtsupport.py
deleted file mode 100644 (file)
index 2adc8cb..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-# IBCarbonsupport.py
-
-from macsupport import *
-
-from CarbonEvtscan import RefObjectTypes
-
-# where should this go? macsupport.py?
-CFStringRef = OpaqueByValueType('CFStringRef')
-
-for typ in RefObjectTypes:
-    execstr = "%(name)s = OpaqueByValueType('%(name)s')" % {"name": typ}
-    exec execstr
-
-
-if 0:
-    # these types will have no methods and will merely be opaque blobs
-    # should write getattr and setattr for them?
-
-    StructObjectTypes = ["EventTypeSpec",
-                                            "HIPoint",
-                                            "HICommand",
-                                            "EventHotKeyID",
-                                            ]
-
-    for typ in StructObjectTypes:
-        execstr = "%(name)s = OpaqueType('%(name)s')" % {"name": typ}
-        exec execstr
-
-EventHotKeyID = OpaqueByValueType("EventHotKeyID", "EventHotKeyID")
-EventTypeSpec_ptr = OpaqueType("EventTypeSpec", "EventTypeSpec")
-
-# is this the right type for the void * in GetEventParameter
-#void_ptr = FixedInputBufferType(1024)
-void_ptr = stringptr
-# here are some types that are really other types
-
-class MyVarInputBufferType(VarInputBufferType):
-    def passInput(self, name):
-        return "%s__len__, %s__in__" % (name, name)
-
-MyInBuffer = MyVarInputBufferType('char', 'long', 'l')          # (buf, len)
-
-EventTime = double
-EventTimeout = EventTime
-EventTimerInterval = EventTime
-EventAttributes = UInt32
-EventParamName = OSType
-EventParamType = OSType
-EventPriority = SInt16
-EventMask = UInt16
-
-EventComparatorUPP = FakeType("(EventComparatorUPP)0")
-EventLoopTimerUPP = FakeType("(EventLoopTimerUPP)0")
-EventHandlerUPP = FakeType("(EventHandlerUPP)0")
-EventHandlerUPP = FakeType("(EventHandlerUPP)0")
-EventComparatorProcPtr = FakeType("(EventComparatorProcPtr)0")
-EventLoopTimerProcPtr = FakeType("(EventLoopTimerProcPtr)0")
-EventHandlerProcPtr = FakeType("(EventHandlerProcPtr)0")
-
-CarbonEventsFunction = OSErrFunctionGenerator
-CarbonEventsMethod = OSErrMethodGenerator
-
-class EventHandlerRefMethod(OSErrMethodGenerator):
-    def precheck(self):
-        OutLbrace('if (_self->ob_itself == NULL)')
-        Output('PyErr_SetString(CarbonEvents_Error, "Handler has been removed");')
-        Output('return NULL;')
-        OutRbrace()
-
-
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
-MouseTrackingResult = UInt16
-
-
-includestuff = includestuff + r"""
-#include <Carbon/Carbon.h>
-
-extern int CFStringRef_New(CFStringRef *);
-
-extern int CFStringRef_Convert(PyObject *, CFStringRef *);
-extern int CFBundleRef_Convert(PyObject *, CFBundleRef *);
-
-int EventTargetRef_Convert(PyObject *, EventTargetRef *);
-PyObject *EventHandlerCallRef_New(EventHandlerCallRef itself);
-PyObject *EventRef_New(EventRef itself);
-
-/********** EventTypeSpec *******/
-static PyObject*
-EventTypeSpec_New(EventTypeSpec *in)
-{
-        return Py_BuildValue("ll", in->eventClass, in->eventKind);
-}
-
-static int
-EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out)
-{
-        if (PyArg_Parse(v, "(O&l)",
-                        PyMac_GetOSType, &(out->eventClass),
-                        &(out->eventKind)))
-                return 1;
-        return NULL;
-}
-
-/********** end EventTypeSpec *******/
-
-/********** HIPoint *******/
-
-#if 0  /* XXX doesn't compile */
-static PyObject*
-HIPoint_New(HIPoint *in)
-{
-        return Py_BuildValue("ff", in->x, in->y);
-}
-
-static int
-HIPoint_Convert(PyObject *v, HIPoint *out)
-{
-        if (PyArg_ParseTuple(v, "ff", &(out->x), &(out->y)))
-                return 1;
-        return NULL;
-}
-#endif
-
-/********** end HIPoint *******/
-
-/********** EventHotKeyID *******/
-
-static PyObject*
-EventHotKeyID_New(EventHotKeyID *in)
-{
-        return Py_BuildValue("ll", in->signature, in->id);
-}
-
-static int
-EventHotKeyID_Convert(PyObject *v, EventHotKeyID *out)
-{
-        if (PyArg_ParseTuple(v, "ll", &out->signature, &out->id))
-                return 1;
-        return NULL;
-}
-
-/********** end EventHotKeyID *******/
-
-/******** myEventHandler ***********/
-
-static EventHandlerUPP myEventHandlerUPP;
-
-static pascal OSStatus
-myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) {
-        PyObject *retValue;
-        int status;
-
-        retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&",
-                                         EventHandlerCallRef_New, handlerRef,
-                                         EventRef_New, event);
-        if (retValue == NULL) {
-                PySys_WriteStderr("Error in event handler callback:\n");
-                PyErr_Print();  /* this also clears the error */
-                status = noErr; /* complain? how? */
-        } else {
-                if (retValue == Py_None)
-                        status = noErr;
-                else if (PyInt_Check(retValue)) {
-                        status = PyInt_AsLong(retValue);
-                } else
-                        status = noErr; /* wrong object type, complain? */
-                Py_DECREF(retValue);
-        }
-
-        return status;
-}
-
-/******** end myEventHandler ***********/
-
-"""
-
-initstuff = initstuff + """
-myEventHandlerUPP = NewEventHandlerUPP(myEventHandler);
-"""
-module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, initstuff)
-
-
-
-
-class EventHandlerRefObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputStructMembers(self):
-        Output("%s ob_itself;", self.itselftype)
-        Output("PyObject *ob_callback;")
-    def outputInitStructMembers(self):
-        Output("it->ob_itself = %sitself;", self.argref)
-        Output("it->ob_callback = NULL;")
-    def outputFreeIt(self, name):
-        OutLbrace("if (self->ob_itself != NULL)")
-        Output("RemoveEventHandler(self->ob_itself);")
-        Output("Py_DECREF(self->ob_callback);")
-        OutRbrace()
-
-class MyGlobalObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    pass
-
-for typ in RefObjectTypes:
-    if typ == 'EventHandlerRef':
-        EventHandlerRefobject = EventHandlerRefObjectDefinition('EventHandlerRef')
-    else:
-        execstr = typ + 'object = MyGlobalObjectDefinition(typ)'
-        exec execstr
-    module.addobject(eval(typ + 'object'))
-
-
-functions = []
-for typ in RefObjectTypes: ## go thru all ObjectTypes as defined in CarbonEventsscan.py
-    # initialize the lists for carbongen to fill
-    execstr = typ + 'methods = []'
-    exec execstr
-
-exec(open('CarbonEventsgen.py').read())
-
-
-
-for f in functions: module.add(f)       # add all the functions carboneventsgen put in the list
-
-for typ in RefObjectTypes:                               ## go thru all ObjectTypes as defined in CarbonEventsscan.py
-    methods = eval(typ + 'methods')  ## get a reference to the method list from the main namespace
-    obj = eval(typ + 'object')                ## get a reference to the object
-    for m in methods: obj.add(m)    ## add each method in the list to the object
-
-
-removeeventhandler = """
-OSStatus _err;
-if (_self->ob_itself == NULL) {
-        PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
-        return NULL;
-}
-if (!PyArg_ParseTuple(_args, ""))
-        return NULL;
-_err = RemoveEventHandler(_self->ob_itself);
-if (_err != noErr) return PyMac_Error(_err);
-_self->ob_itself = NULL;
-Py_DECREF(_self->ob_callback);
-_self->ob_callback = NULL;
-Py_INCREF(Py_None);
-_res = Py_None;
-return _res;"""
-
-f = ManualGenerator("RemoveEventHandler", removeeventhandler);
-f.docstring = lambda: "() -> None"
-EventHandlerRefobject.add(f)
-
-
-installeventhandler = """
-EventTypeSpec inSpec;
-PyObject *callback;
-EventHandlerRef outRef;
-OSStatus _err;
-
-if (!PyArg_ParseTuple(_args, "O&O", EventTypeSpec_Convert, &inSpec, &callback))
-        return NULL;
-
-_err = InstallEventHandler(_self->ob_itself, myEventHandlerUPP, 1, &inSpec, (void *)callback, &outRef);
-if (_err != noErr) return PyMac_Error(_err);
-
-_res = EventHandlerRef_New(outRef);
-if (_res != NULL) {
-        ((EventHandlerRefObject*)_res)->ob_callback = callback;
-        Py_INCREF(callback);
-}
-return _res;"""
-
-f = ManualGenerator("InstallEventHandler", installeventhandler);
-f.docstring = lambda: "(EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)"
-EventTargetRefobject.add(f)
-
-# This may not be the best, but at least it lets you get the raw data back into python as a string. You'll have to cut it up yourself and parse the result.
-
-geteventparameter = """
-UInt32 bufferSize;
-EventParamName inName;
-EventParamType inType;
-OSErr _err;
-void * buffer;
-
-if (!PyArg_ParseTuple(_args, "O&O&", PyMac_GetOSType, &inName, PyMac_GetOSType, &inType))
-      return NULL;
-
-/* Figure out the size by passing a null buffer to GetEventParameter */
-_err = GetEventParameter(_self->ob_itself, inName, inType, NULL, 0, &bufferSize, NULL);
-
-if (_err != noErr)
-      return PyMac_Error(_err);
-buffer = PyMem_NEW(char, bufferSize);
-if (buffer == NULL)
-      return PyErr_NoMemory();
-
-_err = GetEventParameter(_self->ob_itself, inName, inType, NULL, bufferSize, NULL, buffer);
-
-if (_err != noErr) {
-      PyMem_DEL(buffer);
-      return PyMac_Error(_err);
-}
-_res = Py_BuildValue("s#", buffer, bufferSize);
-PyMem_DEL(buffer);
-return _res;
-"""
-
-f = ManualGenerator("GetEventParameter", geteventparameter);
-f.docstring = lambda: "(EventParamName eventName, EventParamType eventType) -> (String eventParamData)"
-EventRefobject.add(f)
-
-SetOutputFileName('_CarbonEvtmodule.c')
-module.generate()
-
-##import os
-##os.system("python setup.py build")
diff --git a/Mac/Modules/carbonevt/_CarbonEvtmodule.c b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
deleted file mode 100755 (executable)
index df7284b..0000000
+++ /dev/null
@@ -1,2214 +0,0 @@
-
-/* ======================= Module _CarbonEvt ======================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-extern int CFStringRef_New(CFStringRef *);
-
-extern int CFStringRef_Convert(PyObject *, CFStringRef *);
-extern int CFBundleRef_Convert(PyObject *, CFBundleRef *);
-
-int EventTargetRef_Convert(PyObject *, EventTargetRef *);
-PyObject *EventHandlerCallRef_New(EventHandlerCallRef itself);
-PyObject *EventRef_New(EventRef itself);
-
-/********** EventTypeSpec *******/
-static PyObject*
-EventTypeSpec_New(EventTypeSpec *in)
-{
-        return Py_BuildValue("ll", in->eventClass, in->eventKind);
-}
-
-static int
-EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out)
-{
-        if (PyArg_Parse(v, "(O&l)",
-                        PyMac_GetOSType, &(out->eventClass),
-                        &(out->eventKind)))
-                return 1;
-        return 0;
-}
-
-/********** end EventTypeSpec *******/
-
-/********** HIPoint *******/
-
-#if 0  /* XXX doesn't compile */
-static PyObject*
-HIPoint_New(HIPoint *in)
-{
-        return Py_BuildValue("ff", in->x, in->y);
-}
-
-static int
-HIPoint_Convert(PyObject *v, HIPoint *out)
-{
-        if (PyArg_ParseTuple(v, "ff", &(out->x), &(out->y)))
-                return 1;
-        return NULL;
-}
-#endif
-
-/********** end HIPoint *******/
-
-/********** EventHotKeyID *******/
-
-static PyObject*
-EventHotKeyID_New(EventHotKeyID *in)
-{
-        return Py_BuildValue("ll", in->signature, in->id);
-}
-
-static int
-EventHotKeyID_Convert(PyObject *v, EventHotKeyID *out)
-{
-        if (PyArg_ParseTuple(v, "ll", &out->signature, &out->id))
-                return 1;
-        return 0;
-}
-
-/********** end EventHotKeyID *******/
-
-/******** myEventHandler ***********/
-
-static EventHandlerUPP myEventHandlerUPP;
-
-static pascal OSStatus
-myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) {
-        PyObject *retValue;
-        int status;
-
-        retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&",
-                                         EventHandlerCallRef_New, handlerRef,
-                                         EventRef_New, event);
-        if (retValue == NULL) {
-                PySys_WriteStderr("Error in event handler callback:\n");
-                PyErr_Print();  /* this also clears the error */
-                status = noErr; /* complain? how? */
-        } else {
-                if (retValue == Py_None)
-                        status = noErr;
-                else if (PyLong_Check(retValue)) {
-                        status = PyLong_AsLong(retValue);
-                } else
-                        status = noErr; /* wrong object type, complain? */
-                Py_DECREF(retValue);
-        }
-
-        return status;
-}
-
-/******** end myEventHandler ***********/
-
-
-static PyObject *CarbonEvents_Error;
-
-/* ---------------------- Object type EventRef ---------------------- */
-
-PyTypeObject EventRef_Type;
-
-#define EventRef_Check(x) ((x)->ob_type == &EventRef_Type || PyObject_TypeCheck((x), &EventRef_Type))
-
-typedef struct EventRefObject {
-       PyObject_HEAD
-       EventRef ob_itself;
-} EventRefObject;
-
-PyObject *EventRef_New(EventRef itself)
-{
-       EventRefObject *it;
-       it = PyObject_NEW(EventRefObject, &EventRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int EventRef_Convert(PyObject *v, EventRef *p_itself)
-{
-       if (!EventRef_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "EventRef required");
-               return 0;
-       }
-       *p_itself = ((EventRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void EventRef_dealloc(EventRefObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *EventRef_RetainEvent(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = RetainEvent(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            EventRef_New, _rv);
-       return _res;
-}
-
-static PyObject *EventRef_GetEventRetainCount(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetEventRetainCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *EventRef_ReleaseEvent(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ReleaseEvent(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventRef_SetEventParameter(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType inName;
-       OSType inType;
-       char *inDataPtr__in__;
-       long inDataPtr__len__;
-       int inDataPtr__in_len__;
-       if (!PyArg_ParseTuple(_args, "O&O&s#",
-                             PyMac_GetOSType, &inName,
-                             PyMac_GetOSType, &inType,
-                             &inDataPtr__in__, &inDataPtr__in_len__))
-               return NULL;
-       inDataPtr__len__ = inDataPtr__in_len__;
-       _err = SetEventParameter(_self->ob_itself,
-                                inName,
-                                inType,
-                                inDataPtr__len__, inDataPtr__in__);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventRef_GetEventClass(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetEventClass(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *EventRef_GetEventKind(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetEventKind(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *EventRef_GetEventTime(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       double _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetEventTime(_self->ob_itself);
-       _res = Py_BuildValue("d",
-                            _rv);
-       return _res;
-}
-
-static PyObject *EventRef_SetEventTime(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       double inTime;
-       if (!PyArg_ParseTuple(_args, "d",
-                             &inTime))
-               return NULL;
-       _err = SetEventTime(_self->ob_itself,
-                           inTime);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventRef_IsUserCancelEventRef(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsUserCancelEventRef(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *EventRef_ConvertEventRefToEventRecord(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord outEvent;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = ConvertEventRefToEventRecord(_self->ob_itself,
-                                          &outEvent);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildEventRecord, &outEvent);
-       return _res;
-}
-
-static PyObject *EventRef_IsEventInMask(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       UInt16 inMask;
-       if (!PyArg_ParseTuple(_args, "H",
-                             &inMask))
-               return NULL;
-       _rv = IsEventInMask(_self->ob_itself,
-                           inMask);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *EventRef_SendEventToEventTarget(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       EventTargetRef inTarget;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             EventTargetRef_Convert, &inTarget))
-               return NULL;
-       _err = SendEventToEventTarget(_self->ob_itself,
-                                     inTarget);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventRef_GetEventParameter(EventRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       UInt32 bufferSize;
-       EventParamName inName;
-       EventParamType inType;
-       OSErr _err;
-       void * buffer;
-
-       if (!PyArg_ParseTuple(_args, "O&O&", PyMac_GetOSType, &inName, PyMac_GetOSType, &inType))
-             return NULL;
-
-       /* Figure out the size by passing a null buffer to GetEventParameter */
-       _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, 0, &bufferSize, NULL);
-
-       if (_err != noErr)
-             return PyMac_Error(_err);
-       buffer = PyMem_NEW(char, bufferSize);
-       if (buffer == NULL)
-             return PyErr_NoMemory();
-
-       _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, bufferSize, NULL, buffer);
-
-       if (_err != noErr) {
-             PyMem_DEL(buffer);
-             return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("s#", buffer, bufferSize);
-       PyMem_DEL(buffer);
-       return _res;
-
-}
-
-static PyMethodDef EventRef_methods[] = {
-       {"RetainEvent", (PyCFunction)EventRef_RetainEvent, 1,
-        PyDoc_STR("() -> (EventRef _rv)")},
-       {"GetEventRetainCount", (PyCFunction)EventRef_GetEventRetainCount, 1,
-        PyDoc_STR("() -> (UInt32 _rv)")},
-       {"ReleaseEvent", (PyCFunction)EventRef_ReleaseEvent, 1,
-        PyDoc_STR("() -> None")},
-       {"SetEventParameter", (PyCFunction)EventRef_SetEventParameter, 1,
-        PyDoc_STR("(OSType inName, OSType inType, Buffer inDataPtr) -> None")},
-       {"GetEventClass", (PyCFunction)EventRef_GetEventClass, 1,
-        PyDoc_STR("() -> (UInt32 _rv)")},
-       {"GetEventKind", (PyCFunction)EventRef_GetEventKind, 1,
-        PyDoc_STR("() -> (UInt32 _rv)")},
-       {"GetEventTime", (PyCFunction)EventRef_GetEventTime, 1,
-        PyDoc_STR("() -> (double _rv)")},
-       {"SetEventTime", (PyCFunction)EventRef_SetEventTime, 1,
-        PyDoc_STR("(double inTime) -> None")},
-       {"IsUserCancelEventRef", (PyCFunction)EventRef_IsUserCancelEventRef, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"ConvertEventRefToEventRecord", (PyCFunction)EventRef_ConvertEventRefToEventRecord, 1,
-        PyDoc_STR("() -> (Boolean _rv, EventRecord outEvent)")},
-       {"IsEventInMask", (PyCFunction)EventRef_IsEventInMask, 1,
-        PyDoc_STR("(UInt16 inMask) -> (Boolean _rv)")},
-       {"SendEventToEventTarget", (PyCFunction)EventRef_SendEventToEventTarget, 1,
-        PyDoc_STR("(EventTargetRef inTarget) -> None")},
-       {"GetEventParameter", (PyCFunction)EventRef_GetEventParameter, 1,
-        PyDoc_STR("(EventParamName eventName, EventParamType eventType) -> (String eventParamData)")},
-       {NULL, NULL, 0}
-};
-
-#define EventRef_getsetlist NULL
-
-
-#define EventRef_compare NULL
-
-#define EventRef_repr NULL
-
-#define EventRef_hash NULL
-#define EventRef_tp_init 0
-
-#define EventRef_tp_alloc PyType_GenericAlloc
-
-static PyObject *EventRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       EventRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventRef_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((EventRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define EventRef_tp_free PyObject_Del
-
-
-PyTypeObject EventRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CarbonEvt.EventRef", /*tp_name*/
-       sizeof(EventRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) EventRef_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) EventRef_compare, /*tp_compare*/
-       (reprfunc) EventRef_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) EventRef_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       EventRef_methods, /* tp_methods */
-       0, /*tp_members*/
-       EventRef_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       EventRef_tp_init, /* tp_init */
-       EventRef_tp_alloc, /* tp_alloc */
-       EventRef_tp_new, /* tp_new */
-       EventRef_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type EventRef -------------------- */
-
-
-/* ------------------- Object type EventQueueRef -------------------- */
-
-PyTypeObject EventQueueRef_Type;
-
-#define EventQueueRef_Check(x) ((x)->ob_type == &EventQueueRef_Type || PyObject_TypeCheck((x), &EventQueueRef_Type))
-
-typedef struct EventQueueRefObject {
-       PyObject_HEAD
-       EventQueueRef ob_itself;
-} EventQueueRefObject;
-
-PyObject *EventQueueRef_New(EventQueueRef itself)
-{
-       EventQueueRefObject *it;
-       it = PyObject_NEW(EventQueueRefObject, &EventQueueRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int EventQueueRef_Convert(PyObject *v, EventQueueRef *p_itself)
-{
-       if (!EventQueueRef_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "EventQueueRef required");
-               return 0;
-       }
-       *p_itself = ((EventQueueRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void EventQueueRef_dealloc(EventQueueRefObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *EventQueueRef_PostEventToQueue(EventQueueRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       EventRef inEvent;
-       SInt16 inPriority;
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             EventRef_Convert, &inEvent,
-                             &inPriority))
-               return NULL;
-       _err = PostEventToQueue(_self->ob_itself,
-                               inEvent,
-                               inPriority);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventQueueRef_FlushEventsMatchingListFromQueue(EventQueueRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 inNumTypes;
-       EventTypeSpec inList;
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &inNumTypes,
-                             EventTypeSpec_Convert, &inList))
-               return NULL;
-       _err = FlushEventsMatchingListFromQueue(_self->ob_itself,
-                                               inNumTypes,
-                                               &inList);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventQueueRef_FlushEventQueue(EventQueueRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FlushEventQueue(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventQueueRef_GetNumEventsInQueue(EventQueueRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetNumEventsInQueue(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *EventQueueRef_RemoveEventFromQueue(EventQueueRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       EventRef inEvent;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             EventRef_Convert, &inEvent))
-               return NULL;
-       _err = RemoveEventFromQueue(_self->ob_itself,
-                                   inEvent);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventQueueRef_IsEventInQueue(EventQueueRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRef inEvent;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             EventRef_Convert, &inEvent))
-               return NULL;
-       _rv = IsEventInQueue(_self->ob_itself,
-                            inEvent);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyMethodDef EventQueueRef_methods[] = {
-       {"PostEventToQueue", (PyCFunction)EventQueueRef_PostEventToQueue, 1,
-        PyDoc_STR("(EventRef inEvent, SInt16 inPriority) -> None")},
-       {"FlushEventsMatchingListFromQueue", (PyCFunction)EventQueueRef_FlushEventsMatchingListFromQueue, 1,
-        PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList) -> None")},
-       {"FlushEventQueue", (PyCFunction)EventQueueRef_FlushEventQueue, 1,
-        PyDoc_STR("() -> None")},
-       {"GetNumEventsInQueue", (PyCFunction)EventQueueRef_GetNumEventsInQueue, 1,
-        PyDoc_STR("() -> (UInt32 _rv)")},
-       {"RemoveEventFromQueue", (PyCFunction)EventQueueRef_RemoveEventFromQueue, 1,
-        PyDoc_STR("(EventRef inEvent) -> None")},
-       {"IsEventInQueue", (PyCFunction)EventQueueRef_IsEventInQueue, 1,
-        PyDoc_STR("(EventRef inEvent) -> (Boolean _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define EventQueueRef_getsetlist NULL
-
-
-#define EventQueueRef_compare NULL
-
-#define EventQueueRef_repr NULL
-
-#define EventQueueRef_hash NULL
-#define EventQueueRef_tp_init 0
-
-#define EventQueueRef_tp_alloc PyType_GenericAlloc
-
-static PyObject *EventQueueRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       EventQueueRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventQueueRef_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((EventQueueRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define EventQueueRef_tp_free PyObject_Del
-
-
-PyTypeObject EventQueueRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CarbonEvt.EventQueueRef", /*tp_name*/
-       sizeof(EventQueueRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) EventQueueRef_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) EventQueueRef_compare, /*tp_compare*/
-       (reprfunc) EventQueueRef_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) EventQueueRef_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       EventQueueRef_methods, /* tp_methods */
-       0, /*tp_members*/
-       EventQueueRef_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       EventQueueRef_tp_init, /* tp_init */
-       EventQueueRef_tp_alloc, /* tp_alloc */
-       EventQueueRef_tp_new, /* tp_new */
-       EventQueueRef_tp_free, /* tp_free */
-};
-
-/* ----------------- End object type EventQueueRef ------------------ */
-
-
-/* -------------------- Object type EventLoopRef -------------------- */
-
-PyTypeObject EventLoopRef_Type;
-
-#define EventLoopRef_Check(x) ((x)->ob_type == &EventLoopRef_Type || PyObject_TypeCheck((x), &EventLoopRef_Type))
-
-typedef struct EventLoopRefObject {
-       PyObject_HEAD
-       EventLoopRef ob_itself;
-} EventLoopRefObject;
-
-PyObject *EventLoopRef_New(EventLoopRef itself)
-{
-       EventLoopRefObject *it;
-       it = PyObject_NEW(EventLoopRefObject, &EventLoopRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int EventLoopRef_Convert(PyObject *v, EventLoopRef *p_itself)
-{
-       if (!EventLoopRef_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "EventLoopRef required");
-               return 0;
-       }
-       *p_itself = ((EventLoopRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void EventLoopRef_dealloc(EventLoopRefObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *EventLoopRef_QuitEventLoop(EventLoopRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = QuitEventLoop(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef EventLoopRef_methods[] = {
-       {"QuitEventLoop", (PyCFunction)EventLoopRef_QuitEventLoop, 1,
-        PyDoc_STR("() -> None")},
-       {NULL, NULL, 0}
-};
-
-#define EventLoopRef_getsetlist NULL
-
-
-#define EventLoopRef_compare NULL
-
-#define EventLoopRef_repr NULL
-
-#define EventLoopRef_hash NULL
-#define EventLoopRef_tp_init 0
-
-#define EventLoopRef_tp_alloc PyType_GenericAlloc
-
-static PyObject *EventLoopRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       EventLoopRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventLoopRef_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((EventLoopRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define EventLoopRef_tp_free PyObject_Del
-
-
-PyTypeObject EventLoopRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CarbonEvt.EventLoopRef", /*tp_name*/
-       sizeof(EventLoopRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) EventLoopRef_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) EventLoopRef_compare, /*tp_compare*/
-       (reprfunc) EventLoopRef_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) EventLoopRef_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       EventLoopRef_methods, /* tp_methods */
-       0, /*tp_members*/
-       EventLoopRef_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       EventLoopRef_tp_init, /* tp_init */
-       EventLoopRef_tp_alloc, /* tp_alloc */
-       EventLoopRef_tp_new, /* tp_new */
-       EventLoopRef_tp_free, /* tp_free */
-};
-
-/* ------------------ End object type EventLoopRef ------------------ */
-
-
-/* ----------------- Object type EventLoopTimerRef ------------------ */
-
-PyTypeObject EventLoopTimerRef_Type;
-
-#define EventLoopTimerRef_Check(x) ((x)->ob_type == &EventLoopTimerRef_Type || PyObject_TypeCheck((x), &EventLoopTimerRef_Type))
-
-typedef struct EventLoopTimerRefObject {
-       PyObject_HEAD
-       EventLoopTimerRef ob_itself;
-} EventLoopTimerRefObject;
-
-PyObject *EventLoopTimerRef_New(EventLoopTimerRef itself)
-{
-       EventLoopTimerRefObject *it;
-       it = PyObject_NEW(EventLoopTimerRefObject, &EventLoopTimerRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int EventLoopTimerRef_Convert(PyObject *v, EventLoopTimerRef *p_itself)
-{
-       if (!EventLoopTimerRef_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "EventLoopTimerRef required");
-               return 0;
-       }
-       *p_itself = ((EventLoopTimerRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void EventLoopTimerRef_dealloc(EventLoopTimerRefObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *EventLoopTimerRef_RemoveEventLoopTimer(EventLoopTimerRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = RemoveEventLoopTimer(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventLoopTimerRef_SetEventLoopTimerNextFireTime(EventLoopTimerRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       double inNextFire;
-       if (!PyArg_ParseTuple(_args, "d",
-                             &inNextFire))
-               return NULL;
-       _err = SetEventLoopTimerNextFireTime(_self->ob_itself,
-                                            inNextFire);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef EventLoopTimerRef_methods[] = {
-       {"RemoveEventLoopTimer", (PyCFunction)EventLoopTimerRef_RemoveEventLoopTimer, 1,
-        PyDoc_STR("() -> None")},
-       {"SetEventLoopTimerNextFireTime", (PyCFunction)EventLoopTimerRef_SetEventLoopTimerNextFireTime, 1,
-        PyDoc_STR("(double inNextFire) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define EventLoopTimerRef_getsetlist NULL
-
-
-#define EventLoopTimerRef_compare NULL
-
-#define EventLoopTimerRef_repr NULL
-
-#define EventLoopTimerRef_hash NULL
-#define EventLoopTimerRef_tp_init 0
-
-#define EventLoopTimerRef_tp_alloc PyType_GenericAlloc
-
-static PyObject *EventLoopTimerRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       EventLoopTimerRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventLoopTimerRef_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((EventLoopTimerRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define EventLoopTimerRef_tp_free PyObject_Del
-
-
-PyTypeObject EventLoopTimerRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CarbonEvt.EventLoopTimerRef", /*tp_name*/
-       sizeof(EventLoopTimerRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) EventLoopTimerRef_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) EventLoopTimerRef_compare, /*tp_compare*/
-       (reprfunc) EventLoopTimerRef_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) EventLoopTimerRef_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       EventLoopTimerRef_methods, /* tp_methods */
-       0, /*tp_members*/
-       EventLoopTimerRef_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       EventLoopTimerRef_tp_init, /* tp_init */
-       EventLoopTimerRef_tp_alloc, /* tp_alloc */
-       EventLoopTimerRef_tp_new, /* tp_new */
-       EventLoopTimerRef_tp_free, /* tp_free */
-};
-
-/* --------------- End object type EventLoopTimerRef ---------------- */
-
-
-/* ------------------ Object type EventHandlerRef ------------------- */
-
-PyTypeObject EventHandlerRef_Type;
-
-#define EventHandlerRef_Check(x) ((x)->ob_type == &EventHandlerRef_Type || PyObject_TypeCheck((x), &EventHandlerRef_Type))
-
-typedef struct EventHandlerRefObject {
-       PyObject_HEAD
-       EventHandlerRef ob_itself;
-       PyObject *ob_callback;
-} EventHandlerRefObject;
-
-PyObject *EventHandlerRef_New(EventHandlerRef itself)
-{
-       EventHandlerRefObject *it;
-       it = PyObject_NEW(EventHandlerRefObject, &EventHandlerRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       it->ob_callback = NULL;
-       return (PyObject *)it;
-}
-
-int EventHandlerRef_Convert(PyObject *v, EventHandlerRef *p_itself)
-{
-       if (!EventHandlerRef_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "EventHandlerRef required");
-               return 0;
-       }
-       *p_itself = ((EventHandlerRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void EventHandlerRef_dealloc(EventHandlerRefObject *self)
-{
-       if (self->ob_itself != NULL) {
-               RemoveEventHandler(self->ob_itself);
-               Py_DECREF(self->ob_callback);
-       }
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *EventHandlerRef_AddEventTypesToHandler(EventHandlerRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 inNumTypes;
-       EventTypeSpec inList;
-       if (_self->ob_itself == NULL) {
-               PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
-               return NULL;
-       }
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &inNumTypes,
-                             EventTypeSpec_Convert, &inList))
-               return NULL;
-       _err = AddEventTypesToHandler(_self->ob_itself,
-                                     inNumTypes,
-                                     &inList);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventHandlerRef_RemoveEventTypesFromHandler(EventHandlerRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 inNumTypes;
-       EventTypeSpec inList;
-       if (_self->ob_itself == NULL) {
-               PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
-               return NULL;
-       }
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &inNumTypes,
-                             EventTypeSpec_Convert, &inList))
-               return NULL;
-       _err = RemoveEventTypesFromHandler(_self->ob_itself,
-                                          inNumTypes,
-                                          &inList);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventHandlerRef_RemoveEventHandler(EventHandlerRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       OSStatus _err;
-       if (_self->ob_itself == NULL) {
-               PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
-               return NULL;
-       }
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = RemoveEventHandler(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       _self->ob_itself = NULL;
-       Py_DECREF(_self->ob_callback);
-       _self->ob_callback = NULL;
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef EventHandlerRef_methods[] = {
-       {"AddEventTypesToHandler", (PyCFunction)EventHandlerRef_AddEventTypesToHandler, 1,
-        PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList) -> None")},
-       {"RemoveEventTypesFromHandler", (PyCFunction)EventHandlerRef_RemoveEventTypesFromHandler, 1,
-        PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList) -> None")},
-       {"RemoveEventHandler", (PyCFunction)EventHandlerRef_RemoveEventHandler, 1,
-        PyDoc_STR("() -> None")},
-       {NULL, NULL, 0}
-};
-
-#define EventHandlerRef_getsetlist NULL
-
-
-#define EventHandlerRef_compare NULL
-
-#define EventHandlerRef_repr NULL
-
-#define EventHandlerRef_hash NULL
-#define EventHandlerRef_tp_init 0
-
-#define EventHandlerRef_tp_alloc PyType_GenericAlloc
-
-static PyObject *EventHandlerRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       EventHandlerRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventHandlerRef_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((EventHandlerRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define EventHandlerRef_tp_free PyObject_Del
-
-
-PyTypeObject EventHandlerRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CarbonEvt.EventHandlerRef", /*tp_name*/
-       sizeof(EventHandlerRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) EventHandlerRef_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) EventHandlerRef_compare, /*tp_compare*/
-       (reprfunc) EventHandlerRef_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) EventHandlerRef_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       EventHandlerRef_methods, /* tp_methods */
-       0, /*tp_members*/
-       EventHandlerRef_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       EventHandlerRef_tp_init, /* tp_init */
-       EventHandlerRef_tp_alloc, /* tp_alloc */
-       EventHandlerRef_tp_new, /* tp_new */
-       EventHandlerRef_tp_free, /* tp_free */
-};
-
-/* ---------------- End object type EventHandlerRef ----------------- */
-
-
-/* ---------------- Object type EventHandlerCallRef ----------------- */
-
-PyTypeObject EventHandlerCallRef_Type;
-
-#define EventHandlerCallRef_Check(x) ((x)->ob_type == &EventHandlerCallRef_Type || PyObject_TypeCheck((x), &EventHandlerCallRef_Type))
-
-typedef struct EventHandlerCallRefObject {
-       PyObject_HEAD
-       EventHandlerCallRef ob_itself;
-} EventHandlerCallRefObject;
-
-PyObject *EventHandlerCallRef_New(EventHandlerCallRef itself)
-{
-       EventHandlerCallRefObject *it;
-       it = PyObject_NEW(EventHandlerCallRefObject, &EventHandlerCallRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int EventHandlerCallRef_Convert(PyObject *v, EventHandlerCallRef *p_itself)
-{
-       if (!EventHandlerCallRef_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "EventHandlerCallRef required");
-               return 0;
-       }
-       *p_itself = ((EventHandlerCallRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void EventHandlerCallRef_dealloc(EventHandlerCallRefObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *EventHandlerCallRef_CallNextEventHandler(EventHandlerCallRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       EventRef inEvent;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             EventRef_Convert, &inEvent))
-               return NULL;
-       _err = CallNextEventHandler(_self->ob_itself,
-                                   inEvent);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef EventHandlerCallRef_methods[] = {
-       {"CallNextEventHandler", (PyCFunction)EventHandlerCallRef_CallNextEventHandler, 1,
-        PyDoc_STR("(EventRef inEvent) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define EventHandlerCallRef_getsetlist NULL
-
-
-#define EventHandlerCallRef_compare NULL
-
-#define EventHandlerCallRef_repr NULL
-
-#define EventHandlerCallRef_hash NULL
-#define EventHandlerCallRef_tp_init 0
-
-#define EventHandlerCallRef_tp_alloc PyType_GenericAlloc
-
-static PyObject *EventHandlerCallRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       EventHandlerCallRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventHandlerCallRef_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((EventHandlerCallRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define EventHandlerCallRef_tp_free PyObject_Del
-
-
-PyTypeObject EventHandlerCallRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CarbonEvt.EventHandlerCallRef", /*tp_name*/
-       sizeof(EventHandlerCallRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) EventHandlerCallRef_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) EventHandlerCallRef_compare, /*tp_compare*/
-       (reprfunc) EventHandlerCallRef_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) EventHandlerCallRef_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       EventHandlerCallRef_methods, /* tp_methods */
-       0, /*tp_members*/
-       EventHandlerCallRef_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       EventHandlerCallRef_tp_init, /* tp_init */
-       EventHandlerCallRef_tp_alloc, /* tp_alloc */
-       EventHandlerCallRef_tp_new, /* tp_new */
-       EventHandlerCallRef_tp_free, /* tp_free */
-};
-
-/* -------------- End object type EventHandlerCallRef --------------- */
-
-
-/* ------------------- Object type EventTargetRef ------------------- */
-
-PyTypeObject EventTargetRef_Type;
-
-#define EventTargetRef_Check(x) ((x)->ob_type == &EventTargetRef_Type || PyObject_TypeCheck((x), &EventTargetRef_Type))
-
-typedef struct EventTargetRefObject {
-       PyObject_HEAD
-       EventTargetRef ob_itself;
-} EventTargetRefObject;
-
-PyObject *EventTargetRef_New(EventTargetRef itself)
-{
-       EventTargetRefObject *it;
-       it = PyObject_NEW(EventTargetRefObject, &EventTargetRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int EventTargetRef_Convert(PyObject *v, EventTargetRef *p_itself)
-{
-       if (!EventTargetRef_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "EventTargetRef required");
-               return 0;
-       }
-       *p_itself = ((EventTargetRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void EventTargetRef_dealloc(EventTargetRefObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *EventTargetRef_InstallStandardEventHandler(EventTargetRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = InstallStandardEventHandler(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *EventTargetRef_InstallEventHandler(EventTargetRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       EventTypeSpec inSpec;
-       PyObject *callback;
-       EventHandlerRef outRef;
-       OSStatus _err;
-
-       if (!PyArg_ParseTuple(_args, "O&O", EventTypeSpec_Convert, &inSpec, &callback))
-               return NULL;
-
-       _err = InstallEventHandler(_self->ob_itself, myEventHandlerUPP, 1, &inSpec, (void *)callback, &outRef);
-       if (_err != noErr) return PyMac_Error(_err);
-
-       _res = EventHandlerRef_New(outRef);
-       if (_res != NULL) {
-               ((EventHandlerRefObject*)_res)->ob_callback = callback;
-               Py_INCREF(callback);
-       }
-       return _res;
-}
-
-static PyMethodDef EventTargetRef_methods[] = {
-       {"InstallStandardEventHandler", (PyCFunction)EventTargetRef_InstallStandardEventHandler, 1,
-        PyDoc_STR("() -> None")},
-       {"InstallEventHandler", (PyCFunction)EventTargetRef_InstallEventHandler, 1,
-        PyDoc_STR("(EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)")},
-       {NULL, NULL, 0}
-};
-
-#define EventTargetRef_getsetlist NULL
-
-
-#define EventTargetRef_compare NULL
-
-#define EventTargetRef_repr NULL
-
-#define EventTargetRef_hash NULL
-#define EventTargetRef_tp_init 0
-
-#define EventTargetRef_tp_alloc PyType_GenericAlloc
-
-static PyObject *EventTargetRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       EventTargetRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventTargetRef_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((EventTargetRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define EventTargetRef_tp_free PyObject_Del
-
-
-PyTypeObject EventTargetRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CarbonEvt.EventTargetRef", /*tp_name*/
-       sizeof(EventTargetRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) EventTargetRef_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) EventTargetRef_compare, /*tp_compare*/
-       (reprfunc) EventTargetRef_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) EventTargetRef_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       EventTargetRef_methods, /* tp_methods */
-       0, /*tp_members*/
-       EventTargetRef_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       EventTargetRef_tp_init, /* tp_init */
-       EventTargetRef_tp_alloc, /* tp_alloc */
-       EventTargetRef_tp_new, /* tp_new */
-       EventTargetRef_tp_free, /* tp_free */
-};
-
-/* ----------------- End object type EventTargetRef ----------------- */
-
-
-/* ------------------- Object type EventHotKeyRef ------------------- */
-
-PyTypeObject EventHotKeyRef_Type;
-
-#define EventHotKeyRef_Check(x) ((x)->ob_type == &EventHotKeyRef_Type || PyObject_TypeCheck((x), &EventHotKeyRef_Type))
-
-typedef struct EventHotKeyRefObject {
-       PyObject_HEAD
-       EventHotKeyRef ob_itself;
-} EventHotKeyRefObject;
-
-PyObject *EventHotKeyRef_New(EventHotKeyRef itself)
-{
-       EventHotKeyRefObject *it;
-       it = PyObject_NEW(EventHotKeyRefObject, &EventHotKeyRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int EventHotKeyRef_Convert(PyObject *v, EventHotKeyRef *p_itself)
-{
-       if (!EventHotKeyRef_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "EventHotKeyRef required");
-               return 0;
-       }
-       *p_itself = ((EventHotKeyRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void EventHotKeyRef_dealloc(EventHotKeyRefObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *EventHotKeyRef_UnregisterEventHotKey(EventHotKeyRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = UnregisterEventHotKey(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef EventHotKeyRef_methods[] = {
-       {"UnregisterEventHotKey", (PyCFunction)EventHotKeyRef_UnregisterEventHotKey, 1,
-        PyDoc_STR("() -> None")},
-       {NULL, NULL, 0}
-};
-
-#define EventHotKeyRef_getsetlist NULL
-
-
-#define EventHotKeyRef_compare NULL
-
-#define EventHotKeyRef_repr NULL
-
-#define EventHotKeyRef_hash NULL
-#define EventHotKeyRef_tp_init 0
-
-#define EventHotKeyRef_tp_alloc PyType_GenericAlloc
-
-static PyObject *EventHotKeyRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       EventHotKeyRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventHotKeyRef_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((EventHotKeyRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define EventHotKeyRef_tp_free PyObject_Del
-
-
-PyTypeObject EventHotKeyRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CarbonEvt.EventHotKeyRef", /*tp_name*/
-       sizeof(EventHotKeyRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) EventHotKeyRef_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) EventHotKeyRef_compare, /*tp_compare*/
-       (reprfunc) EventHotKeyRef_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) EventHotKeyRef_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       EventHotKeyRef_methods, /* tp_methods */
-       0, /*tp_members*/
-       EventHotKeyRef_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       EventHotKeyRef_tp_init, /* tp_init */
-       EventHotKeyRef_tp_alloc, /* tp_alloc */
-       EventHotKeyRef_tp_new, /* tp_new */
-       EventHotKeyRef_tp_free, /* tp_free */
-};
-
-/* ----------------- End object type EventHotKeyRef ----------------- */
-
-
-static PyObject *CarbonEvents_GetCurrentEventLoop(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventLoopRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetCurrentEventLoop();
-       _res = Py_BuildValue("O&",
-                            EventLoopRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetMainEventLoop(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventLoopRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMainEventLoop();
-       _res = Py_BuildValue("O&",
-                            EventLoopRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_RunCurrentEventLoop(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       double inTimeout;
-       if (!PyArg_ParseTuple(_args, "d",
-                             &inTimeout))
-               return NULL;
-       _err = RunCurrentEventLoop(inTimeout);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_ReceiveNextEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 inNumTypes;
-       EventTypeSpec inList;
-       double inTimeout;
-       Boolean inPullEvent;
-       EventRef outEvent;
-       if (!PyArg_ParseTuple(_args, "lO&db",
-                             &inNumTypes,
-                             EventTypeSpec_Convert, &inList,
-                             &inTimeout,
-                             &inPullEvent))
-               return NULL;
-       _err = ReceiveNextEvent(inNumTypes,
-                               &inList,
-                               inTimeout,
-                               inPullEvent,
-                               &outEvent);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            EventRef_New, outEvent);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetCurrentEventQueue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventQueueRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetCurrentEventQueue();
-       _res = Py_BuildValue("O&",
-                            EventQueueRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetMainEventQueue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventQueueRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMainEventQueue();
-       _res = Py_BuildValue("O&",
-                            EventQueueRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetCurrentEventTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       double _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetCurrentEventTime();
-       _res = Py_BuildValue("d",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_TrackMouseLocation(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       GrafPtr inPort;
-       Point outPt;
-       UInt16 outResult;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             GrafObj_Convert, &inPort))
-               return NULL;
-       _err = TrackMouseLocation(inPort,
-                                 &outPt,
-                                 &outResult);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&H",
-                            PyMac_BuildPoint, outPt,
-                            outResult);
-       return _res;
-}
-
-static PyObject *CarbonEvents_TrackMouseLocationWithOptions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       GrafPtr inPort;
-       OptionBits inOptions;
-       double inTimeout;
-       Point outPt;
-       UInt32 outModifiers;
-       UInt16 outResult;
-       if (!PyArg_ParseTuple(_args, "O&ld",
-                             GrafObj_Convert, &inPort,
-                             &inOptions,
-                             &inTimeout))
-               return NULL;
-       _err = TrackMouseLocationWithOptions(inPort,
-                                            inOptions,
-                                            inTimeout,
-                                            &outPt,
-                                            &outModifiers,
-                                            &outResult);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&lH",
-                            PyMac_BuildPoint, outPt,
-                            outModifiers,
-                            outResult);
-       return _res;
-}
-
-static PyObject *CarbonEvents_TrackMouseRegion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       GrafPtr inPort;
-       RgnHandle inRegion;
-       Boolean ioWasInRgn;
-       UInt16 outResult;
-       if (!PyArg_ParseTuple(_args, "O&O&b",
-                             GrafObj_Convert, &inPort,
-                             ResObj_Convert, &inRegion,
-                             &ioWasInRgn))
-               return NULL;
-       _err = TrackMouseRegion(inPort,
-                               inRegion,
-                               &ioWasInRgn,
-                               &outResult);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("bH",
-                            ioWasInRgn,
-                            outResult);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetLastUserEventTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       double _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetLastUserEventTime();
-       _res = Py_BuildValue("d",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_IsMouseCoalescingEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsMouseCoalescingEnabled();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_SetMouseCoalescingEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean inNewState;
-       Boolean outOldState;
-       if (!PyArg_ParseTuple(_args, "b",
-                             &inNewState))
-               return NULL;
-       _err = SetMouseCoalescingEnabled(inNewState,
-                                        &outOldState);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            outOldState);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetWindowEventTarget(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventTargetRef _rv;
-       WindowPtr inWindow;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _rv = GetWindowEventTarget(inWindow);
-       _res = Py_BuildValue("O&",
-                            EventTargetRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetControlEventTarget(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventTargetRef _rv;
-       ControlHandle inControl;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CtlObj_Convert, &inControl))
-               return NULL;
-       _rv = GetControlEventTarget(inControl);
-       _res = Py_BuildValue("O&",
-                            EventTargetRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetMenuEventTarget(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventTargetRef _rv;
-       MenuHandle inMenu;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             MenuObj_Convert, &inMenu))
-               return NULL;
-       _rv = GetMenuEventTarget(inMenu);
-       _res = Py_BuildValue("O&",
-                            EventTargetRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetApplicationEventTarget(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventTargetRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetApplicationEventTarget();
-       _res = Py_BuildValue("O&",
-                            EventTargetRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetUserFocusEventTarget(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventTargetRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetUserFocusEventTarget();
-       _res = Py_BuildValue("O&",
-                            EventTargetRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetEventDispatcherTarget(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventTargetRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetEventDispatcherTarget();
-       _res = Py_BuildValue("O&",
-                            EventTargetRef_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_RunApplicationEventLoop(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       RunApplicationEventLoop();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_QuitApplicationEventLoop(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       QuitApplicationEventLoop();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_RunAppModalLoopForWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = RunAppModalLoopForWindow(inWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_QuitAppModalLoopForWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = QuitAppModalLoopForWindow(inWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_BeginAppModalStateForWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = BeginAppModalStateForWindow(inWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_EndAppModalStateForWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = EndAppModalStateForWindow(inWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_SetUserFocusWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = SetUserFocusWindow(inWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetUserFocusWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetUserFocusWindow();
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CarbonEvents_SetWindowDefaultButton(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       ControlHandle inControl;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &inWindow,
-                             CtlObj_Convert, &inControl))
-               return NULL;
-       _err = SetWindowDefaultButton(inWindow,
-                                     inControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_SetWindowCancelButton(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       ControlHandle inControl;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &inWindow,
-                             CtlObj_Convert, &inControl))
-               return NULL;
-       _err = SetWindowCancelButton(inWindow,
-                                    inControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetWindowDefaultButton(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       ControlHandle outControl;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = GetWindowDefaultButton(inWindow,
-                                     &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *CarbonEvents_GetWindowCancelButton(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       ControlHandle outControl;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = GetWindowCancelButton(inWindow,
-                                    &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *CarbonEvents_RegisterEventHotKey(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 inHotKeyCode;
-       UInt32 inHotKeyModifiers;
-       EventHotKeyID inHotKeyID;
-       EventTargetRef inTarget;
-       OptionBits inOptions;
-       EventHotKeyRef outRef;
-       if (!PyArg_ParseTuple(_args, "llO&O&l",
-                             &inHotKeyCode,
-                             &inHotKeyModifiers,
-                             EventHotKeyID_Convert, &inHotKeyID,
-                             EventTargetRef_Convert, &inTarget,
-                             &inOptions))
-               return NULL;
-       _err = RegisterEventHotKey(inHotKeyCode,
-                                  inHotKeyModifiers,
-                                  inHotKeyID,
-                                  inTarget,
-                                  inOptions,
-                                  &outRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            EventHotKeyRef_New, outRef);
-       return _res;
-}
-
-static PyMethodDef CarbonEvents_methods[] = {
-       {"GetCurrentEventLoop", (PyCFunction)CarbonEvents_GetCurrentEventLoop, 1,
-        PyDoc_STR("() -> (EventLoopRef _rv)")},
-       {"GetMainEventLoop", (PyCFunction)CarbonEvents_GetMainEventLoop, 1,
-        PyDoc_STR("() -> (EventLoopRef _rv)")},
-       {"RunCurrentEventLoop", (PyCFunction)CarbonEvents_RunCurrentEventLoop, 1,
-        PyDoc_STR("(double inTimeout) -> None")},
-       {"ReceiveNextEvent", (PyCFunction)CarbonEvents_ReceiveNextEvent, 1,
-        PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList, double inTimeout, Boolean inPullEvent) -> (EventRef outEvent)")},
-       {"GetCurrentEventQueue", (PyCFunction)CarbonEvents_GetCurrentEventQueue, 1,
-        PyDoc_STR("() -> (EventQueueRef _rv)")},
-       {"GetMainEventQueue", (PyCFunction)CarbonEvents_GetMainEventQueue, 1,
-        PyDoc_STR("() -> (EventQueueRef _rv)")},
-       {"GetCurrentEventTime", (PyCFunction)CarbonEvents_GetCurrentEventTime, 1,
-        PyDoc_STR("() -> (double _rv)")},
-       {"TrackMouseLocation", (PyCFunction)CarbonEvents_TrackMouseLocation, 1,
-        PyDoc_STR("(GrafPtr inPort) -> (Point outPt, UInt16 outResult)")},
-       {"TrackMouseLocationWithOptions", (PyCFunction)CarbonEvents_TrackMouseLocationWithOptions, 1,
-        PyDoc_STR("(GrafPtr inPort, OptionBits inOptions, double inTimeout) -> (Point outPt, UInt32 outModifiers, UInt16 outResult)")},
-       {"TrackMouseRegion", (PyCFunction)CarbonEvents_TrackMouseRegion, 1,
-        PyDoc_STR("(GrafPtr inPort, RgnHandle inRegion, Boolean ioWasInRgn) -> (Boolean ioWasInRgn, UInt16 outResult)")},
-       {"GetLastUserEventTime", (PyCFunction)CarbonEvents_GetLastUserEventTime, 1,
-        PyDoc_STR("() -> (double _rv)")},
-       {"IsMouseCoalescingEnabled", (PyCFunction)CarbonEvents_IsMouseCoalescingEnabled, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"SetMouseCoalescingEnabled", (PyCFunction)CarbonEvents_SetMouseCoalescingEnabled, 1,
-        PyDoc_STR("(Boolean inNewState) -> (Boolean outOldState)")},
-       {"GetWindowEventTarget", (PyCFunction)CarbonEvents_GetWindowEventTarget, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> (EventTargetRef _rv)")},
-       {"GetControlEventTarget", (PyCFunction)CarbonEvents_GetControlEventTarget, 1,
-        PyDoc_STR("(ControlHandle inControl) -> (EventTargetRef _rv)")},
-       {"GetMenuEventTarget", (PyCFunction)CarbonEvents_GetMenuEventTarget, 1,
-        PyDoc_STR("(MenuHandle inMenu) -> (EventTargetRef _rv)")},
-       {"GetApplicationEventTarget", (PyCFunction)CarbonEvents_GetApplicationEventTarget, 1,
-        PyDoc_STR("() -> (EventTargetRef _rv)")},
-       {"GetUserFocusEventTarget", (PyCFunction)CarbonEvents_GetUserFocusEventTarget, 1,
-        PyDoc_STR("() -> (EventTargetRef _rv)")},
-       {"GetEventDispatcherTarget", (PyCFunction)CarbonEvents_GetEventDispatcherTarget, 1,
-        PyDoc_STR("() -> (EventTargetRef _rv)")},
-       {"RunApplicationEventLoop", (PyCFunction)CarbonEvents_RunApplicationEventLoop, 1,
-        PyDoc_STR("() -> None")},
-       {"QuitApplicationEventLoop", (PyCFunction)CarbonEvents_QuitApplicationEventLoop, 1,
-        PyDoc_STR("() -> None")},
-       {"RunAppModalLoopForWindow", (PyCFunction)CarbonEvents_RunAppModalLoopForWindow, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"QuitAppModalLoopForWindow", (PyCFunction)CarbonEvents_QuitAppModalLoopForWindow, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"BeginAppModalStateForWindow", (PyCFunction)CarbonEvents_BeginAppModalStateForWindow, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"EndAppModalStateForWindow", (PyCFunction)CarbonEvents_EndAppModalStateForWindow, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"SetUserFocusWindow", (PyCFunction)CarbonEvents_SetUserFocusWindow, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"GetUserFocusWindow", (PyCFunction)CarbonEvents_GetUserFocusWindow, 1,
-        PyDoc_STR("() -> (WindowPtr _rv)")},
-       {"SetWindowDefaultButton", (PyCFunction)CarbonEvents_SetWindowDefaultButton, 1,
-        PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl) -> None")},
-       {"SetWindowCancelButton", (PyCFunction)CarbonEvents_SetWindowCancelButton, 1,
-        PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl) -> None")},
-       {"GetWindowDefaultButton", (PyCFunction)CarbonEvents_GetWindowDefaultButton, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
-       {"GetWindowCancelButton", (PyCFunction)CarbonEvents_GetWindowCancelButton, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
-       {"RegisterEventHotKey", (PyCFunction)CarbonEvents_RegisterEventHotKey, 1,
-        PyDoc_STR("(UInt32 inHotKeyCode, UInt32 inHotKeyModifiers, EventHotKeyID inHotKeyID, EventTargetRef inTarget, OptionBits inOptions) -> (EventHotKeyRef outRef)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_CarbonEvt(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-       myEventHandlerUPP = NewEventHandlerUPP(myEventHandler);
-
-
-       m = Py_InitModule("_CarbonEvt", CarbonEvents_methods);
-       d = PyModule_GetDict(m);
-       CarbonEvents_Error = PyMac_GetOSErrException();
-       if (CarbonEvents_Error == NULL ||
-           PyDict_SetItemString(d, "Error", CarbonEvents_Error) != 0)
-               return;
-       Py_TYPE(&EventRef_Type) = &PyType_Type;
-       if (PyType_Ready(&EventRef_Type) < 0) return;
-       Py_INCREF(&EventRef_Type);
-       PyModule_AddObject(m, "EventRef", (PyObject *)&EventRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&EventRef_Type);
-       PyModule_AddObject(m, "EventRefType", (PyObject *)&EventRef_Type);
-       Py_TYPE(&EventQueueRef_Type) = &PyType_Type;
-       if (PyType_Ready(&EventQueueRef_Type) < 0) return;
-       Py_INCREF(&EventQueueRef_Type);
-       PyModule_AddObject(m, "EventQueueRef", (PyObject *)&EventQueueRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&EventQueueRef_Type);
-       PyModule_AddObject(m, "EventQueueRefType", (PyObject *)&EventQueueRef_Type);
-       Py_TYPE(&EventLoopRef_Type) = &PyType_Type;
-       if (PyType_Ready(&EventLoopRef_Type) < 0) return;
-       Py_INCREF(&EventLoopRef_Type);
-       PyModule_AddObject(m, "EventLoopRef", (PyObject *)&EventLoopRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&EventLoopRef_Type);
-       PyModule_AddObject(m, "EventLoopRefType", (PyObject *)&EventLoopRef_Type);
-       Py_TYPE(&EventLoopTimerRef_Type) = &PyType_Type;
-       if (PyType_Ready(&EventLoopTimerRef_Type) < 0) return;
-       Py_INCREF(&EventLoopTimerRef_Type);
-       PyModule_AddObject(m, "EventLoopTimerRef", (PyObject *)&EventLoopTimerRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&EventLoopTimerRef_Type);
-       PyModule_AddObject(m, "EventLoopTimerRefType", (PyObject *)&EventLoopTimerRef_Type);
-       Py_TYPE(&EventHandlerRef_Type) = &PyType_Type;
-       if (PyType_Ready(&EventHandlerRef_Type) < 0) return;
-       Py_INCREF(&EventHandlerRef_Type);
-       PyModule_AddObject(m, "EventHandlerRef", (PyObject *)&EventHandlerRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&EventHandlerRef_Type);
-       PyModule_AddObject(m, "EventHandlerRefType", (PyObject *)&EventHandlerRef_Type);
-       Py_TYPE(&EventHandlerCallRef_Type) = &PyType_Type;
-       if (PyType_Ready(&EventHandlerCallRef_Type) < 0) return;
-       Py_INCREF(&EventHandlerCallRef_Type);
-       PyModule_AddObject(m, "EventHandlerCallRef", (PyObject *)&EventHandlerCallRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&EventHandlerCallRef_Type);
-       PyModule_AddObject(m, "EventHandlerCallRefType", (PyObject *)&EventHandlerCallRef_Type);
-       Py_TYPE(&EventTargetRef_Type) = &PyType_Type;
-       if (PyType_Ready(&EventTargetRef_Type) < 0) return;
-       Py_INCREF(&EventTargetRef_Type);
-       PyModule_AddObject(m, "EventTargetRef", (PyObject *)&EventTargetRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&EventTargetRef_Type);
-       PyModule_AddObject(m, "EventTargetRefType", (PyObject *)&EventTargetRef_Type);
-       Py_TYPE(&EventHotKeyRef_Type) = &PyType_Type;
-       if (PyType_Ready(&EventHotKeyRef_Type) < 0) return;
-       Py_INCREF(&EventHotKeyRef_Type);
-       PyModule_AddObject(m, "EventHotKeyRef", (PyObject *)&EventHotKeyRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&EventHotKeyRef_Type);
-       PyModule_AddObject(m, "EventHotKeyRefType", (PyObject *)&EventHotKeyRef_Type);
-}
-
-/* ===================== End module _CarbonEvt ====================== */
-
diff --git a/Mac/Modules/cf/_CFmodule.c b/Mac/Modules/cf/_CFmodule.c
deleted file mode 100644 (file)
index 473e649..0000000
+++ /dev/null
@@ -1,4986 +0,0 @@
-
-/* =========================== Module _CF =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <CoreServices/CoreServices.h>
-
-#include "pycfbridge.h"
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_CFObj_New(CFTypeRef);
-extern int _CFObj_Convert(PyObject *, CFTypeRef *);
-#define CFObj_New _CFObj_New
-#define CFObj_Convert _CFObj_Convert
-
-extern PyObject *_CFTypeRefObj_New(CFTypeRef);
-extern int _CFTypeRefObj_Convert(PyObject *, CFTypeRef *);
-#define CFTypeRefObj_New _CFTypeRefObj_New
-#define CFTypeRefObj_Convert _CFTypeRefObj_Convert
-
-extern PyObject *_CFStringRefObj_New(CFStringRef);
-extern int _CFStringRefObj_Convert(PyObject *, CFStringRef *);
-#define CFStringRefObj_New _CFStringRefObj_New
-#define CFStringRefObj_Convert _CFStringRefObj_Convert
-
-extern PyObject *_CFMutableStringRefObj_New(CFMutableStringRef);
-extern int _CFMutableStringRefObj_Convert(PyObject *, CFMutableStringRef *);
-#define CFMutableStringRefObj_New _CFMutableStringRefObj_New
-#define CFMutableStringRefObj_Convert _CFMutableStringRefObj_Convert
-
-extern PyObject *_CFArrayRefObj_New(CFArrayRef);
-extern int _CFArrayRefObj_Convert(PyObject *, CFArrayRef *);
-#define CFArrayRefObj_New _CFArrayRefObj_New
-#define CFArrayRefObj_Convert _CFArrayRefObj_Convert
-
-extern PyObject *_CFMutableArrayRefObj_New(CFMutableArrayRef);
-extern int _CFMutableArrayRefObj_Convert(PyObject *, CFMutableArrayRef *);
-#define CFMutableArrayRefObj_New _CFMutableArrayRefObj_New
-#define CFMutableArrayRefObj_Convert _CFMutableArrayRefObj_Convert
-
-extern PyObject *_CFDataRefObj_New(CFDataRef);
-extern int _CFDataRefObj_Convert(PyObject *, CFDataRef *);
-#define CFDataRefObj_New _CFDataRefObj_New
-#define CFDataRefObj_Convert _CFDataRefObj_Convert
-
-extern PyObject *_CFMutableDataRefObj_New(CFMutableDataRef);
-extern int _CFMutableDataRefObj_Convert(PyObject *, CFMutableDataRef *);
-#define CFMutableDataRefObj_New _CFMutableDataRefObj_New
-#define CFMutableDataRefObj_Convert _CFMutableDataRefObj_Convert
-
-extern PyObject *_CFDictionaryRefObj_New(CFDictionaryRef);
-extern int _CFDictionaryRefObj_Convert(PyObject *, CFDictionaryRef *);
-#define CFDictionaryRefObj_New _CFDictionaryRefObj_New
-#define CFDictionaryRefObj_Convert _CFDictionaryRefObj_Convert
-
-extern PyObject *_CFMutableDictionaryRefObj_New(CFMutableDictionaryRef);
-extern int _CFMutableDictionaryRefObj_Convert(PyObject *, CFMutableDictionaryRef *);
-#define CFMutableDictionaryRefObj_New _CFMutableDictionaryRefObj_New
-#define CFMutableDictionaryRefObj_Convert _CFMutableDictionaryRefObj_Convert
-
-extern PyObject *_CFURLRefObj_New(CFURLRef);
-extern int _CFURLRefObj_Convert(PyObject *, CFURLRef *);
-extern int _OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *);
-#define CFURLRefObj_New _CFURLRefObj_New
-#define CFURLRefObj_Convert _CFURLRefObj_Convert
-#define OptionalCFURLRefObj_Convert _OptionalCFURLRefObj_Convert
-#endif
-
-/*
-** Parse/generate CFRange records
-*/
-PyObject *CFRange_New(CFRange *itself)
-{
-
-        return Py_BuildValue("ll", (long)itself->location, (long)itself->length);
-}
-
-int
-CFRange_Convert(PyObject *v, CFRange *p_itself)
-{
-        long location, length;
-
-        if( !PyArg_ParseTuple(v, "ll", &location, &length) )
-                return 0;
-        p_itself->location = (CFIndex)location;
-        p_itself->length = (CFIndex)length;
-        return 1;
-}
-
-/* Optional CFURL argument or None (passed as NULL) */
-int
-OptionalCFURLRefObj_Convert(PyObject *v, CFURLRef *p_itself)
-{
-    if ( v == Py_None ) {
-        p_itself = NULL;
-        return 1;
-    }
-    return CFURLRefObj_Convert(v, p_itself);
-}
-
-static PyObject *CF_Error;
-
-/* --------------------- Object type CFTypeRef ---------------------- */
-
-PyTypeObject CFTypeRef_Type;
-
-#define CFTypeRefObj_Check(x) (Py_TYPE(x) == &CFTypeRef_Type || PyObject_TypeCheck((x), &CFTypeRef_Type))
-
-typedef struct CFTypeRefObject {
-       PyObject_HEAD
-       CFTypeRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFTypeRefObject;
-
-PyObject *CFTypeRefObj_New(CFTypeRef itself)
-{
-       CFTypeRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFTypeRefObject, &CFTypeRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFTypeRefObj_Convert(PyObject *v, CFTypeRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       /* Check for other CF objects here */
-
-       if (!CFTypeRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFTypeRef required");
-               return 0;
-       }
-       *p_itself = ((CFTypeRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFTypeRefObj_dealloc(CFTypeRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *CFTypeRefObj_CFGetTypeID(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeID _rv;
-#ifndef CFGetTypeID
-       PyMac_PRECHECK(CFGetTypeID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFGetTypeID(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFRetain(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeRef _rv;
-#ifndef CFRetain
-       PyMac_PRECHECK(CFRetain);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFRetain(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFTypeRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFRelease(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef CFRelease
-       PyMac_PRECHECK(CFRelease);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CFRelease(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFGetRetainCount(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex _rv;
-#ifndef CFGetRetainCount
-       PyMac_PRECHECK(CFGetRetainCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFGetRetainCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFEqual(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       CFTypeRef cf2;
-#ifndef CFEqual
-       PyMac_PRECHECK(CFEqual);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFTypeRefObj_Convert, &cf2))
-               return NULL;
-       _rv = CFEqual(_self->ob_itself,
-                     cf2);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFHash(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFHashCode _rv;
-#ifndef CFHash
-       PyMac_PRECHECK(CFHash);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFHash(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFCopyDescription(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFCopyDescription
-       PyMac_PRECHECK(CFCopyDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFCopyDescription(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFPropertyListCreateXMLData(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFDataRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFPropertyListCreateXMLData((CFAllocatorRef)NULL,
-                                         _self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFDataRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFPropertyListCreateDeepCopy(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeRef _rv;
-       CFOptionFlags mutabilityOption;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &mutabilityOption))
-               return NULL;
-       _rv = CFPropertyListCreateDeepCopy((CFAllocatorRef)NULL,
-                                          _self->ob_itself,
-                                          mutabilityOption);
-       _res = Py_BuildValue("O&",
-                            CFTypeRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFShow(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef CFShow
-       PyMac_PRECHECK(CFShow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CFShow(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFTypeRefObj_CFPropertyListCreateFromXMLData(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       CFTypeRef _rv;
-       CFOptionFlags mutabilityOption;
-       CFStringRef errorString;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &mutabilityOption))
-               return NULL;
-       _rv = CFPropertyListCreateFromXMLData((CFAllocatorRef)NULL,
-                                             _self->ob_itself,
-                                             mutabilityOption,
-                                             &errorString);
-       if (errorString)
-               CFRelease(errorString);
-       if (_rv == NULL) {
-               PyErr_SetString(PyExc_RuntimeError, "Parse error in XML data");
-               return NULL;
-       }
-       _res = Py_BuildValue("O&",
-                            CFTypeRefObj_New, _rv);
-       return _res;
-
-}
-
-static PyObject *CFTypeRefObj_toPython(CFTypeRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       _res = PyCF_CF2Python(_self->ob_itself);
-       return _res;
-
-}
-
-static PyMethodDef CFTypeRefObj_methods[] = {
-       {"CFGetTypeID", (PyCFunction)CFTypeRefObj_CFGetTypeID, 1,
-        PyDoc_STR("() -> (CFTypeID _rv)")},
-       {"CFRetain", (PyCFunction)CFTypeRefObj_CFRetain, 1,
-        PyDoc_STR("() -> (CFTypeRef _rv)")},
-       {"CFRelease", (PyCFunction)CFTypeRefObj_CFRelease, 1,
-        PyDoc_STR("() -> None")},
-       {"CFGetRetainCount", (PyCFunction)CFTypeRefObj_CFGetRetainCount, 1,
-        PyDoc_STR("() -> (CFIndex _rv)")},
-       {"CFEqual", (PyCFunction)CFTypeRefObj_CFEqual, 1,
-        PyDoc_STR("(CFTypeRef cf2) -> (Boolean _rv)")},
-       {"CFHash", (PyCFunction)CFTypeRefObj_CFHash, 1,
-        PyDoc_STR("() -> (CFHashCode _rv)")},
-       {"CFCopyDescription", (PyCFunction)CFTypeRefObj_CFCopyDescription, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFPropertyListCreateXMLData", (PyCFunction)CFTypeRefObj_CFPropertyListCreateXMLData, 1,
-        PyDoc_STR("() -> (CFDataRef _rv)")},
-       {"CFPropertyListCreateDeepCopy", (PyCFunction)CFTypeRefObj_CFPropertyListCreateDeepCopy, 1,
-        PyDoc_STR("(CFOptionFlags mutabilityOption) -> (CFTypeRef _rv)")},
-       {"CFShow", (PyCFunction)CFTypeRefObj_CFShow, 1,
-        PyDoc_STR("() -> None")},
-       {"CFPropertyListCreateFromXMLData", (PyCFunction)CFTypeRefObj_CFPropertyListCreateFromXMLData, 1,
-        PyDoc_STR("(CFOptionFlags mutabilityOption) -> (CFTypeRefObj)")},
-       {"toPython", (PyCFunction)CFTypeRefObj_toPython, 1,
-        PyDoc_STR("() -> (python_object)")},
-       {NULL, NULL, 0}
-};
-
-#define CFTypeRefObj_getsetlist NULL
-
-
-static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFTypeRefObj_repr(CFTypeRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFTypeRef type-%d object at 0x%8.8x for 0x%8.8x>", (int)CFGetTypeID(self->ob_itself), (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFTypeRefObj_hash(CFTypeRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFTypeRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFTypeRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFTypeRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFTypeRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFTypeRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFTypeRefObject *)self)->ob_itself = NULL;
-       ((CFTypeRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFTypeRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFTypeRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFTypeRef", /*tp_name*/
-       sizeof(CFTypeRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFTypeRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFTypeRefObj_compare, /*tp_compare*/
-       (reprfunc) CFTypeRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFTypeRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFTypeRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFTypeRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFTypeRefObj_tp_init, /* tp_init */
-       CFTypeRefObj_tp_alloc, /* tp_alloc */
-       CFTypeRefObj_tp_new, /* tp_new */
-       CFTypeRefObj_tp_free, /* tp_free */
-};
-
-/* ------------------- End object type CFTypeRef -------------------- */
-
-
-/* --------------------- Object type CFArrayRef --------------------- */
-
-PyTypeObject CFArrayRef_Type;
-
-#define CFArrayRefObj_Check(x) (Py_TYPE(x) == &CFArrayRef_Type || PyObject_TypeCheck((x), &CFArrayRef_Type))
-
-typedef struct CFArrayRefObject {
-       PyObject_HEAD
-       CFArrayRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFArrayRefObject;
-
-PyObject *CFArrayRefObj_New(CFArrayRef itself)
-{
-       CFArrayRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFArrayRefObject, &CFArrayRef_Type);
-       if (it == NULL) return NULL;
-       /* XXXX Should we tp_init or tp_new our basetype? */
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFArrayRefObj_Convert(PyObject *v, CFArrayRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       /* Check for other CF objects here */
-
-       if (!CFArrayRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFArrayRef required");
-               return 0;
-       }
-       *p_itself = ((CFArrayRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFArrayRefObj_dealloc(CFArrayRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       CFTypeRef_Type.tp_dealloc((PyObject *)self);
-}
-
-static PyObject *CFArrayRefObj_CFArrayCreateCopy(CFArrayRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFArrayRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFArrayCreateCopy((CFAllocatorRef)NULL,
-                               _self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFArrayRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFArrayRefObj_CFArrayGetCount(CFArrayRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex _rv;
-#ifndef CFArrayGetCount
-       PyMac_PRECHECK(CFArrayGetCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFArrayGetCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFArrayRefObj_CFStringCreateByCombiningStrings(CFArrayRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFStringRef separatorString;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &separatorString))
-               return NULL;
-       _rv = CFStringCreateByCombiningStrings((CFAllocatorRef)NULL,
-                                              _self->ob_itself,
-                                              separatorString);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyMethodDef CFArrayRefObj_methods[] = {
-       {"CFArrayCreateCopy", (PyCFunction)CFArrayRefObj_CFArrayCreateCopy, 1,
-        PyDoc_STR("() -> (CFArrayRef _rv)")},
-       {"CFArrayGetCount", (PyCFunction)CFArrayRefObj_CFArrayGetCount, 1,
-        PyDoc_STR("() -> (CFIndex _rv)")},
-       {"CFStringCreateByCombiningStrings", (PyCFunction)CFArrayRefObj_CFStringCreateByCombiningStrings, 1,
-        PyDoc_STR("(CFStringRef separatorString) -> (CFStringRef _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define CFArrayRefObj_getsetlist NULL
-
-
-static int CFArrayRefObj_compare(CFArrayRefObject *self, CFArrayRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFArrayRefObj_repr(CFArrayRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFArrayRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFArrayRefObj_hash(CFArrayRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFArrayRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFArrayRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFArrayRefObj_Convert, &itself))
-       {
-               ((CFArrayRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-
-       /* Any CFTypeRef descendent is allowed as initializer too */
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFArrayRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFArrayRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFArrayRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFArrayRefObject *)self)->ob_itself = NULL;
-       ((CFArrayRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFArrayRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFArrayRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFArrayRef", /*tp_name*/
-       sizeof(CFArrayRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFArrayRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFArrayRefObj_compare, /*tp_compare*/
-       (reprfunc) CFArrayRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFArrayRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFArrayRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFArrayRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFArrayRefObj_tp_init, /* tp_init */
-       CFArrayRefObj_tp_alloc, /* tp_alloc */
-       CFArrayRefObj_tp_new, /* tp_new */
-       CFArrayRefObj_tp_free, /* tp_free */
-};
-
-/* ------------------- End object type CFArrayRef ------------------- */
-
-
-/* ----------------- Object type CFMutableArrayRef ------------------ */
-
-PyTypeObject CFMutableArrayRef_Type;
-
-#define CFMutableArrayRefObj_Check(x) (Py_TYPE(x) == &CFMutableArrayRef_Type || PyObject_TypeCheck((x), &CFMutableArrayRef_Type))
-
-typedef struct CFMutableArrayRefObject {
-       PyObject_HEAD
-       CFMutableArrayRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFMutableArrayRefObject;
-
-PyObject *CFMutableArrayRefObj_New(CFMutableArrayRef itself)
-{
-       CFMutableArrayRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFMutableArrayRefObject, &CFMutableArrayRef_Type);
-       if (it == NULL) return NULL;
-       /* XXXX Should we tp_init or tp_new our basetype? */
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFMutableArrayRefObj_Convert(PyObject *v, CFMutableArrayRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       /* Check for other CF objects here */
-
-       if (!CFMutableArrayRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFMutableArrayRef required");
-               return 0;
-       }
-       *p_itself = ((CFMutableArrayRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFMutableArrayRefObj_dealloc(CFMutableArrayRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       CFArrayRef_Type.tp_dealloc((PyObject *)self);
-}
-
-static PyObject *CFMutableArrayRefObj_CFArrayRemoveValueAtIndex(CFMutableArrayRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex idx;
-#ifndef CFArrayRemoveValueAtIndex
-       PyMac_PRECHECK(CFArrayRemoveValueAtIndex);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &idx))
-               return NULL;
-       CFArrayRemoveValueAtIndex(_self->ob_itself,
-                                 idx);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableArrayRefObj_CFArrayRemoveAllValues(CFMutableArrayRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef CFArrayRemoveAllValues
-       PyMac_PRECHECK(CFArrayRemoveAllValues);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CFArrayRemoveAllValues(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableArrayRefObj_CFArrayExchangeValuesAtIndices(CFMutableArrayRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex idx1;
-       CFIndex idx2;
-#ifndef CFArrayExchangeValuesAtIndices
-       PyMac_PRECHECK(CFArrayExchangeValuesAtIndices);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &idx1,
-                             &idx2))
-               return NULL;
-       CFArrayExchangeValuesAtIndices(_self->ob_itself,
-                                      idx1,
-                                      idx2);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableArrayRefObj_CFArrayAppendArray(CFMutableArrayRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFArrayRef otherArray;
-       CFRange otherRange;
-#ifndef CFArrayAppendArray
-       PyMac_PRECHECK(CFArrayAppendArray);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFArrayRefObj_Convert, &otherArray,
-                             CFRange_Convert, &otherRange))
-               return NULL;
-       CFArrayAppendArray(_self->ob_itself,
-                          otherArray,
-                          otherRange);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef CFMutableArrayRefObj_methods[] = {
-       {"CFArrayRemoveValueAtIndex", (PyCFunction)CFMutableArrayRefObj_CFArrayRemoveValueAtIndex, 1,
-        PyDoc_STR("(CFIndex idx) -> None")},
-       {"CFArrayRemoveAllValues", (PyCFunction)CFMutableArrayRefObj_CFArrayRemoveAllValues, 1,
-        PyDoc_STR("() -> None")},
-       {"CFArrayExchangeValuesAtIndices", (PyCFunction)CFMutableArrayRefObj_CFArrayExchangeValuesAtIndices, 1,
-        PyDoc_STR("(CFIndex idx1, CFIndex idx2) -> None")},
-       {"CFArrayAppendArray", (PyCFunction)CFMutableArrayRefObj_CFArrayAppendArray, 1,
-        PyDoc_STR("(CFArrayRef otherArray, CFRange otherRange) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define CFMutableArrayRefObj_getsetlist NULL
-
-
-static int CFMutableArrayRefObj_compare(CFMutableArrayRefObject *self, CFMutableArrayRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFMutableArrayRefObj_repr(CFMutableArrayRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFMutableArrayRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFMutableArrayRefObj_hash(CFMutableArrayRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFMutableArrayRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFMutableArrayRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableArrayRefObj_Convert, &itself))
-       {
-               ((CFMutableArrayRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-
-       /* Any CFTypeRef descendent is allowed as initializer too */
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFMutableArrayRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFMutableArrayRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFMutableArrayRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFMutableArrayRefObject *)self)->ob_itself = NULL;
-       ((CFMutableArrayRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFMutableArrayRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFMutableArrayRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFMutableArrayRef", /*tp_name*/
-       sizeof(CFMutableArrayRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFMutableArrayRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFMutableArrayRefObj_compare, /*tp_compare*/
-       (reprfunc) CFMutableArrayRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFMutableArrayRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFMutableArrayRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFMutableArrayRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFMutableArrayRefObj_tp_init, /* tp_init */
-       CFMutableArrayRefObj_tp_alloc, /* tp_alloc */
-       CFMutableArrayRefObj_tp_new, /* tp_new */
-       CFMutableArrayRefObj_tp_free, /* tp_free */
-};
-
-/* --------------- End object type CFMutableArrayRef ---------------- */
-
-
-/* ------------------ Object type CFDictionaryRef ------------------- */
-
-PyTypeObject CFDictionaryRef_Type;
-
-#define CFDictionaryRefObj_Check(x) (Py_TYPE(x) == &CFDictionaryRef_Type || PyObject_TypeCheck((x), &CFDictionaryRef_Type))
-
-typedef struct CFDictionaryRefObject {
-       PyObject_HEAD
-       CFDictionaryRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFDictionaryRefObject;
-
-PyObject *CFDictionaryRefObj_New(CFDictionaryRef itself)
-{
-       CFDictionaryRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFDictionaryRefObject, &CFDictionaryRef_Type);
-       if (it == NULL) return NULL;
-       /* XXXX Should we tp_init or tp_new our basetype? */
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFDictionaryRefObj_Convert(PyObject *v, CFDictionaryRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       /* Check for other CF objects here */
-
-       if (!CFDictionaryRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFDictionaryRef required");
-               return 0;
-       }
-       *p_itself = ((CFDictionaryRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFDictionaryRefObj_dealloc(CFDictionaryRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       CFTypeRef_Type.tp_dealloc((PyObject *)self);
-}
-
-static PyObject *CFDictionaryRefObj_CFDictionaryCreateCopy(CFDictionaryRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFDictionaryRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFDictionaryCreateCopy((CFAllocatorRef)NULL,
-                                    _self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFDictionaryRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFDictionaryRefObj_CFDictionaryGetCount(CFDictionaryRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex _rv;
-#ifndef CFDictionaryGetCount
-       PyMac_PRECHECK(CFDictionaryGetCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFDictionaryGetCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyMethodDef CFDictionaryRefObj_methods[] = {
-       {"CFDictionaryCreateCopy", (PyCFunction)CFDictionaryRefObj_CFDictionaryCreateCopy, 1,
-        PyDoc_STR("() -> (CFDictionaryRef _rv)")},
-       {"CFDictionaryGetCount", (PyCFunction)CFDictionaryRefObj_CFDictionaryGetCount, 1,
-        PyDoc_STR("() -> (CFIndex _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define CFDictionaryRefObj_getsetlist NULL
-
-
-static int CFDictionaryRefObj_compare(CFDictionaryRefObject *self, CFDictionaryRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFDictionaryRefObj_repr(CFDictionaryRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFDictionaryRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFDictionaryRefObj_hash(CFDictionaryRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFDictionaryRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFDictionaryRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFDictionaryRefObj_Convert, &itself))
-       {
-               ((CFDictionaryRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-
-       /* Any CFTypeRef descendent is allowed as initializer too */
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFDictionaryRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFDictionaryRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFDictionaryRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFDictionaryRefObject *)self)->ob_itself = NULL;
-       ((CFDictionaryRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFDictionaryRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFDictionaryRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFDictionaryRef", /*tp_name*/
-       sizeof(CFDictionaryRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFDictionaryRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFDictionaryRefObj_compare, /*tp_compare*/
-       (reprfunc) CFDictionaryRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFDictionaryRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFDictionaryRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFDictionaryRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFDictionaryRefObj_tp_init, /* tp_init */
-       CFDictionaryRefObj_tp_alloc, /* tp_alloc */
-       CFDictionaryRefObj_tp_new, /* tp_new */
-       CFDictionaryRefObj_tp_free, /* tp_free */
-};
-
-/* ---------------- End object type CFDictionaryRef ----------------- */
-
-
-/* --------------- Object type CFMutableDictionaryRef --------------- */
-
-PyTypeObject CFMutableDictionaryRef_Type;
-
-#define CFMutableDictionaryRefObj_Check(x) (Py_TYPE(x) == &CFMutableDictionaryRef_Type || PyObject_TypeCheck((x), &CFMutableDictionaryRef_Type))
-
-typedef struct CFMutableDictionaryRefObject {
-       PyObject_HEAD
-       CFMutableDictionaryRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFMutableDictionaryRefObject;
-
-PyObject *CFMutableDictionaryRefObj_New(CFMutableDictionaryRef itself)
-{
-       CFMutableDictionaryRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFMutableDictionaryRefObject, &CFMutableDictionaryRef_Type);
-       if (it == NULL) return NULL;
-       /* XXXX Should we tp_init or tp_new our basetype? */
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFMutableDictionaryRefObj_Convert(PyObject *v, CFMutableDictionaryRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       /* Check for other CF objects here */
-
-       if (!CFMutableDictionaryRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFMutableDictionaryRef required");
-               return 0;
-       }
-       *p_itself = ((CFMutableDictionaryRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFMutableDictionaryRefObj_dealloc(CFMutableDictionaryRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       CFDictionaryRef_Type.tp_dealloc((PyObject *)self);
-}
-
-static PyObject *CFMutableDictionaryRefObj_CFDictionaryRemoveAllValues(CFMutableDictionaryRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef CFDictionaryRemoveAllValues
-       PyMac_PRECHECK(CFDictionaryRemoveAllValues);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CFDictionaryRemoveAllValues(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef CFMutableDictionaryRefObj_methods[] = {
-       {"CFDictionaryRemoveAllValues", (PyCFunction)CFMutableDictionaryRefObj_CFDictionaryRemoveAllValues, 1,
-        PyDoc_STR("() -> None")},
-       {NULL, NULL, 0}
-};
-
-#define CFMutableDictionaryRefObj_getsetlist NULL
-
-
-static int CFMutableDictionaryRefObj_compare(CFMutableDictionaryRefObject *self, CFMutableDictionaryRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFMutableDictionaryRefObj_repr(CFMutableDictionaryRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFMutableDictionaryRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFMutableDictionaryRefObj_hash(CFMutableDictionaryRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFMutableDictionaryRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFMutableDictionaryRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableDictionaryRefObj_Convert, &itself))
-       {
-               ((CFMutableDictionaryRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-
-       /* Any CFTypeRef descendent is allowed as initializer too */
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFMutableDictionaryRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFMutableDictionaryRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFMutableDictionaryRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFMutableDictionaryRefObject *)self)->ob_itself = NULL;
-       ((CFMutableDictionaryRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFMutableDictionaryRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFMutableDictionaryRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFMutableDictionaryRef", /*tp_name*/
-       sizeof(CFMutableDictionaryRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFMutableDictionaryRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFMutableDictionaryRefObj_compare, /*tp_compare*/
-       (reprfunc) CFMutableDictionaryRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFMutableDictionaryRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFMutableDictionaryRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFMutableDictionaryRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFMutableDictionaryRefObj_tp_init, /* tp_init */
-       CFMutableDictionaryRefObj_tp_alloc, /* tp_alloc */
-       CFMutableDictionaryRefObj_tp_new, /* tp_new */
-       CFMutableDictionaryRefObj_tp_free, /* tp_free */
-};
-
-/* ------------- End object type CFMutableDictionaryRef ------------- */
-
-
-/* --------------------- Object type CFDataRef ---------------------- */
-
-PyTypeObject CFDataRef_Type;
-
-#define CFDataRefObj_Check(x) (Py_TYPE(x) == &CFDataRef_Type || PyObject_TypeCheck((x), &CFDataRef_Type))
-
-typedef struct CFDataRefObject {
-       PyObject_HEAD
-       CFDataRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFDataRefObject;
-
-PyObject *CFDataRefObj_New(CFDataRef itself)
-{
-       CFDataRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFDataRefObject, &CFDataRef_Type);
-       if (it == NULL) return NULL;
-       /* XXXX Should we tp_init or tp_new our basetype? */
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFDataRefObj_Convert(PyObject *v, CFDataRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       if (PyString_Check(v)) {
-           char *cStr;
-           Py_ssize_t cLen;
-           if( PyString_AsStringAndSize(v, &cStr, &cLen) < 0 ) return 0;
-           *p_itself = CFDataCreate((CFAllocatorRef)NULL, (unsigned char *)cStr, cLen);
-           return 1;
-       }
-
-       if (!CFDataRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFDataRef required");
-               return 0;
-       }
-       *p_itself = ((CFDataRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFDataRefObj_dealloc(CFDataRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       CFTypeRef_Type.tp_dealloc((PyObject *)self);
-}
-
-static PyObject *CFDataRefObj_CFDataCreateCopy(CFDataRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFDataRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFDataCreateCopy((CFAllocatorRef)NULL,
-                              _self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFDataRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFDataRefObj_CFDataGetLength(CFDataRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex _rv;
-#ifndef CFDataGetLength
-       PyMac_PRECHECK(CFDataGetLength);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFDataGetLength(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFDataRefObj_CFStringCreateFromExternalRepresentation(CFDataRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFStringEncoding encoding;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &encoding))
-               return NULL;
-       _rv = CFStringCreateFromExternalRepresentation((CFAllocatorRef)NULL,
-                                                      _self->ob_itself,
-                                                      encoding);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFDataRefObj_CFDataGetData(CFDataRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       int size = CFDataGetLength(_self->ob_itself);
-       char *data = (char *)CFDataGetBytePtr(_self->ob_itself);
-
-       _res = (PyObject *)PyString_FromStringAndSize(data, size);
-       return _res;
-
-}
-
-static PyMethodDef CFDataRefObj_methods[] = {
-       {"CFDataCreateCopy", (PyCFunction)CFDataRefObj_CFDataCreateCopy, 1,
-        PyDoc_STR("() -> (CFDataRef _rv)")},
-       {"CFDataGetLength", (PyCFunction)CFDataRefObj_CFDataGetLength, 1,
-        PyDoc_STR("() -> (CFIndex _rv)")},
-       {"CFStringCreateFromExternalRepresentation", (PyCFunction)CFDataRefObj_CFStringCreateFromExternalRepresentation, 1,
-        PyDoc_STR("(CFStringEncoding encoding) -> (CFStringRef _rv)")},
-       {"CFDataGetData", (PyCFunction)CFDataRefObj_CFDataGetData, 1,
-        PyDoc_STR("() -> (string _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define CFDataRefObj_getsetlist NULL
-
-
-static int CFDataRefObj_compare(CFDataRefObject *self, CFDataRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFDataRefObj_repr(CFDataRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFDataRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFDataRefObj_hash(CFDataRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFDataRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFDataRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFDataRefObj_Convert, &itself))
-       {
-               ((CFDataRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-
-       /* Any CFTypeRef descendent is allowed as initializer too */
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFDataRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFDataRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFDataRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFDataRefObject *)self)->ob_itself = NULL;
-       ((CFDataRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFDataRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFDataRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFDataRef", /*tp_name*/
-       sizeof(CFDataRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFDataRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFDataRefObj_compare, /*tp_compare*/
-       (reprfunc) CFDataRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFDataRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFDataRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFDataRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFDataRefObj_tp_init, /* tp_init */
-       CFDataRefObj_tp_alloc, /* tp_alloc */
-       CFDataRefObj_tp_new, /* tp_new */
-       CFDataRefObj_tp_free, /* tp_free */
-};
-
-/* ------------------- End object type CFDataRef -------------------- */
-
-
-/* ------------------ Object type CFMutableDataRef ------------------ */
-
-PyTypeObject CFMutableDataRef_Type;
-
-#define CFMutableDataRefObj_Check(x) (Py_TYPE(x) == &CFMutableDataRef_Type || PyObject_TypeCheck((x), &CFMutableDataRef_Type))
-
-typedef struct CFMutableDataRefObject {
-       PyObject_HEAD
-       CFMutableDataRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFMutableDataRefObject;
-
-PyObject *CFMutableDataRefObj_New(CFMutableDataRef itself)
-{
-       CFMutableDataRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFMutableDataRefObject, &CFMutableDataRef_Type);
-       if (it == NULL) return NULL;
-       /* XXXX Should we tp_init or tp_new our basetype? */
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFMutableDataRefObj_Convert(PyObject *v, CFMutableDataRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       /* Check for other CF objects here */
-
-       if (!CFMutableDataRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFMutableDataRef required");
-               return 0;
-       }
-       *p_itself = ((CFMutableDataRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFMutableDataRefObj_dealloc(CFMutableDataRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       CFDataRef_Type.tp_dealloc((PyObject *)self);
-}
-
-static PyObject *CFMutableDataRefObj_CFDataSetLength(CFMutableDataRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex length;
-#ifndef CFDataSetLength
-       PyMac_PRECHECK(CFDataSetLength);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &length))
-               return NULL;
-       CFDataSetLength(_self->ob_itself,
-                       length);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableDataRefObj_CFDataIncreaseLength(CFMutableDataRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex extraLength;
-#ifndef CFDataIncreaseLength
-       PyMac_PRECHECK(CFDataIncreaseLength);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &extraLength))
-               return NULL;
-       CFDataIncreaseLength(_self->ob_itself,
-                            extraLength);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableDataRefObj_CFDataAppendBytes(CFMutableDataRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       unsigned char *bytes__in__;
-       long bytes__len__;
-       int bytes__in_len__;
-#ifndef CFDataAppendBytes
-       PyMac_PRECHECK(CFDataAppendBytes);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             &bytes__in__, &bytes__in_len__))
-               return NULL;
-       bytes__len__ = bytes__in_len__;
-       CFDataAppendBytes(_self->ob_itself,
-                         bytes__in__, bytes__len__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableDataRefObj_CFDataReplaceBytes(CFMutableDataRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFRange range;
-       unsigned char *newBytes__in__;
-       long newBytes__len__;
-       int newBytes__in_len__;
-#ifndef CFDataReplaceBytes
-       PyMac_PRECHECK(CFDataReplaceBytes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#",
-                             CFRange_Convert, &range,
-                             &newBytes__in__, &newBytes__in_len__))
-               return NULL;
-       newBytes__len__ = newBytes__in_len__;
-       CFDataReplaceBytes(_self->ob_itself,
-                          range,
-                          newBytes__in__, newBytes__len__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableDataRefObj_CFDataDeleteBytes(CFMutableDataRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFRange range;
-#ifndef CFDataDeleteBytes
-       PyMac_PRECHECK(CFDataDeleteBytes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFRange_Convert, &range))
-               return NULL;
-       CFDataDeleteBytes(_self->ob_itself,
-                         range);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef CFMutableDataRefObj_methods[] = {
-       {"CFDataSetLength", (PyCFunction)CFMutableDataRefObj_CFDataSetLength, 1,
-        PyDoc_STR("(CFIndex length) -> None")},
-       {"CFDataIncreaseLength", (PyCFunction)CFMutableDataRefObj_CFDataIncreaseLength, 1,
-        PyDoc_STR("(CFIndex extraLength) -> None")},
-       {"CFDataAppendBytes", (PyCFunction)CFMutableDataRefObj_CFDataAppendBytes, 1,
-        PyDoc_STR("(Buffer bytes) -> None")},
-       {"CFDataReplaceBytes", (PyCFunction)CFMutableDataRefObj_CFDataReplaceBytes, 1,
-        PyDoc_STR("(CFRange range, Buffer newBytes) -> None")},
-       {"CFDataDeleteBytes", (PyCFunction)CFMutableDataRefObj_CFDataDeleteBytes, 1,
-        PyDoc_STR("(CFRange range) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define CFMutableDataRefObj_getsetlist NULL
-
-
-static int CFMutableDataRefObj_compare(CFMutableDataRefObject *self, CFMutableDataRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFMutableDataRefObj_repr(CFMutableDataRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFMutableDataRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFMutableDataRefObj_hash(CFMutableDataRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFMutableDataRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFMutableDataRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableDataRefObj_Convert, &itself))
-       {
-               ((CFMutableDataRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-
-       /* Any CFTypeRef descendent is allowed as initializer too */
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFMutableDataRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFMutableDataRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFMutableDataRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFMutableDataRefObject *)self)->ob_itself = NULL;
-       ((CFMutableDataRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFMutableDataRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFMutableDataRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFMutableDataRef", /*tp_name*/
-       sizeof(CFMutableDataRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFMutableDataRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFMutableDataRefObj_compare, /*tp_compare*/
-       (reprfunc) CFMutableDataRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFMutableDataRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFMutableDataRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFMutableDataRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFMutableDataRefObj_tp_init, /* tp_init */
-       CFMutableDataRefObj_tp_alloc, /* tp_alloc */
-       CFMutableDataRefObj_tp_new, /* tp_new */
-       CFMutableDataRefObj_tp_free, /* tp_free */
-};
-
-/* ---------------- End object type CFMutableDataRef ---------------- */
-
-
-/* -------------------- Object type CFStringRef --------------------- */
-
-PyTypeObject CFStringRef_Type;
-
-#define CFStringRefObj_Check(x) (Py_TYPE(x) == &CFStringRef_Type || PyObject_TypeCheck((x), &CFStringRef_Type))
-
-typedef struct CFStringRefObject {
-       PyObject_HEAD
-       CFStringRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFStringRefObject;
-
-PyObject *CFStringRefObj_New(CFStringRef itself)
-{
-       CFStringRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFStringRefObject, &CFStringRef_Type);
-       if (it == NULL) return NULL;
-       /* XXXX Should we tp_init or tp_new our basetype? */
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFStringRefObj_Convert(PyObject *v, CFStringRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       if (PyString_Check(v)) {
-           char *cStr;
-           if (!PyArg_Parse(v, "es", "ascii", &cStr))
-               return 0;
-               *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);
-               PyMem_Free(cStr);
-               return 1;
-       }
-       if (PyUnicode_Check(v)) {
-               /* We use the CF types here, if Python was configured differently that will give an error */
-               CFIndex size = PyUnicode_GetSize(v);
-               UniChar *unichars = PyUnicode_AsUnicode(v);
-               if (!unichars) return 0;
-               *p_itself = CFStringCreateWithCharacters((CFAllocatorRef)NULL, unichars, size);
-               return 1;
-       }
-
-
-       if (!CFStringRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFStringRef required");
-               return 0;
-       }
-       *p_itself = ((CFStringRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFStringRefObj_dealloc(CFStringRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       CFTypeRef_Type.tp_dealloc((PyObject *)self);
-}
-
-static PyObject *CFStringRefObj_CFStringCreateWithSubstring(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFRange range;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFRange_Convert, &range))
-               return NULL;
-       _rv = CFStringCreateWithSubstring((CFAllocatorRef)NULL,
-                                         _self->ob_itself,
-                                         range);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringCreateCopy(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFStringCreateCopy((CFAllocatorRef)NULL,
-                                _self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringGetLength(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex _rv;
-#ifndef CFStringGetLength
-       PyMac_PRECHECK(CFStringGetLength);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFStringGetLength(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringGetBytes(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex _rv;
-       CFRange range;
-       CFStringEncoding encoding;
-       UInt8 lossByte;
-       Boolean isExternalRepresentation;
-       UInt8 buffer;
-       CFIndex maxBufLen;
-       CFIndex usedBufLen;
-#ifndef CFStringGetBytes
-       PyMac_PRECHECK(CFStringGetBytes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lbll",
-                             CFRange_Convert, &range,
-                             &encoding,
-                             &lossByte,
-                             &isExternalRepresentation,
-                             &maxBufLen))
-               return NULL;
-       _rv = CFStringGetBytes(_self->ob_itself,
-                              range,
-                              encoding,
-                              lossByte,
-                              isExternalRepresentation,
-                              &buffer,
-                              maxBufLen,
-                              &usedBufLen);
-       _res = Py_BuildValue("lbl",
-                            _rv,
-                            buffer,
-                            usedBufLen);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringCreateExternalRepresentation(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFDataRef _rv;
-       CFStringEncoding encoding;
-       UInt8 lossByte;
-       if (!PyArg_ParseTuple(_args, "lb",
-                             &encoding,
-                             &lossByte))
-               return NULL;
-       _rv = CFStringCreateExternalRepresentation((CFAllocatorRef)NULL,
-                                                  _self->ob_itself,
-                                                  encoding,
-                                                  lossByte);
-       _res = Py_BuildValue("O&",
-                            CFDataRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringGetSmallestEncoding(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringEncoding _rv;
-#ifndef CFStringGetSmallestEncoding
-       PyMac_PRECHECK(CFStringGetSmallestEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFStringGetSmallestEncoding(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringGetFastestEncoding(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringEncoding _rv;
-#ifndef CFStringGetFastestEncoding
-       PyMac_PRECHECK(CFStringGetFastestEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFStringGetFastestEncoding(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringCompareWithOptions(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFComparisonResult _rv;
-       CFStringRef theString2;
-       CFRange rangeToCompare;
-       CFOptionFlags compareOptions;
-#ifndef CFStringCompareWithOptions
-       PyMac_PRECHECK(CFStringCompareWithOptions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CFStringRefObj_Convert, &theString2,
-                             CFRange_Convert, &rangeToCompare,
-                             &compareOptions))
-               return NULL;
-       _rv = CFStringCompareWithOptions(_self->ob_itself,
-                                        theString2,
-                                        rangeToCompare,
-                                        compareOptions);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringCompare(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFComparisonResult _rv;
-       CFStringRef theString2;
-       CFOptionFlags compareOptions;
-#ifndef CFStringCompare
-       PyMac_PRECHECK(CFStringCompare);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CFStringRefObj_Convert, &theString2,
-                             &compareOptions))
-               return NULL;
-       _rv = CFStringCompare(_self->ob_itself,
-                             theString2,
-                             compareOptions);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringFindWithOptions(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       CFStringRef stringToFind;
-       CFRange rangeToSearch;
-       CFOptionFlags searchOptions;
-       CFRange result;
-#ifndef CFStringFindWithOptions
-       PyMac_PRECHECK(CFStringFindWithOptions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CFStringRefObj_Convert, &stringToFind,
-                             CFRange_Convert, &rangeToSearch,
-                             &searchOptions))
-               return NULL;
-       _rv = CFStringFindWithOptions(_self->ob_itself,
-                                     stringToFind,
-                                     rangeToSearch,
-                                     searchOptions,
-                                     &result);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CFRange_New, result);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringCreateArrayWithFindResults(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFArrayRef _rv;
-       CFStringRef stringToFind;
-       CFRange rangeToSearch;
-       CFOptionFlags compareOptions;
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CFStringRefObj_Convert, &stringToFind,
-                             CFRange_Convert, &rangeToSearch,
-                             &compareOptions))
-               return NULL;
-       _rv = CFStringCreateArrayWithFindResults((CFAllocatorRef)NULL,
-                                                _self->ob_itself,
-                                                stringToFind,
-                                                rangeToSearch,
-                                                compareOptions);
-       _res = Py_BuildValue("O&",
-                            CFArrayRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringFind(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFRange _rv;
-       CFStringRef stringToFind;
-       CFOptionFlags compareOptions;
-#ifndef CFStringFind
-       PyMac_PRECHECK(CFStringFind);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CFStringRefObj_Convert, &stringToFind,
-                             &compareOptions))
-               return NULL;
-       _rv = CFStringFind(_self->ob_itself,
-                          stringToFind,
-                          compareOptions);
-       _res = Py_BuildValue("O&",
-                            CFRange_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringHasPrefix(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       CFStringRef prefix;
-#ifndef CFStringHasPrefix
-       PyMac_PRECHECK(CFStringHasPrefix);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &prefix))
-               return NULL;
-       _rv = CFStringHasPrefix(_self->ob_itself,
-                               prefix);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringHasSuffix(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       CFStringRef suffix;
-#ifndef CFStringHasSuffix
-       PyMac_PRECHECK(CFStringHasSuffix);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &suffix))
-               return NULL;
-       _rv = CFStringHasSuffix(_self->ob_itself,
-                               suffix);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringGetLineBounds(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFRange range;
-       CFIndex lineBeginIndex;
-       CFIndex lineEndIndex;
-       CFIndex contentsEndIndex;
-#ifndef CFStringGetLineBounds
-       PyMac_PRECHECK(CFStringGetLineBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFRange_Convert, &range))
-               return NULL;
-       CFStringGetLineBounds(_self->ob_itself,
-                             range,
-                             &lineBeginIndex,
-                             &lineEndIndex,
-                             &contentsEndIndex);
-       _res = Py_BuildValue("lll",
-                            lineBeginIndex,
-                            lineEndIndex,
-                            contentsEndIndex);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringCreateArrayBySeparatingStrings(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFArrayRef _rv;
-       CFStringRef separatorString;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &separatorString))
-               return NULL;
-       _rv = CFStringCreateArrayBySeparatingStrings((CFAllocatorRef)NULL,
-                                                    _self->ob_itself,
-                                                    separatorString);
-       _res = Py_BuildValue("O&",
-                            CFArrayRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringGetIntValue(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-#ifndef CFStringGetIntValue
-       PyMac_PRECHECK(CFStringGetIntValue);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFStringGetIntValue(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringGetDoubleValue(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       double _rv;
-#ifndef CFStringGetDoubleValue
-       PyMac_PRECHECK(CFStringGetDoubleValue);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFStringGetDoubleValue(_self->ob_itself);
-       _res = Py_BuildValue("d",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringConvertIANACharSetNameToEncoding(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringEncoding _rv;
-#ifndef CFStringConvertIANACharSetNameToEncoding
-       PyMac_PRECHECK(CFStringConvertIANACharSetNameToEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFStringConvertIANACharSetNameToEncoding(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFShowStr(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef CFShowStr
-       PyMac_PRECHECK(CFShowStr);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CFShowStr(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFURLCreateWithString(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       CFURLRef baseURL;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             OptionalCFURLRefObj_Convert, &baseURL))
-               return NULL;
-       _rv = CFURLCreateWithString((CFAllocatorRef)NULL,
-                                   _self->ob_itself,
-                                   baseURL);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFURLCreateWithFileSystemPath(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       CFURLPathStyle pathStyle;
-       Boolean isDirectory;
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &pathStyle,
-                             &isDirectory))
-               return NULL;
-       _rv = CFURLCreateWithFileSystemPath((CFAllocatorRef)NULL,
-                                           _self->ob_itself,
-                                           pathStyle,
-                                           isDirectory);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFURLCreateWithFileSystemPathRelativeToBase(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       CFURLPathStyle pathStyle;
-       Boolean isDirectory;
-       CFURLRef baseURL;
-       if (!PyArg_ParseTuple(_args, "llO&",
-                             &pathStyle,
-                             &isDirectory,
-                             OptionalCFURLRefObj_Convert, &baseURL))
-               return NULL;
-       _rv = CFURLCreateWithFileSystemPathRelativeToBase((CFAllocatorRef)NULL,
-                                                         _self->ob_itself,
-                                                         pathStyle,
-                                                         isDirectory,
-                                                         baseURL);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFURLCreateStringByReplacingPercentEscapes(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFStringRef charactersToLeaveEscaped;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &charactersToLeaveEscaped))
-               return NULL;
-       _rv = CFURLCreateStringByReplacingPercentEscapes((CFAllocatorRef)NULL,
-                                                        _self->ob_itself,
-                                                        charactersToLeaveEscaped);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFURLCreateStringByAddingPercentEscapes(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFStringRef charactersToLeaveUnescaped;
-       CFStringRef legalURLCharactersToBeEscaped;
-       CFStringEncoding encoding;
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CFStringRefObj_Convert, &charactersToLeaveUnescaped,
-                             CFStringRefObj_Convert, &legalURLCharactersToBeEscaped,
-                             &encoding))
-               return NULL;
-       _rv = CFURLCreateStringByAddingPercentEscapes((CFAllocatorRef)NULL,
-                                                     _self->ob_itself,
-                                                     charactersToLeaveUnescaped,
-                                                     legalURLCharactersToBeEscaped,
-                                                     encoding);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFStringRefObj_CFStringGetString(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       int size = CFStringGetLength(_self->ob_itself)+1;
-       char *data = malloc(size);
-
-       if( data == NULL ) return PyErr_NoMemory();
-       if ( CFStringGetCString(_self->ob_itself, data, size, 0) ) {
-               _res = (PyObject *)PyString_FromString(data);
-       } else {
-               PyErr_SetString(PyExc_RuntimeError, "CFStringGetCString could not fit the string");
-               _res = NULL;
-       }
-       free(data);
-       return _res;
-
-}
-
-static PyObject *CFStringRefObj_CFStringGetUnicode(CFStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       int size = CFStringGetLength(_self->ob_itself)+1;
-       Py_UNICODE *data = malloc(size*sizeof(Py_UNICODE));
-       CFRange range;
-
-       range.location = 0;
-       range.length = size;
-       if( data == NULL ) return PyErr_NoMemory();
-       CFStringGetCharacters(_self->ob_itself, range, data);
-       _res = (PyObject *)PyUnicode_FromUnicode(data, size-1);
-       free(data);
-       return _res;
-
-}
-
-static PyMethodDef CFStringRefObj_methods[] = {
-       {"CFStringCreateWithSubstring", (PyCFunction)CFStringRefObj_CFStringCreateWithSubstring, 1,
-        PyDoc_STR("(CFRange range) -> (CFStringRef _rv)")},
-       {"CFStringCreateCopy", (PyCFunction)CFStringRefObj_CFStringCreateCopy, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFStringGetLength", (PyCFunction)CFStringRefObj_CFStringGetLength, 1,
-        PyDoc_STR("() -> (CFIndex _rv)")},
-       {"CFStringGetBytes", (PyCFunction)CFStringRefObj_CFStringGetBytes, 1,
-        PyDoc_STR("(CFRange range, CFStringEncoding encoding, UInt8 lossByte, Boolean isExternalRepresentation, CFIndex maxBufLen) -> (CFIndex _rv, UInt8 buffer, CFIndex usedBufLen)")},
-       {"CFStringCreateExternalRepresentation", (PyCFunction)CFStringRefObj_CFStringCreateExternalRepresentation, 1,
-        PyDoc_STR("(CFStringEncoding encoding, UInt8 lossByte) -> (CFDataRef _rv)")},
-       {"CFStringGetSmallestEncoding", (PyCFunction)CFStringRefObj_CFStringGetSmallestEncoding, 1,
-        PyDoc_STR("() -> (CFStringEncoding _rv)")},
-       {"CFStringGetFastestEncoding", (PyCFunction)CFStringRefObj_CFStringGetFastestEncoding, 1,
-        PyDoc_STR("() -> (CFStringEncoding _rv)")},
-       {"CFStringCompareWithOptions", (PyCFunction)CFStringRefObj_CFStringCompareWithOptions, 1,
-        PyDoc_STR("(CFStringRef theString2, CFRange rangeToCompare, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)")},
-       {"CFStringCompare", (PyCFunction)CFStringRefObj_CFStringCompare, 1,
-        PyDoc_STR("(CFStringRef theString2, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)")},
-       {"CFStringFindWithOptions", (PyCFunction)CFStringRefObj_CFStringFindWithOptions, 1,
-        PyDoc_STR("(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags searchOptions) -> (Boolean _rv, CFRange result)")},
-       {"CFStringCreateArrayWithFindResults", (PyCFunction)CFStringRefObj_CFStringCreateArrayWithFindResults, 1,
-        PyDoc_STR("(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags compareOptions) -> (CFArrayRef _rv)")},
-       {"CFStringFind", (PyCFunction)CFStringRefObj_CFStringFind, 1,
-        PyDoc_STR("(CFStringRef stringToFind, CFOptionFlags compareOptions) -> (CFRange _rv)")},
-       {"CFStringHasPrefix", (PyCFunction)CFStringRefObj_CFStringHasPrefix, 1,
-        PyDoc_STR("(CFStringRef prefix) -> (Boolean _rv)")},
-       {"CFStringHasSuffix", (PyCFunction)CFStringRefObj_CFStringHasSuffix, 1,
-        PyDoc_STR("(CFStringRef suffix) -> (Boolean _rv)")},
-       {"CFStringGetLineBounds", (PyCFunction)CFStringRefObj_CFStringGetLineBounds, 1,
-        PyDoc_STR("(CFRange range) -> (CFIndex lineBeginIndex, CFIndex lineEndIndex, CFIndex contentsEndIndex)")},
-       {"CFStringCreateArrayBySeparatingStrings", (PyCFunction)CFStringRefObj_CFStringCreateArrayBySeparatingStrings, 1,
-        PyDoc_STR("(CFStringRef separatorString) -> (CFArrayRef _rv)")},
-       {"CFStringGetIntValue", (PyCFunction)CFStringRefObj_CFStringGetIntValue, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"CFStringGetDoubleValue", (PyCFunction)CFStringRefObj_CFStringGetDoubleValue, 1,
-        PyDoc_STR("() -> (double _rv)")},
-       {"CFStringConvertIANACharSetNameToEncoding", (PyCFunction)CFStringRefObj_CFStringConvertIANACharSetNameToEncoding, 1,
-        PyDoc_STR("() -> (CFStringEncoding _rv)")},
-       {"CFShowStr", (PyCFunction)CFStringRefObj_CFShowStr, 1,
-        PyDoc_STR("() -> None")},
-       {"CFURLCreateWithString", (PyCFunction)CFStringRefObj_CFURLCreateWithString, 1,
-        PyDoc_STR("(CFURLRef baseURL) -> (CFURLRef _rv)")},
-       {"CFURLCreateWithFileSystemPath", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPath, 1,
-        PyDoc_STR("(CFURLPathStyle pathStyle, Boolean isDirectory) -> (CFURLRef _rv)")},
-       {"CFURLCreateWithFileSystemPathRelativeToBase", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPathRelativeToBase, 1,
-        PyDoc_STR("(CFURLPathStyle pathStyle, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)")},
-       {"CFURLCreateStringByReplacingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByReplacingPercentEscapes, 1,
-        PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
-       {"CFURLCreateStringByAddingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByAddingPercentEscapes, 1,
-        PyDoc_STR("(CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding) -> (CFStringRef _rv)")},
-       {"CFStringGetString", (PyCFunction)CFStringRefObj_CFStringGetString, 1,
-        PyDoc_STR("() -> (string _rv)")},
-       {"CFStringGetUnicode", (PyCFunction)CFStringRefObj_CFStringGetUnicode, 1,
-        PyDoc_STR("() -> (unicode _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define CFStringRefObj_getsetlist NULL
-
-
-static int CFStringRefObj_compare(CFStringRefObject *self, CFStringRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFStringRefObj_repr(CFStringRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFStringRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFStringRefObj_hash(CFStringRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFStringRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFStringRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFStringRefObj_Convert, &itself))
-       {
-               ((CFStringRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-
-       /* Any CFTypeRef descendent is allowed as initializer too */
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFStringRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFStringRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFStringRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFStringRefObject *)self)->ob_itself = NULL;
-       ((CFStringRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFStringRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFStringRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFStringRef", /*tp_name*/
-       sizeof(CFStringRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFStringRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFStringRefObj_compare, /*tp_compare*/
-       (reprfunc) CFStringRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFStringRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFStringRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFStringRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFStringRefObj_tp_init, /* tp_init */
-       CFStringRefObj_tp_alloc, /* tp_alloc */
-       CFStringRefObj_tp_new, /* tp_new */
-       CFStringRefObj_tp_free, /* tp_free */
-};
-
-/* ------------------ End object type CFStringRef ------------------- */
-
-
-/* ----------------- Object type CFMutableStringRef ----------------- */
-
-PyTypeObject CFMutableStringRef_Type;
-
-#define CFMutableStringRefObj_Check(x) (Py_TYPE(x) == &CFMutableStringRef_Type || PyObject_TypeCheck((x), &CFMutableStringRef_Type))
-
-typedef struct CFMutableStringRefObject {
-       PyObject_HEAD
-       CFMutableStringRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFMutableStringRefObject;
-
-PyObject *CFMutableStringRefObj_New(CFMutableStringRef itself)
-{
-       CFMutableStringRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFMutableStringRefObject, &CFMutableStringRef_Type);
-       if (it == NULL) return NULL;
-       /* XXXX Should we tp_init or tp_new our basetype? */
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFMutableStringRefObj_Convert(PyObject *v, CFMutableStringRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       /* Check for other CF objects here */
-
-       if (!CFMutableStringRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFMutableStringRef required");
-               return 0;
-       }
-       *p_itself = ((CFMutableStringRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFMutableStringRefObj_dealloc(CFMutableStringRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       CFStringRef_Type.tp_dealloc((PyObject *)self);
-}
-
-static PyObject *CFMutableStringRefObj_CFStringAppend(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef appendedString;
-#ifndef CFStringAppend
-       PyMac_PRECHECK(CFStringAppend);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &appendedString))
-               return NULL;
-       CFStringAppend(_self->ob_itself,
-                      appendedString);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringAppendCharacters(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UniChar *chars__in__;
-       UniCharCount chars__len__;
-       int chars__in_len__;
-#ifndef CFStringAppendCharacters
-       PyMac_PRECHECK(CFStringAppendCharacters);
-#endif
-       if (!PyArg_ParseTuple(_args, "u#",
-                             &chars__in__, &chars__in_len__))
-               return NULL;
-       chars__len__ = chars__in_len__;
-       CFStringAppendCharacters(_self->ob_itself,
-                                chars__in__, chars__len__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringAppendPascalString(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 pStr;
-       CFStringEncoding encoding;
-#ifndef CFStringAppendPascalString
-       PyMac_PRECHECK(CFStringAppendPascalString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetStr255, pStr,
-                             &encoding))
-               return NULL;
-       CFStringAppendPascalString(_self->ob_itself,
-                                  pStr,
-                                  encoding);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringAppendCString(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char* cStr;
-       CFStringEncoding encoding;
-#ifndef CFStringAppendCString
-       PyMac_PRECHECK(CFStringAppendCString);
-#endif
-       if (!PyArg_ParseTuple(_args, "sl",
-                             &cStr,
-                             &encoding))
-               return NULL;
-       CFStringAppendCString(_self->ob_itself,
-                             cStr,
-                             encoding);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringInsert(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex idx;
-       CFStringRef insertedStr;
-#ifndef CFStringInsert
-       PyMac_PRECHECK(CFStringInsert);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &idx,
-                             CFStringRefObj_Convert, &insertedStr))
-               return NULL;
-       CFStringInsert(_self->ob_itself,
-                      idx,
-                      insertedStr);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringDelete(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFRange range;
-#ifndef CFStringDelete
-       PyMac_PRECHECK(CFStringDelete);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFRange_Convert, &range))
-               return NULL;
-       CFStringDelete(_self->ob_itself,
-                      range);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringReplace(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFRange range;
-       CFStringRef replacement;
-#ifndef CFStringReplace
-       PyMac_PRECHECK(CFStringReplace);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFRange_Convert, &range,
-                             CFStringRefObj_Convert, &replacement))
-               return NULL;
-       CFStringReplace(_self->ob_itself,
-                       range,
-                       replacement);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringReplaceAll(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef replacement;
-#ifndef CFStringReplaceAll
-       PyMac_PRECHECK(CFStringReplaceAll);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &replacement))
-               return NULL;
-       CFStringReplaceAll(_self->ob_itself,
-                          replacement);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringPad(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef padString;
-       CFIndex length;
-       CFIndex indexIntoPad;
-#ifndef CFStringPad
-       PyMac_PRECHECK(CFStringPad);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CFStringRefObj_Convert, &padString,
-                             &length,
-                             &indexIntoPad))
-               return NULL;
-       CFStringPad(_self->ob_itself,
-                   padString,
-                   length,
-                   indexIntoPad);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringTrim(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef trimString;
-#ifndef CFStringTrim
-       PyMac_PRECHECK(CFStringTrim);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &trimString))
-               return NULL;
-       CFStringTrim(_self->ob_itself,
-                    trimString);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CFMutableStringRefObj_CFStringTrimWhitespace(CFMutableStringRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef CFStringTrimWhitespace
-       PyMac_PRECHECK(CFStringTrimWhitespace);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CFStringTrimWhitespace(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef CFMutableStringRefObj_methods[] = {
-       {"CFStringAppend", (PyCFunction)CFMutableStringRefObj_CFStringAppend, 1,
-        PyDoc_STR("(CFStringRef appendedString) -> None")},
-       {"CFStringAppendCharacters", (PyCFunction)CFMutableStringRefObj_CFStringAppendCharacters, 1,
-        PyDoc_STR("(Buffer chars) -> None")},
-       {"CFStringAppendPascalString", (PyCFunction)CFMutableStringRefObj_CFStringAppendPascalString, 1,
-        PyDoc_STR("(Str255 pStr, CFStringEncoding encoding) -> None")},
-       {"CFStringAppendCString", (PyCFunction)CFMutableStringRefObj_CFStringAppendCString, 1,
-        PyDoc_STR("(char* cStr, CFStringEncoding encoding) -> None")},
-       {"CFStringInsert", (PyCFunction)CFMutableStringRefObj_CFStringInsert, 1,
-        PyDoc_STR("(CFIndex idx, CFStringRef insertedStr) -> None")},
-       {"CFStringDelete", (PyCFunction)CFMutableStringRefObj_CFStringDelete, 1,
-        PyDoc_STR("(CFRange range) -> None")},
-       {"CFStringReplace", (PyCFunction)CFMutableStringRefObj_CFStringReplace, 1,
-        PyDoc_STR("(CFRange range, CFStringRef replacement) -> None")},
-       {"CFStringReplaceAll", (PyCFunction)CFMutableStringRefObj_CFStringReplaceAll, 1,
-        PyDoc_STR("(CFStringRef replacement) -> None")},
-       {"CFStringPad", (PyCFunction)CFMutableStringRefObj_CFStringPad, 1,
-        PyDoc_STR("(CFStringRef padString, CFIndex length, CFIndex indexIntoPad) -> None")},
-       {"CFStringTrim", (PyCFunction)CFMutableStringRefObj_CFStringTrim, 1,
-        PyDoc_STR("(CFStringRef trimString) -> None")},
-       {"CFStringTrimWhitespace", (PyCFunction)CFMutableStringRefObj_CFStringTrimWhitespace, 1,
-        PyDoc_STR("() -> None")},
-       {NULL, NULL, 0}
-};
-
-#define CFMutableStringRefObj_getsetlist NULL
-
-
-static int CFMutableStringRefObj_compare(CFMutableStringRefObject *self, CFMutableStringRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFMutableStringRefObj_repr(CFMutableStringRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFMutableStringRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFMutableStringRefObj_hash(CFMutableStringRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFMutableStringRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFMutableStringRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableStringRefObj_Convert, &itself))
-       {
-               ((CFMutableStringRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-
-       /* Any CFTypeRef descendent is allowed as initializer too */
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFMutableStringRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFMutableStringRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFMutableStringRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFMutableStringRefObject *)self)->ob_itself = NULL;
-       ((CFMutableStringRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFMutableStringRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFMutableStringRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFMutableStringRef", /*tp_name*/
-       sizeof(CFMutableStringRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFMutableStringRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFMutableStringRefObj_compare, /*tp_compare*/
-       (reprfunc) CFMutableStringRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFMutableStringRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFMutableStringRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFMutableStringRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFMutableStringRefObj_tp_init, /* tp_init */
-       CFMutableStringRefObj_tp_alloc, /* tp_alloc */
-       CFMutableStringRefObj_tp_new, /* tp_new */
-       CFMutableStringRefObj_tp_free, /* tp_free */
-};
-
-/* --------------- End object type CFMutableStringRef --------------- */
-
-
-/* ---------------------- Object type CFURLRef ---------------------- */
-
-PyTypeObject CFURLRef_Type;
-
-#define CFURLRefObj_Check(x) (Py_TYPE(x) == &CFURLRef_Type || PyObject_TypeCheck((x), &CFURLRef_Type))
-
-typedef struct CFURLRefObject {
-       PyObject_HEAD
-       CFURLRef ob_itself;
-       void (*ob_freeit)(CFTypeRef ptr);
-} CFURLRefObject;
-
-PyObject *CFURLRefObj_New(CFURLRef itself)
-{
-       CFURLRefObject *it;
-       if (itself == NULL)
-       {
-               PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-               return NULL;
-       }
-       it = PyObject_NEW(CFURLRefObject, &CFURLRef_Type);
-       if (it == NULL) return NULL;
-       /* XXXX Should we tp_init or tp_new our basetype? */
-       it->ob_itself = itself;
-       it->ob_freeit = CFRelease;
-       return (PyObject *)it;
-}
-
-int CFURLRefObj_Convert(PyObject *v, CFURLRef *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       /* Check for other CF objects here */
-
-       if (!CFURLRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CFURLRef required");
-               return 0;
-       }
-       *p_itself = ((CFURLRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CFURLRefObj_dealloc(CFURLRefObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit((CFTypeRef)self->ob_itself);
-               self->ob_itself = NULL;
-       }
-       CFTypeRef_Type.tp_dealloc((PyObject *)self);
-}
-
-static PyObject *CFURLRefObj_CFURLCreateData(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFDataRef _rv;
-       CFStringEncoding encoding;
-       Boolean escapeWhitespace;
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &encoding,
-                             &escapeWhitespace))
-               return NULL;
-       _rv = CFURLCreateData((CFAllocatorRef)NULL,
-                             _self->ob_itself,
-                             encoding,
-                             escapeWhitespace);
-       _res = Py_BuildValue("O&",
-                            CFDataRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLGetFileSystemRepresentation(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Boolean resolveAgainstBase;
-       UInt8 buffer;
-       CFIndex maxBufLen;
-#ifndef CFURLGetFileSystemRepresentation
-       PyMac_PRECHECK(CFURLGetFileSystemRepresentation);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &resolveAgainstBase,
-                             &maxBufLen))
-               return NULL;
-       _rv = CFURLGetFileSystemRepresentation(_self->ob_itself,
-                                              resolveAgainstBase,
-                                              &buffer,
-                                              maxBufLen);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            buffer);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyAbsoluteURL(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-#ifndef CFURLCopyAbsoluteURL
-       PyMac_PRECHECK(CFURLCopyAbsoluteURL);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyAbsoluteURL(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLGetString(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLGetString
-       PyMac_PRECHECK(CFURLGetString);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLGetString(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLGetBaseURL(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-#ifndef CFURLGetBaseURL
-       PyMac_PRECHECK(CFURLGetBaseURL);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLGetBaseURL(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCanBeDecomposed(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef CFURLCanBeDecomposed
-       PyMac_PRECHECK(CFURLCanBeDecomposed);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCanBeDecomposed(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyScheme(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLCopyScheme
-       PyMac_PRECHECK(CFURLCopyScheme);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyScheme(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyNetLocation(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLCopyNetLocation
-       PyMac_PRECHECK(CFURLCopyNetLocation);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyNetLocation(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyPath(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLCopyPath
-       PyMac_PRECHECK(CFURLCopyPath);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyPath(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyStrictPath(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       Boolean isAbsolute;
-#ifndef CFURLCopyStrictPath
-       PyMac_PRECHECK(CFURLCopyStrictPath);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyStrictPath(_self->ob_itself,
-                                 &isAbsolute);
-       _res = Py_BuildValue("O&l",
-                            CFStringRefObj_New, _rv,
-                            isAbsolute);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyFileSystemPath(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFURLPathStyle pathStyle;
-#ifndef CFURLCopyFileSystemPath
-       PyMac_PRECHECK(CFURLCopyFileSystemPath);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &pathStyle))
-               return NULL;
-       _rv = CFURLCopyFileSystemPath(_self->ob_itself,
-                                     pathStyle);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLHasDirectoryPath(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef CFURLHasDirectoryPath
-       PyMac_PRECHECK(CFURLHasDirectoryPath);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLHasDirectoryPath(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyResourceSpecifier(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLCopyResourceSpecifier
-       PyMac_PRECHECK(CFURLCopyResourceSpecifier);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyResourceSpecifier(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyHostName(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLCopyHostName
-       PyMac_PRECHECK(CFURLCopyHostName);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyHostName(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLGetPortNumber(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-#ifndef CFURLGetPortNumber
-       PyMac_PRECHECK(CFURLGetPortNumber);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLGetPortNumber(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyUserName(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLCopyUserName
-       PyMac_PRECHECK(CFURLCopyUserName);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyUserName(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyPassword(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLCopyPassword
-       PyMac_PRECHECK(CFURLCopyPassword);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyPassword(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyParameterString(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFStringRef charactersToLeaveEscaped;
-#ifndef CFURLCopyParameterString
-       PyMac_PRECHECK(CFURLCopyParameterString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &charactersToLeaveEscaped))
-               return NULL;
-       _rv = CFURLCopyParameterString(_self->ob_itself,
-                                      charactersToLeaveEscaped);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyQueryString(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFStringRef charactersToLeaveEscaped;
-#ifndef CFURLCopyQueryString
-       PyMac_PRECHECK(CFURLCopyQueryString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &charactersToLeaveEscaped))
-               return NULL;
-       _rv = CFURLCopyQueryString(_self->ob_itself,
-                                  charactersToLeaveEscaped);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyFragment(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFStringRef charactersToLeaveEscaped;
-#ifndef CFURLCopyFragment
-       PyMac_PRECHECK(CFURLCopyFragment);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &charactersToLeaveEscaped))
-               return NULL;
-       _rv = CFURLCopyFragment(_self->ob_itself,
-                               charactersToLeaveEscaped);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyLastPathComponent(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLCopyLastPathComponent
-       PyMac_PRECHECK(CFURLCopyLastPathComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyLastPathComponent(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCopyPathExtension(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-#ifndef CFURLCopyPathExtension
-       PyMac_PRECHECK(CFURLCopyPathExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCopyPathExtension(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCreateCopyAppendingPathComponent(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       CFStringRef pathComponent;
-       Boolean isDirectory;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CFStringRefObj_Convert, &pathComponent,
-                             &isDirectory))
-               return NULL;
-       _rv = CFURLCreateCopyAppendingPathComponent((CFAllocatorRef)NULL,
-                                                   _self->ob_itself,
-                                                   pathComponent,
-                                                   isDirectory);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCreateCopyDeletingLastPathComponent(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCreateCopyDeletingLastPathComponent((CFAllocatorRef)NULL,
-                                                      _self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCreateCopyAppendingPathExtension(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       CFStringRef extension;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &extension))
-               return NULL;
-       _rv = CFURLCreateCopyAppendingPathExtension((CFAllocatorRef)NULL,
-                                                   _self->ob_itself,
-                                                   extension);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLCreateCopyDeletingPathExtension(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLCreateCopyDeletingPathExtension((CFAllocatorRef)NULL,
-                                                  _self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CFURLRefObj_CFURLGetFSRef(CFURLRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       FSRef fsRef;
-#ifndef CFURLGetFSRef
-       PyMac_PRECHECK(CFURLGetFSRef);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLGetFSRef(_self->ob_itself,
-                           &fsRef);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildFSRef, &fsRef);
-       return _res;
-}
-
-static PyMethodDef CFURLRefObj_methods[] = {
-       {"CFURLCreateData", (PyCFunction)CFURLRefObj_CFURLCreateData, 1,
-        PyDoc_STR("(CFStringEncoding encoding, Boolean escapeWhitespace) -> (CFDataRef _rv)")},
-       {"CFURLGetFileSystemRepresentation", (PyCFunction)CFURLRefObj_CFURLGetFileSystemRepresentation, 1,
-        PyDoc_STR("(Boolean resolveAgainstBase, CFIndex maxBufLen) -> (Boolean _rv, UInt8 buffer)")},
-       {"CFURLCopyAbsoluteURL", (PyCFunction)CFURLRefObj_CFURLCopyAbsoluteURL, 1,
-        PyDoc_STR("() -> (CFURLRef _rv)")},
-       {"CFURLGetString", (PyCFunction)CFURLRefObj_CFURLGetString, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLGetBaseURL", (PyCFunction)CFURLRefObj_CFURLGetBaseURL, 1,
-        PyDoc_STR("() -> (CFURLRef _rv)")},
-       {"CFURLCanBeDecomposed", (PyCFunction)CFURLRefObj_CFURLCanBeDecomposed, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"CFURLCopyScheme", (PyCFunction)CFURLRefObj_CFURLCopyScheme, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLCopyNetLocation", (PyCFunction)CFURLRefObj_CFURLCopyNetLocation, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLCopyPath", (PyCFunction)CFURLRefObj_CFURLCopyPath, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLCopyStrictPath", (PyCFunction)CFURLRefObj_CFURLCopyStrictPath, 1,
-        PyDoc_STR("() -> (CFStringRef _rv, Boolean isAbsolute)")},
-       {"CFURLCopyFileSystemPath", (PyCFunction)CFURLRefObj_CFURLCopyFileSystemPath, 1,
-        PyDoc_STR("(CFURLPathStyle pathStyle) -> (CFStringRef _rv)")},
-       {"CFURLHasDirectoryPath", (PyCFunction)CFURLRefObj_CFURLHasDirectoryPath, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"CFURLCopyResourceSpecifier", (PyCFunction)CFURLRefObj_CFURLCopyResourceSpecifier, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLCopyHostName", (PyCFunction)CFURLRefObj_CFURLCopyHostName, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLGetPortNumber", (PyCFunction)CFURLRefObj_CFURLGetPortNumber, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"CFURLCopyUserName", (PyCFunction)CFURLRefObj_CFURLCopyUserName, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLCopyPassword", (PyCFunction)CFURLRefObj_CFURLCopyPassword, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLCopyParameterString", (PyCFunction)CFURLRefObj_CFURLCopyParameterString, 1,
-        PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
-       {"CFURLCopyQueryString", (PyCFunction)CFURLRefObj_CFURLCopyQueryString, 1,
-        PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
-       {"CFURLCopyFragment", (PyCFunction)CFURLRefObj_CFURLCopyFragment, 1,
-        PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
-       {"CFURLCopyLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCopyLastPathComponent, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLCopyPathExtension", (PyCFunction)CFURLRefObj_CFURLCopyPathExtension, 1,
-        PyDoc_STR("() -> (CFStringRef _rv)")},
-       {"CFURLCreateCopyAppendingPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathComponent, 1,
-        PyDoc_STR("(CFStringRef pathComponent, Boolean isDirectory) -> (CFURLRef _rv)")},
-       {"CFURLCreateCopyDeletingLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingLastPathComponent, 1,
-        PyDoc_STR("() -> (CFURLRef _rv)")},
-       {"CFURLCreateCopyAppendingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathExtension, 1,
-        PyDoc_STR("(CFStringRef extension) -> (CFURLRef _rv)")},
-       {"CFURLCreateCopyDeletingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingPathExtension, 1,
-        PyDoc_STR("() -> (CFURLRef _rv)")},
-       {"CFURLGetFSRef", (PyCFunction)CFURLRefObj_CFURLGetFSRef, 1,
-        PyDoc_STR("() -> (Boolean _rv, FSRef fsRef)")},
-       {NULL, NULL, 0}
-};
-
-#define CFURLRefObj_getsetlist NULL
-
-
-static int CFURLRefObj_compare(CFURLRefObject *self, CFURLRefObject *other)
-{
-       /* XXXX Or should we use CFEqual?? */
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * CFURLRefObj_repr(CFURLRefObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<CFURL object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int CFURLRefObj_hash(CFURLRefObject *self)
-{
-       /* XXXX Or should we use CFHash?? */
-       return (int)self->ob_itself;
-}
-static int CFURLRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       CFURLRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFURLRefObj_Convert, &itself))
-       {
-               ((CFURLRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-
-       /* Any CFTypeRef descendent is allowed as initializer too */
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
-       {
-               ((CFURLRefObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       return -1;
-}
-
-#define CFURLRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CFURLRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CFURLRefObject *)self)->ob_itself = NULL;
-       ((CFURLRefObject *)self)->ob_freeit = CFRelease;
-       return self;
-}
-
-#define CFURLRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CFURLRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CF.CFURLRef", /*tp_name*/
-       sizeof(CFURLRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CFURLRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CFURLRefObj_compare, /*tp_compare*/
-       (reprfunc) CFURLRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CFURLRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CFURLRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CFURLRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CFURLRefObj_tp_init, /* tp_init */
-       CFURLRefObj_tp_alloc, /* tp_alloc */
-       CFURLRefObj_tp_new, /* tp_new */
-       CFURLRefObj_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type CFURLRef -------------------- */
-
-
-static PyObject *CF___CFRangeMake(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFRange _rv;
-       CFIndex loc;
-       CFIndex len;
-#ifndef __CFRangeMake
-       PyMac_PRECHECK(__CFRangeMake);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &loc,
-                             &len))
-               return NULL;
-       _rv = __CFRangeMake(loc,
-                           len);
-       _res = Py_BuildValue("O&",
-                            CFRange_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFAllocatorGetTypeID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeID _rv;
-#ifndef CFAllocatorGetTypeID
-       PyMac_PRECHECK(CFAllocatorGetTypeID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFAllocatorGetTypeID();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFAllocatorGetPreferredSizeForSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex _rv;
-       CFIndex size;
-       CFOptionFlags hint;
-#ifndef CFAllocatorGetPreferredSizeForSize
-       PyMac_PRECHECK(CFAllocatorGetPreferredSizeForSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &size,
-                             &hint))
-               return NULL;
-       _rv = CFAllocatorGetPreferredSizeForSize((CFAllocatorRef)NULL,
-                                                size,
-                                                hint);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFCopyTypeIDDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFTypeID type_id;
-#ifndef CFCopyTypeIDDescription
-       PyMac_PRECHECK(CFCopyTypeIDDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &type_id))
-               return NULL;
-       _rv = CFCopyTypeIDDescription(type_id);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFArrayGetTypeID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeID _rv;
-#ifndef CFArrayGetTypeID
-       PyMac_PRECHECK(CFArrayGetTypeID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFArrayGetTypeID();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFArrayCreateMutable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFMutableArrayRef _rv;
-       CFIndex capacity;
-#ifndef CFArrayCreateMutable
-       PyMac_PRECHECK(CFArrayCreateMutable);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &capacity))
-               return NULL;
-       _rv = CFArrayCreateMutable((CFAllocatorRef)NULL,
-                                  capacity,
-                                  &kCFTypeArrayCallBacks);
-       _res = Py_BuildValue("O&",
-                            CFMutableArrayRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFArrayCreateMutableCopy(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFMutableArrayRef _rv;
-       CFIndex capacity;
-       CFArrayRef theArray;
-#ifndef CFArrayCreateMutableCopy
-       PyMac_PRECHECK(CFArrayCreateMutableCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &capacity,
-                             CFArrayRefObj_Convert, &theArray))
-               return NULL;
-       _rv = CFArrayCreateMutableCopy((CFAllocatorRef)NULL,
-                                      capacity,
-                                      theArray);
-       _res = Py_BuildValue("O&",
-                            CFMutableArrayRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFDataGetTypeID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeID _rv;
-#ifndef CFDataGetTypeID
-       PyMac_PRECHECK(CFDataGetTypeID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFDataGetTypeID();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFDataCreate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFDataRef _rv;
-       unsigned char *bytes__in__;
-       long bytes__len__;
-       int bytes__in_len__;
-#ifndef CFDataCreate
-       PyMac_PRECHECK(CFDataCreate);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             &bytes__in__, &bytes__in_len__))
-               return NULL;
-       bytes__len__ = bytes__in_len__;
-       _rv = CFDataCreate((CFAllocatorRef)NULL,
-                          bytes__in__, bytes__len__);
-       _res = Py_BuildValue("O&",
-                            CFDataRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFDataCreateWithBytesNoCopy(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFDataRef _rv;
-       unsigned char *bytes__in__;
-       long bytes__len__;
-       int bytes__in_len__;
-#ifndef CFDataCreateWithBytesNoCopy
-       PyMac_PRECHECK(CFDataCreateWithBytesNoCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             &bytes__in__, &bytes__in_len__))
-               return NULL;
-       bytes__len__ = bytes__in_len__;
-       _rv = CFDataCreateWithBytesNoCopy((CFAllocatorRef)NULL,
-                                         bytes__in__, bytes__len__,
-                                         (CFAllocatorRef)NULL);
-       _res = Py_BuildValue("O&",
-                            CFDataRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFDataCreateMutable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFMutableDataRef _rv;
-       CFIndex capacity;
-#ifndef CFDataCreateMutable
-       PyMac_PRECHECK(CFDataCreateMutable);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &capacity))
-               return NULL;
-       _rv = CFDataCreateMutable((CFAllocatorRef)NULL,
-                                 capacity);
-       _res = Py_BuildValue("O&",
-                            CFMutableDataRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFDataCreateMutableCopy(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFMutableDataRef _rv;
-       CFIndex capacity;
-       CFDataRef theData;
-#ifndef CFDataCreateMutableCopy
-       PyMac_PRECHECK(CFDataCreateMutableCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &capacity,
-                             CFDataRefObj_Convert, &theData))
-               return NULL;
-       _rv = CFDataCreateMutableCopy((CFAllocatorRef)NULL,
-                                     capacity,
-                                     theData);
-       _res = Py_BuildValue("O&",
-                            CFMutableDataRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFDictionaryGetTypeID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeID _rv;
-#ifndef CFDictionaryGetTypeID
-       PyMac_PRECHECK(CFDictionaryGetTypeID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFDictionaryGetTypeID();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFDictionaryCreateMutable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFMutableDictionaryRef _rv;
-       CFIndex capacity;
-#ifndef CFDictionaryCreateMutable
-       PyMac_PRECHECK(CFDictionaryCreateMutable);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &capacity))
-               return NULL;
-       _rv = CFDictionaryCreateMutable((CFAllocatorRef)NULL,
-                                       capacity,
-                                       &kCFTypeDictionaryKeyCallBacks,
-                                       &kCFTypeDictionaryValueCallBacks);
-       _res = Py_BuildValue("O&",
-                            CFMutableDictionaryRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFDictionaryCreateMutableCopy(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFMutableDictionaryRef _rv;
-       CFIndex capacity;
-       CFDictionaryRef theDict;
-#ifndef CFDictionaryCreateMutableCopy
-       PyMac_PRECHECK(CFDictionaryCreateMutableCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &capacity,
-                             CFDictionaryRefObj_Convert, &theDict))
-               return NULL;
-       _rv = CFDictionaryCreateMutableCopy((CFAllocatorRef)NULL,
-                                           capacity,
-                                           theDict);
-       _res = Py_BuildValue("O&",
-                            CFMutableDictionaryRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesCopyAppValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeRef _rv;
-       CFStringRef key;
-       CFStringRef applicationID;
-#ifndef CFPreferencesCopyAppValue
-       PyMac_PRECHECK(CFPreferencesCopyAppValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFStringRefObj_Convert, &key,
-                             CFStringRefObj_Convert, &applicationID))
-               return NULL;
-       _rv = CFPreferencesCopyAppValue(key,
-                                       applicationID);
-       _res = Py_BuildValue("O&",
-                            CFTypeRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesGetAppBooleanValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       CFStringRef key;
-       CFStringRef applicationID;
-       Boolean keyExistsAndHasValidFormat;
-#ifndef CFPreferencesGetAppBooleanValue
-       PyMac_PRECHECK(CFPreferencesGetAppBooleanValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFStringRefObj_Convert, &key,
-                             CFStringRefObj_Convert, &applicationID))
-               return NULL;
-       _rv = CFPreferencesGetAppBooleanValue(key,
-                                             applicationID,
-                                             &keyExistsAndHasValidFormat);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            keyExistsAndHasValidFormat);
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesGetAppIntegerValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex _rv;
-       CFStringRef key;
-       CFStringRef applicationID;
-       Boolean keyExistsAndHasValidFormat;
-#ifndef CFPreferencesGetAppIntegerValue
-       PyMac_PRECHECK(CFPreferencesGetAppIntegerValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFStringRefObj_Convert, &key,
-                             CFStringRefObj_Convert, &applicationID))
-               return NULL;
-       _rv = CFPreferencesGetAppIntegerValue(key,
-                                             applicationID,
-                                             &keyExistsAndHasValidFormat);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            keyExistsAndHasValidFormat);
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesSetAppValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef key;
-       CFTypeRef value;
-       CFStringRef applicationID;
-#ifndef CFPreferencesSetAppValue
-       PyMac_PRECHECK(CFPreferencesSetAppValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CFStringRefObj_Convert, &key,
-                             CFTypeRefObj_Convert, &value,
-                             CFStringRefObj_Convert, &applicationID))
-               return NULL;
-       CFPreferencesSetAppValue(key,
-                                value,
-                                applicationID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesAddSuitePreferencesToApp(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef applicationID;
-       CFStringRef suiteID;
-#ifndef CFPreferencesAddSuitePreferencesToApp
-       PyMac_PRECHECK(CFPreferencesAddSuitePreferencesToApp);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFStringRefObj_Convert, &applicationID,
-                             CFStringRefObj_Convert, &suiteID))
-               return NULL;
-       CFPreferencesAddSuitePreferencesToApp(applicationID,
-                                             suiteID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesRemoveSuitePreferencesFromApp(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef applicationID;
-       CFStringRef suiteID;
-#ifndef CFPreferencesRemoveSuitePreferencesFromApp
-       PyMac_PRECHECK(CFPreferencesRemoveSuitePreferencesFromApp);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFStringRefObj_Convert, &applicationID,
-                             CFStringRefObj_Convert, &suiteID))
-               return NULL;
-       CFPreferencesRemoveSuitePreferencesFromApp(applicationID,
-                                                  suiteID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesAppSynchronize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       CFStringRef applicationID;
-#ifndef CFPreferencesAppSynchronize
-       PyMac_PRECHECK(CFPreferencesAppSynchronize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &applicationID))
-               return NULL;
-       _rv = CFPreferencesAppSynchronize(applicationID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesCopyValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeRef _rv;
-       CFStringRef key;
-       CFStringRef applicationID;
-       CFStringRef userName;
-       CFStringRef hostName;
-#ifndef CFPreferencesCopyValue
-       PyMac_PRECHECK(CFPreferencesCopyValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CFStringRefObj_Convert, &key,
-                             CFStringRefObj_Convert, &applicationID,
-                             CFStringRefObj_Convert, &userName,
-                             CFStringRefObj_Convert, &hostName))
-               return NULL;
-       _rv = CFPreferencesCopyValue(key,
-                                    applicationID,
-                                    userName,
-                                    hostName);
-       _res = Py_BuildValue("O&",
-                            CFTypeRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesCopyMultiple(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFDictionaryRef _rv;
-       CFArrayRef keysToFetch;
-       CFStringRef applicationID;
-       CFStringRef userName;
-       CFStringRef hostName;
-#ifndef CFPreferencesCopyMultiple
-       PyMac_PRECHECK(CFPreferencesCopyMultiple);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CFArrayRefObj_Convert, &keysToFetch,
-                             CFStringRefObj_Convert, &applicationID,
-                             CFStringRefObj_Convert, &userName,
-                             CFStringRefObj_Convert, &hostName))
-               return NULL;
-       _rv = CFPreferencesCopyMultiple(keysToFetch,
-                                       applicationID,
-                                       userName,
-                                       hostName);
-       _res = Py_BuildValue("O&",
-                            CFDictionaryRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesSetValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef key;
-       CFTypeRef value;
-       CFStringRef applicationID;
-       CFStringRef userName;
-       CFStringRef hostName;
-#ifndef CFPreferencesSetValue
-       PyMac_PRECHECK(CFPreferencesSetValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
-                             CFStringRefObj_Convert, &key,
-                             CFTypeRefObj_Convert, &value,
-                             CFStringRefObj_Convert, &applicationID,
-                             CFStringRefObj_Convert, &userName,
-                             CFStringRefObj_Convert, &hostName))
-               return NULL;
-       CFPreferencesSetValue(key,
-                             value,
-                             applicationID,
-                             userName,
-                             hostName);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesSetMultiple(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFDictionaryRef keysToSet;
-       CFArrayRef keysToRemove;
-       CFStringRef applicationID;
-       CFStringRef userName;
-       CFStringRef hostName;
-#ifndef CFPreferencesSetMultiple
-       PyMac_PRECHECK(CFPreferencesSetMultiple);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
-                             CFDictionaryRefObj_Convert, &keysToSet,
-                             CFArrayRefObj_Convert, &keysToRemove,
-                             CFStringRefObj_Convert, &applicationID,
-                             CFStringRefObj_Convert, &userName,
-                             CFStringRefObj_Convert, &hostName))
-               return NULL;
-       CFPreferencesSetMultiple(keysToSet,
-                                keysToRemove,
-                                applicationID,
-                                userName,
-                                hostName);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesSynchronize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       CFStringRef applicationID;
-       CFStringRef userName;
-       CFStringRef hostName;
-#ifndef CFPreferencesSynchronize
-       PyMac_PRECHECK(CFPreferencesSynchronize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CFStringRefObj_Convert, &applicationID,
-                             CFStringRefObj_Convert, &userName,
-                             CFStringRefObj_Convert, &hostName))
-               return NULL;
-       _rv = CFPreferencesSynchronize(applicationID,
-                                      userName,
-                                      hostName);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesCopyApplicationList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFArrayRef _rv;
-       CFStringRef userName;
-       CFStringRef hostName;
-#ifndef CFPreferencesCopyApplicationList
-       PyMac_PRECHECK(CFPreferencesCopyApplicationList);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CFStringRefObj_Convert, &userName,
-                             CFStringRefObj_Convert, &hostName))
-               return NULL;
-       _rv = CFPreferencesCopyApplicationList(userName,
-                                              hostName);
-       _res = Py_BuildValue("O&",
-                            CFArrayRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFPreferencesCopyKeyList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFArrayRef _rv;
-       CFStringRef applicationID;
-       CFStringRef userName;
-       CFStringRef hostName;
-#ifndef CFPreferencesCopyKeyList
-       PyMac_PRECHECK(CFPreferencesCopyKeyList);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CFStringRefObj_Convert, &applicationID,
-                             CFStringRefObj_Convert, &userName,
-                             CFStringRefObj_Convert, &hostName))
-               return NULL;
-       _rv = CFPreferencesCopyKeyList(applicationID,
-                                      userName,
-                                      hostName);
-       _res = Py_BuildValue("O&",
-                            CFArrayRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringGetTypeID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeID _rv;
-#ifndef CFStringGetTypeID
-       PyMac_PRECHECK(CFStringGetTypeID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFStringGetTypeID();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringCreateWithPascalString(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       Str255 pStr;
-       CFStringEncoding encoding;
-#ifndef CFStringCreateWithPascalString
-       PyMac_PRECHECK(CFStringCreateWithPascalString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetStr255, pStr,
-                             &encoding))
-               return NULL;
-       _rv = CFStringCreateWithPascalString((CFAllocatorRef)NULL,
-                                            pStr,
-                                            encoding);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringCreateWithCString(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       char* cStr;
-       CFStringEncoding encoding;
-#ifndef CFStringCreateWithCString
-       PyMac_PRECHECK(CFStringCreateWithCString);
-#endif
-       if (!PyArg_ParseTuple(_args, "sl",
-                             &cStr,
-                             &encoding))
-               return NULL;
-       _rv = CFStringCreateWithCString((CFAllocatorRef)NULL,
-                                       cStr,
-                                       encoding);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringCreateWithCharacters(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       UniChar *chars__in__;
-       UniCharCount chars__len__;
-       int chars__in_len__;
-#ifndef CFStringCreateWithCharacters
-       PyMac_PRECHECK(CFStringCreateWithCharacters);
-#endif
-       if (!PyArg_ParseTuple(_args, "u#",
-                             &chars__in__, &chars__in_len__))
-               return NULL;
-       chars__len__ = chars__in_len__;
-       _rv = CFStringCreateWithCharacters((CFAllocatorRef)NULL,
-                                          chars__in__, chars__len__);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringCreateWithPascalStringNoCopy(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       Str255 pStr;
-       CFStringEncoding encoding;
-#ifndef CFStringCreateWithPascalStringNoCopy
-       PyMac_PRECHECK(CFStringCreateWithPascalStringNoCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetStr255, pStr,
-                             &encoding))
-               return NULL;
-       _rv = CFStringCreateWithPascalStringNoCopy((CFAllocatorRef)NULL,
-                                                  pStr,
-                                                  encoding,
-                                                  (CFAllocatorRef)NULL);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringCreateWithCStringNoCopy(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       char* cStr;
-       CFStringEncoding encoding;
-#ifndef CFStringCreateWithCStringNoCopy
-       PyMac_PRECHECK(CFStringCreateWithCStringNoCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, "sl",
-                             &cStr,
-                             &encoding))
-               return NULL;
-       _rv = CFStringCreateWithCStringNoCopy((CFAllocatorRef)NULL,
-                                             cStr,
-                                             encoding,
-                                             (CFAllocatorRef)NULL);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringCreateWithCharactersNoCopy(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       UniChar *chars__in__;
-       UniCharCount chars__len__;
-       int chars__in_len__;
-#ifndef CFStringCreateWithCharactersNoCopy
-       PyMac_PRECHECK(CFStringCreateWithCharactersNoCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, "u#",
-                             &chars__in__, &chars__in_len__))
-               return NULL;
-       chars__len__ = chars__in_len__;
-       _rv = CFStringCreateWithCharactersNoCopy((CFAllocatorRef)NULL,
-                                                chars__in__, chars__len__,
-                                                (CFAllocatorRef)NULL);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringCreateMutable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFMutableStringRef _rv;
-       CFIndex maxLength;
-#ifndef CFStringCreateMutable
-       PyMac_PRECHECK(CFStringCreateMutable);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &maxLength))
-               return NULL;
-       _rv = CFStringCreateMutable((CFAllocatorRef)NULL,
-                                   maxLength);
-       _res = Py_BuildValue("O&",
-                            CFMutableStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringCreateMutableCopy(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFMutableStringRef _rv;
-       CFIndex maxLength;
-       CFStringRef theString;
-#ifndef CFStringCreateMutableCopy
-       PyMac_PRECHECK(CFStringCreateMutableCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &maxLength,
-                             CFStringRefObj_Convert, &theString))
-               return NULL;
-       _rv = CFStringCreateMutableCopy((CFAllocatorRef)NULL,
-                                       maxLength,
-                                       theString);
-       _res = Py_BuildValue("O&",
-                            CFMutableStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringCreateWithBytes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       unsigned char *bytes__in__;
-       long bytes__len__;
-       int bytes__in_len__;
-       CFStringEncoding encoding;
-       Boolean isExternalRepresentation;
-#ifndef CFStringCreateWithBytes
-       PyMac_PRECHECK(CFStringCreateWithBytes);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#ll",
-                             &bytes__in__, &bytes__in_len__,
-                             &encoding,
-                             &isExternalRepresentation))
-               return NULL;
-       bytes__len__ = bytes__in_len__;
-       _rv = CFStringCreateWithBytes((CFAllocatorRef)NULL,
-                                     bytes__in__, bytes__len__,
-                                     encoding,
-                                     isExternalRepresentation);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringGetSystemEncoding(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringEncoding _rv;
-#ifndef CFStringGetSystemEncoding
-       PyMac_PRECHECK(CFStringGetSystemEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFStringGetSystemEncoding();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringGetMaximumSizeForEncoding(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFIndex _rv;
-       CFIndex length;
-       CFStringEncoding encoding;
-#ifndef CFStringGetMaximumSizeForEncoding
-       PyMac_PRECHECK(CFStringGetMaximumSizeForEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &length,
-                             &encoding))
-               return NULL;
-       _rv = CFStringGetMaximumSizeForEncoding(length,
-                                               encoding);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringIsEncodingAvailable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       CFStringEncoding encoding;
-#ifndef CFStringIsEncodingAvailable
-       PyMac_PRECHECK(CFStringIsEncodingAvailable);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &encoding))
-               return NULL;
-       _rv = CFStringIsEncodingAvailable(encoding);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringGetNameOfEncoding(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFStringEncoding encoding;
-#ifndef CFStringGetNameOfEncoding
-       PyMac_PRECHECK(CFStringGetNameOfEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &encoding))
-               return NULL;
-       _rv = CFStringGetNameOfEncoding(encoding);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringConvertEncodingToNSStringEncoding(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-       CFStringEncoding encoding;
-#ifndef CFStringConvertEncodingToNSStringEncoding
-       PyMac_PRECHECK(CFStringConvertEncodingToNSStringEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &encoding))
-               return NULL;
-       _rv = CFStringConvertEncodingToNSStringEncoding(encoding);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringConvertNSStringEncodingToEncoding(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringEncoding _rv;
-       UInt32 encoding;
-#ifndef CFStringConvertNSStringEncodingToEncoding
-       PyMac_PRECHECK(CFStringConvertNSStringEncodingToEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &encoding))
-               return NULL;
-       _rv = CFStringConvertNSStringEncodingToEncoding(encoding);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringConvertEncodingToWindowsCodepage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-       CFStringEncoding encoding;
-#ifndef CFStringConvertEncodingToWindowsCodepage
-       PyMac_PRECHECK(CFStringConvertEncodingToWindowsCodepage);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &encoding))
-               return NULL;
-       _rv = CFStringConvertEncodingToWindowsCodepage(encoding);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringConvertWindowsCodepageToEncoding(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringEncoding _rv;
-       UInt32 codepage;
-#ifndef CFStringConvertWindowsCodepageToEncoding
-       PyMac_PRECHECK(CFStringConvertWindowsCodepageToEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &codepage))
-               return NULL;
-       _rv = CFStringConvertWindowsCodepageToEncoding(codepage);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringConvertEncodingToIANACharSetName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       CFStringEncoding encoding;
-#ifndef CFStringConvertEncodingToIANACharSetName
-       PyMac_PRECHECK(CFStringConvertEncodingToIANACharSetName);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &encoding))
-               return NULL;
-       _rv = CFStringConvertEncodingToIANACharSetName(encoding);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFStringGetMostCompatibleMacStringEncoding(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringEncoding _rv;
-       CFStringEncoding encoding;
-#ifndef CFStringGetMostCompatibleMacStringEncoding
-       PyMac_PRECHECK(CFStringGetMostCompatibleMacStringEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &encoding))
-               return NULL;
-       _rv = CFStringGetMostCompatibleMacStringEncoding(encoding);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF___CFStringMakeConstantString(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFStringRef _rv;
-       char* cStr;
-#ifndef __CFStringMakeConstantString
-       PyMac_PRECHECK(__CFStringMakeConstantString);
-#endif
-       if (!PyArg_ParseTuple(_args, "s",
-                             &cStr))
-               return NULL;
-       _rv = __CFStringMakeConstantString(cStr);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFURLGetTypeID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFTypeID _rv;
-#ifndef CFURLGetTypeID
-       PyMac_PRECHECK(CFURLGetTypeID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CFURLGetTypeID();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CF_CFURLCreateWithBytes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       unsigned char *URLBytes__in__;
-       long URLBytes__len__;
-       int URLBytes__in_len__;
-       CFStringEncoding encoding;
-       CFURLRef baseURL;
-#ifndef CFURLCreateWithBytes
-       PyMac_PRECHECK(CFURLCreateWithBytes);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#lO&",
-                             &URLBytes__in__, &URLBytes__in_len__,
-                             &encoding,
-                             OptionalCFURLRefObj_Convert, &baseURL))
-               return NULL;
-       URLBytes__len__ = URLBytes__in_len__;
-       _rv = CFURLCreateWithBytes((CFAllocatorRef)NULL,
-                                  URLBytes__in__, URLBytes__len__,
-                                  encoding,
-                                  baseURL);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFURLCreateFromFileSystemRepresentation(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       unsigned char *buffer__in__;
-       long buffer__len__;
-       int buffer__in_len__;
-       Boolean isDirectory;
-#ifndef CFURLCreateFromFileSystemRepresentation
-       PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentation);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#l",
-                             &buffer__in__, &buffer__in_len__,
-                             &isDirectory))
-               return NULL;
-       buffer__len__ = buffer__in_len__;
-       _rv = CFURLCreateFromFileSystemRepresentation((CFAllocatorRef)NULL,
-                                                     buffer__in__, buffer__len__,
-                                                     isDirectory);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFURLCreateFromFileSystemRepresentationRelativeToBase(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       unsigned char *buffer__in__;
-       long buffer__len__;
-       int buffer__in_len__;
-       Boolean isDirectory;
-       CFURLRef baseURL;
-#ifndef CFURLCreateFromFileSystemRepresentationRelativeToBase
-       PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentationRelativeToBase);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#lO&",
-                             &buffer__in__, &buffer__in_len__,
-                             &isDirectory,
-                             OptionalCFURLRefObj_Convert, &baseURL))
-               return NULL;
-       buffer__len__ = buffer__in_len__;
-       _rv = CFURLCreateFromFileSystemRepresentationRelativeToBase((CFAllocatorRef)NULL,
-                                                                   buffer__in__, buffer__len__,
-                                                                   isDirectory,
-                                                                   baseURL);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_CFURLCreateFromFSRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CFURLRef _rv;
-       FSRef fsRef;
-#ifndef CFURLCreateFromFSRef
-       PyMac_PRECHECK(CFURLCreateFromFSRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSRef, &fsRef))
-               return NULL;
-       _rv = CFURLCreateFromFSRef((CFAllocatorRef)NULL,
-                                  &fsRef);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CF_toCF(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       CFTypeRef rv;
-       CFTypeID typeid;
-
-       if (!PyArg_ParseTuple(_args, "O&", PyCF_Python2CF, &rv))
-               return NULL;
-       typeid = CFGetTypeID(rv);
-
-       if (typeid == CFStringGetTypeID())
-               return Py_BuildValue("O&", CFStringRefObj_New, rv);
-       if (typeid == CFArrayGetTypeID())
-               return Py_BuildValue("O&", CFArrayRefObj_New, rv);
-       if (typeid == CFDictionaryGetTypeID())
-               return Py_BuildValue("O&", CFDictionaryRefObj_New, rv);
-       if (typeid == CFURLGetTypeID())
-               return Py_BuildValue("O&", CFURLRefObj_New, rv);
-
-       _res = Py_BuildValue("O&", CFTypeRefObj_New, rv);
-       return _res;
-
-}
-
-static PyMethodDef CF_methods[] = {
-       {"__CFRangeMake", (PyCFunction)CF___CFRangeMake, 1,
-        PyDoc_STR("(CFIndex loc, CFIndex len) -> (CFRange _rv)")},
-       {"CFAllocatorGetTypeID", (PyCFunction)CF_CFAllocatorGetTypeID, 1,
-        PyDoc_STR("() -> (CFTypeID _rv)")},
-       {"CFAllocatorGetPreferredSizeForSize", (PyCFunction)CF_CFAllocatorGetPreferredSizeForSize, 1,
-        PyDoc_STR("(CFIndex size, CFOptionFlags hint) -> (CFIndex _rv)")},
-       {"CFCopyTypeIDDescription", (PyCFunction)CF_CFCopyTypeIDDescription, 1,
-        PyDoc_STR("(CFTypeID type_id) -> (CFStringRef _rv)")},
-       {"CFArrayGetTypeID", (PyCFunction)CF_CFArrayGetTypeID, 1,
-        PyDoc_STR("() -> (CFTypeID _rv)")},
-       {"CFArrayCreateMutable", (PyCFunction)CF_CFArrayCreateMutable, 1,
-        PyDoc_STR("(CFIndex capacity) -> (CFMutableArrayRef _rv)")},
-       {"CFArrayCreateMutableCopy", (PyCFunction)CF_CFArrayCreateMutableCopy, 1,
-        PyDoc_STR("(CFIndex capacity, CFArrayRef theArray) -> (CFMutableArrayRef _rv)")},
-       {"CFDataGetTypeID", (PyCFunction)CF_CFDataGetTypeID, 1,
-        PyDoc_STR("() -> (CFTypeID _rv)")},
-       {"CFDataCreate", (PyCFunction)CF_CFDataCreate, 1,
-        PyDoc_STR("(Buffer bytes) -> (CFDataRef _rv)")},
-       {"CFDataCreateWithBytesNoCopy", (PyCFunction)CF_CFDataCreateWithBytesNoCopy, 1,
-        PyDoc_STR("(Buffer bytes) -> (CFDataRef _rv)")},
-       {"CFDataCreateMutable", (PyCFunction)CF_CFDataCreateMutable, 1,
-        PyDoc_STR("(CFIndex capacity) -> (CFMutableDataRef _rv)")},
-       {"CFDataCreateMutableCopy", (PyCFunction)CF_CFDataCreateMutableCopy, 1,
-        PyDoc_STR("(CFIndex capacity, CFDataRef theData) -> (CFMutableDataRef _rv)")},
-       {"CFDictionaryGetTypeID", (PyCFunction)CF_CFDictionaryGetTypeID, 1,
-        PyDoc_STR("() -> (CFTypeID _rv)")},
-       {"CFDictionaryCreateMutable", (PyCFunction)CF_CFDictionaryCreateMutable, 1,
-        PyDoc_STR("(CFIndex capacity) -> (CFMutableDictionaryRef _rv)")},
-       {"CFDictionaryCreateMutableCopy", (PyCFunction)CF_CFDictionaryCreateMutableCopy, 1,
-        PyDoc_STR("(CFIndex capacity, CFDictionaryRef theDict) -> (CFMutableDictionaryRef _rv)")},
-       {"CFPreferencesCopyAppValue", (PyCFunction)CF_CFPreferencesCopyAppValue, 1,
-        PyDoc_STR("(CFStringRef key, CFStringRef applicationID) -> (CFTypeRef _rv)")},
-       {"CFPreferencesGetAppBooleanValue", (PyCFunction)CF_CFPreferencesGetAppBooleanValue, 1,
-        PyDoc_STR("(CFStringRef key, CFStringRef applicationID) -> (Boolean _rv, Boolean keyExistsAndHasValidFormat)")},
-       {"CFPreferencesGetAppIntegerValue", (PyCFunction)CF_CFPreferencesGetAppIntegerValue, 1,
-        PyDoc_STR("(CFStringRef key, CFStringRef applicationID) -> (CFIndex _rv, Boolean keyExistsAndHasValidFormat)")},
-       {"CFPreferencesSetAppValue", (PyCFunction)CF_CFPreferencesSetAppValue, 1,
-        PyDoc_STR("(CFStringRef key, CFTypeRef value, CFStringRef applicationID) -> None")},
-       {"CFPreferencesAddSuitePreferencesToApp", (PyCFunction)CF_CFPreferencesAddSuitePreferencesToApp, 1,
-        PyDoc_STR("(CFStringRef applicationID, CFStringRef suiteID) -> None")},
-       {"CFPreferencesRemoveSuitePreferencesFromApp", (PyCFunction)CF_CFPreferencesRemoveSuitePreferencesFromApp, 1,
-        PyDoc_STR("(CFStringRef applicationID, CFStringRef suiteID) -> None")},
-       {"CFPreferencesAppSynchronize", (PyCFunction)CF_CFPreferencesAppSynchronize, 1,
-        PyDoc_STR("(CFStringRef applicationID) -> (Boolean _rv)")},
-       {"CFPreferencesCopyValue", (PyCFunction)CF_CFPreferencesCopyValue, 1,
-        PyDoc_STR("(CFStringRef key, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (CFTypeRef _rv)")},
-       {"CFPreferencesCopyMultiple", (PyCFunction)CF_CFPreferencesCopyMultiple, 1,
-        PyDoc_STR("(CFArrayRef keysToFetch, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (CFDictionaryRef _rv)")},
-       {"CFPreferencesSetValue", (PyCFunction)CF_CFPreferencesSetValue, 1,
-        PyDoc_STR("(CFStringRef key, CFTypeRef value, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> None")},
-       {"CFPreferencesSetMultiple", (PyCFunction)CF_CFPreferencesSetMultiple, 1,
-        PyDoc_STR("(CFDictionaryRef keysToSet, CFArrayRef keysToRemove, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> None")},
-       {"CFPreferencesSynchronize", (PyCFunction)CF_CFPreferencesSynchronize, 1,
-        PyDoc_STR("(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (Boolean _rv)")},
-       {"CFPreferencesCopyApplicationList", (PyCFunction)CF_CFPreferencesCopyApplicationList, 1,
-        PyDoc_STR("(CFStringRef userName, CFStringRef hostName) -> (CFArrayRef _rv)")},
-       {"CFPreferencesCopyKeyList", (PyCFunction)CF_CFPreferencesCopyKeyList, 1,
-        PyDoc_STR("(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (CFArrayRef _rv)")},
-       {"CFStringGetTypeID", (PyCFunction)CF_CFStringGetTypeID, 1,
-        PyDoc_STR("() -> (CFTypeID _rv)")},
-       {"CFStringCreateWithPascalString", (PyCFunction)CF_CFStringCreateWithPascalString, 1,
-        PyDoc_STR("(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
-       {"CFStringCreateWithCString", (PyCFunction)CF_CFStringCreateWithCString, 1,
-        PyDoc_STR("(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
-       {"CFStringCreateWithCharacters", (PyCFunction)CF_CFStringCreateWithCharacters, 1,
-        PyDoc_STR("(Buffer chars) -> (CFStringRef _rv)")},
-       {"CFStringCreateWithPascalStringNoCopy", (PyCFunction)CF_CFStringCreateWithPascalStringNoCopy, 1,
-        PyDoc_STR("(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
-       {"CFStringCreateWithCStringNoCopy", (PyCFunction)CF_CFStringCreateWithCStringNoCopy, 1,
-        PyDoc_STR("(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
-       {"CFStringCreateWithCharactersNoCopy", (PyCFunction)CF_CFStringCreateWithCharactersNoCopy, 1,
-        PyDoc_STR("(Buffer chars) -> (CFStringRef _rv)")},
-       {"CFStringCreateMutable", (PyCFunction)CF_CFStringCreateMutable, 1,
-        PyDoc_STR("(CFIndex maxLength) -> (CFMutableStringRef _rv)")},
-       {"CFStringCreateMutableCopy", (PyCFunction)CF_CFStringCreateMutableCopy, 1,
-        PyDoc_STR("(CFIndex maxLength, CFStringRef theString) -> (CFMutableStringRef _rv)")},
-       {"CFStringCreateWithBytes", (PyCFunction)CF_CFStringCreateWithBytes, 1,
-        PyDoc_STR("(Buffer bytes, CFStringEncoding encoding, Boolean isExternalRepresentation) -> (CFStringRef _rv)")},
-       {"CFStringGetSystemEncoding", (PyCFunction)CF_CFStringGetSystemEncoding, 1,
-        PyDoc_STR("() -> (CFStringEncoding _rv)")},
-       {"CFStringGetMaximumSizeForEncoding", (PyCFunction)CF_CFStringGetMaximumSizeForEncoding, 1,
-        PyDoc_STR("(CFIndex length, CFStringEncoding encoding) -> (CFIndex _rv)")},
-       {"CFStringIsEncodingAvailable", (PyCFunction)CF_CFStringIsEncodingAvailable, 1,
-        PyDoc_STR("(CFStringEncoding encoding) -> (Boolean _rv)")},
-       {"CFStringGetNameOfEncoding", (PyCFunction)CF_CFStringGetNameOfEncoding, 1,
-        PyDoc_STR("(CFStringEncoding encoding) -> (CFStringRef _rv)")},
-       {"CFStringConvertEncodingToNSStringEncoding", (PyCFunction)CF_CFStringConvertEncodingToNSStringEncoding, 1,
-        PyDoc_STR("(CFStringEncoding encoding) -> (UInt32 _rv)")},
-       {"CFStringConvertNSStringEncodingToEncoding", (PyCFunction)CF_CFStringConvertNSStringEncodingToEncoding, 1,
-        PyDoc_STR("(UInt32 encoding) -> (CFStringEncoding _rv)")},
-       {"CFStringConvertEncodingToWindowsCodepage", (PyCFunction)CF_CFStringConvertEncodingToWindowsCodepage, 1,
-        PyDoc_STR("(CFStringEncoding encoding) -> (UInt32 _rv)")},
-       {"CFStringConvertWindowsCodepageToEncoding", (PyCFunction)CF_CFStringConvertWindowsCodepageToEncoding, 1,
-        PyDoc_STR("(UInt32 codepage) -> (CFStringEncoding _rv)")},
-       {"CFStringConvertEncodingToIANACharSetName", (PyCFunction)CF_CFStringConvertEncodingToIANACharSetName, 1,
-        PyDoc_STR("(CFStringEncoding encoding) -> (CFStringRef _rv)")},
-       {"CFStringGetMostCompatibleMacStringEncoding", (PyCFunction)CF_CFStringGetMostCompatibleMacStringEncoding, 1,
-        PyDoc_STR("(CFStringEncoding encoding) -> (CFStringEncoding _rv)")},
-       {"__CFStringMakeConstantString", (PyCFunction)CF___CFStringMakeConstantString, 1,
-        PyDoc_STR("(char* cStr) -> (CFStringRef _rv)")},
-       {"CFURLGetTypeID", (PyCFunction)CF_CFURLGetTypeID, 1,
-        PyDoc_STR("() -> (CFTypeID _rv)")},
-       {"CFURLCreateWithBytes", (PyCFunction)CF_CFURLCreateWithBytes, 1,
-        PyDoc_STR("(Buffer URLBytes, CFStringEncoding encoding, CFURLRef baseURL) -> (CFURLRef _rv)")},
-       {"CFURLCreateFromFileSystemRepresentation", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentation, 1,
-        PyDoc_STR("(Buffer buffer, Boolean isDirectory) -> (CFURLRef _rv)")},
-       {"CFURLCreateFromFileSystemRepresentationRelativeToBase", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentationRelativeToBase, 1,
-        PyDoc_STR("(Buffer buffer, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)")},
-       {"CFURLCreateFromFSRef", (PyCFunction)CF_CFURLCreateFromFSRef, 1,
-        PyDoc_STR("(FSRef fsRef) -> (CFURLRef _rv)")},
-       {"toCF", (PyCFunction)CF_toCF, 1,
-        PyDoc_STR("(python_object) -> (CF_object)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-/* Routines to convert any CF type to/from the corresponding CFxxxObj */
-PyObject *CFObj_New(CFTypeRef itself)
-{
-        if (itself == NULL)
-        {
-                PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-                return NULL;
-        }
-        if (CFGetTypeID(itself) == CFArrayGetTypeID()) return CFArrayRefObj_New((CFArrayRef)itself);
-        if (CFGetTypeID(itself) == CFDictionaryGetTypeID()) return CFDictionaryRefObj_New((CFDictionaryRef)itself);
-        if (CFGetTypeID(itself) == CFDataGetTypeID()) return CFDataRefObj_New((CFDataRef)itself);
-        if (CFGetTypeID(itself) == CFStringGetTypeID()) return CFStringRefObj_New((CFStringRef)itself);
-        if (CFGetTypeID(itself) == CFURLGetTypeID()) return CFURLRefObj_New((CFURLRef)itself);
-        /* XXXX Or should we use PyCF_CF2Python here?? */
-        return CFTypeRefObj_New(itself);
-}
-int CFObj_Convert(PyObject *v, CFTypeRef *p_itself)
-{
-
-        if (v == Py_None) { *p_itself = NULL; return 1; }
-        /* Check for other CF objects here */
-
-        if (!CFTypeRefObj_Check(v) &&
-                !CFArrayRefObj_Check(v) &&
-                !CFMutableArrayRefObj_Check(v) &&
-                !CFDictionaryRefObj_Check(v) &&
-                !CFMutableDictionaryRefObj_Check(v) &&
-                !CFDataRefObj_Check(v) &&
-                !CFMutableDataRefObj_Check(v) &&
-                !CFStringRefObj_Check(v) &&
-                !CFMutableStringRefObj_Check(v) &&
-                !CFURLRefObj_Check(v) )
-        {
-                /* XXXX Or should we use PyCF_Python2CF here?? */
-                PyErr_SetString(PyExc_TypeError, "CF object required");
-                return 0;
-        }
-        *p_itself = ((CFTypeRefObject *)v)->ob_itself;
-        return 1;
-}
-
-
-void init_CF(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFObj_Convert);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFTypeRefObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFTypeRefObj_Convert);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(CFStringRef, CFStringRefObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFStringRef, CFStringRefObj_Convert);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableStringRef, CFMutableStringRefObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableStringRef, CFMutableStringRefObj_Convert);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(CFArrayRef, CFArrayRefObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFArrayRef, CFArrayRefObj_Convert);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableArrayRef, CFMutableArrayRefObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableArrayRef, CFMutableArrayRefObj_Convert);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(CFDictionaryRef, CFDictionaryRefObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFDictionaryRef, CFDictionaryRefObj_Convert);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableDictionaryRef, CFMutableDictionaryRefObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableDictionaryRef, CFMutableDictionaryRefObj_Convert);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(CFURLRef, CFURLRefObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFURLRef, CFURLRefObj_Convert);
-
-
-       m = Py_InitModule("_CF", CF_methods);
-       d = PyModule_GetDict(m);
-       CF_Error = PyMac_GetOSErrException();
-       if (CF_Error == NULL ||
-           PyDict_SetItemString(d, "Error", CF_Error) != 0)
-               return;
-       Py_TYPE(&CFTypeRef_Type) = &PyType_Type;
-       if (PyType_Ready(&CFTypeRef_Type) < 0) return;
-       Py_INCREF(&CFTypeRef_Type);
-       PyModule_AddObject(m, "CFTypeRef", (PyObject *)&CFTypeRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFTypeRef_Type);
-       PyModule_AddObject(m, "CFTypeRefType", (PyObject *)&CFTypeRef_Type);
-       Py_TYPE(&CFArrayRef_Type) = &PyType_Type;
-       CFArrayRef_Type.tp_base = &CFTypeRef_Type;
-       if (PyType_Ready(&CFArrayRef_Type) < 0) return;
-       Py_INCREF(&CFArrayRef_Type);
-       PyModule_AddObject(m, "CFArrayRef", (PyObject *)&CFArrayRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFArrayRef_Type);
-       PyModule_AddObject(m, "CFArrayRefType", (PyObject *)&CFArrayRef_Type);
-       Py_TYPE(&CFMutableArrayRef_Type) = &PyType_Type;
-       CFMutableArrayRef_Type.tp_base = &CFArrayRef_Type;
-       if (PyType_Ready(&CFMutableArrayRef_Type) < 0) return;
-       Py_INCREF(&CFMutableArrayRef_Type);
-       PyModule_AddObject(m, "CFMutableArrayRef", (PyObject *)&CFMutableArrayRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFMutableArrayRef_Type);
-       PyModule_AddObject(m, "CFMutableArrayRefType", (PyObject *)&CFMutableArrayRef_Type);
-       Py_TYPE(&CFDictionaryRef_Type) = &PyType_Type;
-       CFDictionaryRef_Type.tp_base = &CFTypeRef_Type;
-       if (PyType_Ready(&CFDictionaryRef_Type) < 0) return;
-       Py_INCREF(&CFDictionaryRef_Type);
-       PyModule_AddObject(m, "CFDictionaryRef", (PyObject *)&CFDictionaryRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFDictionaryRef_Type);
-       PyModule_AddObject(m, "CFDictionaryRefType", (PyObject *)&CFDictionaryRef_Type);
-       Py_TYPE(&CFMutableDictionaryRef_Type) = &PyType_Type;
-       CFMutableDictionaryRef_Type.tp_base = &CFDictionaryRef_Type;
-       if (PyType_Ready(&CFMutableDictionaryRef_Type) < 0) return;
-       Py_INCREF(&CFMutableDictionaryRef_Type);
-       PyModule_AddObject(m, "CFMutableDictionaryRef", (PyObject *)&CFMutableDictionaryRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFMutableDictionaryRef_Type);
-       PyModule_AddObject(m, "CFMutableDictionaryRefType", (PyObject *)&CFMutableDictionaryRef_Type);
-       Py_TYPE(&CFDataRef_Type) = &PyType_Type;
-       CFDataRef_Type.tp_base = &CFTypeRef_Type;
-       if (PyType_Ready(&CFDataRef_Type) < 0) return;
-       Py_INCREF(&CFDataRef_Type);
-       PyModule_AddObject(m, "CFDataRef", (PyObject *)&CFDataRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFDataRef_Type);
-       PyModule_AddObject(m, "CFDataRefType", (PyObject *)&CFDataRef_Type);
-       Py_TYPE(&CFMutableDataRef_Type) = &PyType_Type;
-       CFMutableDataRef_Type.tp_base = &CFDataRef_Type;
-       if (PyType_Ready(&CFMutableDataRef_Type) < 0) return;
-       Py_INCREF(&CFMutableDataRef_Type);
-       PyModule_AddObject(m, "CFMutableDataRef", (PyObject *)&CFMutableDataRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFMutableDataRef_Type);
-       PyModule_AddObject(m, "CFMutableDataRefType", (PyObject *)&CFMutableDataRef_Type);
-       Py_TYPE(&CFStringRef_Type) = &PyType_Type;
-       CFStringRef_Type.tp_base = &CFTypeRef_Type;
-       if (PyType_Ready(&CFStringRef_Type) < 0) return;
-       Py_INCREF(&CFStringRef_Type);
-       PyModule_AddObject(m, "CFStringRef", (PyObject *)&CFStringRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFStringRef_Type);
-       PyModule_AddObject(m, "CFStringRefType", (PyObject *)&CFStringRef_Type);
-       Py_TYPE(&CFMutableStringRef_Type) = &PyType_Type;
-       CFMutableStringRef_Type.tp_base = &CFStringRef_Type;
-       if (PyType_Ready(&CFMutableStringRef_Type) < 0) return;
-       Py_INCREF(&CFMutableStringRef_Type);
-       PyModule_AddObject(m, "CFMutableStringRef", (PyObject *)&CFMutableStringRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFMutableStringRef_Type);
-       PyModule_AddObject(m, "CFMutableStringRefType", (PyObject *)&CFMutableStringRef_Type);
-       Py_TYPE(&CFURLRef_Type) = &PyType_Type;
-       CFURLRef_Type.tp_base = &CFTypeRef_Type;
-       if (PyType_Ready(&CFURLRef_Type) < 0) return;
-       Py_INCREF(&CFURLRef_Type);
-       PyModule_AddObject(m, "CFURLRef", (PyObject *)&CFURLRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CFURLRef_Type);
-       PyModule_AddObject(m, "CFURLRefType", (PyObject *)&CFURLRef_Type);
-
-#define _STRINGCONST(name) PyModule_AddObject(m, #name, CFStringRefObj_New(name))
-       _STRINGCONST(kCFPreferencesAnyApplication);
-       _STRINGCONST(kCFPreferencesCurrentApplication);
-       _STRINGCONST(kCFPreferencesAnyHost);
-       _STRINGCONST(kCFPreferencesCurrentHost);
-       _STRINGCONST(kCFPreferencesAnyUser);
-       _STRINGCONST(kCFPreferencesCurrentUser);
-
-
-
-}
-
-/* ========================= End module _CF ========================= */
-
diff --git a/Mac/Modules/cf/cfscan.py b/Mac/Modules/cf/cfscan.py
deleted file mode 100644 (file)
index de5bbba..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner_OSX
-
-LONG = "CoreFoundation"
-SHORT = "cf"
-OBJECTS = ("CFTypeRef",
-                "CFArrayRef", "CFMutableArrayRef",
-                "CFDataRef", "CFMutableDataRef",
-                "CFDictionaryRef", "CFMutableDictionaryRef",
-                "CFStringRef", "CFMutableStringRef",
-                "CFURLRef",
-##              "CFPropertyListRef",
-                )
-# ADD object typenames here
-
-def main():
-    input = [
-            "CFBase.h",
-            "CFArray.h",
-##              "CFBag.h",
-##              "CFBundle.h",
-##              "CFCharacterSet.h",
-            "CFData.h",
-##              "CFDate.h",
-            "CFDictionary.h",
-##              "CFNumber.h",
-##              "CFPlugIn.h",
-            "CFPreferences.h",
-            "CFPropertyList.h",
-##              "CFSet.h",
-            "CFString.h",
-##              "CFStringEncodingExt.h",
-##              "CFTimeZone.h",
-            "CFURL.h",
-            ]
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.gentypetest(SHORT+"typetest.py")
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner_OSX):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist and name[:13] != 'CFPreferences':
-            t, n, m = arglist[0]
-            if t in OBJECTS and m == "InMode":
-                classname = "Method"
-                listname = t + "_methods"
-            # Special case for the silly first AllocatorRef argument
-            if t == 'CFAllocatorRef' and m == 'InMode' and len(arglist) > 1:
-                t, n, m = arglist[1]
-                if t in OBJECTS and m == "InMode":
-                    classname = "MethodSkipArg1"
-                    listname = t + "_methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-    def makeblacklistnames(self):
-        return [
-                # Memory allocator functions
-                "CFAllocatorGetDefault",
-                "CFAllocatorSetDefault",
-                "CFAllocatorAllocate",
-                "CFAllocatorReallocate",
-                "CFAllocatorDeallocate",
-                "CFGetAllocator",
-                # Array functions we skip for now.
-                "CFArrayGetValueAtIndex",
-                # Data pointer functions. Skip for now.
-                "CFDataGetBytePtr",
-                "CFDataGetMutableBytePtr",
-                "CFDataGetBytes",   # XXXX Should support this one
-                # String functions
-                "CFStringGetPascalString", # Use the C-string methods.
-                "CFStringGetPascalStringPtr", # TBD automatically
-                "CFStringGetCStringPtr",
-                "CFStringGetCharactersPtr",
-                "CFStringGetCString",
-                "CFStringGetCharacters",
-                "CFURLCreateStringWithFileSystemPath", # Gone in later releases
-                "CFStringCreateMutableWithExternalCharactersNoCopy", # Not a clue...
-                "CFStringSetExternalCharactersNoCopy",
-                "CFStringGetCharacterAtIndex", # No format for single unichars yet.
-                "kCFStringEncodingInvalidId", # incompatible constant declaration
-                "CFPropertyListCreateFromXMLData", # Manually generated
-                ]
-
-    def makegreylist(self):
-        return []
-
-    def makeblacklisttypes(self):
-        return [
-                "CFComparatorFunction", # Callback function pointer
-                "CFAllocatorContext", # Not interested in providing our own allocator
-                "void_ptr_ptr",  # Tricky. This is the initializer for arrays...
-                "void_ptr", # Ditto for various array lookup methods
-                "CFArrayApplierFunction", # Callback function pointer
-                "CFDictionaryApplierFunction", # Callback function pointer
-                "va_list", # For printf-to-a-cfstring. Use Python.
-                "const_CFStringEncoding_ptr", # To be done, I guess
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                # Buffers in CF seem to be passed as UInt8 * normally.
-                ([("UInt8_ptr", "*", "InMode"), ("CFIndex", "*", "InMode")],
-                 [("UcharInBuffer", "*", "*")]),
-
-                ([("UniChar_ptr", "*", "InMode"), ("CFIndex", "*", "InMode")],
-                 [("UnicodeInBuffer", "*", "*")]),
-
-                # Some functions return a const char *. Don't worry, we won't modify it.
-                ([("const_char_ptr", "*", "ReturnMode")],
-                 [("return_stringptr", "*", "*")]),
-
-                # base URLs are optional (pass None for NULL)
-                ([("CFURLRef", "baseURL", "InMode")],
-                 [("OptionalCFURLRef", "*", "*")]),
-
-                # We handle CFPropertyListRef objects as plain CFTypeRef
-                ([("CFPropertyListRef", "*", "*")],
-                 [("CFTypeRef", "*", "*")]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/cf/cfsupport.py b/Mac/Modules/cf/cfsupport.py
deleted file mode 100644 (file)
index a1913c3..0000000
+++ /dev/null
@@ -1,666 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-#error missing SetActionFilter
-
-import string
-
-# Declarations that change for each manager
-MODNAME = '_CF'                         # The name of the module
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'CF'                        # The prefix for module-wide routines
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Special case generator for the functions that have an AllocatorRef first argument,
-# which we skip anyway, and the object as the second arg.
-class MethodSkipArg1(MethodGenerator):
-    """Similar to MethodGenerator, but has self as last argument"""
-
-    def parseArgumentList(self, args):
-        if len(args) < 2:
-            raise ValueError("MethodSkipArg1 expects at least 2 args")
-        a0, a1, args = args[0], args[1], args[2:]
-        t0, n0, m0 = a0
-        if t0 != "CFAllocatorRef" and m0 != InMode:
-            raise ValueError("MethodSkipArg1 should have dummy AllocatorRef first arg")
-        t1, n1, m1 = a1
-        if m1 != InMode:
-            raise ValueError("method's 'self' must be 'InMode'")
-        dummy = Variable(t0, n0, m0)
-        self.argumentList.append(dummy)
-        self.itself = Variable(t1, "_self->ob_itself", SelfMode)
-        self.argumentList.append(self.itself)
-        FunctionGenerator.parseArgumentList(self, args)
-
-
-# Create the type objects
-
-includestuff = includestuff + """
-#include <CoreServices/CoreServices.h>
-
-#include "pycfbridge.h"
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_CFObj_New(CFTypeRef);
-extern int _CFObj_Convert(PyObject *, CFTypeRef *);
-#define CFObj_New _CFObj_New
-#define CFObj_Convert _CFObj_Convert
-
-extern PyObject *_CFTypeRefObj_New(CFTypeRef);
-extern int _CFTypeRefObj_Convert(PyObject *, CFTypeRef *);
-#define CFTypeRefObj_New _CFTypeRefObj_New
-#define CFTypeRefObj_Convert _CFTypeRefObj_Convert
-
-extern PyObject *_CFStringRefObj_New(CFStringRef);
-extern int _CFStringRefObj_Convert(PyObject *, CFStringRef *);
-#define CFStringRefObj_New _CFStringRefObj_New
-#define CFStringRefObj_Convert _CFStringRefObj_Convert
-
-extern PyObject *_CFMutableStringRefObj_New(CFMutableStringRef);
-extern int _CFMutableStringRefObj_Convert(PyObject *, CFMutableStringRef *);
-#define CFMutableStringRefObj_New _CFMutableStringRefObj_New
-#define CFMutableStringRefObj_Convert _CFMutableStringRefObj_Convert
-
-extern PyObject *_CFArrayRefObj_New(CFArrayRef);
-extern int _CFArrayRefObj_Convert(PyObject *, CFArrayRef *);
-#define CFArrayRefObj_New _CFArrayRefObj_New
-#define CFArrayRefObj_Convert _CFArrayRefObj_Convert
-
-extern PyObject *_CFMutableArrayRefObj_New(CFMutableArrayRef);
-extern int _CFMutableArrayRefObj_Convert(PyObject *, CFMutableArrayRef *);
-#define CFMutableArrayRefObj_New _CFMutableArrayRefObj_New
-#define CFMutableArrayRefObj_Convert _CFMutableArrayRefObj_Convert
-
-extern PyObject *_CFDataRefObj_New(CFDataRef);
-extern int _CFDataRefObj_Convert(PyObject *, CFDataRef *);
-#define CFDataRefObj_New _CFDataRefObj_New
-#define CFDataRefObj_Convert _CFDataRefObj_Convert
-
-extern PyObject *_CFMutableDataRefObj_New(CFMutableDataRef);
-extern int _CFMutableDataRefObj_Convert(PyObject *, CFMutableDataRef *);
-#define CFMutableDataRefObj_New _CFMutableDataRefObj_New
-#define CFMutableDataRefObj_Convert _CFMutableDataRefObj_Convert
-
-extern PyObject *_CFDictionaryRefObj_New(CFDictionaryRef);
-extern int _CFDictionaryRefObj_Convert(PyObject *, CFDictionaryRef *);
-#define CFDictionaryRefObj_New _CFDictionaryRefObj_New
-#define CFDictionaryRefObj_Convert _CFDictionaryRefObj_Convert
-
-extern PyObject *_CFMutableDictionaryRefObj_New(CFMutableDictionaryRef);
-extern int _CFMutableDictionaryRefObj_Convert(PyObject *, CFMutableDictionaryRef *);
-#define CFMutableDictionaryRefObj_New _CFMutableDictionaryRefObj_New
-#define CFMutableDictionaryRefObj_Convert _CFMutableDictionaryRefObj_Convert
-
-extern PyObject *_CFURLRefObj_New(CFURLRef);
-extern int _CFURLRefObj_Convert(PyObject *, CFURLRef *);
-extern int _OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *);
-#define CFURLRefObj_New _CFURLRefObj_New
-#define CFURLRefObj_Convert _CFURLRefObj_Convert
-#define OptionalCFURLRefObj_Convert _OptionalCFURLRefObj_Convert
-#endif
-
-/*
-** Parse/generate CFRange records
-*/
-PyObject *CFRange_New(CFRange *itself)
-{
-
-        return Py_BuildValue("ll", (long)itself->location, (long)itself->length);
-}
-
-int
-CFRange_Convert(PyObject *v, CFRange *p_itself)
-{
-        long location, length;
-
-        if( !PyArg_ParseTuple(v, "ll", &location, &length) )
-                return 0;
-        p_itself->location = (CFIndex)location;
-        p_itself->length = (CFIndex)length;
-        return 1;
-}
-
-/* Optional CFURL argument or None (passed as NULL) */
-int
-OptionalCFURLRefObj_Convert(PyObject *v, CFURLRef *p_itself)
-{
-    if ( v == Py_None ) {
-        p_itself = NULL;
-        return 1;
-    }
-    return CFURLRefObj_Convert(v, p_itself);
-}
-"""
-
-finalstuff = finalstuff + """
-
-/* Routines to convert any CF type to/from the corresponding CFxxxObj */
-PyObject *CFObj_New(CFTypeRef itself)
-{
-        if (itself == NULL)
-        {
-                PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
-                return NULL;
-        }
-        if (CFGetTypeID(itself) == CFArrayGetTypeID()) return CFArrayRefObj_New((CFArrayRef)itself);
-        if (CFGetTypeID(itself) == CFDictionaryGetTypeID()) return CFDictionaryRefObj_New((CFDictionaryRef)itself);
-        if (CFGetTypeID(itself) == CFDataGetTypeID()) return CFDataRefObj_New((CFDataRef)itself);
-        if (CFGetTypeID(itself) == CFStringGetTypeID()) return CFStringRefObj_New((CFStringRef)itself);
-        if (CFGetTypeID(itself) == CFURLGetTypeID()) return CFURLRefObj_New((CFURLRef)itself);
-        /* XXXX Or should we use PyCF_CF2Python here?? */
-        return CFTypeRefObj_New(itself);
-}
-int CFObj_Convert(PyObject *v, CFTypeRef *p_itself)
-{
-
-        if (v == Py_None) { *p_itself = NULL; return 1; }
-        /* Check for other CF objects here */
-
-        if (!CFTypeRefObj_Check(v) &&
-                !CFArrayRefObj_Check(v) &&
-                !CFMutableArrayRefObj_Check(v) &&
-                !CFDictionaryRefObj_Check(v) &&
-                !CFMutableDictionaryRefObj_Check(v) &&
-                !CFDataRefObj_Check(v) &&
-                !CFMutableDataRefObj_Check(v) &&
-                !CFStringRefObj_Check(v) &&
-                !CFMutableStringRefObj_Check(v) &&
-                !CFURLRefObj_Check(v) )
-        {
-                /* XXXX Or should we use PyCF_Python2CF here?? */
-                PyErr_SetString(PyExc_TypeError, "CF object required");
-                return 0;
-        }
-        *p_itself = ((CFTypeRefObject *)v)->ob_itself;
-        return 1;
-}
-"""
-
-initstuff = initstuff + """
-PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFObj_Convert);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFTypeRefObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFTypeRefObj_Convert);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(CFStringRef, CFStringRefObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFStringRef, CFStringRefObj_Convert);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableStringRef, CFMutableStringRefObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableStringRef, CFMutableStringRefObj_Convert);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(CFArrayRef, CFArrayRefObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFArrayRef, CFArrayRefObj_Convert);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableArrayRef, CFMutableArrayRefObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableArrayRef, CFMutableArrayRefObj_Convert);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(CFDictionaryRef, CFDictionaryRefObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFDictionaryRef, CFDictionaryRefObj_Convert);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableDictionaryRef, CFMutableDictionaryRefObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableDictionaryRef, CFMutableDictionaryRefObj_Convert);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(CFURLRef, CFURLRefObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFURLRef, CFURLRefObj_Convert);
-"""
-
-variablestuff="""
-#define _STRINGCONST(name) PyModule_AddObject(m, #name, CFStringRefObj_New(name))
-_STRINGCONST(kCFPreferencesAnyApplication);
-_STRINGCONST(kCFPreferencesCurrentApplication);
-_STRINGCONST(kCFPreferencesAnyHost);
-_STRINGCONST(kCFPreferencesCurrentHost);
-_STRINGCONST(kCFPreferencesAnyUser);
-_STRINGCONST(kCFPreferencesCurrentUser);
-
-"""
-
-Boolean = Type("Boolean", "l")
-CFTypeID = Type("CFTypeID", "l") # XXXX a guess, seems better than OSTypeType.
-CFHashCode = Type("CFHashCode", "l")
-CFIndex = Type("CFIndex", "l")
-CFRange = OpaqueByValueType('CFRange', 'CFRange')
-CFOptionFlags = Type("CFOptionFlags", "l")
-CFStringEncoding = Type("CFStringEncoding", "l")
-CFComparisonResult = Type("CFComparisonResult", "l")  # a bit dangerous, it's an enum
-CFURLPathStyle = Type("CFURLPathStyle", "l") #  a bit dangerous, it's an enum
-
-char_ptr = stringptr
-return_stringptr = Type("char *", "s")  # ONLY FOR RETURN VALUES!!
-
-CFAllocatorRef = FakeType("(CFAllocatorRef)NULL")
-CFArrayCallBacks_ptr = FakeType("&kCFTypeArrayCallBacks")
-CFDictionaryKeyCallBacks_ptr = FakeType("&kCFTypeDictionaryKeyCallBacks")
-CFDictionaryValueCallBacks_ptr = FakeType("&kCFTypeDictionaryValueCallBacks")
-# The real objects
-CFTypeRef = OpaqueByValueType("CFTypeRef", "CFTypeRefObj")
-CFArrayRef = OpaqueByValueType("CFArrayRef", "CFArrayRefObj")
-CFMutableArrayRef = OpaqueByValueType("CFMutableArrayRef", "CFMutableArrayRefObj")
-CFArrayRef = OpaqueByValueType("CFArrayRef", "CFArrayRefObj")
-CFMutableArrayRef = OpaqueByValueType("CFMutableArrayRef", "CFMutableArrayRefObj")
-CFDataRef = OpaqueByValueType("CFDataRef", "CFDataRefObj")
-CFMutableDataRef = OpaqueByValueType("CFMutableDataRef", "CFMutableDataRefObj")
-CFDictionaryRef = OpaqueByValueType("CFDictionaryRef", "CFDictionaryRefObj")
-CFMutableDictionaryRef = OpaqueByValueType("CFMutableDictionaryRef", "CFMutableDictionaryRefObj")
-CFStringRef = OpaqueByValueType("CFStringRef", "CFStringRefObj")
-CFMutableStringRef = OpaqueByValueType("CFMutableStringRef", "CFMutableStringRefObj")
-CFURLRef = OpaqueByValueType("CFURLRef", "CFURLRefObj")
-OptionalCFURLRef  = OpaqueByValueType("CFURLRef", "OptionalCFURLRefObj")
-##CFPropertyListRef = OpaqueByValueType("CFPropertyListRef", "CFTypeRefObj")
-# ADD object type here
-
-# Our (opaque) objects
-
-class MyGlobalObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output('if (itself == NULL)')
-        OutLbrace()
-        Output('PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");')
-        Output('return NULL;')
-        OutRbrace()
-    def outputStructMembers(self):
-        GlobalObjectDefinition.outputStructMembers(self)
-        Output("void (*ob_freeit)(CFTypeRef ptr);")
-    def outputInitStructMembers(self):
-        GlobalObjectDefinition.outputInitStructMembers(self)
-##              Output("it->ob_freeit = NULL;")
-        Output("it->ob_freeit = CFRelease;")
-    def outputCheckConvertArg(self):
-        Out("""
-        if (v == Py_None) { *p_itself = NULL; return 1; }
-        /* Check for other CF objects here */
-        """)
-    def outputCleanupStructMembers(self):
-        Output("if (self->ob_freeit && self->ob_itself)")
-        OutLbrace()
-        Output("self->ob_freeit((CFTypeRef)self->ob_itself);")
-        Output("self->ob_itself = NULL;")
-        OutRbrace()
-
-    def outputCompare(self):
-        Output()
-        Output("static int %s_compare(%s *self, %s *other)", self.prefix, self.objecttype, self.objecttype)
-        OutLbrace()
-        Output("/* XXXX Or should we use CFEqual?? */")
-        Output("if ( self->ob_itself > other->ob_itself ) return 1;")
-        Output("if ( self->ob_itself < other->ob_itself ) return -1;")
-        Output("return 0;")
-        OutRbrace()
-
-    def outputHash(self):
-        Output()
-        Output("static int %s_hash(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("/* XXXX Or should we use CFHash?? */")
-        Output("return (int)self->ob_itself;")
-        OutRbrace()
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFTypeRef type-%%d object at 0x%%8.8x for 0x%%8.8x>", (int)CFGetTypeID(self->ob_itself), (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-    def output_tp_newBody(self):
-        Output("PyObject *self;")
-        Output
-        Output("if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;")
-        Output("((%s *)self)->ob_itself = NULL;", self.objecttype)
-        Output("((%s *)self)->ob_freeit = CFRelease;", self.objecttype)
-        Output("return self;")
-
-    def output_tp_initBody(self):
-        Output("%s itself;", self.itselftype)
-        Output("char *kw[] = {\"itself\", 0};")
-        Output()
-        Output("if (PyArg_ParseTupleAndKeywords(_args, _kwds, \"O&\", kw, %s_Convert, &itself))",
-                self.prefix)
-        OutLbrace()
-        Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
-        Output("return 0;")
-        OutRbrace()
-        if self.prefix != 'CFTypeRefObj':
-            Output()
-            Output("/* Any CFTypeRef descendent is allowed as initializer too */")
-            Output("if (PyArg_ParseTupleAndKeywords(_args, _kwds, \"O&\", kw, CFTypeRefObj_Convert, &itself))")
-            OutLbrace()
-            Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
-            Output("return 0;")
-            OutRbrace()
-        Output("return -1;")
-
-class CFTypeRefObjectDefinition(MyGlobalObjectDefinition):
-    pass
-
-class CFArrayRefObjectDefinition(MyGlobalObjectDefinition):
-    basetype = "CFTypeRef_Type"
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFArrayRef object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-class CFMutableArrayRefObjectDefinition(MyGlobalObjectDefinition):
-    basetype = "CFArrayRef_Type"
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFMutableArrayRef object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-class CFDictionaryRefObjectDefinition(MyGlobalObjectDefinition):
-    basetype = "CFTypeRef_Type"
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFDictionaryRef object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-class CFMutableDictionaryRefObjectDefinition(MyGlobalObjectDefinition):
-    basetype = "CFDictionaryRef_Type"
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFMutableDictionaryRef object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-class CFDataRefObjectDefinition(MyGlobalObjectDefinition):
-    basetype = "CFTypeRef_Type"
-
-    def outputCheckConvertArg(self):
-        Out("""
-        if (v == Py_None) { *p_itself = NULL; return 1; }
-        if (PyString_Check(v)) {
-            char *cStr;
-            int cLen;
-            if( PyString_AsStringAndSize(v, &cStr, &cLen) < 0 ) return 0;
-            *p_itself = CFDataCreate((CFAllocatorRef)NULL, (unsigned char *)cStr, cLen);
-            return 1;
-        }
-        """)
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFDataRef object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-class CFMutableDataRefObjectDefinition(MyGlobalObjectDefinition):
-    basetype = "CFDataRef_Type"
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFMutableDataRef object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-class CFStringRefObjectDefinition(MyGlobalObjectDefinition):
-    basetype = "CFTypeRef_Type"
-
-    def outputCheckConvertArg(self):
-        Out("""
-        if (v == Py_None) { *p_itself = NULL; return 1; }
-        if (PyString_Check(v)) {
-            char *cStr;
-            if (!PyArg_Parse(v, "es", "ascii", &cStr))
-                return NULL;
-                *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);
-                PyMem_Free(cStr);
-                return 1;
-        }
-        if (PyUnicode_Check(v)) {
-                /* We use the CF types here, if Python was configured differently that will give an error */
-                CFIndex size = PyUnicode_GetSize(v);
-                UniChar *unichars = PyUnicode_AsUnicode(v);
-                if (!unichars) return 0;
-                *p_itself = CFStringCreateWithCharacters((CFAllocatorRef)NULL, unichars, size);
-                return 1;
-        }
-
-        """)
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFStringRef object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-class CFMutableStringRefObjectDefinition(CFStringRefObjectDefinition):
-    basetype = "CFStringRef_Type"
-
-    def outputCheckConvertArg(self):
-        # Mutable, don't allow Python strings
-        return MyGlobalObjectDefinition.outputCheckConvertArg(self)
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFMutableStringRef object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-class CFURLRefObjectDefinition(MyGlobalObjectDefinition):
-    basetype = "CFTypeRef_Type"
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<CFURL object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-
-# ADD object class here
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff, variablestuff)
-CFTypeRef_object = CFTypeRefObjectDefinition('CFTypeRef', 'CFTypeRefObj', 'CFTypeRef')
-CFArrayRef_object = CFArrayRefObjectDefinition('CFArrayRef', 'CFArrayRefObj', 'CFArrayRef')
-CFMutableArrayRef_object = CFMutableArrayRefObjectDefinition('CFMutableArrayRef', 'CFMutableArrayRefObj', 'CFMutableArrayRef')
-CFDictionaryRef_object = CFDictionaryRefObjectDefinition('CFDictionaryRef', 'CFDictionaryRefObj', 'CFDictionaryRef')
-CFMutableDictionaryRef_object = CFMutableDictionaryRefObjectDefinition('CFMutableDictionaryRef', 'CFMutableDictionaryRefObj', 'CFMutableDictionaryRef')
-CFDataRef_object = CFDataRefObjectDefinition('CFDataRef', 'CFDataRefObj', 'CFDataRef')
-CFMutableDataRef_object = CFMutableDataRefObjectDefinition('CFMutableDataRef', 'CFMutableDataRefObj', 'CFMutableDataRef')
-CFStringRef_object = CFStringRefObjectDefinition('CFStringRef', 'CFStringRefObj', 'CFStringRef')
-CFMutableStringRef_object = CFMutableStringRefObjectDefinition('CFMutableStringRef', 'CFMutableStringRefObj', 'CFMutableStringRef')
-CFURLRef_object = CFURLRefObjectDefinition('CFURLRef', 'CFURLRefObj', 'CFURLRef')
-
-# ADD object here
-
-module.addobject(CFTypeRef_object)
-module.addobject(CFArrayRef_object)
-module.addobject(CFMutableArrayRef_object)
-module.addobject(CFDictionaryRef_object)
-module.addobject(CFMutableDictionaryRef_object)
-module.addobject(CFDataRef_object)
-module.addobject(CFMutableDataRef_object)
-module.addobject(CFStringRef_object)
-module.addobject(CFMutableStringRef_object)
-module.addobject(CFURLRef_object)
-# ADD addobject call here
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-CFTypeRef_methods = []
-CFArrayRef_methods = []
-CFMutableArrayRef_methods = []
-CFDictionaryRef_methods = []
-CFMutableDictionaryRef_methods = []
-CFDataRef_methods = []
-CFMutableDataRef_methods = []
-CFStringRef_methods = []
-CFMutableStringRef_methods = []
-CFURLRef_methods = []
-
-# ADD _methods initializer here
-exec(open(INPUTFILE).read())
-
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in CFTypeRef_methods: CFTypeRef_object.add(f)
-for f in CFArrayRef_methods: CFArrayRef_object.add(f)
-for f in CFMutableArrayRef_methods: CFMutableArrayRef_object.add(f)
-for f in CFDictionaryRef_methods: CFDictionaryRef_object.add(f)
-for f in CFMutableDictionaryRef_methods: CFMutableDictionaryRef_object.add(f)
-for f in CFDataRef_methods: CFDataRef_object.add(f)
-for f in CFMutableDataRef_methods: CFMutableDataRef_object.add(f)
-for f in CFStringRef_methods: CFStringRef_object.add(f)
-for f in CFMutableStringRef_methods: CFMutableStringRef_object.add(f)
-for f in CFURLRef_methods: CFURLRef_object.add(f)
-
-# Manual generators for getting data out of strings
-
-getasstring_body = """
-int size = CFStringGetLength(_self->ob_itself)+1;
-char *data = malloc(size);
-
-if( data == NULL ) return PyErr_NoMemory();
-if ( CFStringGetCString(_self->ob_itself, data, size, 0) ) {
-        _res = (PyObject *)PyString_FromString(data);
-} else {
-        PyErr_SetString(PyExc_RuntimeError, "CFStringGetCString could not fit the string");
-        _res = NULL;
-}
-free(data);
-return _res;
-"""
-
-f = ManualGenerator("CFStringGetString", getasstring_body);
-f.docstring = lambda: "() -> (string _rv)"
-CFStringRef_object.add(f)
-
-getasunicode_body = """
-int size = CFStringGetLength(_self->ob_itself)+1;
-Py_UNICODE *data = malloc(size*sizeof(Py_UNICODE));
-CFRange range;
-
-range.location = 0;
-range.length = size;
-if( data == NULL ) return PyErr_NoMemory();
-CFStringGetCharacters(_self->ob_itself, range, data);
-_res = (PyObject *)PyUnicode_FromUnicode(data, size-1);
-free(data);
-return _res;
-"""
-
-f = ManualGenerator("CFStringGetUnicode", getasunicode_body);
-f.docstring = lambda: "() -> (unicode _rv)"
-CFStringRef_object.add(f)
-
-# Get data from CFDataRef
-getasdata_body = """
-int size = CFDataGetLength(_self->ob_itself);
-char *data = (char *)CFDataGetBytePtr(_self->ob_itself);
-
-_res = (PyObject *)PyString_FromStringAndSize(data, size);
-return _res;
-"""
-
-f = ManualGenerator("CFDataGetData", getasdata_body);
-f.docstring = lambda: "() -> (string _rv)"
-CFDataRef_object.add(f)
-
-# Manual generator for CFPropertyListCreateFromXMLData because of funny error return
-fromxml_body = """
-CFTypeRef _rv;
-CFOptionFlags mutabilityOption;
-CFStringRef errorString;
-if (!PyArg_ParseTuple(_args, "l",
-                      &mutabilityOption))
-        return NULL;
-_rv = CFPropertyListCreateFromXMLData((CFAllocatorRef)NULL,
-                                      _self->ob_itself,
-                                      mutabilityOption,
-                                      &errorString);
-if (errorString)
-        CFRelease(errorString);
-if (_rv == NULL) {
-        PyErr_SetString(PyExc_RuntimeError, "Parse error in XML data");
-        return NULL;
-}
-_res = Py_BuildValue("O&",
-                     CFTypeRefObj_New, _rv);
-return _res;
-"""
-f = ManualGenerator("CFPropertyListCreateFromXMLData", fromxml_body)
-f.docstring = lambda: "(CFOptionFlags mutabilityOption) -> (CFTypeRefObj)"
-CFTypeRef_object.add(f)
-
-# Convert CF objects to Python objects
-toPython_body = """
-_res = PyCF_CF2Python(_self->ob_itself);
-return _res;
-"""
-
-f = ManualGenerator("toPython", toPython_body);
-f.docstring = lambda: "() -> (python_object)"
-CFTypeRef_object.add(f)
-
-toCF_body = """
-CFTypeRef rv;
-CFTypeID typeid;
-
-if (!PyArg_ParseTuple(_args, "O&", PyCF_Python2CF, &rv))
-        return NULL;
-typeid = CFGetTypeID(rv);
-
-if (typeid == CFStringGetTypeID())
-        return Py_BuildValue("O&", CFStringRefObj_New, rv);
-if (typeid == CFArrayGetTypeID())
-        return Py_BuildValue("O&", CFArrayRefObj_New, rv);
-if (typeid == CFDictionaryGetTypeID())
-        return Py_BuildValue("O&", CFDictionaryRefObj_New, rv);
-if (typeid == CFURLGetTypeID())
-        return Py_BuildValue("O&", CFURLRefObj_New, rv);
-
-_res = Py_BuildValue("O&", CFTypeRefObj_New, rv);
-return _res;
-"""
-f = ManualGenerator("toCF", toCF_body);
-f.docstring = lambda: "(python_object) -> (CF_object)"
-module.add(f)
-
-# ADD add forloop here
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/cf/pycfbridge.c b/Mac/Modules/cf/pycfbridge.c
deleted file mode 100644 (file)
index eb476ed..0000000
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
-** Convert objects from Python to CoreFoundation and vice-versa.
-*/
-
-#include <CoreServices/CoreServices.h>
-
-#include "Python.h"
-#include "pymactoolbox.h"
-#include "pycfbridge.h"
-
-
-/* ---------------------------------------- */
-/* CoreFoundation objects to Python objects */
-/* ---------------------------------------- */
-
-PyObject *
-PyCF_CF2Python(CFTypeRef src) {
-       CFTypeID typeid;
-       
-       if( src == NULL ) {
-               Py_INCREF(Py_None);
-               return Py_None;
-       }
-       typeid = CFGetTypeID(src);
-       if (typeid == CFArrayGetTypeID())
-               return PyCF_CF2Python_sequence((CFArrayRef)src);
-       if (typeid == CFDictionaryGetTypeID())
-               return PyCF_CF2Python_mapping((CFDictionaryRef)src);
-       return PyCF_CF2Python_simple(src);
-}
-
-PyObject *
-PyCF_CF2Python_sequence(CFArrayRef src) {
-       int size = CFArrayGetCount(src);
-       PyObject *rv;
-       CFTypeRef item_cf;
-       PyObject *item_py = NULL;
-       int i;
-       
-       if ( (rv=PyList_New(size)) == NULL )
-               return NULL;
-       for(i=0; i<size; i++) {
-               item_cf = CFArrayGetValueAtIndex(src, i);
-               if (item_cf == NULL ) goto err;
-               item_py = PyCF_CF2Python(item_cf);
-               if (item_py == NULL ) goto err;
-               if (PyList_SetItem(rv, i, item_py) < 0) goto err;
-               item_py = NULL;
-       }
-       return rv;
-err:
-       Py_XDECREF(item_py);
-       Py_DECREF(rv);
-       return NULL;
-}
-
-PyObject *
-PyCF_CF2Python_mapping(CFTypeRef src) {
-       int size = CFDictionaryGetCount(src);
-       PyObject *rv = NULL;
-       CFTypeRef *allkeys = NULL, *allvalues = NULL;
-       CFTypeRef key_cf, value_cf;
-       PyObject *key_py = NULL, *value_py = NULL;
-       int i;
-       
-       allkeys = malloc(size*sizeof(CFTypeRef *));
-       if (allkeys == NULL) {
-               PyErr_NoMemory();
-               goto err;
-       }
-       allvalues = malloc(size*sizeof(CFTypeRef *));
-       if (allvalues == NULL) {
-               PyErr_NoMemory();
-               goto err;
-       }
-       if ( (rv=PyDict_New()) == NULL ) goto err;
-       CFDictionaryGetKeysAndValues(src, allkeys, allvalues);
-       for(i=0; i<size; i++) {
-               key_cf = allkeys[i];
-               value_cf = allvalues[i];
-               key_py = PyCF_CF2Python(key_cf);
-               if (key_py == NULL ) goto err;
-               value_py = PyCF_CF2Python(value_cf);
-               if (value_py == NULL ) goto err;
-               if (PyDict_SetItem(rv, key_py, value_py) < 0) goto err;
-               key_py = NULL;
-               value_py = NULL;
-       }
-       return rv;
-err:
-       Py_XDECREF(key_py);
-       Py_XDECREF(value_py);
-       Py_XDECREF(rv);
-       free(allkeys);
-       free(allvalues);
-       return NULL;
-}
-
-PyObject *
-PyCF_CF2Python_simple(CFTypeRef src) {
-       CFTypeID typeid;
-       
-       typeid = CFGetTypeID(src);
-       if (typeid == CFStringGetTypeID())
-               return PyCF_CF2Python_string((CFStringRef)src);
-       if (typeid == CFBooleanGetTypeID())
-               return PyBool_FromLong((long)CFBooleanGetValue(src));
-       if (typeid == CFNumberGetTypeID()) {
-               if (CFNumberIsFloatType(src)) {
-                       double d;
-                       CFNumberGetValue(src, kCFNumberDoubleType, &d);
-                       return PyFloat_FromDouble(d);
-               } else {
-                       long l;
-                       if (!CFNumberGetValue(src, kCFNumberLongType, &l))
-                               /* XXXX Out of range! */;
-                       return PyLong_FromLong(l);
-               }
-       }
-       /* XXXX Should return as CFTypeRef, really... */
-       PyMac_Error(resNotFound);
-       return NULL;
-}
-
-/* Unsure - Return unicode or 8 bit strings? */
-PyObject *
-PyCF_CF2Python_string(CFStringRef src) {
-       int size = CFStringGetLength(src)+1;
-       Py_UNICODE *data = malloc(size*sizeof(Py_UNICODE));
-       CFRange range;
-       PyObject *rv;
-
-       range.location = 0;
-       range.length = size;
-       if( data == NULL ) return PyErr_NoMemory();
-       CFStringGetCharacters(src, range, data);
-       rv = (PyObject *)PyUnicode_FromUnicode(data, size-1);
-       free(data);
-       return rv;
-}
-
-/* ---------------------------------------- */
-/* Python objects to CoreFoundation objects */
-/* ---------------------------------------- */
-
-int
-PyCF_Python2CF(PyObject *src, CFTypeRef *dst) {
-
-       if (PyString_Check(src) || PyUnicode_Check(src))
-               return PyCF_Python2CF_simple(src, dst);
-       if (PySequence_Check(src))
-               return PyCF_Python2CF_sequence(src, (CFArrayRef *)dst);
-       if (PyMapping_Check(src))
-               return PyCF_Python2CF_mapping(src, (CFDictionaryRef *)dst);
-       return PyCF_Python2CF_simple(src, dst);
-}
-
-int
-PyCF_Python2CF_sequence(PyObject *src, CFArrayRef *dst) {
-       CFMutableArrayRef rv = NULL;
-       CFTypeRef item_cf = NULL;
-       PyObject *item_py = NULL;
-       int size, i;
-       
-       if( !PySequence_Check(src) ) {
-               PyErr_Format(PyExc_TypeError,
-                       "Cannot convert %.500s objects to CFArray",
-                       src->ob_type->tp_name);
-               return 0;
-       }
-       size = PySequence_Size(src);
-       rv = CFArrayCreateMutable((CFAllocatorRef)NULL, size, &kCFTypeArrayCallBacks);
-       if (rv == NULL) {
-               PyMac_Error(resNotFound); 
-               goto err;
-       }
-
-       for( i=0; i<size; i++) {
-               item_py = PySequence_GetItem(src, i);
-               if (item_py == NULL) goto err;
-               if ( !PyCF_Python2CF(item_py, &item_cf)) goto err;
-               Py_DECREF(item_py);
-               CFArraySetValueAtIndex(rv, i, item_cf);
-               CFRelease(item_cf);
-               item_cf = NULL;
-       }
-       *dst = rv;
-       return 1;
-err:
-       Py_XDECREF(item_py);
-       if (rv) CFRelease(rv);
-       if (item_cf) CFRelease(item_cf);
-       return 0;               
-}
-
-int
-PyCF_Python2CF_mapping(PyObject *src, CFDictionaryRef *dst) {
-       CFMutableDictionaryRef rv = NULL;
-       PyObject *aslist = NULL;
-       CFTypeRef key_cf = NULL, value_cf = NULL;
-       PyObject *item_py = NULL, *key_py = NULL, *value_py = NULL;
-       int size, i;
-       
-       if( !PyMapping_Check(src) ) {
-               PyErr_Format(PyExc_TypeError,
-                       "Cannot convert %.500s objects to CFDictionary",
-                       src->ob_type->tp_name);
-               return 0;
-       }
-       size = PyMapping_Size(src);
-       rv = CFDictionaryCreateMutable((CFAllocatorRef)NULL, size,
-                                       &kCFTypeDictionaryKeyCallBacks,
-                                       &kCFTypeDictionaryValueCallBacks);
-       if (rv == NULL) {
-               PyMac_Error(resNotFound); 
-               goto err;
-       }
-       if ( (aslist = PyMapping_Items(src)) == NULL ) goto err;
-
-       for( i=0; i<size; i++) {
-               item_py = PySequence_GetItem(aslist, i);
-               if (item_py == NULL) goto err;
-               if (!PyArg_ParseTuple(item_py, "OO", &key_py, &value_py)) goto err;
-               if ( !PyCF_Python2CF(key_py, &key_cf) ) goto err;
-               if ( !PyCF_Python2CF(value_py, &value_cf) ) goto err;
-               CFDictionaryAddValue(rv, key_cf, value_cf);
-               CFRelease(key_cf);
-               key_cf = NULL;
-               CFRelease(value_cf);
-               value_cf = NULL;
-       }
-       *dst = rv;
-       return 1;
-err:
-       Py_XDECREF(item_py);
-       Py_XDECREF(aslist);
-       if (rv) CFRelease(rv);
-       if (key_cf) CFRelease(key_cf);
-       if (value_cf) CFRelease(value_cf);
-       return 0;               
-}
-
-int
-PyCF_Python2CF_simple(PyObject *src, CFTypeRef *dst) {
-       
-#if 0
-       if (PyObject_HasAttrString(src, "CFType")) {
-               *dst = PyObject_CallMethod(src, "CFType", "");
-               return (*dst != NULL);
-       }
-#endif
-       if (PyString_Check(src) || PyUnicode_Check(src)) 
-               return PyCF_Python2CF_string(src, (CFStringRef *)dst);
-       if (PyBool_Check(src)) {
-               if (src == Py_True)
-                       *dst = kCFBooleanTrue;
-               else
-                       *dst = kCFBooleanFalse;
-               return 1;
-       }
-       if (PyLong_Check(src)) {
-               long v = PyLong_AsLong(src);
-               *dst = CFNumberCreate(NULL, kCFNumberLongType, &v);
-               return 1;
-       }
-       if (PyFloat_Check(src)) {
-               double d = PyFloat_AsDouble(src);
-               *dst = CFNumberCreate(NULL, kCFNumberDoubleType, &d);
-               return 1;
-       }
-                       
-       PyErr_Format(PyExc_TypeError,
-                 "Cannot convert %.500s objects to CFType",
-                                    src->ob_type->tp_name);
-       return 0;
-}
-
-int
-PyCF_Python2CF_string(PyObject *src, CFStringRef *dst) {
-       char *chars;
-       CFIndex size;
-       UniChar *unichars;
-       
-       if (PyString_Check(src)) {
-               if (!PyArg_Parse(src, "es", "ascii", &chars))
-                       return 0; /* This error is more descriptive than the general one below */
-               *dst = CFStringCreateWithCString((CFAllocatorRef)NULL, chars, kCFStringEncodingASCII);
-               PyMem_Free(chars);
-               return 1;
-       }
-       if (PyUnicode_Check(src)) {
-               /* We use the CF types here, if Python was configured differently that will give an error */
-               size = PyUnicode_GetSize(src);
-               if ((unichars = PyUnicode_AsUnicode(src)) == NULL ) goto err;
-               *dst = CFStringCreateWithCharacters((CFAllocatorRef)NULL, unichars, size);
-               return 1;
-       }
-err:
-       PyErr_Format(PyExc_TypeError,
-                 "Cannot convert %.500s objects to CFString",
-                                    src->ob_type->tp_name);
-       return 0;
-}
diff --git a/Mac/Modules/cf/pycfbridge.h b/Mac/Modules/cf/pycfbridge.h
deleted file mode 100644 (file)
index 3377d5d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-extern PyObject *PyCF_CF2Python(CFTypeRef src);
-extern PyObject *PyCF_CF2Python_sequence(CFArrayRef src);
-extern PyObject *PyCF_CF2Python_mapping(CFTypeRef src);
-extern PyObject *PyCF_CF2Python_simple(CFTypeRef src);
-extern PyObject *PyCF_CF2Python_string(CFStringRef src);
-
-extern int PyCF_Python2CF(PyObject *src, CFTypeRef *dst);
-extern int PyCF_Python2CF_sequence(PyObject *src, CFArrayRef *dst);
-extern int PyCF_Python2CF_mapping(PyObject *src, CFDictionaryRef *dst);
-extern int PyCF_Python2CF_simple(PyObject *src, CFTypeRef *dst);
-extern int PyCF_Python2CF_string(PyObject *src, CFStringRef *dst);
\ No newline at end of file
diff --git a/Mac/Modules/cg/CFMLateImport.c b/Mac/Modules/cg/CFMLateImport.c
deleted file mode 100755 (executable)
index bc2976e..0000000
+++ /dev/null
@@ -1,1360 +0,0 @@
-/*
-       File:           CFMLateImport.c
-
-       Contains:       Implementation of CFM late import library.
-
-       Written by:     Quinn
-
-       Copyright:      Copyright Â© 1999 by Apple Computer, Inc., all rights reserved.
-
-                               You may incorporate this Apple sample source code into your program(s) without
-                               restriction. This Apple sample source code has been provided "AS IS" and the
-                               responsibility for its operation is yours. You are not permitted to redistribute
-                               this Apple sample source code as "Apple sample source code" after having made
-                               changes. If you're going to re-distribute the source, we require that you make
-                               it clear in the source that the code was descended from Apple sample source
-                               code, but that you've made changes.
-
-       Change History (most recent first):
-
-        <13>     24/9/01    Quinn   Fixes to compile with C++ activated.
-        <12>     21/9/01    Quinn   [2710489] Fix typo in the comments for FragmentLookup.
-        <11>     21/9/01    Quinn   Changes for CWPro7 Mach-O build.
-        <10>     19/9/01    Quinn   Corrected implementation of kPEFRelocSmBySection. Added
-                                    implementations of kPEFRelocSetPosition and kPEFRelocLgByImport
-                                    (from code contributed by Eric Grant, Ned Holbrook, and Steve
-                                    Kalkwarf), although I can't test them yet.
-         <9>     19/9/01    Quinn   We now handle unpacked data sections, courtesy of some code from
-                                    Ned Holbrook.
-         <8>     19/9/01    Quinn   Minor fixes for the previous checkin. Updated some comments and
-                                    killed some dead code.
-         <7>     19/9/01    Quinn   Simplified API and implementation after a suggestion by Eric
-                                    Grant. You no longer have to CFM export a dummy function; you
-                                    can just pass in the address of your fragment's init routine.
-         <6>     15/2/01    Quinn   Modify compile-time warnings to complain if you try to build
-                                    this module into a Mach-O binary.
-         <5>      5/2/01    Quinn   Removed redundant assignment in CFMLateImportCore.
-         <4>    30/11/00    Quinn   Added comment about future of data symbols in CF.
-         <3>    16/11/00    Quinn   Allow symbol finding via a callback and use that to implement
-                                    CFBundle support.
-         <2>    18/10/99    Quinn   Renamed CFMLateImport to CFMLateImportLibrary to allow for
-                                    possible future API expansion.
-         <1>     15/6/99    Quinn   First checked in.
-*/
-
-// To Do List:
-//
-// o get rid of dependence on ANSI "string.h", but how?
-//
-// Done:
-//
-// Ãƒ investigate alternative APIs, like an external lookup routine
-//   renamed CFMLateImport to CFMLateImportLibrary to allow for
-//   future expansion of the APIs for things like CFMLateImportSymbol
-// Ãƒ test with non-zero fragment offset in the file
-// Ãƒ test more with MPW fragments
-// Ãƒ test data imports
-
-/////////////////////////////////////////////////////////////////
-
-// MoreIsBetter Setup
-
-//#include "MoreSetup.h"
-#define MoreAssert(x) (true)
-#define MoreAssertQ(x)
-
-// Mac OS Interfaces
-
-#if ! MORE_FRAMEWORK_INCLUDES
-       #include <CodeFragments.h>
-       #include <PEFBinaryFormat.h>
-#endif
-
-// Standard C Interfaces
-
-#include <string.h>
-
-// MIB Prototypes
-
-//#include "MoreInterfaceLib.h"
-#define MoreBlockZero BlockZero
-
-// Our Prototypes
-
-#include "CFMLateImport.h"
-
-/////////////////////////////////////////////////////////////////
-
-#if TARGET_RT_MAC_MACHO
-       #error CFMLateImport is not suitable for use in a Mach-O project.
-#elif !TARGET_RT_MAC_CFM || !TARGET_CPU_PPC
-       #error CFMLateImport has not been qualified for 68K or CFM-68K use.
-#endif
-
-/////////////////////////////////////////////////////////////////
-#pragma mark ----- Utility Routines -----
-
-static OSStatus FSReadAtOffset(SInt16 refNum, SInt32 offset, SInt32 count, void *buffer)
-       // A convenient wrapper around PBRead which has two advantages
-       // over FSRead.  First, it takes count as a value parameter.
-       // Second, it reads from an arbitrary offset into the file,
-       // which avoids a bunch of SetFPos calls.
-       //
-       // I guess this should go into "MoreFiles.h", but I'm not sure
-       // how we're going to integrate such a concept into MIB yet.
-{
-       ParamBlockRec pb;
-       
-       pb.ioParam.ioRefNum     = refNum;
-       pb.ioParam.ioBuffer     = (Ptr) buffer;
-       pb.ioParam.ioReqCount   = count;
-       pb.ioParam.ioPosMode    = fsFromStart;
-       pb.ioParam.ioPosOffset  = offset;
-       
-       return PBReadSync(&pb);
-}
-
-/////////////////////////////////////////////////////////////////
-#pragma mark ----- Late Import Engine -----
-
-// This structure represents the core data structure of the late import
-// engine.  It basically holds information about the fragment we're going
-// to fix up.  It starts off with the first three fields, which are
-// provided by the client.  Then, as we procede through the operation,
-// we fill out more fields.
-
-struct FragToFixInfo {
-       CFragSystem7DiskFlatLocator     locator;                                // How to find the fragment's container.
-       CFragConnectionID                       connID;                                 // CFM connection to the fragment.
-       CFragInitFunction                       initRoutine;                    // The CFM init routine for the fragment.
-       PEFContainerHeader                      containerHeader;                // The CFM header, read in from the container.
-       PEFSectionHeader                        *sectionHeaders;                // The CFM section headers.  A pointer block containing an array of containerHeader.sectionCount elements.
-       PEFLoaderInfoHeader                     *loaderSection;                 // The entire CFM loader section in a pointer block.
-       SInt16                                          fileRef;                                // A read-only path to the CFM container.  We keep this here because one that one routine needs to read from the container.
-       void                                            *section0Base;                  // The base address of section 0, which we go through hoops to calculate.
-       void                                            *section1Base;                  // The base address of section 1, which we go through hoops to calculate.
-       Boolean                                         disposeSectionPointers; // See below.
-};
-typedef struct FragToFixInfo FragToFixInfo;
-
-// The disposeSectionPointers Boolean is designed for future cool VM
-// support.  If VM is on, the entire code fragment is file mapped into
-// high memory, including the data we're forced to allocate the
-// sectionHeaders and loaderSection memory blocks to maintain.  If
-// we could find the address of the entire file mapped container,
-// we could access the information directly from there and thus
-// we wouldn't need to allocate (or dispose of) the memory blocks
-// for sectionHeaders and loaderSection.
-//
-// I haven't implemented this yet because a) I'm not sure how to do
-// it with documented APIs, and b) I couldn't be bothered, but
-// disposeSectionPointers remains as vestigial support for the concept.
-
-static OSStatus ReadContainerBasics(FragToFixInfo *fragToFix)
-       // Reads some basic information from the container of the
-       // fragment to fix and stores it in various fields of
-       // fragToFix.  This includes:
-       //
-       // o containerHeader -- The contain header itself.
-       // o sectionHeaders  -- The array of section headers (in a newly allocated pointer block).
-       // o loaderSection   -- The entire loader section (in a newly allocated pointer block).
-       //
-       // Also sets disposeSectionPointers to indicate whether
-       // the last two pointers should be disposed of.
-       //
-       // Finally, it leaves the container file open for later
-       // folks who want to read data from it.
-{
-       OSStatus        err;
-       UInt16          sectionIndex;
-       Boolean         found;
-
-       MoreAssertQ(fragToFix != nil);
-       MoreAssertQ(fragToFix->locator.fileSpec != nil);
-       MoreAssertQ(fragToFix->connID != nil);
-       MoreAssertQ(fragToFix->loaderSection == nil);
-       MoreAssertQ(fragToFix->sectionHeaders == nil);
-       MoreAssertQ(fragToFix->fileRef == 0);
-       
-       fragToFix->disposeSectionPointers = true;
-       
-       // Open up the file, read the container head, then read in
-       // all the section headers, then go looking through the
-       // section headers for the loader section (PEF defines
-       // that there can be only one).
-       
-       err = FSpOpenDF(fragToFix->locator.fileSpec, fsRdPerm, &fragToFix->fileRef);
-       if (err == noErr) {
-               err = FSReadAtOffset(fragToFix->fileRef,
-                                                               fragToFix->locator.offset,
-                                                               sizeof(fragToFix->containerHeader),
-                                                               &fragToFix->containerHeader);
-               if (err == noErr) {
-                       if (   fragToFix->containerHeader.tag1 != kPEFTag1
-                               || fragToFix->containerHeader.tag2 != kPEFTag2
-                               || fragToFix->containerHeader.architecture != kCompiledCFragArch
-                               || fragToFix->containerHeader.formatVersion != kPEFVersion) {
-                               err = cfragFragmentFormatErr;
-                       }
-               }
-               if (err == noErr) {
-                       fragToFix->sectionHeaders = (PEFSectionHeader *) NewPtr(fragToFix->containerHeader.sectionCount * sizeof(PEFSectionHeader));
-                       err = MemError();
-               }
-               if (err == noErr) {
-                       err = FSReadAtOffset(fragToFix->fileRef,
-                                                                       fragToFix->locator.offset + sizeof(fragToFix->containerHeader),
-                                                                       fragToFix->containerHeader.sectionCount * sizeof(PEFSectionHeader), 
-                                                                       fragToFix->sectionHeaders);
-               }
-               if (err == noErr) {
-                       sectionIndex = 0;
-                       found = false;
-                       while ( sectionIndex < fragToFix->containerHeader.sectionCount && ! found ) {
-                               found = (fragToFix->sectionHeaders[sectionIndex].sectionKind == kPEFLoaderSection);
-                               if ( ! found ) {
-                                       sectionIndex += 1;
-                               }
-                       }
-               }
-               if (err == noErr && ! found) {
-                       err = cfragNoSectionErr;
-               }
-               
-               // Now read allocate a pointer block and read the loader section into it.
-               
-               if (err == noErr) {
-                       fragToFix->loaderSection = (PEFLoaderInfoHeader *) NewPtr(fragToFix->sectionHeaders[sectionIndex].containerLength);
-                       err = MemError();
-               }
-               if (err == noErr) {
-                       err = FSReadAtOffset(fragToFix->fileRef, 
-                                                                       fragToFix->locator.offset + fragToFix->sectionHeaders[sectionIndex].containerOffset,
-                                                                       fragToFix->sectionHeaders[sectionIndex].containerLength, 
-                                                                       fragToFix->loaderSection);
-               }                               
-       }
-       
-       // No clean up.  The client must init fragToFix to zeros and then
-       // clean up regardless of whether we return an error.
-               
-       return err;
-}
-
-static UInt32 DecodeVCountValue(const UInt8 *start, UInt32 *outCount)
-       // Given a pointer to the start of a variable length PEF value, 
-       // work out the value (in *outCount).  Returns the number of bytes 
-       // consumed by the value.
-{
-       UInt8 *                 bytePtr;
-       UInt8                   byte;
-       UInt32                  count;
-       
-       bytePtr = (UInt8 *)start;
-       
-       // Code taken from "PEFBinaryFormat.h".
-       count = 0;
-       do {
-               byte = *bytePtr++;
-               count = (count << kPEFPkDataVCountShift) | (byte & kPEFPkDataVCountMask);
-       } while ((byte & kPEFPkDataVCountEndMask) != 0);
-       
-       *outCount = count;
-       return bytePtr - start;
-}
-
-static UInt32 DecodeInstrCountValue(const UInt8 *inOpStart, UInt32 *outCount)
-       // Given a pointer to the start of an opcode (inOpStart), work out the 
-       // count argument for that opcode (*outCount).  Returns the number of 
-       // bytes consumed by the opcode and count combination.
-{
-       MoreAssertQ(inOpStart != nil);
-       MoreAssertQ(outCount  != nil);
-       
-       if (PEFPkDataCount5(*inOpStart) != 0)
-       {
-               // Simple case, count encoded in opcode.
-               *outCount = PEFPkDataCount5(*inOpStart);
-               return 1;
-       }
-       else
-       {
-               // Variable-length case.
-               return 1 + DecodeVCountValue(inOpStart + 1, outCount);
-       }
-}
-
-static OSStatus UnpackPEFDataSection(const UInt8 * const packedData,   UInt32 packedSize,
-                                                                          UInt8 * const unpackedData, UInt32 unpackedSize)
-{
-       OSErr                   err;
-       UInt32                  offset;
-       UInt8                   opCode;
-       UInt8 *                 unpackCursor;
-       
-       MoreAssertQ(packedData != nil);
-       MoreAssertQ(unpackedData != nil);
-       MoreAssertQ(unpackedSize >= packedSize);
-
-       // The following asserts assume that the client allocated the memory with NewPtr, 
-       // which may not always be true.  However, the asserts' value in preventing accidental 
-       // memory block overruns outweighs the possible maintenance effort.
-       
-       MoreAssertQ( packedSize   == GetPtrSize( (Ptr) packedData  ) );
-       MoreAssertQ( unpackedSize == GetPtrSize( (Ptr) unpackedData) );
-       
-       err          = noErr;
-       offset       = 0;
-       unpackCursor = unpackedData;
-       while (offset < packedSize) {
-               MoreAssertQ(unpackCursor < &unpackedData[unpackedSize]);
-               
-               opCode = packedData[offset];
-               
-               switch (PEFPkDataOpcode(opCode)) {
-                       case kPEFPkDataZero:
-                               {
-                                       UInt32  count;
-                                       
-                                       offset += DecodeInstrCountValue(&packedData[offset], &count);
-                                       
-                                       MoreBlockZero(unpackCursor, count);
-                                       unpackCursor += count;
-                               }
-                               break;
-                       
-                       case kPEFPkDataBlock:
-                               {
-                                       UInt32  blockSize;
-                                       
-                                       offset += DecodeInstrCountValue(&packedData[offset], &blockSize);
-                                       
-                                       BlockMoveData(&packedData[offset], unpackCursor, blockSize);
-                                       unpackCursor += blockSize;
-                                       offset += blockSize;
-                               }
-                               break;
-                       
-                       case kPEFPkDataRepeat:
-                               {
-                                       UInt32  blockSize;
-                                       UInt32  repeatCount;
-                                       UInt32  loopCounter;
-                                       
-                                       offset += DecodeInstrCountValue(&packedData[offset], &blockSize);
-                                       offset += DecodeVCountValue(&packedData[offset], &repeatCount);
-                                       repeatCount += 1;       // stored value is (repeatCount - 1)
-                                       
-                                       for (loopCounter = 0; loopCounter < repeatCount; loopCounter++) {
-                                               BlockMoveData(&packedData[offset], unpackCursor, blockSize);
-                                               unpackCursor += blockSize;
-                                       }
-                                       offset += blockSize;
-                               }
-                               break;
-                       
-                       case kPEFPkDataRepeatBlock:
-                               {
-                                       UInt32  commonSize;
-                                       UInt32  customSize;
-                                       UInt32  repeatCount;
-                                       const UInt8 *commonData;
-                                       const UInt8 *customData;
-                                       UInt32 loopCounter;
-                                       
-                                       offset += DecodeInstrCountValue(&packedData[offset], &commonSize);
-                                       offset += DecodeVCountValue(&packedData[offset], &customSize);
-                                       offset += DecodeVCountValue(&packedData[offset], &repeatCount);
-                                       
-                                       commonData = &packedData[offset];
-                                       customData = &packedData[offset + commonSize];
-                                       
-                                       for (loopCounter = 0; loopCounter < repeatCount; loopCounter++) {
-                                               BlockMoveData(commonData, unpackCursor, commonSize);
-                                               unpackCursor += commonSize;
-                                               BlockMoveData(customData, unpackCursor, customSize);
-                                               unpackCursor += customSize;
-                                               customData += customSize;
-                                       }
-                                       BlockMoveData(commonData, unpackCursor, commonSize);
-                                       unpackCursor += commonSize;
-                                       offset += (repeatCount * (commonSize + customSize)) + commonSize;
-                               }
-                               break;
-                       
-                       case kPEFPkDataRepeatZero:
-                               {
-                                       UInt32  commonSize;
-                                       UInt32  customSize;
-                                       UInt32  repeatCount;
-                                       const UInt8 *customData;
-                                       UInt32 loopCounter;
-                                       
-                                       offset += DecodeInstrCountValue(&packedData[offset], &commonSize);
-                                       offset += DecodeVCountValue(&packedData[offset], &customSize);
-                                       offset += DecodeVCountValue(&packedData[offset], &repeatCount);
-                                       
-                                       customData = &packedData[offset];
-                                       
-                                       for (loopCounter = 0; loopCounter < repeatCount; loopCounter++) {
-                                               MoreBlockZero(unpackCursor, commonSize);
-                                               unpackCursor += commonSize;
-                                               BlockMoveData(customData, unpackCursor, customSize);
-                                               unpackCursor += customSize;
-                                               customData += customSize;
-                                       }
-                                       MoreBlockZero(unpackCursor, commonSize);
-                                       unpackCursor += commonSize;
-                                       offset += repeatCount * customSize;
-                               }
-                               break;
-                       
-                       default:
-                               #if MORE_DEBUG
-                                       DebugStr("\pUnpackPEFDataSection: Unexpected data opcode");
-                               #endif
-                               err = cfragFragmentCorruptErr;
-                               goto leaveNow;
-                               break;
-               }
-       }
-       
-leaveNow:
-       return err;
-}
-
-/*     SetupSectionBaseAddresses Rationale
-       -----------------------------------
-       
-       OK, here's where things get weird.  In order to run the relocation
-       engine, I need to be able to find the base address of an instantiated
-       section of the fragment we're fixing up given only its section number.
-       This isn't hard for CFM to do because it's the one that instantiated the
-       sections in the first place.  It's surprisingly difficult to do if
-       you're not CFM.  [And you don't have access to the private CFM APis for 
-       doing it.]
-       
-       [Alan Lillich is going to kill me when he reads this!  I should point out
-        that TVector's don't have to contain two words, they can be longer,
-        and that the second word isn't necessarily a TOC pointer, it's
-        just that the calling conventions require that it be put in the
-        TOC register when the code is called.
-        
-        Furthermore, the code section isn't always section 0, and the data
-        section isn't always section 1, and there can be zero to many sections
-        of each type.
-        
-        But these niceties are besides the point: I'm doing something tricky 
-        because I don't have a nice API for getting section base addresses.  
-        If I had a nice API for doing that, none of this code would exist.
-       ]
-
-       The technique is very sneaky (thanks to Eric Grant).  The fragment to 
-       fix necessarily has a CFM init routine (because it needs that routine 
-       in order to capture the fragment location and connection ID).  Thus the 
-       fragment to fix must have a TVector in its data section.  TVectors are 
-       interesting because they're made up of two words.  The first is a pointer 
-       to the code that implements the routine; the second is a pointer to the TOC
-       for the fragment that's exporting the TVector.  How TVectors are
-       created is interesting too.  On disk, a TVector consists of two words,
-       the first being the offset from the start of the code section to the
-       routine, the second being the offset from the start of the data section
-       to the TOC base.  When CFM prepares a TVector, it applies the following
-       transform:
-       
-               tvector.codePtr = tvector.codeOffset + base of code section
-               tvector.tocPtr  = tvector.tocOffset  + base of data section
-               
-       Now, you can reverse these questions to make them:
-       
-               base of code section = tvector.codePtr - tvector.codeOffset
-               base of data section = tvector.dataPtr - tvector.dataOffset
-       
-       So if you can find the relocated contents of the TVector and
-       find the original offsets that made up the TVector, you can then
-       calculate the base address of both the code and data sections.
-       
-       Finding the relocated contents of the TVector is easy; I simply 
-       require the client to pass in a pointer to its init routine. 
-       A routine pointer is a TVector pointer, so you can just cast it 
-       and extract the pair of words.
-
-       Finding the original offsets is a trickier.  My technique is to
-       look up the init routine in the fragment's loader info header.  This
-       yields the section number and offset where the init routine's unrelocated 
-       TVector exists.  Once I have that, I can just read the unrelocated TVector
-       out of the file and extract the offsets.
-*/
-
-struct TVector {
-       void *codePtr;
-       void *tocPtr;
-};
-typedef struct TVector TVector;
-
-static OSStatus SetupSectionBaseAddresses(FragToFixInfo *fragToFix)
-       // This routine initialises the section0Base and section1Base
-       // base fields of fragToFix to the base addresses of the
-       // instantiated fragment represented by the other fields
-       // of fragToFix.  The process works in three states:
-       //
-       // 1.   Find the contents of the relocated TVector of the 
-       //      fragment's initialisation routine, provided to us by 
-       //      the caller.
-       //
-       // 2.   Find the contents of the non-relocated TVector by 
-       //      looking it up in the PEF loader info header and then 
-       //      using that to read the TVector contents from disk.
-       //      This yields the offsets from the section bases for 
-       //      the init routine.
-       //
-       // 3.   Subtract 2 from 3.
-{
-       OSStatus                        err;
-       TVector *                       relocatedExport;
-       SInt32                          initSection;
-       UInt32                          initOffset;
-       PEFSectionHeader *      initSectionHeader;
-       Ptr                                     packedDataSection;
-       Ptr                                     unpackedDataSection;
-       TVector                         originalOffsets;
-
-       packedDataSection   = nil;
-       unpackedDataSection = nil;
-       
-       // Step 1.
-
-       // First find the init routine's TVector, which gives us the relocated 
-       // offsets of the init routine into the data and code sections.
-
-       relocatedExport = (TVector *) fragToFix->initRoutine;
-               
-       // Step 2.
-       
-       // Now find the init routine's TVector's offsets in the data section on 
-       // disk.  This gives us the raw offsets from the data and code section 
-       // of the beginning of the init routine.
-       
-       err = noErr;
-       initSection = fragToFix->loaderSection->initSection;
-       initOffset  = fragToFix->loaderSection->initOffset;
-       if (initSection == -1) {
-               err = cfragFragmentUsageErr;
-       }
-       if (err == noErr) {
-               MoreAssertQ( initSection >= 0 );                // Negative indexes are pseudo-sections which are just not allowed!
-               MoreAssertQ( initSection < fragToFix->containerHeader.sectionCount );
-
-               initSectionHeader = &fragToFix->sectionHeaders[initSection];
-               
-               // If the data section is packed, unpack it to a temporary buffer and then get the 
-               // original offsets from that buffer.  If the data section is unpacked, just read 
-               // the original offsets directly off the disk.
-               
-               if ( initSectionHeader->sectionKind == kPEFPackedDataSection ) {
-
-                       // Allocate space for packed and unpacked copies of the section.
-                       
-                       packedDataSection = NewPtr(initSectionHeader->containerLength);
-                       err = MemError();
-
-                       if (err == noErr) {
-                               unpackedDataSection = NewPtr(initSectionHeader->unpackedLength);
-                               err = MemError();
-                       }
-
-                       // Read the contents of the packed section.
-                       
-                       if (err == noErr) {
-                               err = FSReadAtOffset(   fragToFix->fileRef,
-                                                                               fragToFix->locator.offset
-                                                                               + initSectionHeader->containerOffset,
-                                                                               initSectionHeader->containerLength,
-                                                                               packedDataSection);
-                       }
-                       
-                       // Unpack the data into the unpacked section.
-                       
-                       if (err == noErr) {
-                               err = UnpackPEFDataSection( (UInt8 *) packedDataSection,   initSectionHeader->containerLength,
-                                                                           (UInt8 *) unpackedDataSection, initSectionHeader->unpackedLength);
-                       }
-                       
-                       // Extract the init routine's TVector from the unpacked section.
-                       
-                       if (err == noErr) {
-                               BlockMoveData(unpackedDataSection + initOffset, &originalOffsets, sizeof(TVector));
-                       }
-                       
-               } else {
-                       MoreAssertQ(fragToFix->sectionHeaders[initSection].sectionKind == kPEFUnpackedDataSection);
-                       err = FSReadAtOffset(fragToFix->fileRef, 
-                                                                       fragToFix->locator.offset
-                                                                       + fragToFix->sectionHeaders[initSection].containerOffset
-                                                                       + initOffset,
-                                                                       sizeof(TVector), 
-                                                                       &originalOffsets);
-               }
-       }
-
-       // Step 3.
-               
-       // Do the maths to subtract the unrelocated offsets from the current address 
-       // to get the base address.
-       
-       if (err == noErr) {
-               fragToFix->section0Base = ((char *) relocatedExport->codePtr) - (UInt32) originalOffsets.codePtr;
-               fragToFix->section1Base = ((char *) relocatedExport->tocPtr)  - (UInt32) originalOffsets.tocPtr;
-       }
-       
-       // Clean up.
-       
-       if (packedDataSection != nil) {
-               DisposePtr(packedDataSection);
-               MoreAssertQ( MemError() == noErr );
-       }
-       if (unpackedDataSection != nil) {
-               DisposePtr(unpackedDataSection);
-               MoreAssertQ( MemError() == noErr );
-       }
-       return err;
-}
-
-static void *GetSectionBaseAddress(const FragToFixInfo *fragToFix, UInt16 sectionIndex)
-       // This routine returns the base of the instantiated section
-       // whose index is sectionIndex.  This routine is the evil twin
-       // of SetupSectionBaseAddresses.  It simply returns the values
-       // for section 0 and 1 that we derived in SetupSectionBaseAddresses.
-       // In a real implementation, this routine would call CFM API
-       // to get this information, and SetupSectionBaseAddresses would
-       // not exist, but CFM does not export the necessary APIs to
-       // third parties.
-{
-       void *result;
-       
-       MoreAssertQ(fragToFix != nil);
-       MoreAssertQ(fragToFix->containerHeader.tag1 == kPEFTag1);
-       
-       switch (sectionIndex) {
-               case 0:
-                       result = fragToFix->section0Base;
-                       break;
-               case 1:
-                       result = fragToFix->section1Base;
-                       break;
-               default:
-                       result = nil;
-                       break;
-       }
-       return result;
-}
-
-
-static OSStatus FindImportLibrary(PEFLoaderInfoHeader *loaderSection, const char *libraryName, PEFImportedLibrary **importLibrary)
-       // This routine finds the import library description (PEFImportedLibrary)
-       // for the import library libraryName in the PEF loader section.
-       // It sets *importLibrary to the address of the description.
-{
-       OSStatus                        err;
-       UInt32                          librariesRemaining;
-       PEFImportedLibrary      *thisImportLibrary;
-       Boolean                         found;
-       
-       MoreAssertQ(loaderSection != nil);
-       MoreAssertQ(libraryName != nil);
-       MoreAssertQ(importLibrary != nil);
-       
-       // Loop through each import library looking for a matching name.
-       
-       // Initialise thisImportLibrary to point to the byte after the
-       // end of the loader section's header.
-       
-       thisImportLibrary = (PEFImportedLibrary *) (loaderSection + 1);
-       librariesRemaining = loaderSection->importedLibraryCount;
-       found = false;
-       while ( librariesRemaining > 0 && ! found ) {
-               // PEF defines that import library names will have
-               // a null terminator, so we can just use strcmp.
-               found = (strcmp( libraryName,
-                                               ((char *)loaderSection)
-                                               + loaderSection->loaderStringsOffset 
-                                               + thisImportLibrary->nameOffset) == 0);
-               // *** Remove ANSI strcmp eventually.
-               if ( ! found ) {
-                       thisImportLibrary += 1;
-                       librariesRemaining -= 1;
-               }
-       }
-       
-       if (found) {
-               *importLibrary = thisImportLibrary;
-               err = noErr;
-       } else {
-               *importLibrary = nil;
-               err = cfragNoLibraryErr;
-       }
-       return err;
-}
-
-static OSStatus LookupSymbol(CFMLateImportLookupProc lookup, void *refCon,
-                                                       PEFLoaderInfoHeader *loaderSection,
-                                                       UInt32 symbolIndex,
-                                                       UInt32 *symbolValue)
-       // This routine is used to look up a symbol during relocation.
-       // "lookup" is a client callback and refCon is its argument.
-       // Typically refCon is the CFM connection to the library that is
-       // substituting for the weak linked library.  loaderSection
-       // is a pointer to the loader section of the fragment to fix up.
-       // symbolIndex is the index of the imported symbol in the loader section.
-       // The routine sets the word pointed to by symbolValue to the
-       // value of the symbol.
-       //
-       // The routine works by using symbolIndex to index into the imported
-       // symbol table to find the offset of the symbol's name in the string
-       // table.  It then looks up the symbol by calling the client's "lookup"
-       // function and passes the resulting symbol address back in symbolValue.
-{
-       OSStatus                        err;
-       UInt32                          *importSymbolTable;
-       UInt32                          symbolStringOffset;
-       Boolean                         symbolIsWeak;
-       CFragSymbolClass        symbolClass;
-       char                            *symbolStringAddress;
-       Str255                          symbolString;
-       
-       MoreAssertQ(lookup != nil);
-       MoreAssertQ(loaderSection != nil);
-       MoreAssertQ(symbolIndex < loaderSection->totalImportedSymbolCount);
-       MoreAssertQ(symbolValue != nil);
-       
-       // Find the base of the imported symbol table.
-       
-       importSymbolTable = (UInt32 *)(((char *)(loaderSection + 1)) + (loaderSection->importedLibraryCount * sizeof(PEFImportedLibrary)));
-       
-       // Grab the appropriate entry out of the table and
-       // extract the information from that entry.
-       
-       symbolStringOffset = importSymbolTable[symbolIndex];
-       symbolClass = PEFImportedSymbolClass(symbolStringOffset);
-       symbolIsWeak = ((symbolClass & kPEFWeakImportSymMask) != 0);
-       symbolClass = symbolClass & ~kPEFWeakImportSymMask;
-       symbolStringOffset = PEFImportedSymbolNameOffset(symbolStringOffset);
-       
-       // Find the string for the symbol in the strings table and
-       // extract it from the table into a Pascal string on the stack.
-       
-       symbolStringAddress = ((char *)loaderSection) + loaderSection->loaderStringsOffset + symbolStringOffset;
-       symbolString[0] = strlen(symbolStringAddress);          // *** remove ANSI strlen
-       BlockMoveData(symbolStringAddress, &symbolString[1], symbolString[0]);
-       
-       // Look up the symbol in substitute library.  If it fails, return
-       // a 0 value and check whether the error is fatal (a strong linked
-       // symbol) or benign (a weak linked symbol).
-       
-       err = lookup(symbolString, symbolClass, (void **) symbolValue, refCon);
-       if (err != noErr) {
-               *symbolValue = 0;
-               if (symbolIsWeak) {
-                       err = noErr;
-               }
-       }
-       return err;
-}
-
-// The EngineState structure encapsulates all of the persistent state
-// of the CFM relocation engine virtual machine.  I originally defined
-// this structure so I could pass the state around between routines
-// that implement various virtual opcodes, however I later worked
-// out that the relocation was sufficiently simple that I could put it
-// in in one routine.  Still, I left the state in this structure in
-// case I ever need to reverse that decision.  It's also a convenient
-// instructional design.
-
-struct EngineState {
-       UInt32 currentReloc;            // Index of current relocation opcodes
-       UInt32 terminatingReloc;        // Index of relocation opcodes which terminates relocation
-       UInt32 *sectionBase;            // Start of the section
-       UInt32 *relocAddress;           // Address within the section where the relocations are to be performed
-       UInt32 importIndex;                     // Symbol index, which is used to access an imported symbol's address
-       void  *sectionC;                        // Memory address of an instantiated section within the PEF container; this variable is used by relocation opcodes that relocate section addresses
-       void  *sectionD;                        // Memory address of an instantiated section within the PEF container; this variable is used by relocation opcodes that relocate section addresses
-};
-typedef struct EngineState EngineState;
-
-// Note:
-// If I ever have to support the repeat opcodes, I'll probably
-// have to add a repeat counter to EngineState.
-
-static OSStatus InitEngineState(const FragToFixInfo *fragToFix,
-                                                               UInt16 relocHeaderIndex,
-                                                               EngineState *state)
-       // This routine initialises the engine state suitably for
-       // running the relocation opcodes for the section whose
-       // index is relocHeaderIndex.  relocHeaderIndex is not a
-       // a section number.  See the comment where it's used below
-       // for details.  The routine basically fills out all the fields
-       // in the EngineState structure as described by
-       // "Mac OS Runtime Architectures".
-{
-       OSStatus err;
-       PEFLoaderRelocationHeader *relocHeader;
-       
-       MoreAssertQ(fragToFix != nil);
-       MoreAssertQ(state != nil);
-
-       // This bit is tricky.  relocHeaderIndex is an index into the relocation
-       // header table, starting at relocSectionCount (which is in the loader
-       // section header) for the first relocated section and decrementing
-       // down to 1 for the last relocated section.  I find the relocation
-       // header by using relocHeaderIndex as a index backwards from the
-       // start of the relocation opcodes (ie relocInstrOffset).  If you
-       // look at the diagram of the layout of the container in
-       // "PEFBinaryFormat.h", you'll see that the relocation opcodes
-       // immediately follow the relocation headers.
-       //
-       // I did this because the alternative (starting at the loader
-       // header and stepping past the import library table and the
-       // import symbol table) was a pain.
-
-       relocHeader = (PEFLoaderRelocationHeader *) (((char *) fragToFix->loaderSection) + fragToFix->loaderSection->relocInstrOffset - relocHeaderIndex * sizeof(PEFLoaderRelocationHeader));
-       
-       MoreAssertQ(relocHeader->reservedA == 0);               // PEF spec says it must be; we check to try to catch bugs in calculation of relocHeader
-       
-       state->currentReloc = relocHeader->firstRelocOffset;
-       state->terminatingReloc = relocHeader->firstRelocOffset + relocHeader->relocCount;
-       state->sectionBase = (UInt32 *) GetSectionBaseAddress(fragToFix, relocHeader->sectionIndex);
-       state->relocAddress = state->sectionBase;
-       state->importIndex = 0;
-
-       // From "Mac OS Runtime Architectures":
-       //
-       // The sectionC and sectionD variables actually contain the
-       // memory address of an instantiated section minus the
-       // default address for that section. The default address for a
-       // section is contained in the defaultAddress field of the
-       // section header. However, in almost all cases the default
-       // address should be 0, so the simplified definition suffices.
-       // 
-       // In the debug version, we drop into MacsBug if this weird case
-       // ever executes because it's more likely we made a mistake than
-       // we encountered a section with a default address.
-
-       state->sectionC = GetSectionBaseAddress(fragToFix, 0);
-       if (state->sectionC != nil) {
-               #if MORE_DEBUG
-                       if (fragToFix->sectionHeaders[0].defaultAddress != 0) {
-                               DebugStr("\pInitEngineState: Executing weird case.");
-                       }
-               #endif
-               (char *) state->sectionC -= fragToFix->sectionHeaders[0].defaultAddress;
-       }
-       state->sectionD = GetSectionBaseAddress(fragToFix, 1);
-       if (state->sectionD != nil) {
-               #if MORE_DEBUG
-                       if (fragToFix->sectionHeaders[1].defaultAddress != 0) {
-                               DebugStr("\pInitEngineState: Executing weird case.");
-                       }
-               #endif
-               (char *) state->sectionD -= fragToFix->sectionHeaders[1].defaultAddress;
-       }
-
-       err = noErr;
-       if (state->relocAddress == nil) {
-               err = cfragFragmentUsageErr;
-       }
-       return err;
-}
-
-// kPEFRelocBasicOpcodes is a table that maps the top 7 bits of the opcode
-// to a fundamental action.  It's contents are defined for me in "PEFBinaryFormat.h",
-// which is really convenient.
-
-static UInt8 kPEFRelocBasicOpcodes[kPEFRelocBasicOpcodeRange] = { PEFMaskedBasicOpcodes };
-
-static OSStatus RunRelocationEngine(const FragToFixInfo *fragToFix, 
-                                                                               PEFImportedLibrary  *importLibrary, 
-                                                                               CFMLateImportLookupProc lookup, void *refCon)
-       // This is where the rubber really hits the.  Given a fully
-       // populated fragToFix structure, the import library description
-       // of the weak imported library we're resolving, and a connection
-       // to the library we're going to substitute it, re-execute the
-       // relocation instructions (CFM has already executed them once)
-       // but only *do* instructions (ie store the change to the data section)
-       // that CFM skipped because the weak symbols were missing.
-{
-       OSStatus        err;
-       EngineState     state;
-       UInt16          sectionsLeftToRelocate;
-       UInt32          totalRelocs;
-       UInt16          *relocInstrTable;
-       UInt16          opCode;
-       
-       MoreAssertQ(fragToFix != nil);
-       MoreAssertQ(fragToFix->containerHeader.tag1 == kPEFTag1);
-       MoreAssertQ(fragToFix->sectionHeaders != nil);
-       MoreAssertQ(fragToFix->loaderSection != nil);
-       MoreAssertQ(fragToFix->section0Base != nil);    // Technically, having a nil for these two is not a problem, ...
-       MoreAssertQ(fragToFix->section1Base != nil);    // but in practise it a wildly deviant case and we should know about it.
-       MoreAssertQ(importLibrary != nil);
-       MoreAssertQ(lookup != nil);
-
-       // Before entering the loop, work out some information in advance.
-
-       // totalRelocs is only used for debugging, to make sure our
-       // relocation PC (state.currentReloc) doesn't run wild.
-       
-       totalRelocs = (fragToFix->loaderSection->loaderStringsOffset - fragToFix->loaderSection->relocInstrOffset) / sizeof(UInt16);
-       
-       // relocInstrTable is the base address of the table of relocation
-       // instructions in the fragment to fix.
-       
-       relocInstrTable = (UInt16 *)((char *) fragToFix->loaderSection + fragToFix->loaderSection->relocInstrOffset);
-       
-       // sectionsLeftToRelocate is the loop counter for the outer loop.
-       
-       MoreAssertQ(fragToFix->loaderSection->relocSectionCount <= 0x0FFFF);
-       sectionsLeftToRelocate = fragToFix->loaderSection->relocSectionCount;
-
-       // Now let's run the relocation engine.  We run it once per
-       // section in the table.  Each time around, we init the engine
-       // and then loop again, this time executing individual opcodes.
-       // The opcode loop terminates when the relocation PC
-       // (state.currentReloc) hits the final opcode (state.terminatingReloc).
-       
-       // Note:
-       // One design decision I made was to totally re-init the engine state
-       // for each section.  The CFM spec is unclear as to whether you're supposed
-       // to totally re-init the engine state, or just re-init the section-specific
-       // state (ie currentReloc, terminatingReloc, and relocAddress).  I hope this
-       // is correct, but it's hard to test without having a fragment with multiple
-       // relocated sections, which is difficult to create.
-       
-       // How do I decide which opcodes should be effective (ie make changes to
-       // the section being relocated) and which opcodes should just be executed
-       // for their side effects (ie updated state.relocAddress or state.importIndex)?
-       // The answer is both simple and subtle.  Opcodes whose actions are dependent
-       // on a symbol that was in the weak linked library are effective, those that
-       // an independent of those symbols are not.  The only opcodes that use
-       // symbolic values are kPEFRelocImportRun and kPEFRelocSmByImport, and
-       // these are only if the symbol is in the weak linked library.
-       // All other cases are executed for their side effects only.
-       //
-       // How do I determine if a symbol is in the weak linked library?
-       // Well I know the symbol's index and I know the lower bound and count
-       // of the symbols in the weak linked library, so I just do a simple
-       // bounds test, ie 
-       //
-       //   firstImportedSymbol <= importIndex < firstImportedSymbol + importedSymbolCount
-
-       // From this code, it's relatively easy to see which relocation opcodes
-       // aren't implemented.  If you ever encounter one, you'll find yourself
-       // in MacsBug with a message telling you which opcode was found.  The
-       // two big groups of opcodes I skipped were the large format opcodes
-       // and the repeating opcodes.  I skipped them because:
-       //
-       // a) I haven't got a way to generate them in a PEF container that I can 
-       //    test against. Without that, there's no way I could be assured that
-       //    the code worked.
-       //
-       // b) I'm lazy.
-
-       err = noErr;
-       while ( sectionsLeftToRelocate > 0 ) {
-               err = InitEngineState(fragToFix, sectionsLeftToRelocate, &state);
-               if (err != noErr) {
-                       goto leaveNow;
-               }
-               
-               while ( state.currentReloc != state.terminatingReloc ) {
-                       
-                       MoreAssertQ( state.currentReloc < totalRelocs );
-
-                       opCode = relocInstrTable[state.currentReloc];
-                       switch ( PEFRelocBasicOpcode(opCode) ) {
-                               case kPEFRelocBySectDWithSkip:
-                                       {
-                                               UInt16 skipCount;
-                                               UInt16 relocCount;
-                                               
-                                               skipCount = ((opCode >> 6) & 0x00FF);
-                                               relocCount = (opCode & 0x003F);
-                                               state.relocAddress += skipCount;
-                                               state.relocAddress += relocCount;
-                                       }
-                                       break;
-                               case kPEFRelocBySectC:
-                               case kPEFRelocBySectD:
-                                       {
-                                               UInt16 runLength;
-
-                                               runLength = (opCode & 0x01FF) + 1;
-                                               state.relocAddress += runLength;
-                                       }
-                                       break;
-                               case kPEFRelocTVector12:
-                                       {
-                                               UInt16 runLength;
-
-                                               runLength = (opCode & 0x01FF) + 1;
-                                               state.relocAddress += (runLength * 3);
-                                       }
-                                       break;
-                               case kPEFRelocTVector8:
-                               case kPEFRelocVTable8:
-                                       {
-                                               UInt16 runLength;
-
-                                               runLength = (opCode & 0x01FF) + 1;
-                                               state.relocAddress += (runLength * 2);
-                                       }
-                                       break;
-                               case kPEFRelocImportRun:
-                                       {
-                                               UInt32 symbolValue;
-                                               UInt16 runLength;
-                                               
-                                               runLength = (opCode & 0x01FF) + 1;
-                                               while (runLength > 0) {
-                                                       if ( state.importIndex >= importLibrary->firstImportedSymbol && state.importIndex < (importLibrary->firstImportedSymbol + importLibrary->importedSymbolCount) ) {
-                                                               err = LookupSymbol(lookup, refCon, fragToFix->loaderSection, state.importIndex, &symbolValue);
-                                                               if (err != noErr) {
-                                                                       goto leaveNow;
-                                                               }
-                                                               *(state.relocAddress) += symbolValue;
-                                                       }
-                                                       state.importIndex += 1;
-                                                       state.relocAddress += 1;
-                                                       runLength -= 1;
-                                               }
-                                       }
-                                       break;
-                               case kPEFRelocSmByImport:
-                                       {
-                                               UInt32 symbolValue;
-                                               UInt32 index;
-
-                                               index = (opCode & 0x01FF);
-                                               if ( index >= importLibrary->firstImportedSymbol && index < (importLibrary->firstImportedSymbol + importLibrary->importedSymbolCount) ) {
-                                                       err = LookupSymbol(lookup, refCon, fragToFix->loaderSection, index, &symbolValue);
-                                                       if (err != noErr) {
-                                                               goto leaveNow;
-                                                       }
-                                                       *(state.relocAddress) += symbolValue;
-                                               }
-                                               state.importIndex = index + 1;
-                                               state.relocAddress += 1;
-                                       }
-                                       break;
-                               case kPEFRelocSmSetSectC:
-                                       {
-                                               UInt32 index;
-
-                                               index = (opCode & 0x01FF);
-                                               state.sectionC = GetSectionBaseAddress(fragToFix, index);
-                                               MoreAssertQ(state.sectionC != nil);
-                                       }
-                                       break;
-                               case kPEFRelocSmSetSectD:
-                                       {
-                                               UInt32 index;
-
-                                               index = (opCode & 0x01FF);
-                                               state.sectionD = GetSectionBaseAddress(fragToFix, index);
-                                               MoreAssertQ(state.sectionD != nil);
-                                       }
-                                       break;
-                               case kPEFRelocSmBySection:
-                                       state.relocAddress += 1;
-                                       break;
-                               case kPEFRelocIncrPosition:
-                                       {
-                                               UInt16 offset;
-                                               
-                                               offset = (opCode & 0x0FFF) + 1;
-                                               ((char *) state.relocAddress) += offset;
-                                       }
-                                       break;
-                               case kPEFRelocSmRepeat:
-                                       #if MORE_DEBUG
-                                               DebugStr("\pRunRelocationEngine: kPEFRelocSmRepeat not yet implemented");
-                                       #endif
-                                       err = unimpErr;
-                                       goto leaveNow;
-                                       break;
-                               case kPEFRelocSetPosition:
-                                       {
-                                               UInt32 offset;
-
-                                               // Lot's of folks have tried various interpretations of the description of 
-                                               // this opCode in "Mac OS Runtime Architectures" (which states "This instruction 
-                                               // sets relocAddress to the address of the section offset offset."  *smile*).
-                                               // I eventually dug into the CFM source code to find my interpretation, which 
-                                               // I believe is correct.  The key point is tht the offset is relative to 
-                                               // the start of the section for which these relocations are being performed.
-                                               
-                                               // Skip to next reloc word, which is the second chunk of the offset.
-                                               
-                                               state.currentReloc += 1;
-                                               
-                                               // Extract offset based on the most significant 10 bits in opCode and 
-                                               // the next significant 16 bits in the next reloc word.
-                                               
-                                               offset = PEFRelocSetPosFullOffset(opCode, relocInstrTable[state.currentReloc]);
-
-                                               state.relocAddress = (UInt32 *) ( ((char *) state.sectionBase) + offset);
-                                       }
-                                       break;
-                               case kPEFRelocLgByImport:
-                                       {
-                                               UInt32 symbolValue;
-                                               UInt32 index;
-
-                                               // Get the 26 bit symbol index from the current and next reloc words.
-                                               
-                                               state.currentReloc += 1;
-                                               index = PEFRelocLgByImportFullIndex(opCode, relocInstrTable[state.currentReloc]);
-                                               
-                                               if ( index >= importLibrary->firstImportedSymbol && index < (importLibrary->firstImportedSymbol + importLibrary->importedSymbolCount) ) {
-                                                       err = LookupSymbol(lookup, refCon, fragToFix->loaderSection, index, &symbolValue);
-                                                       if (err != noErr) {
-                                                               goto leaveNow;
-                                                       }
-                                                       *(state.relocAddress) += symbolValue;
-                                               }
-                                               state.importIndex = index + 1;
-                                               state.relocAddress += 1;
-                                       }
-                                       break;
-                               case kPEFRelocLgRepeat:
-                                       #if MORE_DEBUG
-                                               DebugStr("\pRunRelocationEngine: kPEFRelocLgRepeat not yet implemented");
-                                       #endif
-                                       err = unimpErr;
-                                       goto leaveNow;
-                                       break;
-                               case kPEFRelocLgSetOrBySection:
-                                       #if MORE_DEBUG
-                                               DebugStr("\pRunRelocationEngine: kPEFRelocLgSetOrBySection not yet implemented");
-                                       #endif
-                                       err = unimpErr;
-                                       goto leaveNow;
-                                       break;
-                               case kPEFRelocUndefinedOpcode:
-                                       err = cfragFragmentCorruptErr;
-                                       goto leaveNow;
-                                       break;
-                               default:
-                                       MoreAssertQ(false);
-                                       err = cfragFragmentCorruptErr;
-                                       goto leaveNow;
-                                       break;
-                       }
-                       state.currentReloc += 1;
-               }
-               
-               sectionsLeftToRelocate -= 1;
-       }
-
-leaveNow:
-       return err;
-}
-
-extern pascal OSStatus CFMLateImportCore(const CFragSystem7DiskFlatLocator *fragToFixLocator,
-                                                                               CFragConnectionID fragToFixConnID,
-                                                                               CFragInitFunction fragToFixInitRoutine,
-                                                                               ConstStr255Param weakLinkedLibraryName,
-                                                                               CFMLateImportLookupProc lookup,
-                                                                               void *refCon)
-       // See comments in interface part.
-{
-       OSStatus err;
-       OSStatus junk;
-       FragToFixInfo fragToFix;
-       PEFImportedLibrary *importLibrary;
-       char weakLinkedLibraryNameCString[256];
-
-       MoreAssertQ(fragToFixLocator != nil);   
-       MoreAssertQ(fragToFixConnID != nil);
-       MoreAssertQ(fragToFixInitRoutine != nil);
-       MoreAssertQ(weakLinkedLibraryName != nil);      
-       MoreAssertQ(lookup != nil);     
-       
-       // Fill out the bits of fragToFix which are passed in
-       // by the client.
-       
-       MoreBlockZero(&fragToFix, sizeof(fragToFix));
-       fragToFix.locator = *fragToFixLocator;
-       fragToFix.connID  = fragToFixConnID;
-       fragToFix.initRoutine = fragToFixInitRoutine;
-       
-       // Make a C string from weakLinkedLibraryName.
-       
-       BlockMoveData(weakLinkedLibraryName + 1, weakLinkedLibraryNameCString, weakLinkedLibraryName[0]);
-       weakLinkedLibraryNameCString[weakLinkedLibraryName[0]] = 0;
-
-       // Get the basic information from the fragment.
-       // Fills out the containerHeader, sectionHeaders, loaderSection and fileRef fields
-       // of fragToFix.
-       
-       err = ReadContainerBasics(&fragToFix);
-
-       // Set up the base address fields in fragToFix (ie section0Base and section1Base)
-       // by looking up our init routine (fragToFix.initRoutine) and subtracting
-       // away the section offsets (which we get from the disk copy of the section)
-       // to derive the bases of the sections themselves.
-       
-       if (err == noErr) {
-               err = SetupSectionBaseAddresses(&fragToFix);
-       }
-       
-       // Look inside the loader section for the import library description
-       // of weakLinkedLibraryName.  We need this to know the range of symbol
-       // indexes we're going to fix up.
-       
-       if (err == noErr) {
-               err = FindImportLibrary(fragToFix.loaderSection, weakLinkedLibraryNameCString, &importLibrary);
-       }
-       
-       // Do a quick check to ensure that the library was actually imported weak.
-       // If it wasn't, it doesn't make much sense to resolve its weak imports
-       // later on.  Resolving them again is likely to be bad.
-       
-       if (err == noErr) {
-               if ((importLibrary->options & kPEFWeakImportLibMask) == 0) {
-                       err = cfragFragmentUsageErr;
-               }
-       }
-       
-       // Now run the main relocation engine.
-       
-       if (err == noErr) {
-               err = RunRelocationEngine(&fragToFix, importLibrary, lookup, refCon);
-       }
-       
-       // Clean up.
-       
-       if (fragToFix.disposeSectionPointers) {
-               if (fragToFix.fileRef != 0) {
-                       junk = FSClose(fragToFix.fileRef);
-                       MoreAssertQ(junk == noErr);
-               }
-               if (fragToFix.loaderSection != nil) {
-                       DisposePtr( (Ptr) fragToFix.loaderSection);
-                       MoreAssertQ(MemError() == noErr);
-               }
-               if (fragToFix.sectionHeaders != nil) {
-                       DisposePtr( (Ptr) fragToFix.sectionHeaders);
-                       MoreAssertQ(MemError() == noErr);
-               }
-       }
-       return err;
-}
-
-static pascal OSStatus FragmentLookup(ConstStr255Param symName, CFragSymbolClass symClass,
-                                                                       void **symAddr, void *refCon)
-       // This is the CFMLateImportLookupProc callback used when 
-       // late importing from a CFM shared library.
-{
-       OSStatus err;
-       CFragConnectionID connIDToImport;
-       CFragSymbolClass  foundSymClass;
-       
-       MoreAssertQ(symName != nil);
-       MoreAssertQ(symAddr != nil);
-       MoreAssertQ(refCon  != nil);
-       
-       connIDToImport = (CFragConnectionID) refCon;
-       
-       // Shame there's no way to validate that connIDToImport is valid.
-
-       err = FindSymbol(connIDToImport, symName, (Ptr *) symAddr, &foundSymClass);
-       if (err == noErr) {
-               // If the symbol isn't of the right class, we act like we didn't 
-               // find it, but also assert in the debug build because weird things 
-               // are afoot.
-               if (foundSymClass != symClass) {
-                       MoreAssertQ(false);
-                       *symAddr = nil;
-                       err = cfragNoSymbolErr;
-               }
-       }
-       return err;
-}
-
-extern pascal OSStatus CFMLateImportLibrary(const CFragSystem7DiskFlatLocator *fragToFixLocator,
-                                                                               CFragConnectionID fragToFixConnID,
-                                                                               CFragInitFunction fragToFixInitRoutine,
-                                                                               ConstStr255Param weakLinkedLibraryName,
-                                                                               CFragConnectionID connIDToImport)
-       // See comments in interface part.
-{
-       MoreAssertQ(connIDToImport != nil);
-       return CFMLateImportCore(fragToFixLocator, fragToFixConnID, fragToFixInitRoutine,
-                                                                               weakLinkedLibraryName, FragmentLookup, connIDToImport);
-}
-
-static pascal OSStatus BundleLookup(ConstStr255Param symName, CFragSymbolClass symClass,
-                                                                       void **symAddr, void *refCon)
-       // This is the CFMLateImportLookupProc callback used when 
-       // late importing from a CFBundle.
-{
-       OSStatus        err;
-       CFBundleRef bundleToImport;
-       CFStringRef symNameStr;
-       
-       MoreAssertQ(symName != nil);
-       MoreAssertQ(symAddr != nil);
-       MoreAssertQ(refCon  != nil);
-       
-       symNameStr = nil;
-       
-       bundleToImport = (CFBundleRef) refCon;
-       
-       // Shame there's no way to validate that bundleToImport is really a bundle.
-       
-       // We can only find function pointers because CFBundleGetFunctionPointerForName 
-       // only works for function pointers.  So if the client is asking for something 
-       // other than a function pointer (ie TVector symbol) then we don't even true.
-       // Also assert in the debug build because this shows a certain lack of 
-       // understanding on the part of the client.
-       //
-       // CF is being revise to support accessing data symbols using a new API
-       // (currently this is available to Apple internal developers as 
-       // CFBundleGetDataPointerForName).  When the new API is available in a 
-       // public header file I should revise this code to lift this restriction.
-       
-       err = noErr;
-       if (symClass != kTVectorCFragSymbol) {
-               MoreAssertQ(false);
-               err = cfragNoSymbolErr;
-       }
-       if (err == noErr) {
-               symNameStr = CFStringCreateWithPascalString(kCFAllocatorSystemDefault, 
-                                                                                                       symName, kCFStringEncodingMacRoman);
-               if (symNameStr == nil) {
-                       err = coreFoundationUnknownErr;
-               }
-       }
-       if (err == noErr) {
-               *symAddr = CFBundleGetFunctionPointerForName(bundleToImport, symNameStr);
-               if (*symAddr == nil) {
-                       err = cfragNoSymbolErr;
-               }
-       }
-       if (symNameStr != nil) {
-               CFRelease(symNameStr);
-       }
-       return err;
-}
-
-extern pascal OSStatus CFMLateImportBundle(const CFragSystem7DiskFlatLocator *fragToFixLocator,
-                                                                               CFragConnectionID fragToFixConnID,
-                                                                               CFragInitFunction fragToFixInitRoutine,
-                                                                               ConstStr255Param weakLinkedLibraryName,
-                                                                               CFBundleRef bundleToImport)
-       // See comments in interface part.
-{
-       MoreAssertQ(bundleToImport != nil);
-       return CFMLateImportCore(fragToFixLocator, fragToFixConnID, fragToFixInitRoutine,
-                                                                               weakLinkedLibraryName, BundleLookup, bundleToImport);
-}
diff --git a/Mac/Modules/cg/CFMLateImport.h b/Mac/Modules/cg/CFMLateImport.h
deleted file mode 100755 (executable)
index f3a89bc..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
-       File:           CFMLateImport.h
-
-       Contains:       Interface to CFM late import library.
-
-       Written by:     Quinn
-
-       Copyright:      Copyright Â© 1999 by Apple Computer, Inc., all rights reserved.
-
-                               You may incorporate this Apple sample source code into your program(s) without
-                               restriction. This Apple sample source code has been provided "AS IS" and the
-                               responsibility for its operation is yours. You are not permitted to redistribute
-                               this Apple sample source code as "Apple sample source code" after having made
-                               changes. If you're going to re-distribute the source, we require that you make
-                               it clear in the source that the code was descended from Apple sample source
-                               code, but that you've made changes.
-
-       Change History (most recent first):
-
-         <6>     21/9/01    Quinn   Changes for CWPro7 Mach-O build.
-         <5>     19/9/01    Quinn   Change comments to reflect the fact that an unpacked data
-                                    section is no longer required.
-         <4>     19/9/01    Quinn   Simplified API and implementation after a suggestion by Eric
-                                    Grant. You no longer have to CFM export a dummy function; you
-                                    can just pass in the address of your fragment's init routine.
-         <3>    16/11/00    Quinn   Allow symbol finding via a callback and use that to implement
-                                    CFBundle support.
-         <2>    18/10/99    Quinn   Renamed CFMLateImport to CFMLateImportLibrary to allow for
-                                    possible future API expansion.
-         <1>     15/6/99    Quinn   First checked in.
-*/
-
-#pragma once
-
-/////////////////////////////////////////////////////////////////
-
-// MoreIsBetter Setup
-
-//#include "MoreSetup.h"
-
-// Mac OS Interfaces
-
-#if ! MORE_FRAMEWORK_INCLUDES
-       #include <MacTypes.h>
-       #include <CodeFragments.h>
-       #include <Devices.h>
-       #include <CFBundle.h>
-#endif
-
-/////////////////////////////////////////////////////////////////
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*     FAQ
-       ---
-       
-       Q:      What does this library do?
-       A:      It allows you to resolve a weak linked library at runtime,
-               by supply a CFM connection to the library that should substitute
-               for the weak linked one.
-       
-       Q:      Does the substituted library have to have the same name as the
-               weak linked library.
-       A:      No.
-       
-       Q:      What's this useful for?
-       A:      The most obvious example of where this is useful is when
-               you rely on shared libraries that the user might delete
-               or move.  To can find the shared library (possibly even
-               using CatSearch), call GetDiskFragment to open a connection
-               to it, late import it using this library, and then the
-               rest of your code can continue to use the shared library
-               as if nothing had happened.  No more defining thousands
-               of stub routines which call through routine pointers.
-               
-               There are, however, numerous less obvious uses.  You can
-               use this code to make a 'self repairing' application.  If
-               the user removes your shared library from the Extensions
-               folder, the startup code for your application can offer
-               tor re-install it.  If the user agrees, you can then
-               re-install your shared library, late import it, and then
-               continue running your application if nothing happened.
-               
-               You can even use this code to free yourself from the
-               Extensions folder entirely.  Say you have a suite of
-               applications that currently installs a dozen shared 
-               libraries in the Extensions folder.  You can move those
-               libraries to another folder entirely and each application's
-               startup code can track down the library (using an alias
-               in the Preferences file) and late import it.
-               
-               An even cooler use is to provide easy abstraction layers.
-               Say you have a network code for both the MacTCP
-               API and the Open Transport API.  Typically, you would be
-               force to do this by having an abstraction layer where every
-               routine contains a switch between MacTCP and OT.  Your
-               OpenSocket routine might look like:
-
-                       static int OpenSocket(void)
-                       {
-                           if (gOTAvailable) {
-                               return OpenSocketOT();
-                           } else {
-                               return OpenSocketMacTCP();
-                           }
-                       }
-               
-               With this code, you can avoid that entirely.  Simply
-               weak link to a shared library that you know is never
-               going to be implemented ("crea;MySocketsDummy") and then, 
-               at runtime, decide whether the system has MacTCP or OT
-               and late import the relevant real implementation
-               ("crea;MySocketsMacTCP" or "crea;MySocketsOT").
-               One benefit of this approach is that only the MacTCP or
-               the OT code is resident in memory on any given system.
-*/
-
-typedef pascal OSStatus (*CFMLateImportLookupProc)(ConstStr255Param symName, CFragSymbolClass symClass,
-                                                                                                       void **symAddr, void *refCon);
-       // CFMLateImportLookupProc defines a callback for CFMLateImportCore.
-       // The routine is expected to look up the address of the symbol named 
-       // symName and return it in *symAddr.  The symbol should be of class 
-       // symClass, although the callback decides whether a class mismatch is 
-       // an error.  refCon is an application defined value that was originally 
-       // passed in to CFMLateImportCore.
-       //
-       // If this routine returns an error, a symbol address of 0 is assumed. 
-       // If the symbol is marked as a weak import, the CFMLateImportCore will 
-       // continue, otherwise the CFMLateImportCore routine will fail with the 
-       // error.
-       
-extern pascal OSStatus CFMLateImportCore(const CFragSystem7DiskFlatLocator *fragToFixLocator,
-                                                                               CFragConnectionID fragToFixConnID,
-                                                                               CFragInitFunction fragToFixInitRoutine,
-                                                                               ConstStr255Param weakLinkedLibraryName,
-                                                                               CFMLateImportLookupProc lookup,
-                                                                               void *refCon);
-       // This routine will link you, at runtime, to some library 
-       // that you were weak linked to and wasn't present when your
-       // fragment was prepared.  As well as the obvious functionality
-       // of being able to resolve weak links after prepare time,
-       // this functionality can be put to a number of less obvious uses,
-       // some of which are discussed at the top of this header file.
-       //
-       // To call this routine, you need a number of pieces of information:
-       //
-       // 1. fragToFixLocator, fragToFixConnID:  The location of your own
-       //    code fragment on disk and the CFM connection ID to your own
-       //    code fragment.  Typically you get this information from your 
-       //    fragment's CFM init routine.  You must ensure that
-       //    fragToFixLocator->fileSpec points to an FSSpec of the
-       //    file which holds your code fragment.
-       //
-       //    IMPORTANT:
-       //    The fact that you pass in a CFragSystem7DiskFlatLocator as the
-       //    fragToFixLocator implies that the fragment to be fixed up must
-       //    be in the data fork of a file.  The code could be modified
-       //    to remove this requirement, but on disk code fragments are the most
-       //    common case.
-       //
-       //    IMPORTANT:
-       //    The fragment to fix may have a packed data section.  Packing the 
-       //    data section will reduce the size of your fragment on disk, but it 
-       //    will significantly increase the memory needed by this routine 
-       //    (it increases memory usage by the sum of the sizes of the packed 
-       //    and unpacked data section).  See below for instructions on how to 
-       //    create an unpacked data section.
-       //
-       // 2. fragToFixInitRoutine:  A pointer to your own code fragment's
-       //    fragment initialiser routine.  You necessarily have one of these 
-       //    because you need it to get values for the fragToFixLocator and 
-       //    fragToFixConnID parameters.  Just pass its address in as a parameter 
-       //    as well. 
-       //
-       // 3. weakLinkedLibraryName:  The name of the weak linked library which
-       //    failed to link.  You must have weak linked to this library.
-       //    It is oxymoric for you to pass a strong linked library here,
-       //    because your code would not have prepared if a strong linked
-       //    library failed to prepare, and so you couldn't supply a valid
-       ///   fragToFix.
-       //
-       // 4. lookup, refCon:  A pointer to a callback function that the 
-       //        routine calls to look up the address of a symbol, and a refCon 
-       //    for that callback routine.
-       //
-       // Note:
-       // The fragToFixLocator and fragToFixInitRoutine parameters
-       // are artifacts of the way in which this functionality is implemented.
-       // In an ideal world, where CFM exported decent introspection APIs
-       // to third party developers, these parameters would not be necessary.
-       // If you're using this code inside Apple, you probably should investigate
-       // using the CFM private APIs for getting at the information these
-       // parameters are needed for.  See the comments inside the implementation
-       // for more details.
-       //
-       // Note:
-       // The extra memory taken when you use a packed data section is also an 
-       // artifact of my workaround for the lack of CFM introspection APIs.  In 
-       // my opinion it's better to use an unpacked data section and consume more 
-       // space on disk while saving memory.  In CodeWarrior you can switch to an 
-       // unpacked data section by checking the "Expand Uninitialized Data" 
-       // checkbox in the "PPC PEF" settings panel.  In MPW, specified the
-       // "-packdata off" option to PPCLink.
-       //
-       // When the routine returns, any symbols that you imported from the
-       // library named weakLinkedLibraryName will be resolved to the address
-       // of the symbol provided by the "lookup" callback routine.
-       //
-       // It is possible for an unresolved import to remain unresolved after
-       // this routine returns.  If the symbol import is marked as weak (as
-       // opposed to the library, which *must* be marked as weak) and the symbol
-       // is not found by the "lookup" callback, the routine will simple skip 
-       // that symbol.  If the symbol isn't marked as weak, the routine will fail 
-       // in that case.
-       //
-       // Most of the possible error results are co-opted CFM errors.  These
-       // include:
-       //
-       // cfragFragmentFormatErr  -- The fragment to fix is is an unknown format.
-       // cfragNoSectionErr       -- Could not find the loader section in the fragment to fix.
-       // cfragNoLibraryErr       -- The fragment to fix is not weak linked to weakLinkedLibraryName.
-       // cfragFragmentUsageErr   -- The fragment to fix doesn't have a data section.
-       //                         -- The fragment to fix is strong linked to weakLinkedLibraryName.
-       //                         -- The fragment doesn't have an init routine.
-       // cfragFragmentCorruptErr -- Encountered an undefined relocation opcode.
-       // unimpErr                -- Encountered an unimplement relocation opcode.  The
-       //                            relocation engine only implements a subset of the CFM
-       //                            relocation opcodes, the subset most commonly used by
-       //                            MPW and CodeWarrior PEF containers.  If you encounter
-       //                            this error, you'll probably have to add the weird
-       //                            relocation opcode to the engine, which shouldn't be
-       //                            be too hard.
-       // memFullErr                      -- It's likely that this error is triggered by the memory 
-       //                            needed to unpack your data section.  Either make your 
-       //                            data section smaller, or unpack it (see above).
-       // errors returned by FindSymbol
-       // errors returned by Memory Manager
-       //
-       // The routine needs enough memory to hold the loader section of the fragment
-       // to fix in memory.  It allocates that memory using NewPtr and dispsoses of 
-       // it before it returns.  You may want to change the memory allocator, which
-       // is very simple.
-
-extern pascal OSStatus CFMLateImportLibrary(const CFragSystem7DiskFlatLocator *fragToFixLocator,
-                                                                               CFragConnectionID fragToFixConnID,
-                                                                               CFragInitFunction fragToFixInitRoutine,
-                                                                               ConstStr255Param weakLinkedLibraryName,
-                                                                               CFragConnectionID connIDToImport);
-       // A wrapper around CFMLateImportCore that looks up symbols by calling 
-       // FindSymbol on a connection to a CFM library (connIDToImport).
-       // You can get this connection ID through any standard CFM API, for example
-       // GetSharedLibrary, GetDiskFragment, or GetMemFragment.
-       //
-       // IMPORTANT:
-       // The fragment name for connIDToImport *does not* have to match
-       // weakLinkedLibraryName.  This is part of the power of this library.
-
-extern pascal OSStatus CFMLateImportBundle(const CFragSystem7DiskFlatLocator *fragToFixLocator,
-                                                                               CFragConnectionID fragToFixConnID,
-                                                                               CFragInitFunction fragToFixInitRoutine,
-                                                                               ConstStr255Param weakLinkedLibraryName,
-                                                                               CFBundleRef bundleToImport);
-       // A wrapper around CFMLateImportCore that looks up symbols by calling 
-       // CFBundleGetFunctionPointerForName on a reference to a Core Foundation 
-       // bundle (bundleToImport).  You can get this reference through any 
-       // Core Foundation bundle API, for example CFBundleCreate.
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/Mac/Modules/cg/CGStubLib b/Mac/Modules/cg/CGStubLib
deleted file mode 100755 (executable)
index 5f939a3..0000000
Binary files a/Mac/Modules/cg/CGStubLib and /dev/null differ
diff --git a/Mac/Modules/cg/CGStubLib.exp b/Mac/Modules/cg/CGStubLib.exp
deleted file mode 100755 (executable)
index b93dc7c..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-CGContextShowTextAtPoint
-CGContextShowText
-CGContextSelectFont
-CGContextSetTextDrawingMode
-CGContextDrawPath
-CGContextSetLineJoin
-CGContextSetLineCap
-CGContextGetTextPosition
-CGContextGetPathCurrentPoint
-CGContextSetShouldAntialias
-CGContextSynchronize
-CGContextFlush
-CGContextEndPage
-CGContextSetFontSize
-CGContextGetTextMatrix
-CGContextSetTextMatrix
-CGContextSetTextPosition
-CGContextSetCharacterSpacing
-CGContextSetCMYKStrokeColor
-CGContextSetCMYKFillColor
-CGContextSetRGBStrokeColor
-CGContextSetRGBFillColor
-CGContextSetGrayStrokeColor
-CGContextSetGrayFillColor
-CGContextClipToRect
-CGContextEOClip
-CGContextClip
-CGContextClearRect
-CGContextStrokeRectWithWidth
-CGContextStrokeRect
-CGContextFillRect
-CGContextStrokePath
-CGContextEOFillPath
-CGContextFillPath
-CGContextGetPathBoundingBox
-CGContextIsPathEmpty
-CGContextAddArcToPoint
-CGContextAddArc
-CGContextAddRect
-CGContextClosePath
-CGContextAddQuadCurveToPoint
-CGContextAddCurveToPoint
-CGContextAddLineToPoint
-CGContextMoveToPoint
-CGContextBeginPath
-CGContextSetAlpha
-CGContextSetFlatness
-CGContextSetMiterLimit
-CGContextSetLineWidth
-CGContextGetCTM
-CGContextConcatCTM
-CGContextRotateCTM
-CGContextTranslateCTM
-CGContextScaleCTM
-CGContextRestoreGState
-CGContextSaveGState
-CGContextRelease
-CreateCGContextForPort
-SyncCGContextOriginWithPort
-ClipCGContextToRegion
diff --git a/Mac/Modules/cg/CGStubLib.readme b/Mac/Modules/cg/CGStubLib.readme
deleted file mode 100755 (executable)
index d2c5fa8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# CGStubLib was created by issuing this command in MPW:
-
-MakeStub CGStubLib.exp -o CGStubLib
diff --git a/Mac/Modules/cg/_CGmodule.c b/Mac/Modules/cg/_CGmodule.c
deleted file mode 100755 (executable)
index 67c6bad..0000000
+++ /dev/null
@@ -1,1307 +0,0 @@
-
-/* =========================== Module _CG =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <ApplicationServices/ApplicationServices.h>
-
-extern int GrafObj_Convert(PyObject *, GrafPtr *);
-
-/*
-** Manual converters
-*/
-
-PyObject *CGPoint_New(CGPoint *itself)
-{
-
-        return Py_BuildValue("(ff)",
-                        itself->x,
-                        itself->y);
-}
-
-int
-CGPoint_Convert(PyObject *v, CGPoint *p_itself)
-{
-        if( !PyArg_Parse(v, "(ff)",
-                        &p_itself->x,
-                        &p_itself->y) )
-                return 0;
-        return 1;
-}
-
-PyObject *CGRect_New(CGRect *itself)
-{
-
-        return Py_BuildValue("(ffff)",
-                        itself->origin.x,
-                        itself->origin.y,
-                        itself->size.width,
-                        itself->size.height);
-}
-
-int
-CGRect_Convert(PyObject *v, CGRect *p_itself)
-{
-        if( !PyArg_Parse(v, "(ffff)",
-                        &p_itself->origin.x,
-                        &p_itself->origin.y,
-                        &p_itself->size.width,
-                        &p_itself->size.height) )
-                return 0;
-        return 1;
-}
-
-PyObject *CGAffineTransform_New(CGAffineTransform *itself)
-{
-
-        return Py_BuildValue("(ffffff)",
-                        itself->a,
-                        itself->b,
-                        itself->c,
-                        itself->d,
-                        itself->tx,
-                        itself->ty);
-}
-
-int
-CGAffineTransform_Convert(PyObject *v, CGAffineTransform *p_itself)
-{
-        if( !PyArg_Parse(v, "(ffffff)",
-                        &p_itself->a,
-                        &p_itself->b,
-                        &p_itself->c,
-                        &p_itself->d,
-                        &p_itself->tx,
-                        &p_itself->ty) )
-                return 0;
-        return 1;
-}
-
-static PyObject *CG_Error;
-
-/* -------------------- Object type CGContextRef -------------------- */
-
-PyTypeObject CGContextRef_Type;
-
-#define CGContextRefObj_Check(x) (Py_TYPE(x) == &CGContextRef_Type || PyObject_TypeCheck((x), &CGContextRef_Type))
-
-typedef struct CGContextRefObject {
-       PyObject_HEAD
-       CGContextRef ob_itself;
-} CGContextRefObject;
-
-PyObject *CGContextRefObj_New(CGContextRef itself)
-{
-       CGContextRefObject *it;
-       it = PyObject_NEW(CGContextRefObject, &CGContextRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int CGContextRefObj_Convert(PyObject *v, CGContextRef *p_itself)
-{
-       if (!CGContextRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "CGContextRef required");
-               return 0;
-       }
-       *p_itself = ((CGContextRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CGContextRefObj_dealloc(CGContextRefObject *self)
-{
-       CGContextRelease(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *CGContextRefObj_CGContextSaveGState(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextSaveGState(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextRestoreGState(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextRestoreGState(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextScaleCTM(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float sx;
-       float sy;
-       if (!PyArg_ParseTuple(_args, "ff",
-                             &sx,
-                             &sy))
-               return NULL;
-       CGContextScaleCTM(_self->ob_itself,
-                         sx,
-                         sy);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextTranslateCTM(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float tx;
-       float ty;
-       if (!PyArg_ParseTuple(_args, "ff",
-                             &tx,
-                             &ty))
-               return NULL;
-       CGContextTranslateCTM(_self->ob_itself,
-                             tx,
-                             ty);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextRotateCTM(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float angle;
-       if (!PyArg_ParseTuple(_args, "f",
-                             &angle))
-               return NULL;
-       CGContextRotateCTM(_self->ob_itself,
-                          angle);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextConcatCTM(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGAffineTransform transform;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CGAffineTransform_Convert, &transform))
-               return NULL;
-       CGContextConcatCTM(_self->ob_itself,
-                          transform);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextGetCTM(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGAffineTransform _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CGContextGetCTM(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CGAffineTransform_New, &_rv);
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetLineWidth(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float width;
-       if (!PyArg_ParseTuple(_args, "f",
-                             &width))
-               return NULL;
-       CGContextSetLineWidth(_self->ob_itself,
-                             width);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetLineCap(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       int cap;
-       if (!PyArg_ParseTuple(_args, "i",
-                             &cap))
-               return NULL;
-       CGContextSetLineCap(_self->ob_itself,
-                           cap);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetLineJoin(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       int join;
-       if (!PyArg_ParseTuple(_args, "i",
-                             &join))
-               return NULL;
-       CGContextSetLineJoin(_self->ob_itself,
-                            join);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetMiterLimit(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float limit;
-       if (!PyArg_ParseTuple(_args, "f",
-                             &limit))
-               return NULL;
-       CGContextSetMiterLimit(_self->ob_itself,
-                              limit);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetFlatness(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float flatness;
-       if (!PyArg_ParseTuple(_args, "f",
-                             &flatness))
-               return NULL;
-       CGContextSetFlatness(_self->ob_itself,
-                            flatness);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetAlpha(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float alpha;
-       if (!PyArg_ParseTuple(_args, "f",
-                             &alpha))
-               return NULL;
-       CGContextSetAlpha(_self->ob_itself,
-                         alpha);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextBeginPath(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextBeginPath(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextMoveToPoint(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float x;
-       float y;
-       if (!PyArg_ParseTuple(_args, "ff",
-                             &x,
-                             &y))
-               return NULL;
-       CGContextMoveToPoint(_self->ob_itself,
-                            x,
-                            y);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextAddLineToPoint(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float x;
-       float y;
-       if (!PyArg_ParseTuple(_args, "ff",
-                             &x,
-                             &y))
-               return NULL;
-       CGContextAddLineToPoint(_self->ob_itself,
-                               x,
-                               y);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextAddCurveToPoint(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float cp1x;
-       float cp1y;
-       float cp2x;
-       float cp2y;
-       float x;
-       float y;
-       if (!PyArg_ParseTuple(_args, "ffffff",
-                             &cp1x,
-                             &cp1y,
-                             &cp2x,
-                             &cp2y,
-                             &x,
-                             &y))
-               return NULL;
-       CGContextAddCurveToPoint(_self->ob_itself,
-                                cp1x,
-                                cp1y,
-                                cp2x,
-                                cp2y,
-                                x,
-                                y);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextAddQuadCurveToPoint(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float cpx;
-       float cpy;
-       float x;
-       float y;
-       if (!PyArg_ParseTuple(_args, "ffff",
-                             &cpx,
-                             &cpy,
-                             &x,
-                             &y))
-               return NULL;
-       CGContextAddQuadCurveToPoint(_self->ob_itself,
-                                    cpx,
-                                    cpy,
-                                    x,
-                                    y);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextClosePath(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextClosePath(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextAddRect(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGRect rect;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CGRect_Convert, &rect))
-               return NULL;
-       CGContextAddRect(_self->ob_itself,
-                        rect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextAddArc(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float x;
-       float y;
-       float radius;
-       float startAngle;
-       float endAngle;
-       int clockwise;
-       if (!PyArg_ParseTuple(_args, "fffffi",
-                             &x,
-                             &y,
-                             &radius,
-                             &startAngle,
-                             &endAngle,
-                             &clockwise))
-               return NULL;
-       CGContextAddArc(_self->ob_itself,
-                       x,
-                       y,
-                       radius,
-                       startAngle,
-                       endAngle,
-                       clockwise);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextAddArcToPoint(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float x1;
-       float y1;
-       float x2;
-       float y2;
-       float radius;
-       if (!PyArg_ParseTuple(_args, "fffff",
-                             &x1,
-                             &y1,
-                             &x2,
-                             &y2,
-                             &radius))
-               return NULL;
-       CGContextAddArcToPoint(_self->ob_itself,
-                              x1,
-                              y1,
-                              x2,
-                              y2,
-                              radius);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextIsPathEmpty(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       int _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CGContextIsPathEmpty(_self->ob_itself);
-       _res = Py_BuildValue("i",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextGetPathCurrentPoint(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGPoint _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CGContextGetPathCurrentPoint(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CGPoint_New, &_rv);
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextGetPathBoundingBox(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGRect _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CGContextGetPathBoundingBox(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CGRect_New, &_rv);
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextDrawPath(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       int mode;
-       if (!PyArg_ParseTuple(_args, "i",
-                             &mode))
-               return NULL;
-       CGContextDrawPath(_self->ob_itself,
-                         mode);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextFillPath(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextFillPath(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextEOFillPath(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextEOFillPath(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextStrokePath(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextStrokePath(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextFillRect(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGRect rect;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CGRect_Convert, &rect))
-               return NULL;
-       CGContextFillRect(_self->ob_itself,
-                         rect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextStrokeRect(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGRect rect;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CGRect_Convert, &rect))
-               return NULL;
-       CGContextStrokeRect(_self->ob_itself,
-                           rect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextStrokeRectWithWidth(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGRect rect;
-       float width;
-       if (!PyArg_ParseTuple(_args, "O&f",
-                             CGRect_Convert, &rect,
-                             &width))
-               return NULL;
-       CGContextStrokeRectWithWidth(_self->ob_itself,
-                                    rect,
-                                    width);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextClearRect(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGRect rect;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CGRect_Convert, &rect))
-               return NULL;
-       CGContextClearRect(_self->ob_itself,
-                          rect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextClip(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextClip(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextEOClip(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextEOClip(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextClipToRect(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGRect rect;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CGRect_Convert, &rect))
-               return NULL;
-       CGContextClipToRect(_self->ob_itself,
-                           rect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetGrayFillColor(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float gray;
-       float alpha;
-       if (!PyArg_ParseTuple(_args, "ff",
-                             &gray,
-                             &alpha))
-               return NULL;
-       CGContextSetGrayFillColor(_self->ob_itself,
-                                 gray,
-                                 alpha);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetGrayStrokeColor(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float gray;
-       float alpha;
-       if (!PyArg_ParseTuple(_args, "ff",
-                             &gray,
-                             &alpha))
-               return NULL;
-       CGContextSetGrayStrokeColor(_self->ob_itself,
-                                   gray,
-                                   alpha);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetRGBFillColor(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float red;
-       float green;
-       float blue;
-       float alpha;
-       if (!PyArg_ParseTuple(_args, "ffff",
-                             &red,
-                             &green,
-                             &blue,
-                             &alpha))
-               return NULL;
-       CGContextSetRGBFillColor(_self->ob_itself,
-                                red,
-                                green,
-                                blue,
-                                alpha);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetRGBStrokeColor(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float red;
-       float green;
-       float blue;
-       float alpha;
-       if (!PyArg_ParseTuple(_args, "ffff",
-                             &red,
-                             &green,
-                             &blue,
-                             &alpha))
-               return NULL;
-       CGContextSetRGBStrokeColor(_self->ob_itself,
-                                  red,
-                                  green,
-                                  blue,
-                                  alpha);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetCMYKFillColor(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float cyan;
-       float magenta;
-       float yellow;
-       float black;
-       float alpha;
-       if (!PyArg_ParseTuple(_args, "fffff",
-                             &cyan,
-                             &magenta,
-                             &yellow,
-                             &black,
-                             &alpha))
-               return NULL;
-       CGContextSetCMYKFillColor(_self->ob_itself,
-                                 cyan,
-                                 magenta,
-                                 yellow,
-                                 black,
-                                 alpha);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetCMYKStrokeColor(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float cyan;
-       float magenta;
-       float yellow;
-       float black;
-       float alpha;
-       if (!PyArg_ParseTuple(_args, "fffff",
-                             &cyan,
-                             &magenta,
-                             &yellow,
-                             &black,
-                             &alpha))
-               return NULL;
-       CGContextSetCMYKStrokeColor(_self->ob_itself,
-                                   cyan,
-                                   magenta,
-                                   yellow,
-                                   black,
-                                   alpha);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextGetInterpolationQuality(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       int _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CGContextGetInterpolationQuality(_self->ob_itself);
-       _res = Py_BuildValue("i",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetInterpolationQuality(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       int quality;
-       if (!PyArg_ParseTuple(_args, "i",
-                             &quality))
-               return NULL;
-       CGContextSetInterpolationQuality(_self->ob_itself,
-                                        quality);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetCharacterSpacing(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float spacing;
-       if (!PyArg_ParseTuple(_args, "f",
-                             &spacing))
-               return NULL;
-       CGContextSetCharacterSpacing(_self->ob_itself,
-                                    spacing);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetTextPosition(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float x;
-       float y;
-       if (!PyArg_ParseTuple(_args, "ff",
-                             &x,
-                             &y))
-               return NULL;
-       CGContextSetTextPosition(_self->ob_itself,
-                                x,
-                                y);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextGetTextPosition(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGPoint _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CGContextGetTextPosition(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CGPoint_New, &_rv);
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetTextMatrix(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGAffineTransform transform;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CGAffineTransform_Convert, &transform))
-               return NULL;
-       CGContextSetTextMatrix(_self->ob_itself,
-                              transform);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextGetTextMatrix(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGAffineTransform _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CGContextGetTextMatrix(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CGAffineTransform_New, &_rv);
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetTextDrawingMode(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       int mode;
-       if (!PyArg_ParseTuple(_args, "i",
-                             &mode))
-               return NULL;
-       CGContextSetTextDrawingMode(_self->ob_itself,
-                                   mode);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetFontSize(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float size;
-       if (!PyArg_ParseTuple(_args, "f",
-                             &size))
-               return NULL;
-       CGContextSetFontSize(_self->ob_itself,
-                            size);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSelectFont(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char * name;
-       float size;
-       int textEncoding;
-       if (!PyArg_ParseTuple(_args, "sfi",
-                             &name,
-                             &size,
-                             &textEncoding))
-               return NULL;
-       CGContextSelectFont(_self->ob_itself,
-                           name,
-                           size,
-                           textEncoding);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextShowText(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *cstring__in__;
-       long cstring__len__;
-       int cstring__in_len__;
-       if (!PyArg_ParseTuple(_args, "s#",
-                             &cstring__in__, &cstring__in_len__))
-               return NULL;
-       cstring__len__ = cstring__in_len__;
-       CGContextShowText(_self->ob_itself,
-                         cstring__in__, cstring__len__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextShowTextAtPoint(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       float x;
-       float y;
-       char *cstring__in__;
-       long cstring__len__;
-       int cstring__in_len__;
-       if (!PyArg_ParseTuple(_args, "ffs#",
-                             &x,
-                             &y,
-                             &cstring__in__, &cstring__in_len__))
-               return NULL;
-       cstring__len__ = cstring__in_len__;
-       CGContextShowTextAtPoint(_self->ob_itself,
-                                x,
-                                y,
-                                cstring__in__, cstring__len__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextEndPage(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextEndPage(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextFlush(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextFlush(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSynchronize(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CGContextSynchronize(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_CGContextSetShouldAntialias(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       int shouldAntialias;
-       if (!PyArg_ParseTuple(_args, "i",
-                             &shouldAntialias))
-               return NULL;
-       CGContextSetShouldAntialias(_self->ob_itself,
-                                   shouldAntialias);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_SyncCGContextOriginWithPort(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr port;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             GrafObj_Convert, &port))
-               return NULL;
-       SyncCGContextOriginWithPort(_self->ob_itself,
-                                   port);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CGContextRefObj_ClipCGContextToRegion(CGContextRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect portRect;
-       RgnHandle region;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &portRect,
-                             ResObj_Convert, &region))
-               return NULL;
-       ClipCGContextToRegion(_self->ob_itself,
-                             &portRect,
-                             region);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef CGContextRefObj_methods[] = {
-       {"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextRestoreGState", (PyCFunction)CGContextRefObj_CGContextRestoreGState, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextScaleCTM", (PyCFunction)CGContextRefObj_CGContextScaleCTM, 1,
-        PyDoc_STR("(float sx, float sy) -> None")},
-       {"CGContextTranslateCTM", (PyCFunction)CGContextRefObj_CGContextTranslateCTM, 1,
-        PyDoc_STR("(float tx, float ty) -> None")},
-       {"CGContextRotateCTM", (PyCFunction)CGContextRefObj_CGContextRotateCTM, 1,
-        PyDoc_STR("(float angle) -> None")},
-       {"CGContextConcatCTM", (PyCFunction)CGContextRefObj_CGContextConcatCTM, 1,
-        PyDoc_STR("(CGAffineTransform transform) -> None")},
-       {"CGContextGetCTM", (PyCFunction)CGContextRefObj_CGContextGetCTM, 1,
-        PyDoc_STR("() -> (CGAffineTransform _rv)")},
-       {"CGContextSetLineWidth", (PyCFunction)CGContextRefObj_CGContextSetLineWidth, 1,
-        PyDoc_STR("(float width) -> None")},
-       {"CGContextSetLineCap", (PyCFunction)CGContextRefObj_CGContextSetLineCap, 1,
-        PyDoc_STR("(int cap) -> None")},
-       {"CGContextSetLineJoin", (PyCFunction)CGContextRefObj_CGContextSetLineJoin, 1,
-        PyDoc_STR("(int join) -> None")},
-       {"CGContextSetMiterLimit", (PyCFunction)CGContextRefObj_CGContextSetMiterLimit, 1,
-        PyDoc_STR("(float limit) -> None")},
-       {"CGContextSetFlatness", (PyCFunction)CGContextRefObj_CGContextSetFlatness, 1,
-        PyDoc_STR("(float flatness) -> None")},
-       {"CGContextSetAlpha", (PyCFunction)CGContextRefObj_CGContextSetAlpha, 1,
-        PyDoc_STR("(float alpha) -> None")},
-       {"CGContextBeginPath", (PyCFunction)CGContextRefObj_CGContextBeginPath, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextMoveToPoint", (PyCFunction)CGContextRefObj_CGContextMoveToPoint, 1,
-        PyDoc_STR("(float x, float y) -> None")},
-       {"CGContextAddLineToPoint", (PyCFunction)CGContextRefObj_CGContextAddLineToPoint, 1,
-        PyDoc_STR("(float x, float y) -> None")},
-       {"CGContextAddCurveToPoint", (PyCFunction)CGContextRefObj_CGContextAddCurveToPoint, 1,
-        PyDoc_STR("(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y) -> None")},
-       {"CGContextAddQuadCurveToPoint", (PyCFunction)CGContextRefObj_CGContextAddQuadCurveToPoint, 1,
-        PyDoc_STR("(float cpx, float cpy, float x, float y) -> None")},
-       {"CGContextClosePath", (PyCFunction)CGContextRefObj_CGContextClosePath, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextAddRect", (PyCFunction)CGContextRefObj_CGContextAddRect, 1,
-        PyDoc_STR("(CGRect rect) -> None")},
-       {"CGContextAddArc", (PyCFunction)CGContextRefObj_CGContextAddArc, 1,
-        PyDoc_STR("(float x, float y, float radius, float startAngle, float endAngle, int clockwise) -> None")},
-       {"CGContextAddArcToPoint", (PyCFunction)CGContextRefObj_CGContextAddArcToPoint, 1,
-        PyDoc_STR("(float x1, float y1, float x2, float y2, float radius) -> None")},
-       {"CGContextIsPathEmpty", (PyCFunction)CGContextRefObj_CGContextIsPathEmpty, 1,
-        PyDoc_STR("() -> (int _rv)")},
-       {"CGContextGetPathCurrentPoint", (PyCFunction)CGContextRefObj_CGContextGetPathCurrentPoint, 1,
-        PyDoc_STR("() -> (CGPoint _rv)")},
-       {"CGContextGetPathBoundingBox", (PyCFunction)CGContextRefObj_CGContextGetPathBoundingBox, 1,
-        PyDoc_STR("() -> (CGRect _rv)")},
-       {"CGContextDrawPath", (PyCFunction)CGContextRefObj_CGContextDrawPath, 1,
-        PyDoc_STR("(int mode) -> None")},
-       {"CGContextFillPath", (PyCFunction)CGContextRefObj_CGContextFillPath, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextEOFillPath", (PyCFunction)CGContextRefObj_CGContextEOFillPath, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextStrokePath", (PyCFunction)CGContextRefObj_CGContextStrokePath, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextFillRect", (PyCFunction)CGContextRefObj_CGContextFillRect, 1,
-        PyDoc_STR("(CGRect rect) -> None")},
-       {"CGContextStrokeRect", (PyCFunction)CGContextRefObj_CGContextStrokeRect, 1,
-        PyDoc_STR("(CGRect rect) -> None")},
-       {"CGContextStrokeRectWithWidth", (PyCFunction)CGContextRefObj_CGContextStrokeRectWithWidth, 1,
-        PyDoc_STR("(CGRect rect, float width) -> None")},
-       {"CGContextClearRect", (PyCFunction)CGContextRefObj_CGContextClearRect, 1,
-        PyDoc_STR("(CGRect rect) -> None")},
-       {"CGContextClip", (PyCFunction)CGContextRefObj_CGContextClip, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextEOClip", (PyCFunction)CGContextRefObj_CGContextEOClip, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextClipToRect", (PyCFunction)CGContextRefObj_CGContextClipToRect, 1,
-        PyDoc_STR("(CGRect rect) -> None")},
-       {"CGContextSetGrayFillColor", (PyCFunction)CGContextRefObj_CGContextSetGrayFillColor, 1,
-        PyDoc_STR("(float gray, float alpha) -> None")},
-       {"CGContextSetGrayStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetGrayStrokeColor, 1,
-        PyDoc_STR("(float gray, float alpha) -> None")},
-       {"CGContextSetRGBFillColor", (PyCFunction)CGContextRefObj_CGContextSetRGBFillColor, 1,
-        PyDoc_STR("(float red, float green, float blue, float alpha) -> None")},
-       {"CGContextSetRGBStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetRGBStrokeColor, 1,
-        PyDoc_STR("(float red, float green, float blue, float alpha) -> None")},
-       {"CGContextSetCMYKFillColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKFillColor, 1,
-        PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")},
-       {"CGContextSetCMYKStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKStrokeColor, 1,
-        PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")},
-       {"CGContextGetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextGetInterpolationQuality, 1,
-        PyDoc_STR("() -> (int _rv)")},
-       {"CGContextSetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextSetInterpolationQuality, 1,
-        PyDoc_STR("(int quality) -> None")},
-       {"CGContextSetCharacterSpacing", (PyCFunction)CGContextRefObj_CGContextSetCharacterSpacing, 1,
-        PyDoc_STR("(float spacing) -> None")},
-       {"CGContextSetTextPosition", (PyCFunction)CGContextRefObj_CGContextSetTextPosition, 1,
-        PyDoc_STR("(float x, float y) -> None")},
-       {"CGContextGetTextPosition", (PyCFunction)CGContextRefObj_CGContextGetTextPosition, 1,
-        PyDoc_STR("() -> (CGPoint _rv)")},
-       {"CGContextSetTextMatrix", (PyCFunction)CGContextRefObj_CGContextSetTextMatrix, 1,
-        PyDoc_STR("(CGAffineTransform transform) -> None")},
-       {"CGContextGetTextMatrix", (PyCFunction)CGContextRefObj_CGContextGetTextMatrix, 1,
-        PyDoc_STR("() -> (CGAffineTransform _rv)")},
-       {"CGContextSetTextDrawingMode", (PyCFunction)CGContextRefObj_CGContextSetTextDrawingMode, 1,
-        PyDoc_STR("(int mode) -> None")},
-       {"CGContextSetFontSize", (PyCFunction)CGContextRefObj_CGContextSetFontSize, 1,
-        PyDoc_STR("(float size) -> None")},
-       {"CGContextSelectFont", (PyCFunction)CGContextRefObj_CGContextSelectFont, 1,
-        PyDoc_STR("(char * name, float size, int textEncoding) -> None")},
-       {"CGContextShowText", (PyCFunction)CGContextRefObj_CGContextShowText, 1,
-        PyDoc_STR("(Buffer cstring) -> None")},
-       {"CGContextShowTextAtPoint", (PyCFunction)CGContextRefObj_CGContextShowTextAtPoint, 1,
-        PyDoc_STR("(float x, float y, Buffer cstring) -> None")},
-       {"CGContextEndPage", (PyCFunction)CGContextRefObj_CGContextEndPage, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextFlush", (PyCFunction)CGContextRefObj_CGContextFlush, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextSynchronize", (PyCFunction)CGContextRefObj_CGContextSynchronize, 1,
-        PyDoc_STR("() -> None")},
-       {"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
-        PyDoc_STR("(int shouldAntialias) -> None")},
-       {"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1,
-        PyDoc_STR("(CGrafPtr port) -> None")},
-       {"ClipCGContextToRegion", (PyCFunction)CGContextRefObj_ClipCGContextToRegion, 1,
-        PyDoc_STR("(Rect portRect, RgnHandle region) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define CGContextRefObj_getsetlist NULL
-
-
-#define CGContextRefObj_compare NULL
-
-#define CGContextRefObj_repr NULL
-
-#define CGContextRefObj_hash NULL
-#define CGContextRefObj_tp_init 0
-
-#define CGContextRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CGContextRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       CGContextRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CGContextRefObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((CGContextRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define CGContextRefObj_tp_free PyObject_Del
-
-
-PyTypeObject CGContextRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_CG.CGContextRef", /*tp_name*/
-       sizeof(CGContextRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CGContextRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CGContextRefObj_compare, /*tp_compare*/
-       (reprfunc) CGContextRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CGContextRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CGContextRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CGContextRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CGContextRefObj_tp_init, /* tp_init */
-       CGContextRefObj_tp_alloc, /* tp_alloc */
-       CGContextRefObj_tp_new, /* tp_new */
-       CGContextRefObj_tp_free, /* tp_free */
-};
-
-/* ------------------ End object type CGContextRef ------------------ */
-
-
-static PyObject *CG_CreateCGContextForPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GrafPtr port;
-       CGContextRef ctx;
-       OSStatus _err;
-
-       if (!PyArg_ParseTuple(_args, "O&", GrafObj_Convert, &port))
-               return NULL;
-
-       _err = CreateCGContextForPort(port, &ctx);
-       if (_err != noErr)
-               if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&", CGContextRefObj_New, ctx);
-       return _res;
-
-}
-
-static PyMethodDef CG_methods[] = {
-       {"CreateCGContextForPort", (PyCFunction)CG_CreateCGContextForPort, 1,
-        PyDoc_STR("(CGrafPtr) -> CGContextRef")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_CG(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_CG", CG_methods);
-       d = PyModule_GetDict(m);
-       CG_Error = PyMac_GetOSErrException();
-       if (CG_Error == NULL ||
-           PyDict_SetItemString(d, "Error", CG_Error) != 0)
-               return;
-       Py_TYPE(&CGContextRef_Type) = &PyType_Type;
-       if (PyType_Ready(&CGContextRef_Type) < 0) return;
-       Py_INCREF(&CGContextRef_Type);
-       PyModule_AddObject(m, "CGContextRef", (PyObject *)&CGContextRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&CGContextRef_Type);
-       PyModule_AddObject(m, "CGContextRefType", (PyObject *)&CGContextRef_Type);
-}
-
-/* ========================= End module _CG ========================= */
-
diff --git a/Mac/Modules/cg/cgscan.py b/Mac/Modules/cg/cgscan.py
deleted file mode 100755 (executable)
index 72aecee..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner_OSX
-
-LONG = "CoreGraphics"
-SHORT = "cg"
-OBJECTS = ("CGContextRef",
-                )
-# ADD object typenames here
-
-def main():
-    input = [
-            "CGContext.h",
-    ]
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.gentypetest(SHORT+"typetest.py")
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner_OSX):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in OBJECTS and m == "InMode":
-                classname = "Method"
-                listname = t + "_methods"
-            # Special case for the silly first AllocatorRef argument
-            if t == 'CFAllocatorRef' and m == 'InMode' and len(arglist) > 1:
-                t, n, m = arglist[1]
-                if t in OBJECTS and m == "InMode":
-                    classname = "MethodSkipArg1"
-                    listname = t + "_methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-    def makeblacklistnames(self):
-        return [
-                "CGContextRetain",
-                "CGContextRelease",
-                ]
-
-    def makegreylist(self):
-        return []
-
-    def makeblacklisttypes(self):
-        return [
-                "float_ptr",
-                "CGRect_ptr",
-                "CGPoint_ptr",
-                "CGColorSpaceRef",
-                "CGColorRenderingIntent",
-                "CGFontRef",
-#                       "char_ptr",
-                "CGGlyph_ptr",
-                "CGImageRef",
-                "CGPDFDocumentRef",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("char_ptr", "cstring", "InMode"), ("size_t", "length", "InMode")],
-                 [("InBuffer", "*", "*")]),
-#                       ([("char_ptr", "name", "InMode"),],
-#                        [("CCCCC", "*", "*")]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/cg/cgsupport.py b/Mac/Modules/cg/cgsupport.py
deleted file mode 100755 (executable)
index 7fa06e2..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-#error missing SetActionFilter
-
-import string
-
-# Declarations that change for each manager
-MODNAME = '_CG'                         # The name of the module
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'CG'                        # The prefix for module-wide routines
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-
-# Create the type objects
-
-includestuff = includestuff + """
-#include <ApplicationServices/ApplicationServices.h>
-
-extern int GrafObj_Convert(PyObject *, GrafPtr *);
-
-/*
-** Manual converters
-*/
-
-PyObject *CGPoint_New(CGPoint *itself)
-{
-
-        return Py_BuildValue("(ff)",
-                        itself->x,
-                        itself->y);
-}
-
-int
-CGPoint_Convert(PyObject *v, CGPoint *p_itself)
-{
-        if( !PyArg_Parse(v, "(ff)",
-                        &p_itself->x,
-                        &p_itself->y) )
-                return 0;
-        return 1;
-}
-
-PyObject *CGRect_New(CGRect *itself)
-{
-
-        return Py_BuildValue("(ffff)",
-                        itself->origin.x,
-                        itself->origin.y,
-                        itself->size.width,
-                        itself->size.height);
-}
-
-int
-CGRect_Convert(PyObject *v, CGRect *p_itself)
-{
-        if( !PyArg_Parse(v, "(ffff)",
-                        &p_itself->origin.x,
-                        &p_itself->origin.y,
-                        &p_itself->size.width,
-                        &p_itself->size.height) )
-                return 0;
-        return 1;
-}
-
-PyObject *CGAffineTransform_New(CGAffineTransform *itself)
-{
-
-        return Py_BuildValue("(ffffff)",
-                        itself->a,
-                        itself->b,
-                        itself->c,
-                        itself->d,
-                        itself->tx,
-                        itself->ty);
-}
-
-int
-CGAffineTransform_Convert(PyObject *v, CGAffineTransform *p_itself)
-{
-        if( !PyArg_Parse(v, "(ffffff)",
-                        &p_itself->a,
-                        &p_itself->b,
-                        &p_itself->c,
-                        &p_itself->d,
-                        &p_itself->tx,
-                        &p_itself->ty) )
-                return 0;
-        return 1;
-}
-"""
-
-class MyOpaqueByValueType(OpaqueByValueType):
-    """Sort of a mix between OpaqueByValueType and OpaqueType."""
-    def mkvalueArgs(self, name):
-        return "%s, &%s" % (self.new, name)
-
-CGPoint = MyOpaqueByValueType('CGPoint', 'CGPoint')
-CGRect = MyOpaqueByValueType('CGRect', 'CGRect')
-CGAffineTransform = MyOpaqueByValueType('CGAffineTransform', 'CGAffineTransform')
-
-char_ptr = Type("char *", "s")
-
-CGTextEncoding = int
-CGLineCap = int
-CGLineJoin = int
-CGTextDrawingMode = int
-CGPathDrawingMode = int
-CGInterpolationQuality = int
-
-# The real objects
-CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
-
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputStructMembers(self):
-        ObjectDefinition.outputStructMembers(self)
-    def outputCleanupStructMembers(self):
-        Output("CGContextRelease(self->ob_itself);")
-
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-
-CGContextRef_object = MyObjectDefinition('CGContextRef', 'CGContextRefObj', 'CGContextRef')
-
-
-# ADD object here
-
-module.addobject(CGContextRef_object)
-
-
-
-Function = FunctionGenerator
-Method = MethodGenerator
-
-CGContextRef_methods = []
-
-# ADD _methods initializer here
-exec(open(INPUTFILE).read())
-
-# manual method, lives in Quickdraw.h
-f = Method(void, 'SyncCGContextOriginWithPort',
-    (CGContextRef, 'ctx', InMode),
-    (CGrafPtr, 'port', InMode),
-)
-CGContextRef_methods.append(f)
-
-# manual method, lives in Quickdraw.h
-f = Method(void, 'ClipCGContextToRegion',
-    (CGContextRef, 'ctx', InMode),
-    (Rect, 'portRect', InMode),
-    (RgnHandle, 'region', InMode),
-)
-CGContextRef_methods.append(f)
-
-
-CreateCGContextForPort_body = """\
-GrafPtr port;
-CGContextRef ctx;
-OSStatus _err;
-
-if (!PyArg_ParseTuple(_args, "O&", GrafObj_Convert, &port))
-        return NULL;
-
-_err = CreateCGContextForPort(port, &ctx);
-if (_err != noErr)
-        if (_err != noErr) return PyMac_Error(_err);
-_res = Py_BuildValue("O&", CGContextRefObj_New, ctx);
-return _res;
-"""
-
-f = ManualGenerator("CreateCGContextForPort", CreateCGContextForPort_body);
-f.docstring = lambda: "(CGrafPtr) -> CGContextRef"
-module.add(f)
-
-
-# ADD add forloop here
-for f in CGContextRef_methods:
-    CGContextRef_object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/cm/_Cmmodule.c b/Mac/Modules/cm/_Cmmodule.c
deleted file mode 100644 (file)
index c445981..0000000
+++ /dev/null
@@ -1,945 +0,0 @@
-
-/* =========================== Module _Cm =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_CmpObj_New(Component);
-extern int _CmpObj_Convert(PyObject *, Component *);
-extern PyObject *_CmpInstObj_New(ComponentInstance);
-extern int _CmpInstObj_Convert(PyObject *, ComponentInstance *);
-
-#define CmpObj_New _CmpObj_New
-#define CmpObj_Convert _CmpObj_Convert
-#define CmpInstObj_New _CmpInstObj_New
-#define CmpInstObj_Convert _CmpInstObj_Convert
-#endif
-
-/*
-** Parse/generate ComponentDescriptor records
-*/
-static PyObject *
-CmpDesc_New(ComponentDescription *itself)
-{
-
-        return Py_BuildValue("O&O&O&ll",
-                PyMac_BuildOSType, itself->componentType,
-                PyMac_BuildOSType, itself->componentSubType,
-                PyMac_BuildOSType, itself->componentManufacturer,
-                itself->componentFlags, itself->componentFlagsMask);
-}
-
-static int
-CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself)
-{
-        return PyArg_ParseTuple(v, "O&O&O&ll",
-                PyMac_GetOSType, &p_itself->componentType,
-                PyMac_GetOSType, &p_itself->componentSubType,
-                PyMac_GetOSType, &p_itself->componentManufacturer,
-                &p_itself->componentFlags, &p_itself->componentFlagsMask);
-}
-
-
-static PyObject *Cm_Error;
-
-/* ----------------- Object type ComponentInstance ------------------ */
-
-PyTypeObject ComponentInstance_Type;
-
-#define CmpInstObj_Check(x) (Py_TYPE(x) == &ComponentInstance_Type || PyObject_TypeCheck((x), &ComponentInstance_Type))
-
-typedef struct ComponentInstanceObject {
-       PyObject_HEAD
-       ComponentInstance ob_itself;
-} ComponentInstanceObject;
-
-PyObject *CmpInstObj_New(ComponentInstance itself)
-{
-       ComponentInstanceObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Cm_Error,"NULL ComponentInstance");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(ComponentInstanceObject, &ComponentInstance_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int CmpInstObj_Convert(PyObject *v, ComponentInstance *p_itself)
-{
-       if (!CmpInstObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "ComponentInstance required");
-               return 0;
-       }
-       *p_itself = ((ComponentInstanceObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CmpInstObj_dealloc(ComponentInstanceObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *CmpInstObj_CloseComponent(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef CloseComponent
-       PyMac_PRECHECK(CloseComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CloseComponent(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpInstObj_GetComponentInstanceError(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef GetComponentInstanceError
-       PyMac_PRECHECK(GetComponentInstanceError);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetComponentInstanceError(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpInstObj_SetComponentInstanceError(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr theError;
-#ifndef SetComponentInstanceError
-       PyMac_PRECHECK(SetComponentInstanceError);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &theError))
-               return NULL;
-       SetComponentInstanceError(_self->ob_itself,
-                                 theError);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpInstObj_GetComponentInstanceStorage(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef GetComponentInstanceStorage
-       PyMac_PRECHECK(GetComponentInstanceStorage);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetComponentInstanceStorage(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CmpInstObj_SetComponentInstanceStorage(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle theStorage;
-#ifndef SetComponentInstanceStorage
-       PyMac_PRECHECK(SetComponentInstanceStorage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theStorage))
-               return NULL;
-       SetComponentInstanceStorage(_self->ob_itself,
-                                   theStorage);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpInstObj_ComponentFunctionImplemented(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       short ftnNumber;
-#ifndef ComponentFunctionImplemented
-       PyMac_PRECHECK(ComponentFunctionImplemented);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &ftnNumber))
-               return NULL;
-       _rv = ComponentFunctionImplemented(_self->ob_itself,
-                                          ftnNumber);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CmpInstObj_GetComponentVersion(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetComponentVersion
-       PyMac_PRECHECK(GetComponentVersion);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetComponentVersion(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CmpInstObj_ComponentSetTarget(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       ComponentInstance target;
-#ifndef ComponentSetTarget
-       PyMac_PRECHECK(ComponentSetTarget);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &target))
-               return NULL;
-       _rv = ComponentSetTarget(_self->ob_itself,
-                                target);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyMethodDef CmpInstObj_methods[] = {
-       {"CloseComponent", (PyCFunction)CmpInstObj_CloseComponent, 1,
-        PyDoc_STR("() -> None")},
-       {"GetComponentInstanceError", (PyCFunction)CmpInstObj_GetComponentInstanceError, 1,
-        PyDoc_STR("() -> None")},
-       {"SetComponentInstanceError", (PyCFunction)CmpInstObj_SetComponentInstanceError, 1,
-        PyDoc_STR("(OSErr theError) -> None")},
-       {"GetComponentInstanceStorage", (PyCFunction)CmpInstObj_GetComponentInstanceStorage, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"SetComponentInstanceStorage", (PyCFunction)CmpInstObj_SetComponentInstanceStorage, 1,
-        PyDoc_STR("(Handle theStorage) -> None")},
-       {"ComponentFunctionImplemented", (PyCFunction)CmpInstObj_ComponentFunctionImplemented, 1,
-        PyDoc_STR("(short ftnNumber) -> (long _rv)")},
-       {"GetComponentVersion", (PyCFunction)CmpInstObj_GetComponentVersion, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"ComponentSetTarget", (PyCFunction)CmpInstObj_ComponentSetTarget, 1,
-        PyDoc_STR("(ComponentInstance target) -> (long _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define CmpInstObj_getsetlist NULL
-
-
-#define CmpInstObj_compare NULL
-
-#define CmpInstObj_repr NULL
-
-#define CmpInstObj_hash NULL
-#define CmpInstObj_tp_init 0
-
-#define CmpInstObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CmpInstObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       ComponentInstance itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CmpInstObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((ComponentInstanceObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define CmpInstObj_tp_free PyObject_Del
-
-
-PyTypeObject ComponentInstance_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Cm.ComponentInstance", /*tp_name*/
-       sizeof(ComponentInstanceObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CmpInstObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CmpInstObj_compare, /*tp_compare*/
-       (reprfunc) CmpInstObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CmpInstObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CmpInstObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CmpInstObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CmpInstObj_tp_init, /* tp_init */
-       CmpInstObj_tp_alloc, /* tp_alloc */
-       CmpInstObj_tp_new, /* tp_new */
-       CmpInstObj_tp_free, /* tp_free */
-};
-
-/* --------------- End object type ComponentInstance ---------------- */
-
-
-/* --------------------- Object type Component ---------------------- */
-
-PyTypeObject Component_Type;
-
-#define CmpObj_Check(x) (Py_TYPE(x) == &Component_Type || PyObject_TypeCheck((x), &Component_Type))
-
-typedef struct ComponentObject {
-       PyObject_HEAD
-       Component ob_itself;
-} ComponentObject;
-
-PyObject *CmpObj_New(Component itself)
-{
-       ComponentObject *it;
-       if (itself == NULL) {
-                                       /* XXXX Or should we return None? */
-                                       PyErr_SetString(Cm_Error,"No such component");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(ComponentObject, &Component_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int CmpObj_Convert(PyObject *v, Component *p_itself)
-{
-       if ( v == Py_None ) {
-                                       *p_itself = 0;
-                                       return 1;
-               }
-       if (!CmpObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Component required");
-               return 0;
-       }
-       *p_itself = ((ComponentObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CmpObj_dealloc(ComponentObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *CmpObj_UnregisterComponent(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef UnregisterComponent
-       PyMac_PRECHECK(UnregisterComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = UnregisterComponent(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpObj_GetComponentInfo(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ComponentDescription cd;
-       Handle componentName;
-       Handle componentInfo;
-       Handle componentIcon;
-#ifndef GetComponentInfo
-       PyMac_PRECHECK(GetComponentInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &componentName,
-                             ResObj_Convert, &componentInfo,
-                             ResObj_Convert, &componentIcon))
-               return NULL;
-       _err = GetComponentInfo(_self->ob_itself,
-                               &cd,
-                               componentName,
-                               componentInfo,
-                               componentIcon);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CmpDesc_New, &cd);
-       return _res;
-}
-
-static PyObject *CmpObj_OpenComponent(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentInstance _rv;
-#ifndef OpenComponent
-       PyMac_PRECHECK(OpenComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = OpenComponent(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CmpObj_ResolveComponentAlias(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Component _rv;
-#ifndef ResolveComponentAlias
-       PyMac_PRECHECK(ResolveComponentAlias);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = ResolveComponentAlias(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CmpObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CmpObj_GetComponentPublicIndString(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Str255 theString;
-       short strListID;
-       short index;
-#ifndef GetComponentPublicIndString
-       PyMac_PRECHECK(GetComponentPublicIndString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetStr255, theString,
-                             &strListID,
-                             &index))
-               return NULL;
-       _err = GetComponentPublicIndString(_self->ob_itself,
-                                          theString,
-                                          strListID,
-                                          index);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpObj_GetComponentRefcon(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetComponentRefcon
-       PyMac_PRECHECK(GetComponentRefcon);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetComponentRefcon(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CmpObj_SetComponentRefcon(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long theRefcon;
-#ifndef SetComponentRefcon
-       PyMac_PRECHECK(SetComponentRefcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &theRefcon))
-               return NULL;
-       SetComponentRefcon(_self->ob_itself,
-                          theRefcon);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpObj_OpenComponentResFile(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef OpenComponentResFile
-       PyMac_PRECHECK(OpenComponentResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = OpenComponentResFile(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CmpObj_GetComponentResource(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType resType;
-       short resID;
-       Handle theResource;
-#ifndef GetComponentResource
-       PyMac_PRECHECK(GetComponentResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetOSType, &resType,
-                             &resID))
-               return NULL;
-       _err = GetComponentResource(_self->ob_itself,
-                                   resType,
-                                   resID,
-                                   &theResource);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theResource);
-       return _res;
-}
-
-static PyObject *CmpObj_GetComponentIndString(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Str255 theString;
-       short strListID;
-       short index;
-#ifndef GetComponentIndString
-       PyMac_PRECHECK(GetComponentIndString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetStr255, theString,
-                             &strListID,
-                             &index))
-               return NULL;
-       _err = GetComponentIndString(_self->ob_itself,
-                                    theString,
-                                    strListID,
-                                    index);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpObj_CountComponentInstances(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef CountComponentInstances
-       PyMac_PRECHECK(CountComponentInstances);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CountComponentInstances(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CmpObj_SetDefaultComponent(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short flags;
-#ifndef SetDefaultComponent
-       PyMac_PRECHECK(SetDefaultComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &flags))
-               return NULL;
-       _err = SetDefaultComponent(_self->ob_itself,
-                                  flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpObj_CaptureComponent(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Component _rv;
-       Component capturingComponent;
-#ifndef CaptureComponent
-       PyMac_PRECHECK(CaptureComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &capturingComponent))
-               return NULL;
-       _rv = CaptureComponent(_self->ob_itself,
-                              capturingComponent);
-       _res = Py_BuildValue("O&",
-                            CmpObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CmpObj_UncaptureComponent(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef UncaptureComponent
-       PyMac_PRECHECK(UncaptureComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = UncaptureComponent(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CmpObj_GetComponentIconSuite(ComponentObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle iconSuite;
-#ifndef GetComponentIconSuite
-       PyMac_PRECHECK(GetComponentIconSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetComponentIconSuite(_self->ob_itself,
-                                    &iconSuite);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, iconSuite);
-       return _res;
-}
-
-static PyMethodDef CmpObj_methods[] = {
-       {"UnregisterComponent", (PyCFunction)CmpObj_UnregisterComponent, 1,
-        PyDoc_STR("() -> None")},
-       {"GetComponentInfo", (PyCFunction)CmpObj_GetComponentInfo, 1,
-        PyDoc_STR("(Handle componentName, Handle componentInfo, Handle componentIcon) -> (ComponentDescription cd)")},
-       {"OpenComponent", (PyCFunction)CmpObj_OpenComponent, 1,
-        PyDoc_STR("() -> (ComponentInstance _rv)")},
-       {"ResolveComponentAlias", (PyCFunction)CmpObj_ResolveComponentAlias, 1,
-        PyDoc_STR("() -> (Component _rv)")},
-       {"GetComponentPublicIndString", (PyCFunction)CmpObj_GetComponentPublicIndString, 1,
-        PyDoc_STR("(Str255 theString, short strListID, short index) -> None")},
-       {"GetComponentRefcon", (PyCFunction)CmpObj_GetComponentRefcon, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"SetComponentRefcon", (PyCFunction)CmpObj_SetComponentRefcon, 1,
-        PyDoc_STR("(long theRefcon) -> None")},
-       {"OpenComponentResFile", (PyCFunction)CmpObj_OpenComponentResFile, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetComponentResource", (PyCFunction)CmpObj_GetComponentResource, 1,
-        PyDoc_STR("(OSType resType, short resID) -> (Handle theResource)")},
-       {"GetComponentIndString", (PyCFunction)CmpObj_GetComponentIndString, 1,
-        PyDoc_STR("(Str255 theString, short strListID, short index) -> None")},
-       {"CountComponentInstances", (PyCFunction)CmpObj_CountComponentInstances, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"SetDefaultComponent", (PyCFunction)CmpObj_SetDefaultComponent, 1,
-        PyDoc_STR("(short flags) -> None")},
-       {"CaptureComponent", (PyCFunction)CmpObj_CaptureComponent, 1,
-        PyDoc_STR("(Component capturingComponent) -> (Component _rv)")},
-       {"UncaptureComponent", (PyCFunction)CmpObj_UncaptureComponent, 1,
-        PyDoc_STR("() -> None")},
-       {"GetComponentIconSuite", (PyCFunction)CmpObj_GetComponentIconSuite, 1,
-        PyDoc_STR("() -> (Handle iconSuite)")},
-       {NULL, NULL, 0}
-};
-
-#define CmpObj_getsetlist NULL
-
-
-#define CmpObj_compare NULL
-
-#define CmpObj_repr NULL
-
-#define CmpObj_hash NULL
-#define CmpObj_tp_init 0
-
-#define CmpObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CmpObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       Component itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CmpObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((ComponentObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define CmpObj_tp_free PyObject_Del
-
-
-PyTypeObject Component_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Cm.Component", /*tp_name*/
-       sizeof(ComponentObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CmpObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CmpObj_compare, /*tp_compare*/
-       (reprfunc) CmpObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CmpObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CmpObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CmpObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CmpObj_tp_init, /* tp_init */
-       CmpObj_tp_alloc, /* tp_alloc */
-       CmpObj_tp_new, /* tp_new */
-       CmpObj_tp_free, /* tp_free */
-};
-
-/* ------------------- End object type Component -------------------- */
-
-
-static PyObject *Cm_RegisterComponentResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Component _rv;
-       ComponentResourceHandle cr;
-       short global;
-#ifndef RegisterComponentResource
-       PyMac_PRECHECK(RegisterComponentResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             ResObj_Convert, &cr,
-                             &global))
-               return NULL;
-       _rv = RegisterComponentResource(cr,
-                                       global);
-       _res = Py_BuildValue("O&",
-                            CmpObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Cm_FindNextComponent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Component _rv;
-       Component aComponent;
-       ComponentDescription looking;
-#ifndef FindNextComponent
-       PyMac_PRECHECK(FindNextComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &aComponent,
-                             CmpDesc_Convert, &looking))
-               return NULL;
-       _rv = FindNextComponent(aComponent,
-                               &looking);
-       _res = Py_BuildValue("O&",
-                            CmpObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Cm_CountComponents(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       ComponentDescription looking;
-#ifndef CountComponents
-       PyMac_PRECHECK(CountComponents);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpDesc_Convert, &looking))
-               return NULL;
-       _rv = CountComponents(&looking);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Cm_GetComponentListModSeed(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetComponentListModSeed
-       PyMac_PRECHECK(GetComponentListModSeed);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetComponentListModSeed();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Cm_CloseComponentResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short refnum;
-#ifndef CloseComponentResFile
-       PyMac_PRECHECK(CloseComponentResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refnum))
-               return NULL;
-       _err = CloseComponentResFile(refnum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Cm_OpenDefaultComponent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentInstance _rv;
-       OSType componentType;
-       OSType componentSubType;
-#ifndef OpenDefaultComponent
-       PyMac_PRECHECK(OpenDefaultComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &componentType,
-                             PyMac_GetOSType, &componentSubType))
-               return NULL;
-       _rv = OpenDefaultComponent(componentType,
-                                  componentSubType);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Cm_RegisterComponentResourceFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       short resRefNum;
-       short global;
-#ifndef RegisterComponentResourceFile
-       PyMac_PRECHECK(RegisterComponentResourceFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &resRefNum,
-                             &global))
-               return NULL;
-       _rv = RegisterComponentResourceFile(resRefNum,
-                                           global);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyMethodDef Cm_methods[] = {
-       {"RegisterComponentResource", (PyCFunction)Cm_RegisterComponentResource, 1,
-        PyDoc_STR("(ComponentResourceHandle cr, short global) -> (Component _rv)")},
-       {"FindNextComponent", (PyCFunction)Cm_FindNextComponent, 1,
-        PyDoc_STR("(Component aComponent, ComponentDescription looking) -> (Component _rv)")},
-       {"CountComponents", (PyCFunction)Cm_CountComponents, 1,
-        PyDoc_STR("(ComponentDescription looking) -> (long _rv)")},
-       {"GetComponentListModSeed", (PyCFunction)Cm_GetComponentListModSeed, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"CloseComponentResFile", (PyCFunction)Cm_CloseComponentResFile, 1,
-        PyDoc_STR("(short refnum) -> None")},
-       {"OpenDefaultComponent", (PyCFunction)Cm_OpenDefaultComponent, 1,
-        PyDoc_STR("(OSType componentType, OSType componentSubType) -> (ComponentInstance _rv)")},
-       {"RegisterComponentResourceFile", (PyCFunction)Cm_RegisterComponentResourceFile, 1,
-        PyDoc_STR("(short resRefNum, short global) -> (long _rv)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Cm(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(Component, CmpObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Component, CmpObj_Convert);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, CmpInstObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, CmpInstObj_Convert);
-
-
-       m = Py_InitModule("_Cm", Cm_methods);
-       d = PyModule_GetDict(m);
-       Cm_Error = PyMac_GetOSErrException();
-       if (Cm_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Cm_Error) != 0)
-               return;
-       Py_TYPE(&ComponentInstance_Type) = &PyType_Type;
-       if (PyType_Ready(&ComponentInstance_Type) < 0) return;
-       Py_INCREF(&ComponentInstance_Type);
-       PyModule_AddObject(m, "ComponentInstance", (PyObject *)&ComponentInstance_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&ComponentInstance_Type);
-       PyModule_AddObject(m, "ComponentInstanceType", (PyObject *)&ComponentInstance_Type);
-       Py_TYPE(&Component_Type) = &PyType_Type;
-       if (PyType_Ready(&Component_Type) < 0) return;
-       Py_INCREF(&Component_Type);
-       PyModule_AddObject(m, "Component", (PyObject *)&Component_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Component_Type);
-       PyModule_AddObject(m, "ComponentType", (PyObject *)&Component_Type);
-}
-
-/* ========================= End module _Cm ========================= */
-
diff --git a/Mac/Modules/cm/cmscan.py b/Mac/Modules/cm/cmscan.py
deleted file mode 100644 (file)
index 26cdb5e..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "Components"
-SHORT = "cm"
-
-def main():
-    input = "Components.h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            #
-            # FindNextComponent is a special case, since it call also be called
-            # with None as the argument. Hence, we make it a function
-            #
-            if t == "Component" and m == "InMode" and name != "FindNextComponent":
-                classname = "Method"
-                listname = "c_methods"
-            elif t == "ComponentInstance" and m == "InMode":
-                classname = "Method"
-                listname = "ci_methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-    def makeblacklistnames(self):
-        return [
-                "OpenADefaultComponent",
-                "GetComponentTypeModSeed",
-                "OpenAComponentResFile",
-                "CallComponentUnregister",
-                "CallComponentTarget",
-                "CallComponentRegister",
-                "CallComponentVersion",
-                "CallComponentCanDo",
-                "CallComponentClose",
-                "CallComponentOpen",
-                "OpenAComponent",
-                "GetComponentPublicResource", # Missing in CW Pro 6
-                "CallComponentGetPublicResource", # Missing in CW Pro 6
-                'SetComponentInstanceA5',
-                'GetComponentInstanceA5',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "ResourceSpec",
-                "ComponentResource",
-                "ComponentPlatformInfo",
-                "ComponentResourceExtension",
-                "ComponentPlatformInfoArray",
-                "ExtComponentResource",
-                "ComponentParameters",
-
-                "ComponentRoutineUPP",
-                "ComponentMPWorkFunctionUPP",
-                "ComponentFunctionUPP",
-                "GetMissingComponentResourceUPP",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([('ComponentDescription', 'looking', 'OutMode')],
-                 [('ComponentDescription', '*', 'InMode')]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/cm/cmsupport.py b/Mac/Modules/cm/cmsupport.py
deleted file mode 100644 (file)
index 1653bb3..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Components.h'          # The Apple header file
-MODNAME = '_Cm'                         # The name of the module
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Cm'                        # The prefix for module-wide routines
-C_OBJECTPREFIX = 'CmpObj'       # The prefix for object methods
-CI_OBJECTPREFIX = 'CmpInstObj'
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_CmpObj_New(Component);
-extern int _CmpObj_Convert(PyObject *, Component *);
-extern PyObject *_CmpInstObj_New(ComponentInstance);
-extern int _CmpInstObj_Convert(PyObject *, ComponentInstance *);
-
-#define CmpObj_New _CmpObj_New
-#define CmpObj_Convert _CmpObj_Convert
-#define CmpInstObj_New _CmpInstObj_New
-#define CmpInstObj_Convert _CmpInstObj_Convert
-#endif
-
-/*
-** Parse/generate ComponentDescriptor records
-*/
-static PyObject *
-CmpDesc_New(ComponentDescription *itself)
-{
-
-        return Py_BuildValue("O&O&O&ll",
-                PyMac_BuildOSType, itself->componentType,
-                PyMac_BuildOSType, itself->componentSubType,
-                PyMac_BuildOSType, itself->componentManufacturer,
-                itself->componentFlags, itself->componentFlagsMask);
-}
-
-static int
-CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself)
-{
-        return PyArg_ParseTuple(v, "O&O&O&ll",
-                PyMac_GetOSType, &p_itself->componentType,
-                PyMac_GetOSType, &p_itself->componentSubType,
-                PyMac_GetOSType, &p_itself->componentManufacturer,
-                &p_itself->componentFlags, &p_itself->componentFlagsMask);
-}
-
-"""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(Component, CmpObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Component, CmpObj_Convert);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, CmpInstObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, CmpInstObj_Convert);
-"""
-
-ComponentDescription = OpaqueType('ComponentDescription', 'CmpDesc')
-Component = OpaqueByValueType('Component', C_OBJECTPREFIX)
-ComponentInstance = OpaqueByValueType('ComponentInstance', CI_OBJECTPREFIX)
-ComponentResult = Type("ComponentResult", "l")
-
-ComponentResourceHandle = OpaqueByValueType("ComponentResourceHandle", "ResObj")
-
-class MyCIObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output("""if (itself == NULL) {
-                                PyErr_SetString(Cm_Error,"NULL ComponentInstance");
-                                return NULL;
-                        }""")
-
-class MyCObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output("""if (itself == NULL) {
-                                /* XXXX Or should we return None? */
-                                PyErr_SetString(Cm_Error,"No such component");
-                                return NULL;
-                        }""")
-
-    def outputCheckConvertArg(self):
-        Output("""if ( v == Py_None ) {
-                                *p_itself = 0;
-                                return 1;
-        }""")
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-ci_object = MyCIObjectDefinition('ComponentInstance', CI_OBJECTPREFIX,
-                'ComponentInstance')
-c_object = MyCObjectDefinition('Component', C_OBJECTPREFIX, 'Component')
-module.addobject(ci_object)
-module.addobject(c_object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-c_methods = []
-ci_methods = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in c_methods: c_object.add(f)
-for f in ci_methods: ci_object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c
deleted file mode 100644 (file)
index 38ca1d1..0000000
+++ /dev/null
@@ -1,5803 +0,0 @@
-
-/* ========================== Module _Ctl =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_CtlObj_New(ControlHandle);
-extern int _CtlObj_Convert(PyObject *, ControlHandle *);
-
-#define CtlObj_New _CtlObj_New
-#define CtlObj_Convert _CtlObj_Convert
-#endif
-
-static PyObject *CtlObj_WhichControl(ControlHandle);
-
-#define as_Control(h) ((ControlHandle)h)
-#define as_Resource(ctl) ((Handle)ctl)
-#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
-
-#define MAXTABS 32  /* maximum number of tabs that we support in a tabs control */
-/*
-** Parse/generate ControlFontStyleRec records
-*/
-#if 0 /* Not needed */
-static PyObject *
-ControlFontStyle_New(ControlFontStyleRec *itself)
-{
-
-        return Py_BuildValue("hhhhhhO&O&", itself->flags, itself->font,
-                itself->size, itself->style, itself->mode, itself->just,
-                QdRGB_New, &itself->foreColor, QdRGB_New, &itself->backColor);
-}
-#endif
-
-static int
-ControlFontStyle_Convert(PyObject *v, ControlFontStyleRec *itself)
-{
-        return PyArg_Parse(v, "(hhhhhhO&O&)", &itself->flags,
-                &itself->font, &itself->size, &itself->style, &itself->mode,
-                &itself->just, QdRGB_Convert, &itself->foreColor,
-                QdRGB_Convert, &itself->backColor);
-}
-
-/*
-** Parse/generate ControlID records
-*/
-static PyObject *
-PyControlID_New(ControlID *itself)
-{
-
-        return Py_BuildValue("O&l", PyMac_BuildOSType, itself->signature, itself->id);
-}
-
-static int
-PyControlID_Convert(PyObject *v, ControlID *itself)
-{
-        return PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &itself->signature, &itself->id);
-}
-
-/*
-** generate DataBrowserListViewColumnDesc records
-*/
-static int
-DataBrowserTableViewColumnDesc_Convert(PyObject *v, DataBrowserTableViewColumnDesc *itself)
-{
-        return PyArg_Parse(v, "(lO&l)",
-                           &itself->propertyID,
-                           PyMac_GetOSType, &itself->propertyType,
-                           &itself->propertyFlags);
-}
-
-static int
-ControlButtonContentInfo_Convert(PyObject *v, ControlButtonContentInfo *itself)
-{
-        return PyArg_Parse(v, "(hO&)",
-                           &itself->contentType,
-                           OptResObj_Convert, &itself->u.iconSuite);
-}
-
-static int
-DataBrowserListViewHeaderDesc_Convert(PyObject *v, DataBrowserListViewHeaderDesc *itself)
-{
-        itself->version = kDataBrowserListViewLatestHeaderDesc;
-        return PyArg_Parse(v, "(HHhO&HO&O&)",
-                           &itself->minimumWidth,
-                           &itself->maximumWidth,
-                           &itself->titleOffset,
-                           CFStringRefObj_Convert, &itself->titleString,
-                           &itself->initialOrder,
-                           ControlFontStyle_Convert, &itself->btnFontStyle,
-                           ControlButtonContentInfo_Convert, &itself->btnContentInfo);
-}
-
-static int
-DataBrowserListViewColumnDesc_Convert(PyObject *v, DataBrowserListViewColumnDesc *itself)
-{
-        return PyArg_Parse(v, "(O&O&)",
-                           DataBrowserTableViewColumnDesc_Convert, &itself->propertyDesc,
-                           DataBrowserListViewHeaderDesc_Convert, &itself->headerBtnDesc);
-}
-
-/* TrackControl and HandleControlClick callback support */
-#define kMyControlActionProcTag 'ACTN'  /* not an official tag, only for internal use */
-static PyObject *tracker;
-static ControlActionUPP mytracker_upp;
-static ControlActionUPP myactionproc_upp;
-static ControlUserPaneKeyDownUPP mykeydownproc_upp;
-static ControlUserPaneFocusUPP myfocusproc_upp;
-static ControlUserPaneDrawUPP mydrawproc_upp;
-static ControlUserPaneIdleUPP myidleproc_upp;
-static ControlUserPaneHitTestUPP myhittestproc_upp;
-static ControlUserPaneTrackingUPP mytrackingproc_upp;
-
-static int settrackfunc(PyObject *);    /* forward */
-static void clrtrackfunc(void); /* forward */
-static int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
-
-static PyObject *Ctl_Error;
-
-/* ---------------------- Object type Control ----------------------- */
-
-PyTypeObject Control_Type;
-
-#define CtlObj_Check(x) (Py_TYPE(x) == &Control_Type || PyObject_TypeCheck((x), &Control_Type))
-
-typedef struct ControlObject {
-       PyObject_HEAD
-       ControlHandle ob_itself;
-       PyObject *ob_callbackdict;
-} ControlObject;
-
-PyObject *CtlObj_New(ControlHandle itself)
-{
-       ControlObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(ControlObject, &Control_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       SetControlReference(itself, (long)it);
-       it->ob_callbackdict = NULL;
-       return (PyObject *)it;
-}
-
-int CtlObj_Convert(PyObject *v, ControlHandle *p_itself)
-{
-       if (!CtlObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Control required");
-               return 0;
-       }
-       *p_itself = ((ControlObject *)v)->ob_itself;
-       return 1;
-}
-
-static void CtlObj_dealloc(ControlObject *self)
-{
-       Py_XDECREF(self->ob_callbackdict);
-       if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *CtlObj_HiliteControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlPartCode hiliteState;
-#ifndef HiliteControl
-       PyMac_PRECHECK(HiliteControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &hiliteState))
-               return NULL;
-       HiliteControl(_self->ob_itself,
-                     hiliteState);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_ShowControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ShowControl
-       PyMac_PRECHECK(ShowControl);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ShowControl(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_HideControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef HideControl
-       PyMac_PRECHECK(HideControl);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       HideControl(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_IsControlActive(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsControlActive
-       PyMac_PRECHECK(IsControlActive);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsControlActive(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_IsControlVisible(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsControlVisible
-       PyMac_PRECHECK(IsControlVisible);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsControlVisible(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_ActivateControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef ActivateControl
-       PyMac_PRECHECK(ActivateControl);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = ActivateControl(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_DeactivateControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef DeactivateControl
-       PyMac_PRECHECK(DeactivateControl);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = DeactivateControl(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlVisibility(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Boolean inIsVisible;
-       Boolean inDoDraw;
-#ifndef SetControlVisibility
-       PyMac_PRECHECK(SetControlVisibility);
-#endif
-       if (!PyArg_ParseTuple(_args, "bb",
-                             &inIsVisible,
-                             &inDoDraw))
-               return NULL;
-       _err = SetControlVisibility(_self->ob_itself,
-                                   inIsVisible,
-                                   inDoDraw);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_IsControlEnabled(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsControlEnabled
-       PyMac_PRECHECK(IsControlEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsControlEnabled(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_EnableControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef EnableControl
-       PyMac_PRECHECK(EnableControl);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = EnableControl(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_DisableControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef DisableControl
-       PyMac_PRECHECK(DisableControl);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = DisableControl(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_Draw1Control(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef Draw1Control
-       PyMac_PRECHECK(Draw1Control);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       Draw1Control(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetBestControlRect(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect outRect;
-       SInt16 outBaseLineOffset;
-#ifndef GetBestControlRect
-       PyMac_PRECHECK(GetBestControlRect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetBestControlRect(_self->ob_itself,
-                                 &outRect,
-                                 &outBaseLineOffset);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&h",
-                            PyMac_BuildRect, &outRect,
-                            outBaseLineOffset);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlFontStyle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ControlFontStyleRec inStyle;
-#ifndef SetControlFontStyle
-       PyMac_PRECHECK(SetControlFontStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ControlFontStyle_Convert, &inStyle))
-               return NULL;
-       _err = SetControlFontStyle(_self->ob_itself,
-                                  &inStyle);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_DrawControlInCurrentPort(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DrawControlInCurrentPort
-       PyMac_PRECHECK(DrawControlInCurrentPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DrawControlInCurrentPort(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetUpControlBackground(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inDepth;
-       Boolean inIsColorDevice;
-#ifndef SetUpControlBackground
-       PyMac_PRECHECK(SetUpControlBackground);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &inDepth,
-                             &inIsColorDevice))
-               return NULL;
-       _err = SetUpControlBackground(_self->ob_itself,
-                                     inDepth,
-                                     inIsColorDevice);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetUpControlTextColor(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inDepth;
-       Boolean inIsColorDevice;
-#ifndef SetUpControlTextColor
-       PyMac_PRECHECK(SetUpControlTextColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &inDepth,
-                             &inIsColorDevice))
-               return NULL;
-       _err = SetUpControlTextColor(_self->ob_itself,
-                                    inDepth,
-                                    inIsColorDevice);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_DragControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point startPoint;
-       Rect limitRect;
-       Rect slopRect;
-       DragConstraint axis;
-#ifndef DragControl
-       PyMac_PRECHECK(DragControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&H",
-                             PyMac_GetPoint, &startPoint,
-                             PyMac_GetRect, &limitRect,
-                             PyMac_GetRect, &slopRect,
-                             &axis))
-               return NULL;
-       DragControl(_self->ob_itself,
-                   startPoint,
-                   &limitRect,
-                   &slopRect,
-                   axis);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_TestControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlPartCode _rv;
-       Point testPoint;
-#ifndef TestControl
-       PyMac_PRECHECK(TestControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &testPoint))
-               return NULL;
-       _rv = TestControl(_self->ob_itself,
-                         testPoint);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_HandleControlContextualMenuClick(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point inWhere;
-       Boolean menuDisplayed;
-#ifndef HandleControlContextualMenuClick
-       PyMac_PRECHECK(HandleControlContextualMenuClick);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &inWhere))
-               return NULL;
-       _err = HandleControlContextualMenuClick(_self->ob_itself,
-                                               inWhere,
-                                               &menuDisplayed);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            menuDisplayed);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlClickActivation(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point inWhere;
-       EventModifiers inModifiers;
-       ClickActivationResult outResult;
-#ifndef GetControlClickActivation
-       PyMac_PRECHECK(GetControlClickActivation);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&H",
-                             PyMac_GetPoint, &inWhere,
-                             &inModifiers))
-               return NULL;
-       _err = GetControlClickActivation(_self->ob_itself,
-                                        inWhere,
-                                        inModifiers,
-                                        &outResult);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outResult);
-       return _res;
-}
-
-static PyObject *CtlObj_HandleControlKey(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlPartCode _rv;
-       SInt16 inKeyCode;
-       SInt16 inCharCode;
-       EventModifiers inModifiers;
-#ifndef HandleControlKey
-       PyMac_PRECHECK(HandleControlKey);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhH",
-                             &inKeyCode,
-                             &inCharCode,
-                             &inModifiers))
-               return NULL;
-       _rv = HandleControlKey(_self->ob_itself,
-                              inKeyCode,
-                              inCharCode,
-                              inModifiers);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_HandleControlSetCursor(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point localPoint;
-       EventModifiers modifiers;
-       Boolean cursorWasSet;
-#ifndef HandleControlSetCursor
-       PyMac_PRECHECK(HandleControlSetCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&H",
-                             PyMac_GetPoint, &localPoint,
-                             &modifiers))
-               return NULL;
-       _err = HandleControlSetCursor(_self->ob_itself,
-                                     localPoint,
-                                     modifiers,
-                                     &cursorWasSet);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            cursorWasSet);
-       return _res;
-}
-
-static PyObject *CtlObj_MoveControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 h;
-       SInt16 v;
-#ifndef MoveControl
-       PyMac_PRECHECK(MoveControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &h,
-                             &v))
-               return NULL;
-       MoveControl(_self->ob_itself,
-                   h,
-                   v);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SizeControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 w;
-       SInt16 h;
-#ifndef SizeControl
-       PyMac_PRECHECK(SizeControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &w,
-                             &h))
-               return NULL;
-       SizeControl(_self->ob_itself,
-                   w,
-                   h);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlTitle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 title;
-#ifndef SetControlTitle
-       PyMac_PRECHECK(SetControlTitle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, title))
-               return NULL;
-       SetControlTitle(_self->ob_itself,
-                       title);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlTitle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 title;
-#ifndef GetControlTitle
-       PyMac_PRECHECK(GetControlTitle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetControlTitle(_self->ob_itself,
-                       title);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildStr255, title);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlTitleWithCFString(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inString;
-#ifndef SetControlTitleWithCFString
-       PyMac_PRECHECK(SetControlTitleWithCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &inString))
-               return NULL;
-       _err = SetControlTitleWithCFString(_self->ob_itself,
-                                          inString);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_CopyControlTitleAsCFString(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef outString;
-#ifndef CopyControlTitleAsCFString
-       PyMac_PRECHECK(CopyControlTitleAsCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CopyControlTitleAsCFString(_self->ob_itself,
-                                         &outString);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, outString);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlValue(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef GetControlValue
-       PyMac_PRECHECK(GetControlValue);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlValue(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlValue(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 newValue;
-#ifndef SetControlValue
-       PyMac_PRECHECK(SetControlValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &newValue))
-               return NULL;
-       SetControlValue(_self->ob_itself,
-                       newValue);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlMinimum(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef GetControlMinimum
-       PyMac_PRECHECK(GetControlMinimum);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlMinimum(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlMinimum(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 newMinimum;
-#ifndef SetControlMinimum
-       PyMac_PRECHECK(SetControlMinimum);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &newMinimum))
-               return NULL;
-       SetControlMinimum(_self->ob_itself,
-                         newMinimum);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlMaximum(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef GetControlMaximum
-       PyMac_PRECHECK(GetControlMaximum);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlMaximum(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlMaximum(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 newMaximum;
-#ifndef SetControlMaximum
-       PyMac_PRECHECK(SetControlMaximum);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &newMaximum))
-               return NULL;
-       SetControlMaximum(_self->ob_itself,
-                         newMaximum);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlViewSize(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-#ifndef GetControlViewSize
-       PyMac_PRECHECK(GetControlViewSize);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlViewSize(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlViewSize(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 newViewSize;
-#ifndef SetControlViewSize
-       PyMac_PRECHECK(SetControlViewSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &newViewSize))
-               return NULL;
-       SetControlViewSize(_self->ob_itself,
-                          newViewSize);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControl32BitValue(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-#ifndef GetControl32BitValue
-       PyMac_PRECHECK(GetControl32BitValue);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControl32BitValue(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControl32BitValue(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 newValue;
-#ifndef SetControl32BitValue
-       PyMac_PRECHECK(SetControl32BitValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &newValue))
-               return NULL;
-       SetControl32BitValue(_self->ob_itself,
-                            newValue);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControl32BitMaximum(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-#ifndef GetControl32BitMaximum
-       PyMac_PRECHECK(GetControl32BitMaximum);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControl32BitMaximum(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControl32BitMaximum(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 newMaximum;
-#ifndef SetControl32BitMaximum
-       PyMac_PRECHECK(SetControl32BitMaximum);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &newMaximum))
-               return NULL;
-       SetControl32BitMaximum(_self->ob_itself,
-                              newMaximum);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControl32BitMinimum(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-#ifndef GetControl32BitMinimum
-       PyMac_PRECHECK(GetControl32BitMinimum);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControl32BitMinimum(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControl32BitMinimum(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 newMinimum;
-#ifndef SetControl32BitMinimum
-       PyMac_PRECHECK(SetControl32BitMinimum);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &newMinimum))
-               return NULL;
-       SetControl32BitMinimum(_self->ob_itself,
-                              newMinimum);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_IsValidControlHandle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsValidControlHandle
-       PyMac_PRECHECK(IsValidControlHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsValidControlHandle(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlID(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ControlID inID;
-#ifndef SetControlID
-       PyMac_PRECHECK(SetControlID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyControlID_Convert, &inID))
-               return NULL;
-       _err = SetControlID(_self->ob_itself,
-                           &inID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlID(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ControlID outID;
-#ifndef GetControlID
-       PyMac_PRECHECK(GetControlID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetControlID(_self->ob_itself,
-                           &outID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyControlID_New, &outID);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlCommandID(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 inCommandID;
-#ifndef SetControlCommandID
-       PyMac_PRECHECK(SetControlCommandID);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inCommandID))
-               return NULL;
-       _err = SetControlCommandID(_self->ob_itself,
-                                  inCommandID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlCommandID(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 outCommandID;
-#ifndef GetControlCommandID
-       PyMac_PRECHECK(GetControlCommandID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetControlCommandID(_self->ob_itself,
-                                  &outCommandID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outCommandID);
-       return _res;
-}
-
-static PyObject *CtlObj_RemoveControlProperty(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType propertyCreator;
-       OSType propertyTag;
-#ifndef RemoveControlProperty
-       PyMac_PRECHECK(RemoveControlProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &propertyCreator,
-                             PyMac_GetOSType, &propertyTag))
-               return NULL;
-       _err = RemoveControlProperty(_self->ob_itself,
-                                    propertyCreator,
-                                    propertyTag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlPropertyAttributes(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType propertyCreator;
-       OSType propertyTag;
-       UInt32 attributes;
-#ifndef GetControlPropertyAttributes
-       PyMac_PRECHECK(GetControlPropertyAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &propertyCreator,
-                             PyMac_GetOSType, &propertyTag))
-               return NULL;
-       _err = GetControlPropertyAttributes(_self->ob_itself,
-                                           propertyCreator,
-                                           propertyTag,
-                                           &attributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            attributes);
-       return _res;
-}
-
-static PyObject *CtlObj_ChangeControlPropertyAttributes(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType propertyCreator;
-       OSType propertyTag;
-       UInt32 attributesToSet;
-       UInt32 attributesToClear;
-#ifndef ChangeControlPropertyAttributes
-       PyMac_PRECHECK(ChangeControlPropertyAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&ll",
-                             PyMac_GetOSType, &propertyCreator,
-                             PyMac_GetOSType, &propertyTag,
-                             &attributesToSet,
-                             &attributesToClear))
-               return NULL;
-       _err = ChangeControlPropertyAttributes(_self->ob_itself,
-                                              propertyCreator,
-                                              propertyTag,
-                                              attributesToSet,
-                                              attributesToClear);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlRegion(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ControlPartCode inPart;
-       RgnHandle outRegion;
-#ifndef GetControlRegion
-       PyMac_PRECHECK(GetControlRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &inPart,
-                             ResObj_Convert, &outRegion))
-               return NULL;
-       _err = GetControlRegion(_self->ob_itself,
-                               inPart,
-                               outRegion);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlVariant(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlVariant _rv;
-#ifndef GetControlVariant
-       PyMac_PRECHECK(GetControlVariant);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlVariant(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlAction(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PyObject* actionProc;
-       UniversalProcPtr c_callback;
-#ifndef SetControlAction
-       PyMac_PRECHECK(SetControlAction);
-#endif
-       if (!PyArg_ParseTuple(_args, "O",
-                             &actionProc))
-               return NULL;
-       SetControlAction(_self->ob_itself,
-                        myactionproc_upp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       setcallback((PyObject*)_self, kMyControlActionProcTag, actionProc, &c_callback);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlReference(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 data;
-#ifndef SetControlReference
-       PyMac_PRECHECK(SetControlReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &data))
-               return NULL;
-       SetControlReference(_self->ob_itself,
-                           data);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlReference(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-#ifndef GetControlReference
-       PyMac_PRECHECK(GetControlReference);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlReference(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_EmbedControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ControlHandle inContainer;
-#ifndef EmbedControl
-       PyMac_PRECHECK(EmbedControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CtlObj_Convert, &inContainer))
-               return NULL;
-       _err = EmbedControl(_self->ob_itself,
-                           inContainer);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_AutoEmbedControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-#ifndef AutoEmbedControl
-       PyMac_PRECHECK(AutoEmbedControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = AutoEmbedControl(_self->ob_itself,
-                               inWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetSuperControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ControlHandle outParent;
-#ifndef GetSuperControl
-       PyMac_PRECHECK(GetSuperControl);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetSuperControl(_self->ob_itself,
-                              &outParent);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_WhichControl, outParent);
-       return _res;
-}
-
-static PyObject *CtlObj_CountSubControls(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UInt16 outNumChildren;
-#ifndef CountSubControls
-       PyMac_PRECHECK(CountSubControls);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CountSubControls(_self->ob_itself,
-                               &outNumChildren);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            outNumChildren);
-       return _res;
-}
-
-static PyObject *CtlObj_GetIndexedSubControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UInt16 inIndex;
-       ControlHandle outSubControl;
-#ifndef GetIndexedSubControl
-       PyMac_PRECHECK(GetIndexedSubControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &inIndex))
-               return NULL;
-       _err = GetIndexedSubControl(_self->ob_itself,
-                                   inIndex,
-                                   &outSubControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_WhichControl, outSubControl);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlSupervisor(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ControlHandle inBoss;
-#ifndef SetControlSupervisor
-       PyMac_PRECHECK(SetControlSupervisor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CtlObj_Convert, &inBoss))
-               return NULL;
-       _err = SetControlSupervisor(_self->ob_itself,
-                                   inBoss);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlFeatures(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UInt32 outFeatures;
-#ifndef GetControlFeatures
-       PyMac_PRECHECK(GetControlFeatures);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetControlFeatures(_self->ob_itself,
-                                 &outFeatures);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outFeatures);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlDataSize(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       Size outMaxSize;
-#ifndef GetControlDataSize
-       PyMac_PRECHECK(GetControlDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName))
-               return NULL;
-       _err = GetControlDataSize(_self->ob_itself,
-                                 inPart,
-                                 inTagName,
-                                 &outMaxSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outMaxSize);
-       return _res;
-}
-
-static PyObject *CtlObj_HandleControlDragTracking(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       DragTrackingMessage inMessage;
-       DragReference inDrag;
-       Boolean outLikesDrag;
-#ifndef HandleControlDragTracking
-       PyMac_PRECHECK(HandleControlDragTracking);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &inMessage,
-                             DragObj_Convert, &inDrag))
-               return NULL;
-       _err = HandleControlDragTracking(_self->ob_itself,
-                                        inMessage,
-                                        inDrag,
-                                        &outLikesDrag);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            outLikesDrag);
-       return _res;
-}
-
-static PyObject *CtlObj_HandleControlDragReceive(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       DragReference inDrag;
-#ifndef HandleControlDragReceive
-       PyMac_PRECHECK(HandleControlDragReceive);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             DragObj_Convert, &inDrag))
-               return NULL;
-       _err = HandleControlDragReceive(_self->ob_itself,
-                                       inDrag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlDragTrackingEnabled(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean inTracks;
-#ifndef SetControlDragTrackingEnabled
-       PyMac_PRECHECK(SetControlDragTrackingEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &inTracks))
-               return NULL;
-       _err = SetControlDragTrackingEnabled(_self->ob_itself,
-                                            inTracks);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_IsControlDragTrackingEnabled(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean outTracks;
-#ifndef IsControlDragTrackingEnabled
-       PyMac_PRECHECK(IsControlDragTrackingEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = IsControlDragTrackingEnabled(_self->ob_itself,
-                                           &outTracks);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            outTracks);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlBounds(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect bounds;
-#ifndef GetControlBounds
-       PyMac_PRECHECK(GetControlBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetControlBounds(_self->ob_itself,
-                        &bounds);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *CtlObj_IsControlHilited(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsControlHilited
-       PyMac_PRECHECK(IsControlHilited);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsControlHilited(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlHilite(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt16 _rv;
-#ifndef GetControlHilite
-       PyMac_PRECHECK(GetControlHilite);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlHilite(_self->ob_itself);
-       _res = Py_BuildValue("H",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlOwner(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-#ifndef GetControlOwner
-       PyMac_PRECHECK(GetControlOwner);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlOwner(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlDataHandle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef GetControlDataHandle
-       PyMac_PRECHECK(GetControlDataHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlDataHandle(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlPopupMenuHandle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle _rv;
-#ifndef GetControlPopupMenuHandle
-       PyMac_PRECHECK(GetControlPopupMenuHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlPopupMenuHandle(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlPopupMenuID(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetControlPopupMenuID
-       PyMac_PRECHECK(GetControlPopupMenuID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetControlPopupMenuID(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlDataHandle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle dataHandle;
-#ifndef SetControlDataHandle
-       PyMac_PRECHECK(SetControlDataHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &dataHandle))
-               return NULL;
-       SetControlDataHandle(_self->ob_itself,
-                            dataHandle);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlBounds(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect bounds;
-#ifndef SetControlBounds
-       PyMac_PRECHECK(SetControlBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &bounds))
-               return NULL;
-       SetControlBounds(_self->ob_itself,
-                        &bounds);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlPopupMenuHandle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle popupMenu;
-#ifndef SetControlPopupMenuHandle
-       PyMac_PRECHECK(SetControlPopupMenuHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             MenuObj_Convert, &popupMenu))
-               return NULL;
-       SetControlPopupMenuHandle(_self->ob_itself,
-                                 popupMenu);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetControlPopupMenuID(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short menuID;
-#ifndef SetControlPopupMenuID
-       PyMac_PRECHECK(SetControlPopupMenuID);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &menuID))
-               return NULL;
-       SetControlPopupMenuID(_self->ob_itself,
-                             menuID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetBevelButtonMenuValue(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 outValue;
-#ifndef GetBevelButtonMenuValue
-       PyMac_PRECHECK(GetBevelButtonMenuValue);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetBevelButtonMenuValue(_self->ob_itself,
-                                      &outValue);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outValue);
-       return _res;
-}
-
-static PyObject *CtlObj_SetBevelButtonMenuValue(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inValue;
-#ifndef SetBevelButtonMenuValue
-       PyMac_PRECHECK(SetBevelButtonMenuValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inValue))
-               return NULL;
-       _err = SetBevelButtonMenuValue(_self->ob_itself,
-                                      inValue);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetBevelButtonMenuHandle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       MenuHandle outHandle;
-#ifndef GetBevelButtonMenuHandle
-       PyMac_PRECHECK(GetBevelButtonMenuHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetBevelButtonMenuHandle(_self->ob_itself,
-                                       &outHandle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, outHandle);
-       return _res;
-}
-
-static PyObject *CtlObj_SetBevelButtonContentInfo(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ControlButtonContentInfo inContent;
-#ifndef SetBevelButtonContentInfo
-       PyMac_PRECHECK(SetBevelButtonContentInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ControlButtonContentInfo_Convert, &inContent))
-               return NULL;
-       _err = SetBevelButtonContentInfo(_self->ob_itself,
-                                        &inContent);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetBevelButtonTransform(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconTransformType transform;
-#ifndef SetBevelButtonTransform
-       PyMac_PRECHECK(SetBevelButtonTransform);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &transform))
-               return NULL;
-       _err = SetBevelButtonTransform(_self->ob_itself,
-                                      transform);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetDisclosureTriangleLastValue(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inValue;
-#ifndef SetDisclosureTriangleLastValue
-       PyMac_PRECHECK(SetDisclosureTriangleLastValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inValue))
-               return NULL;
-       _err = SetDisclosureTriangleLastValue(_self->ob_itself,
-                                             inValue);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetTabContentRect(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect outContentRect;
-#ifndef GetTabContentRect
-       PyMac_PRECHECK(GetTabContentRect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetTabContentRect(_self->ob_itself,
-                                &outContentRect);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &outContentRect);
-       return _res;
-}
-
-static PyObject *CtlObj_SetTabEnabled(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inTabToHilite;
-       Boolean inEnabled;
-#ifndef SetTabEnabled
-       PyMac_PRECHECK(SetTabEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &inTabToHilite,
-                             &inEnabled))
-               return NULL;
-       _err = SetTabEnabled(_self->ob_itself,
-                            inTabToHilite,
-                            inEnabled);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetImageWellContentInfo(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ControlButtonContentInfo inContent;
-#ifndef SetImageWellContentInfo
-       PyMac_PRECHECK(SetImageWellContentInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ControlButtonContentInfo_Convert, &inContent))
-               return NULL;
-       _err = SetImageWellContentInfo(_self->ob_itself,
-                                      &inContent);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetImageWellTransform(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconTransformType inTransform;
-#ifndef SetImageWellTransform
-       PyMac_PRECHECK(SetImageWellTransform);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inTransform))
-               return NULL;
-       _err = SetImageWellTransform(_self->ob_itself,
-                                    inTransform);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType style;
-#ifndef GetDataBrowserViewStyle
-       PyMac_PRECHECK(GetDataBrowserViewStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserViewStyle(_self->ob_itself,
-                                      &style);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildOSType, style);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType style;
-#ifndef SetDataBrowserViewStyle
-       PyMac_PRECHECK(SetDataBrowserViewStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &style))
-               return NULL;
-       _err = SetDataBrowserViewStyle(_self->ob_itself,
-                                      style);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_EnableDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       UInt32 command;
-#ifndef EnableDataBrowserEditCommand
-       PyMac_PRECHECK(EnableDataBrowserEditCommand);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &command))
-               return NULL;
-       _rv = EnableDataBrowserEditCommand(_self->ob_itself,
-                                          command);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_ExecuteDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 command;
-#ifndef ExecuteDataBrowserEditCommand
-       PyMac_PRECHECK(ExecuteDataBrowserEditCommand);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &command))
-               return NULL;
-       _err = ExecuteDataBrowserEditCommand(_self->ob_itself,
-                                            command);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 first;
-       UInt32 last;
-#ifndef GetDataBrowserSelectionAnchor
-       PyMac_PRECHECK(GetDataBrowserSelectionAnchor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserSelectionAnchor(_self->ob_itself,
-                                            &first,
-                                            &last);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("ll",
-                            first,
-                            last);
-       return _res;
-}
-
-static PyObject *CtlObj_MoveDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 direction;
-       Boolean extendSelection;
-#ifndef MoveDataBrowserSelectionAnchor
-       PyMac_PRECHECK(MoveDataBrowserSelectionAnchor);
-#endif
-       if (!PyArg_ParseTuple(_args, "lb",
-                             &direction,
-                             &extendSelection))
-               return NULL;
-       _err = MoveDataBrowserSelectionAnchor(_self->ob_itself,
-                                             direction,
-                                             extendSelection);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_OpenDataBrowserContainer(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 container;
-#ifndef OpenDataBrowserContainer
-       PyMac_PRECHECK(OpenDataBrowserContainer);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &container))
-               return NULL;
-       _err = OpenDataBrowserContainer(_self->ob_itself,
-                                       container);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_CloseDataBrowserContainer(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 container;
-#ifndef CloseDataBrowserContainer
-       PyMac_PRECHECK(CloseDataBrowserContainer);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &container))
-               return NULL;
-       _err = CloseDataBrowserContainer(_self->ob_itself,
-                                        container);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SortDataBrowserContainer(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 container;
-       Boolean sortChildren;
-#ifndef SortDataBrowserContainer
-       PyMac_PRECHECK(SortDataBrowserContainer);
-#endif
-       if (!PyArg_ParseTuple(_args, "lb",
-                             &container,
-                             &sortChildren))
-               return NULL;
-       _err = SortDataBrowserContainer(_self->ob_itself,
-                                       container,
-                                       sortChildren);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserItems(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 container;
-       Boolean recurse;
-       UInt32 state;
-       Handle items;
-#ifndef GetDataBrowserItems
-       PyMac_PRECHECK(GetDataBrowserItems);
-#endif
-       if (!PyArg_ParseTuple(_args, "lblO&",
-                             &container,
-                             &recurse,
-                             &state,
-                             ResObj_Convert, &items))
-               return NULL;
-       _err = GetDataBrowserItems(_self->ob_itself,
-                                  container,
-                                  recurse,
-                                  state,
-                                  items);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserItemCount(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 container;
-       Boolean recurse;
-       UInt32 state;
-       UInt32 numItems;
-#ifndef GetDataBrowserItemCount
-       PyMac_PRECHECK(GetDataBrowserItemCount);
-#endif
-       if (!PyArg_ParseTuple(_args, "lbl",
-                             &container,
-                             &recurse,
-                             &state))
-               return NULL;
-       _err = GetDataBrowserItemCount(_self->ob_itself,
-                                      container,
-                                      recurse,
-                                      state,
-                                      &numItems);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            numItems);
-       return _res;
-}
-
-static PyObject *CtlObj_IsDataBrowserItemSelected(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       UInt32 item;
-#ifndef IsDataBrowserItemSelected
-       PyMac_PRECHECK(IsDataBrowserItemSelected);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &item))
-               return NULL;
-       _rv = IsDataBrowserItemSelected(_self->ob_itself,
-                                       item);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserItemState(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 item;
-       UInt32 state;
-#ifndef GetDataBrowserItemState
-       PyMac_PRECHECK(GetDataBrowserItemState);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &item))
-               return NULL;
-       _err = GetDataBrowserItemState(_self->ob_itself,
-                                      item,
-                                      &state);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            state);
-       return _res;
-}
-
-static PyObject *CtlObj_RevealDataBrowserItem(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 item;
-       UInt32 propertyID;
-       UInt8 options;
-#ifndef RevealDataBrowserItem
-       PyMac_PRECHECK(RevealDataBrowserItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "llb",
-                             &item,
-                             &propertyID,
-                             &options))
-               return NULL;
-       _err = RevealDataBrowserItem(_self->ob_itself,
-                                    item,
-                                    propertyID,
-                                    options);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean active;
-#ifndef SetDataBrowserActiveItems
-       PyMac_PRECHECK(SetDataBrowserActiveItems);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &active))
-               return NULL;
-       _err = SetDataBrowserActiveItems(_self->ob_itself,
-                                        active);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean active;
-#ifndef GetDataBrowserActiveItems
-       PyMac_PRECHECK(GetDataBrowserActiveItems);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserActiveItems(_self->ob_itself,
-                                        &active);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            active);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect insetRect;
-#ifndef SetDataBrowserScrollBarInset
-       PyMac_PRECHECK(SetDataBrowserScrollBarInset);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = SetDataBrowserScrollBarInset(_self->ob_itself,
-                                           &insetRect);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &insetRect);
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect insetRect;
-#ifndef GetDataBrowserScrollBarInset
-       PyMac_PRECHECK(GetDataBrowserScrollBarInset);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserScrollBarInset(_self->ob_itself,
-                                           &insetRect);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &insetRect);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserTarget(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 target;
-#ifndef SetDataBrowserTarget
-       PyMac_PRECHECK(SetDataBrowserTarget);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &target))
-               return NULL;
-       _err = SetDataBrowserTarget(_self->ob_itself,
-                                   target);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTarget(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 target;
-#ifndef GetDataBrowserTarget
-       PyMac_PRECHECK(GetDataBrowserTarget);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserTarget(_self->ob_itself,
-                                   &target);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            target);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt16 order;
-#ifndef SetDataBrowserSortOrder
-       PyMac_PRECHECK(SetDataBrowserSortOrder);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &order))
-               return NULL;
-       _err = SetDataBrowserSortOrder(_self->ob_itself,
-                                      order);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt16 order;
-#ifndef GetDataBrowserSortOrder
-       PyMac_PRECHECK(GetDataBrowserSortOrder);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserSortOrder(_self->ob_itself,
-                                      &order);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            order);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 top;
-       UInt32 left;
-#ifndef SetDataBrowserScrollPosition
-       PyMac_PRECHECK(SetDataBrowserScrollPosition);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &top,
-                             &left))
-               return NULL;
-       _err = SetDataBrowserScrollPosition(_self->ob_itself,
-                                           top,
-                                           left);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 top;
-       UInt32 left;
-#ifndef GetDataBrowserScrollPosition
-       PyMac_PRECHECK(GetDataBrowserScrollPosition);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserScrollPosition(_self->ob_itself,
-                                           &top,
-                                           &left);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("ll",
-                            top,
-                            left);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean horiz;
-       Boolean vert;
-#ifndef SetDataBrowserHasScrollBars
-       PyMac_PRECHECK(SetDataBrowserHasScrollBars);
-#endif
-       if (!PyArg_ParseTuple(_args, "bb",
-                             &horiz,
-                             &vert))
-               return NULL;
-       _err = SetDataBrowserHasScrollBars(_self->ob_itself,
-                                          horiz,
-                                          vert);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean horiz;
-       Boolean vert;
-#ifndef GetDataBrowserHasScrollBars
-       PyMac_PRECHECK(GetDataBrowserHasScrollBars);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserHasScrollBars(_self->ob_itself,
-                                          &horiz,
-                                          &vert);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("bb",
-                            horiz,
-                            vert);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 property;
-#ifndef SetDataBrowserSortProperty
-       PyMac_PRECHECK(SetDataBrowserSortProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &property))
-               return NULL;
-       _err = SetDataBrowserSortProperty(_self->ob_itself,
-                                         property);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 property;
-#ifndef GetDataBrowserSortProperty
-       PyMac_PRECHECK(GetDataBrowserSortProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserSortProperty(_self->ob_itself,
-                                         &property);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            property);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 selectionFlags;
-#ifndef SetDataBrowserSelectionFlags
-       PyMac_PRECHECK(SetDataBrowserSelectionFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &selectionFlags))
-               return NULL;
-       _err = SetDataBrowserSelectionFlags(_self->ob_itself,
-                                           selectionFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 selectionFlags;
-#ifndef GetDataBrowserSelectionFlags
-       PyMac_PRECHECK(GetDataBrowserSelectionFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserSelectionFlags(_self->ob_itself,
-                                           &selectionFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            selectionFlags);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 property;
-       UInt32 flags;
-#ifndef SetDataBrowserPropertyFlags
-       PyMac_PRECHECK(SetDataBrowserPropertyFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &property,
-                             &flags))
-               return NULL;
-       _err = SetDataBrowserPropertyFlags(_self->ob_itself,
-                                          property,
-                                          flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 property;
-       UInt32 flags;
-#ifndef GetDataBrowserPropertyFlags
-       PyMac_PRECHECK(GetDataBrowserPropertyFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &property))
-               return NULL;
-       _err = GetDataBrowserPropertyFlags(_self->ob_itself,
-                                          property,
-                                          &flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            flags);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserEditText(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef text;
-#ifndef SetDataBrowserEditText
-       PyMac_PRECHECK(SetDataBrowserEditText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &text))
-               return NULL;
-       _err = SetDataBrowserEditText(_self->ob_itself,
-                                     text);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_CopyDataBrowserEditText(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef text;
-#ifndef CopyDataBrowserEditText
-       PyMac_PRECHECK(CopyDataBrowserEditText);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CopyDataBrowserEditText(_self->ob_itself,
-                                      &text);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, text);
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserEditText(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFMutableStringRef text;
-#ifndef GetDataBrowserEditText
-       PyMac_PRECHECK(GetDataBrowserEditText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFMutableStringRefObj_Convert, &text))
-               return NULL;
-       _err = GetDataBrowserEditText(_self->ob_itself,
-                                     text);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 item;
-       UInt32 property;
-#ifndef SetDataBrowserEditItem
-       PyMac_PRECHECK(SetDataBrowserEditItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &item,
-                             &property))
-               return NULL;
-       _err = SetDataBrowserEditItem(_self->ob_itself,
-                                     item,
-                                     property);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 item;
-       UInt32 property;
-#ifndef GetDataBrowserEditItem
-       PyMac_PRECHECK(GetDataBrowserEditItem);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserEditItem(_self->ob_itself,
-                                     &item,
-                                     &property);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("ll",
-                            item,
-                            property);
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserItemPartBounds(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 item;
-       UInt32 property;
-       OSType part;
-       Rect bounds;
-#ifndef GetDataBrowserItemPartBounds
-       PyMac_PRECHECK(GetDataBrowserItemPartBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "llO&",
-                             &item,
-                             &property,
-                             PyMac_GetOSType, &part))
-               return NULL;
-       _err = GetDataBrowserItemPartBounds(_self->ob_itself,
-                                           item,
-                                           property,
-                                           part,
-                                           &bounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *CtlObj_RemoveDataBrowserTableViewColumn(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 column;
-#ifndef RemoveDataBrowserTableViewColumn
-       PyMac_PRECHECK(RemoveDataBrowserTableViewColumn);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &column))
-               return NULL;
-       _err = RemoveDataBrowserTableViewColumn(_self->ob_itself,
-                                               column);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewColumnCount(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 numColumns;
-#ifndef GetDataBrowserTableViewColumnCount
-       PyMac_PRECHECK(GetDataBrowserTableViewColumnCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserTableViewColumnCount(_self->ob_itself,
-                                                 &numColumns);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            numColumns);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 hiliteStyle;
-#ifndef SetDataBrowserTableViewHiliteStyle
-       PyMac_PRECHECK(SetDataBrowserTableViewHiliteStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &hiliteStyle))
-               return NULL;
-       _err = SetDataBrowserTableViewHiliteStyle(_self->ob_itself,
-                                                 hiliteStyle);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 hiliteStyle;
-#ifndef GetDataBrowserTableViewHiliteStyle
-       PyMac_PRECHECK(GetDataBrowserTableViewHiliteStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserTableViewHiliteStyle(_self->ob_itself,
-                                                 &hiliteStyle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            hiliteStyle);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt16 height;
-#ifndef SetDataBrowserTableViewRowHeight
-       PyMac_PRECHECK(SetDataBrowserTableViewRowHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &height))
-               return NULL;
-       _err = SetDataBrowserTableViewRowHeight(_self->ob_itself,
-                                               height);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt16 height;
-#ifndef GetDataBrowserTableViewRowHeight
-       PyMac_PRECHECK(GetDataBrowserTableViewRowHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserTableViewRowHeight(_self->ob_itself,
-                                               &height);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            height);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt16 width;
-#ifndef SetDataBrowserTableViewColumnWidth
-       PyMac_PRECHECK(SetDataBrowserTableViewColumnWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &width))
-               return NULL;
-       _err = SetDataBrowserTableViewColumnWidth(_self->ob_itself,
-                                                 width);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt16 width;
-#ifndef GetDataBrowserTableViewColumnWidth
-       PyMac_PRECHECK(GetDataBrowserTableViewColumnWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserTableViewColumnWidth(_self->ob_itself,
-                                                 &width);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            width);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 item;
-       UInt16 height;
-#ifndef SetDataBrowserTableViewItemRowHeight
-       PyMac_PRECHECK(SetDataBrowserTableViewItemRowHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, "lH",
-                             &item,
-                             &height))
-               return NULL;
-       _err = SetDataBrowserTableViewItemRowHeight(_self->ob_itself,
-                                                   item,
-                                                   height);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 item;
-       UInt16 height;
-#ifndef GetDataBrowserTableViewItemRowHeight
-       PyMac_PRECHECK(GetDataBrowserTableViewItemRowHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &item))
-               return NULL;
-       _err = GetDataBrowserTableViewItemRowHeight(_self->ob_itself,
-                                                   item,
-                                                   &height);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            height);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 column;
-       UInt16 width;
-#ifndef SetDataBrowserTableViewNamedColumnWidth
-       PyMac_PRECHECK(SetDataBrowserTableViewNamedColumnWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, "lH",
-                             &column,
-                             &width))
-               return NULL;
-       _err = SetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
-                                                      column,
-                                                      width);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 column;
-       UInt16 width;
-#ifndef GetDataBrowserTableViewNamedColumnWidth
-       PyMac_PRECHECK(GetDataBrowserTableViewNamedColumnWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &column))
-               return NULL;
-       _err = GetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
-                                                      column,
-                                                      &width);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            width);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean variableWidthColumns;
-       Boolean variableHeightRows;
-#ifndef SetDataBrowserTableViewGeometry
-       PyMac_PRECHECK(SetDataBrowserTableViewGeometry);
-#endif
-       if (!PyArg_ParseTuple(_args, "bb",
-                             &variableWidthColumns,
-                             &variableHeightRows))
-               return NULL;
-       _err = SetDataBrowserTableViewGeometry(_self->ob_itself,
-                                              variableWidthColumns,
-                                              variableHeightRows);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean variableWidthColumns;
-       Boolean variableHeightRows;
-#ifndef GetDataBrowserTableViewGeometry
-       PyMac_PRECHECK(GetDataBrowserTableViewGeometry);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserTableViewGeometry(_self->ob_itself,
-                                              &variableWidthColumns,
-                                              &variableHeightRows);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("bb",
-                            variableWidthColumns,
-                            variableHeightRows);
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewItemID(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 row;
-       UInt32 item;
-#ifndef GetDataBrowserTableViewItemID
-       PyMac_PRECHECK(GetDataBrowserTableViewItemID);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &row))
-               return NULL;
-       _err = GetDataBrowserTableViewItemID(_self->ob_itself,
-                                            row,
-                                            &item);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            item);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 item;
-       UInt32 row;
-#ifndef SetDataBrowserTableViewItemRow
-       PyMac_PRECHECK(SetDataBrowserTableViewItemRow);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &item,
-                             &row))
-               return NULL;
-       _err = SetDataBrowserTableViewItemRow(_self->ob_itself,
-                                             item,
-                                             row);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 item;
-       UInt32 row;
-#ifndef GetDataBrowserTableViewItemRow
-       PyMac_PRECHECK(GetDataBrowserTableViewItemRow);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &item))
-               return NULL;
-       _err = GetDataBrowserTableViewItemRow(_self->ob_itself,
-                                             item,
-                                             &row);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            row);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 column;
-       UInt32 position;
-#ifndef SetDataBrowserTableViewColumnPosition
-       PyMac_PRECHECK(SetDataBrowserTableViewColumnPosition);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &column,
-                             &position))
-               return NULL;
-       _err = SetDataBrowserTableViewColumnPosition(_self->ob_itself,
-                                                    column,
-                                                    position);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 column;
-       UInt32 position;
-#ifndef GetDataBrowserTableViewColumnPosition
-       PyMac_PRECHECK(GetDataBrowserTableViewColumnPosition);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &column))
-               return NULL;
-       _err = GetDataBrowserTableViewColumnPosition(_self->ob_itself,
-                                                    column,
-                                                    &position);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            position);
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserTableViewColumnProperty(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 column;
-       UInt32 property;
-#ifndef GetDataBrowserTableViewColumnProperty
-       PyMac_PRECHECK(GetDataBrowserTableViewColumnProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &column))
-               return NULL;
-       _err = GetDataBrowserTableViewColumnProperty(_self->ob_itself,
-                                                    column,
-                                                    &property);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            property);
-       return _res;
-}
-
-static PyObject *CtlObj_AutoSizeDataBrowserListViewColumns(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef AutoSizeDataBrowserListViewColumns
-       PyMac_PRECHECK(AutoSizeDataBrowserListViewColumns);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AutoSizeDataBrowserListViewColumns(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_AddDataBrowserListViewColumn(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       DataBrowserListViewColumnDesc columnDesc;
-       UInt32 position;
-#ifndef AddDataBrowserListViewColumn
-       PyMac_PRECHECK(AddDataBrowserListViewColumn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             DataBrowserListViewColumnDesc_Convert, &columnDesc,
-                             &position))
-               return NULL;
-       _err = AddDataBrowserListViewColumn(_self->ob_itself,
-                                           &columnDesc,
-                                           position);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt16 height;
-#ifndef SetDataBrowserListViewHeaderBtnHeight
-       PyMac_PRECHECK(SetDataBrowserListViewHeaderBtnHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &height))
-               return NULL;
-       _err = SetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
-                                                    height);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt16 height;
-#ifndef GetDataBrowserListViewHeaderBtnHeight
-       PyMac_PRECHECK(GetDataBrowserListViewHeaderBtnHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
-                                                    &height);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            height);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean usePlainBackground;
-#ifndef SetDataBrowserListViewUsePlainBackground
-       PyMac_PRECHECK(SetDataBrowserListViewUsePlainBackground);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &usePlainBackground))
-               return NULL;
-       _err = SetDataBrowserListViewUsePlainBackground(_self->ob_itself,
-                                                       usePlainBackground);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean usePlainBackground;
-#ifndef GetDataBrowserListViewUsePlainBackground
-       PyMac_PRECHECK(GetDataBrowserListViewUsePlainBackground);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserListViewUsePlainBackground(_self->ob_itself,
-                                                       &usePlainBackground);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            usePlainBackground);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 column;
-       Boolean expandableRows;
-#ifndef SetDataBrowserListViewDisclosureColumn
-       PyMac_PRECHECK(SetDataBrowserListViewDisclosureColumn);
-#endif
-       if (!PyArg_ParseTuple(_args, "lb",
-                             &column,
-                             &expandableRows))
-               return NULL;
-       _err = SetDataBrowserListViewDisclosureColumn(_self->ob_itself,
-                                                     column,
-                                                     expandableRows);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 column;
-       Boolean expandableRows;
-#ifndef GetDataBrowserListViewDisclosureColumn
-       PyMac_PRECHECK(GetDataBrowserListViewDisclosureColumn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserListViewDisclosureColumn(_self->ob_itself,
-                                                     &column,
-                                                     &expandableRows);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("lb",
-                            column,
-                            expandableRows);
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserColumnViewPath(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Handle path;
-#ifndef GetDataBrowserColumnViewPath
-       PyMac_PRECHECK(GetDataBrowserColumnViewPath);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &path))
-               return NULL;
-       _err = GetDataBrowserColumnViewPath(_self->ob_itself,
-                                           path);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserColumnViewPathLength(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 pathLength;
-#ifndef GetDataBrowserColumnViewPathLength
-       PyMac_PRECHECK(GetDataBrowserColumnViewPathLength);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserColumnViewPathLength(_self->ob_itself,
-                                                 &pathLength);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            pathLength);
-       return _res;
-}
-
-static PyObject *CtlObj_SetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType propertyType;
-#ifndef SetDataBrowserColumnViewDisplayType
-       PyMac_PRECHECK(SetDataBrowserColumnViewDisplayType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &propertyType))
-               return NULL;
-       _err = SetDataBrowserColumnViewDisplayType(_self->ob_itself,
-                                                  propertyType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *CtlObj_GetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType propertyType;
-#ifndef GetDataBrowserColumnViewDisplayType
-       PyMac_PRECHECK(GetDataBrowserColumnViewDisplayType);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDataBrowserColumnViewDisplayType(_self->ob_itself,
-                                                  &propertyType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildOSType, propertyType);
-       return _res;
-}
-
-static PyObject *CtlObj_as_Resource(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef as_Resource
-       PyMac_PRECHECK(as_Resource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = as_Resource(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *CtlObj_GetControlRect(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect rect;
-#ifndef GetControlRect
-       PyMac_PRECHECK(GetControlRect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetControlRect(_self->ob_itself,
-                      &rect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &rect);
-       return _res;
-}
-
-static PyObject *CtlObj_DisposeControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-               if (!PyArg_ParseTuple(_args, ""))
-                       return NULL;
-               if ( _self->ob_itself ) {
-                       SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
-                       DisposeControl(_self->ob_itself);
-                       _self->ob_itself = NULL;
-               }
-               Py_INCREF(Py_None);
-               _res = Py_None;
-               return _res;
-
-}
-
-static PyObject *CtlObj_TrackControl(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       ControlPartCode _rv;
-       Point startPoint;
-       ControlActionUPP upp = 0;
-       PyObject *callback = 0;
-
-       if (!PyArg_ParseTuple(_args, "O&|O",
-                             PyMac_GetPoint, &startPoint, &callback))
-               return NULL;
-       if (callback && callback != Py_None) {
-               if (PyLong_Check(callback) && PyLong_AS_LONG(callback) == -1)
-                       upp = (ControlActionUPP)-1;
-               else {
-                       settrackfunc(callback);
-                       upp = mytracker_upp;
-               }
-       }
-       _rv = TrackControl(_self->ob_itself,
-                          startPoint,
-                          upp);
-       clrtrackfunc();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-
-}
-
-static PyObject *CtlObj_HandleControlClick(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       ControlPartCode _rv;
-       Point startPoint;
-       SInt16 modifiers;
-       ControlActionUPP upp = 0;
-       PyObject *callback = 0;
-
-       if (!PyArg_ParseTuple(_args, "O&h|O",
-                             PyMac_GetPoint, &startPoint,
-                             &modifiers,
-                             &callback))
-               return NULL;
-       if (callback && callback != Py_None) {
-               if (PyLong_Check(callback) && PyLong_AS_LONG(callback) == -1)
-                       upp = (ControlActionUPP)-1;
-               else {
-                       settrackfunc(callback);
-                       upp = mytracker_upp;
-               }
-       }
-       _rv = HandleControlClick(_self->ob_itself,
-                          startPoint,
-                          modifiers,
-                          upp);
-       clrtrackfunc();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-
-}
-
-static PyObject *CtlObj_SetControlData(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       Size bufferSize;
-       Ptr buffer;
-
-       if (!PyArg_ParseTuple(_args, "hO&s#",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName,
-                             &buffer, &bufferSize))
-               return NULL;
-
-       _err = SetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             bufferSize,
-                             buffer);
-
-       if (_err != noErr)
-               return PyMac_Error(_err);
-       _res = Py_None;
-       return _res;
-
-}
-
-static PyObject *CtlObj_GetControlData(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       Size bufferSize;
-       Ptr buffer;
-       Size outSize;
-
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName))
-               return NULL;
-
-       /* allocate a buffer for the data */
-       _err = GetControlDataSize(_self->ob_itself,
-                                 inPart,
-                                 inTagName,
-                                 &bufferSize);
-       if (_err != noErr)
-               return PyMac_Error(_err);
-       buffer = PyMem_NEW(char, bufferSize);
-       if (buffer == NULL)
-               return PyErr_NoMemory();
-
-       _err = GetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             bufferSize,
-                             buffer,
-                             &outSize);
-
-       if (_err != noErr) {
-               PyMem_DEL(buffer);
-               return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("s#", buffer, outSize);
-       PyMem_DEL(buffer);
-       return _res;
-
-}
-
-static PyObject *CtlObj_SetControlData_Handle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       Handle buffer;
-
-       if (!PyArg_ParseTuple(_args, "hO&O&",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName,
-                             OptResObj_Convert, &buffer))
-               return NULL;
-
-       _err = SetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             sizeof(buffer),
-                             (Ptr)&buffer);
-
-       if (_err != noErr)
-               return PyMac_Error(_err);
-       _res = Py_None;
-       return _res;
-
-}
-
-static PyObject *CtlObj_GetControlData_Handle(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       Size bufferSize;
-       Handle hdl;
-
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName))
-               return NULL;
-
-       /* Check it is handle-sized */
-       _err = GetControlDataSize(_self->ob_itself,
-                                 inPart,
-                                 inTagName,
-                                 &bufferSize);
-       if (_err != noErr)
-               return PyMac_Error(_err);
-       if (bufferSize != sizeof(Handle)) {
-               PyErr_SetString(Ctl_Error, "GetControlDataSize() != sizeof(Handle)");
-               return NULL;
-       }
-
-       _err = GetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             sizeof(Handle),
-                             (Ptr)&hdl,
-                             &bufferSize);
-
-       if (_err != noErr) {
-               return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&", OptResObj_New, hdl);
-       return _res;
-
-}
-
-static PyObject *CtlObj_SetControlData_Callback(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       PyObject *callback;
-       UniversalProcPtr c_callback;
-
-       if (!PyArg_ParseTuple(_args, "hO&O",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName,
-                             &callback))
-               return NULL;
-
-       if ( setcallback((PyObject *)_self, inTagName, callback, &c_callback) < 0 )
-               return NULL;
-       _err = SetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             sizeof(c_callback),
-                             (Ptr)&c_callback);
-
-       if (_err != noErr)
-               return PyMac_Error(_err);
-       _res = Py_None;
-       return _res;
-
-}
-
-static PyMethodDef CtlObj_methods[] = {
-       {"HiliteControl", (PyCFunction)CtlObj_HiliteControl, 1,
-        PyDoc_STR("(ControlPartCode hiliteState) -> None")},
-       {"ShowControl", (PyCFunction)CtlObj_ShowControl, 1,
-        PyDoc_STR("() -> None")},
-       {"HideControl", (PyCFunction)CtlObj_HideControl, 1,
-        PyDoc_STR("() -> None")},
-       {"IsControlActive", (PyCFunction)CtlObj_IsControlActive, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"IsControlVisible", (PyCFunction)CtlObj_IsControlVisible, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"ActivateControl", (PyCFunction)CtlObj_ActivateControl, 1,
-        PyDoc_STR("() -> None")},
-       {"DeactivateControl", (PyCFunction)CtlObj_DeactivateControl, 1,
-        PyDoc_STR("() -> None")},
-       {"SetControlVisibility", (PyCFunction)CtlObj_SetControlVisibility, 1,
-        PyDoc_STR("(Boolean inIsVisible, Boolean inDoDraw) -> None")},
-       {"IsControlEnabled", (PyCFunction)CtlObj_IsControlEnabled, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"EnableControl", (PyCFunction)CtlObj_EnableControl, 1,
-        PyDoc_STR("() -> None")},
-       {"DisableControl", (PyCFunction)CtlObj_DisableControl, 1,
-        PyDoc_STR("() -> None")},
-       {"Draw1Control", (PyCFunction)CtlObj_Draw1Control, 1,
-        PyDoc_STR("() -> None")},
-       {"GetBestControlRect", (PyCFunction)CtlObj_GetBestControlRect, 1,
-        PyDoc_STR("() -> (Rect outRect, SInt16 outBaseLineOffset)")},
-       {"SetControlFontStyle", (PyCFunction)CtlObj_SetControlFontStyle, 1,
-        PyDoc_STR("(ControlFontStyleRec inStyle) -> None")},
-       {"DrawControlInCurrentPort", (PyCFunction)CtlObj_DrawControlInCurrentPort, 1,
-        PyDoc_STR("() -> None")},
-       {"SetUpControlBackground", (PyCFunction)CtlObj_SetUpControlBackground, 1,
-        PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> None")},
-       {"SetUpControlTextColor", (PyCFunction)CtlObj_SetUpControlTextColor, 1,
-        PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> None")},
-       {"DragControl", (PyCFunction)CtlObj_DragControl, 1,
-        PyDoc_STR("(Point startPoint, Rect limitRect, Rect slopRect, DragConstraint axis) -> None")},
-       {"TestControl", (PyCFunction)CtlObj_TestControl, 1,
-        PyDoc_STR("(Point testPoint) -> (ControlPartCode _rv)")},
-       {"HandleControlContextualMenuClick", (PyCFunction)CtlObj_HandleControlContextualMenuClick, 1,
-        PyDoc_STR("(Point inWhere) -> (Boolean menuDisplayed)")},
-       {"GetControlClickActivation", (PyCFunction)CtlObj_GetControlClickActivation, 1,
-        PyDoc_STR("(Point inWhere, EventModifiers inModifiers) -> (ClickActivationResult outResult)")},
-       {"HandleControlKey", (PyCFunction)CtlObj_HandleControlKey, 1,
-        PyDoc_STR("(SInt16 inKeyCode, SInt16 inCharCode, EventModifiers inModifiers) -> (ControlPartCode _rv)")},
-       {"HandleControlSetCursor", (PyCFunction)CtlObj_HandleControlSetCursor, 1,
-        PyDoc_STR("(Point localPoint, EventModifiers modifiers) -> (Boolean cursorWasSet)")},
-       {"MoveControl", (PyCFunction)CtlObj_MoveControl, 1,
-        PyDoc_STR("(SInt16 h, SInt16 v) -> None")},
-       {"SizeControl", (PyCFunction)CtlObj_SizeControl, 1,
-        PyDoc_STR("(SInt16 w, SInt16 h) -> None")},
-       {"SetControlTitle", (PyCFunction)CtlObj_SetControlTitle, 1,
-        PyDoc_STR("(Str255 title) -> None")},
-       {"GetControlTitle", (PyCFunction)CtlObj_GetControlTitle, 1,
-        PyDoc_STR("() -> (Str255 title)")},
-       {"SetControlTitleWithCFString", (PyCFunction)CtlObj_SetControlTitleWithCFString, 1,
-        PyDoc_STR("(CFStringRef inString) -> None")},
-       {"CopyControlTitleAsCFString", (PyCFunction)CtlObj_CopyControlTitleAsCFString, 1,
-        PyDoc_STR("() -> (CFStringRef outString)")},
-       {"GetControlValue", (PyCFunction)CtlObj_GetControlValue, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"SetControlValue", (PyCFunction)CtlObj_SetControlValue, 1,
-        PyDoc_STR("(SInt16 newValue) -> None")},
-       {"GetControlMinimum", (PyCFunction)CtlObj_GetControlMinimum, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"SetControlMinimum", (PyCFunction)CtlObj_SetControlMinimum, 1,
-        PyDoc_STR("(SInt16 newMinimum) -> None")},
-       {"GetControlMaximum", (PyCFunction)CtlObj_GetControlMaximum, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"SetControlMaximum", (PyCFunction)CtlObj_SetControlMaximum, 1,
-        PyDoc_STR("(SInt16 newMaximum) -> None")},
-       {"GetControlViewSize", (PyCFunction)CtlObj_GetControlViewSize, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"SetControlViewSize", (PyCFunction)CtlObj_SetControlViewSize, 1,
-        PyDoc_STR("(SInt32 newViewSize) -> None")},
-       {"GetControl32BitValue", (PyCFunction)CtlObj_GetControl32BitValue, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"SetControl32BitValue", (PyCFunction)CtlObj_SetControl32BitValue, 1,
-        PyDoc_STR("(SInt32 newValue) -> None")},
-       {"GetControl32BitMaximum", (PyCFunction)CtlObj_GetControl32BitMaximum, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"SetControl32BitMaximum", (PyCFunction)CtlObj_SetControl32BitMaximum, 1,
-        PyDoc_STR("(SInt32 newMaximum) -> None")},
-       {"GetControl32BitMinimum", (PyCFunction)CtlObj_GetControl32BitMinimum, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"SetControl32BitMinimum", (PyCFunction)CtlObj_SetControl32BitMinimum, 1,
-        PyDoc_STR("(SInt32 newMinimum) -> None")},
-       {"IsValidControlHandle", (PyCFunction)CtlObj_IsValidControlHandle, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"SetControlID", (PyCFunction)CtlObj_SetControlID, 1,
-        PyDoc_STR("(ControlID inID) -> None")},
-       {"GetControlID", (PyCFunction)CtlObj_GetControlID, 1,
-        PyDoc_STR("() -> (ControlID outID)")},
-       {"SetControlCommandID", (PyCFunction)CtlObj_SetControlCommandID, 1,
-        PyDoc_STR("(UInt32 inCommandID) -> None")},
-       {"GetControlCommandID", (PyCFunction)CtlObj_GetControlCommandID, 1,
-        PyDoc_STR("() -> (UInt32 outCommandID)")},
-       {"RemoveControlProperty", (PyCFunction)CtlObj_RemoveControlProperty, 1,
-        PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> None")},
-       {"GetControlPropertyAttributes", (PyCFunction)CtlObj_GetControlPropertyAttributes, 1,
-        PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
-       {"ChangeControlPropertyAttributes", (PyCFunction)CtlObj_ChangeControlPropertyAttributes, 1,
-        PyDoc_STR("(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
-       {"GetControlRegion", (PyCFunction)CtlObj_GetControlRegion, 1,
-        PyDoc_STR("(ControlPartCode inPart, RgnHandle outRegion) -> None")},
-       {"GetControlVariant", (PyCFunction)CtlObj_GetControlVariant, 1,
-        PyDoc_STR("() -> (ControlVariant _rv)")},
-       {"SetControlAction", (PyCFunction)CtlObj_SetControlAction, 1,
-        PyDoc_STR("(PyObject* actionProc) -> None")},
-       {"SetControlReference", (PyCFunction)CtlObj_SetControlReference, 1,
-        PyDoc_STR("(SInt32 data) -> None")},
-       {"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"EmbedControl", (PyCFunction)CtlObj_EmbedControl, 1,
-        PyDoc_STR("(ControlHandle inContainer) -> None")},
-       {"AutoEmbedControl", (PyCFunction)CtlObj_AutoEmbedControl, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"GetSuperControl", (PyCFunction)CtlObj_GetSuperControl, 1,
-        PyDoc_STR("() -> (ControlHandle outParent)")},
-       {"CountSubControls", (PyCFunction)CtlObj_CountSubControls, 1,
-        PyDoc_STR("() -> (UInt16 outNumChildren)")},
-       {"GetIndexedSubControl", (PyCFunction)CtlObj_GetIndexedSubControl, 1,
-        PyDoc_STR("(UInt16 inIndex) -> (ControlHandle outSubControl)")},
-       {"SetControlSupervisor", (PyCFunction)CtlObj_SetControlSupervisor, 1,
-        PyDoc_STR("(ControlHandle inBoss) -> None")},
-       {"GetControlFeatures", (PyCFunction)CtlObj_GetControlFeatures, 1,
-        PyDoc_STR("() -> (UInt32 outFeatures)")},
-       {"GetControlDataSize", (PyCFunction)CtlObj_GetControlDataSize, 1,
-        PyDoc_STR("(ControlPartCode inPart, ResType inTagName) -> (Size outMaxSize)")},
-       {"HandleControlDragTracking", (PyCFunction)CtlObj_HandleControlDragTracking, 1,
-        PyDoc_STR("(DragTrackingMessage inMessage, DragReference inDrag) -> (Boolean outLikesDrag)")},
-       {"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
-        PyDoc_STR("(DragReference inDrag) -> None")},
-       {"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
-        PyDoc_STR("(Boolean inTracks) -> None")},
-       {"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
-        PyDoc_STR("() -> (Boolean outTracks)")},
-       {"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
-        PyDoc_STR("() -> (Rect bounds)")},
-       {"IsControlHilited", (PyCFunction)CtlObj_IsControlHilited, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"GetControlHilite", (PyCFunction)CtlObj_GetControlHilite, 1,
-        PyDoc_STR("() -> (UInt16 _rv)")},
-       {"GetControlOwner", (PyCFunction)CtlObj_GetControlOwner, 1,
-        PyDoc_STR("() -> (WindowPtr _rv)")},
-       {"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"GetControlPopupMenuHandle", (PyCFunction)CtlObj_GetControlPopupMenuHandle, 1,
-        PyDoc_STR("() -> (MenuHandle _rv)")},
-       {"GetControlPopupMenuID", (PyCFunction)CtlObj_GetControlPopupMenuID, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"SetControlDataHandle", (PyCFunction)CtlObj_SetControlDataHandle, 1,
-        PyDoc_STR("(Handle dataHandle) -> None")},
-       {"SetControlBounds", (PyCFunction)CtlObj_SetControlBounds, 1,
-        PyDoc_STR("(Rect bounds) -> None")},
-       {"SetControlPopupMenuHandle", (PyCFunction)CtlObj_SetControlPopupMenuHandle, 1,
-        PyDoc_STR("(MenuHandle popupMenu) -> None")},
-       {"SetControlPopupMenuID", (PyCFunction)CtlObj_SetControlPopupMenuID, 1,
-        PyDoc_STR("(short menuID) -> None")},
-       {"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
-        PyDoc_STR("() -> (SInt16 outValue)")},
-       {"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
-        PyDoc_STR("(SInt16 inValue) -> None")},
-       {"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
-        PyDoc_STR("() -> (MenuHandle outHandle)")},
-       {"SetBevelButtonContentInfo", (PyCFunction)CtlObj_SetBevelButtonContentInfo, 1,
-        PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
-       {"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
-        PyDoc_STR("(IconTransformType transform) -> None")},
-       {"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
-        PyDoc_STR("(SInt16 inValue) -> None")},
-       {"GetTabContentRect", (PyCFunction)CtlObj_GetTabContentRect, 1,
-        PyDoc_STR("() -> (Rect outContentRect)")},
-       {"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
-        PyDoc_STR("(SInt16 inTabToHilite, Boolean inEnabled) -> None")},
-       {"SetImageWellContentInfo", (PyCFunction)CtlObj_SetImageWellContentInfo, 1,
-        PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
-       {"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
-        PyDoc_STR("(IconTransformType inTransform) -> None")},
-       {"GetDataBrowserViewStyle", (PyCFunction)CtlObj_GetDataBrowserViewStyle, 1,
-        PyDoc_STR("() -> (OSType style)")},
-       {"SetDataBrowserViewStyle", (PyCFunction)CtlObj_SetDataBrowserViewStyle, 1,
-        PyDoc_STR("(OSType style) -> None")},
-       {"EnableDataBrowserEditCommand", (PyCFunction)CtlObj_EnableDataBrowserEditCommand, 1,
-        PyDoc_STR("(UInt32 command) -> (Boolean _rv)")},
-       {"ExecuteDataBrowserEditCommand", (PyCFunction)CtlObj_ExecuteDataBrowserEditCommand, 1,
-        PyDoc_STR("(UInt32 command) -> None")},
-       {"GetDataBrowserSelectionAnchor", (PyCFunction)CtlObj_GetDataBrowserSelectionAnchor, 1,
-        PyDoc_STR("() -> (UInt32 first, UInt32 last)")},
-       {"MoveDataBrowserSelectionAnchor", (PyCFunction)CtlObj_MoveDataBrowserSelectionAnchor, 1,
-        PyDoc_STR("(UInt32 direction, Boolean extendSelection) -> None")},
-       {"OpenDataBrowserContainer", (PyCFunction)CtlObj_OpenDataBrowserContainer, 1,
-        PyDoc_STR("(UInt32 container) -> None")},
-       {"CloseDataBrowserContainer", (PyCFunction)CtlObj_CloseDataBrowserContainer, 1,
-        PyDoc_STR("(UInt32 container) -> None")},
-       {"SortDataBrowserContainer", (PyCFunction)CtlObj_SortDataBrowserContainer, 1,
-        PyDoc_STR("(UInt32 container, Boolean sortChildren) -> None")},
-       {"GetDataBrowserItems", (PyCFunction)CtlObj_GetDataBrowserItems, 1,
-        PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state, Handle items) -> None")},
-       {"GetDataBrowserItemCount", (PyCFunction)CtlObj_GetDataBrowserItemCount, 1,
-        PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state) -> (UInt32 numItems)")},
-       {"IsDataBrowserItemSelected", (PyCFunction)CtlObj_IsDataBrowserItemSelected, 1,
-        PyDoc_STR("(UInt32 item) -> (Boolean _rv)")},
-       {"GetDataBrowserItemState", (PyCFunction)CtlObj_GetDataBrowserItemState, 1,
-        PyDoc_STR("(UInt32 item) -> (UInt32 state)")},
-       {"RevealDataBrowserItem", (PyCFunction)CtlObj_RevealDataBrowserItem, 1,
-        PyDoc_STR("(UInt32 item, UInt32 propertyID, UInt8 options) -> None")},
-       {"SetDataBrowserActiveItems", (PyCFunction)CtlObj_SetDataBrowserActiveItems, 1,
-        PyDoc_STR("(Boolean active) -> None")},
-       {"GetDataBrowserActiveItems", (PyCFunction)CtlObj_GetDataBrowserActiveItems, 1,
-        PyDoc_STR("() -> (Boolean active)")},
-       {"SetDataBrowserScrollBarInset", (PyCFunction)CtlObj_SetDataBrowserScrollBarInset, 1,
-        PyDoc_STR("() -> (Rect insetRect)")},
-       {"GetDataBrowserScrollBarInset", (PyCFunction)CtlObj_GetDataBrowserScrollBarInset, 1,
-        PyDoc_STR("() -> (Rect insetRect)")},
-       {"SetDataBrowserTarget", (PyCFunction)CtlObj_SetDataBrowserTarget, 1,
-        PyDoc_STR("(UInt32 target) -> None")},
-       {"GetDataBrowserTarget", (PyCFunction)CtlObj_GetDataBrowserTarget, 1,
-        PyDoc_STR("() -> (UInt32 target)")},
-       {"SetDataBrowserSortOrder", (PyCFunction)CtlObj_SetDataBrowserSortOrder, 1,
-        PyDoc_STR("(UInt16 order) -> None")},
-       {"GetDataBrowserSortOrder", (PyCFunction)CtlObj_GetDataBrowserSortOrder, 1,
-        PyDoc_STR("() -> (UInt16 order)")},
-       {"SetDataBrowserScrollPosition", (PyCFunction)CtlObj_SetDataBrowserScrollPosition, 1,
-        PyDoc_STR("(UInt32 top, UInt32 left) -> None")},
-       {"GetDataBrowserScrollPosition", (PyCFunction)CtlObj_GetDataBrowserScrollPosition, 1,
-        PyDoc_STR("() -> (UInt32 top, UInt32 left)")},
-       {"SetDataBrowserHasScrollBars", (PyCFunction)CtlObj_SetDataBrowserHasScrollBars, 1,
-        PyDoc_STR("(Boolean horiz, Boolean vert) -> None")},
-       {"GetDataBrowserHasScrollBars", (PyCFunction)CtlObj_GetDataBrowserHasScrollBars, 1,
-        PyDoc_STR("() -> (Boolean horiz, Boolean vert)")},
-       {"SetDataBrowserSortProperty", (PyCFunction)CtlObj_SetDataBrowserSortProperty, 1,
-        PyDoc_STR("(UInt32 property) -> None")},
-       {"GetDataBrowserSortProperty", (PyCFunction)CtlObj_GetDataBrowserSortProperty, 1,
-        PyDoc_STR("() -> (UInt32 property)")},
-       {"SetDataBrowserSelectionFlags", (PyCFunction)CtlObj_SetDataBrowserSelectionFlags, 1,
-        PyDoc_STR("(UInt32 selectionFlags) -> None")},
-       {"GetDataBrowserSelectionFlags", (PyCFunction)CtlObj_GetDataBrowserSelectionFlags, 1,
-        PyDoc_STR("() -> (UInt32 selectionFlags)")},
-       {"SetDataBrowserPropertyFlags", (PyCFunction)CtlObj_SetDataBrowserPropertyFlags, 1,
-        PyDoc_STR("(UInt32 property, UInt32 flags) -> None")},
-       {"GetDataBrowserPropertyFlags", (PyCFunction)CtlObj_GetDataBrowserPropertyFlags, 1,
-        PyDoc_STR("(UInt32 property) -> (UInt32 flags)")},
-       {"SetDataBrowserEditText", (PyCFunction)CtlObj_SetDataBrowserEditText, 1,
-        PyDoc_STR("(CFStringRef text) -> None")},
-       {"CopyDataBrowserEditText", (PyCFunction)CtlObj_CopyDataBrowserEditText, 1,
-        PyDoc_STR("() -> (CFStringRef text)")},
-       {"GetDataBrowserEditText", (PyCFunction)CtlObj_GetDataBrowserEditText, 1,
-        PyDoc_STR("(CFMutableStringRef text) -> None")},
-       {"SetDataBrowserEditItem", (PyCFunction)CtlObj_SetDataBrowserEditItem, 1,
-        PyDoc_STR("(UInt32 item, UInt32 property) -> None")},
-       {"GetDataBrowserEditItem", (PyCFunction)CtlObj_GetDataBrowserEditItem, 1,
-        PyDoc_STR("() -> (UInt32 item, UInt32 property)")},
-       {"GetDataBrowserItemPartBounds", (PyCFunction)CtlObj_GetDataBrowserItemPartBounds, 1,
-        PyDoc_STR("(UInt32 item, UInt32 property, OSType part) -> (Rect bounds)")},
-       {"RemoveDataBrowserTableViewColumn", (PyCFunction)CtlObj_RemoveDataBrowserTableViewColumn, 1,
-        PyDoc_STR("(UInt32 column) -> None")},
-       {"GetDataBrowserTableViewColumnCount", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnCount, 1,
-        PyDoc_STR("() -> (UInt32 numColumns)")},
-       {"SetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_SetDataBrowserTableViewHiliteStyle, 1,
-        PyDoc_STR("(UInt32 hiliteStyle) -> None")},
-       {"GetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_GetDataBrowserTableViewHiliteStyle, 1,
-        PyDoc_STR("() -> (UInt32 hiliteStyle)")},
-       {"SetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewRowHeight, 1,
-        PyDoc_STR("(UInt16 height) -> None")},
-       {"GetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewRowHeight, 1,
-        PyDoc_STR("() -> (UInt16 height)")},
-       {"SetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnWidth, 1,
-        PyDoc_STR("(UInt16 width) -> None")},
-       {"GetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnWidth, 1,
-        PyDoc_STR("() -> (UInt16 width)")},
-       {"SetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRowHeight, 1,
-        PyDoc_STR("(UInt32 item, UInt16 height) -> None")},
-       {"GetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRowHeight, 1,
-        PyDoc_STR("(UInt32 item) -> (UInt16 height)")},
-       {"SetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewNamedColumnWidth, 1,
-        PyDoc_STR("(UInt32 column, UInt16 width) -> None")},
-       {"GetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewNamedColumnWidth, 1,
-        PyDoc_STR("(UInt32 column) -> (UInt16 width)")},
-       {"SetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_SetDataBrowserTableViewGeometry, 1,
-        PyDoc_STR("(Boolean variableWidthColumns, Boolean variableHeightRows) -> None")},
-       {"GetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_GetDataBrowserTableViewGeometry, 1,
-        PyDoc_STR("() -> (Boolean variableWidthColumns, Boolean variableHeightRows)")},
-       {"GetDataBrowserTableViewItemID", (PyCFunction)CtlObj_GetDataBrowserTableViewItemID, 1,
-        PyDoc_STR("(UInt32 row) -> (UInt32 item)")},
-       {"SetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRow, 1,
-        PyDoc_STR("(UInt32 item, UInt32 row) -> None")},
-       {"GetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRow, 1,
-        PyDoc_STR("(UInt32 item) -> (UInt32 row)")},
-       {"SetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnPosition, 1,
-        PyDoc_STR("(UInt32 column, UInt32 position) -> None")},
-       {"GetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnPosition, 1,
-        PyDoc_STR("(UInt32 column) -> (UInt32 position)")},
-       {"GetDataBrowserTableViewColumnProperty", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnProperty, 1,
-        PyDoc_STR("(UInt32 column) -> (UInt32 property)")},
-       {"AutoSizeDataBrowserListViewColumns", (PyCFunction)CtlObj_AutoSizeDataBrowserListViewColumns, 1,
-        PyDoc_STR("() -> None")},
-       {"AddDataBrowserListViewColumn", (PyCFunction)CtlObj_AddDataBrowserListViewColumn, 1,
-        PyDoc_STR("(DataBrowserListViewColumnDesc columnDesc, UInt32 position) -> None")},
-       {"SetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_SetDataBrowserListViewHeaderBtnHeight, 1,
-        PyDoc_STR("(UInt16 height) -> None")},
-       {"GetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_GetDataBrowserListViewHeaderBtnHeight, 1,
-        PyDoc_STR("() -> (UInt16 height)")},
-       {"SetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_SetDataBrowserListViewUsePlainBackground, 1,
-        PyDoc_STR("(Boolean usePlainBackground) -> None")},
-       {"GetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_GetDataBrowserListViewUsePlainBackground, 1,
-        PyDoc_STR("() -> (Boolean usePlainBackground)")},
-       {"SetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_SetDataBrowserListViewDisclosureColumn, 1,
-        PyDoc_STR("(UInt32 column, Boolean expandableRows) -> None")},
-       {"GetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_GetDataBrowserListViewDisclosureColumn, 1,
-        PyDoc_STR("() -> (UInt32 column, Boolean expandableRows)")},
-       {"GetDataBrowserColumnViewPath", (PyCFunction)CtlObj_GetDataBrowserColumnViewPath, 1,
-        PyDoc_STR("(Handle path) -> None")},
-       {"GetDataBrowserColumnViewPathLength", (PyCFunction)CtlObj_GetDataBrowserColumnViewPathLength, 1,
-        PyDoc_STR("() -> (UInt32 pathLength)")},
-       {"SetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_SetDataBrowserColumnViewDisplayType, 1,
-        PyDoc_STR("(OSType propertyType) -> None")},
-       {"GetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_GetDataBrowserColumnViewDisplayType, 1,
-        PyDoc_STR("() -> (OSType propertyType)")},
-       {"as_Resource", (PyCFunction)CtlObj_as_Resource, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"GetControlRect", (PyCFunction)CtlObj_GetControlRect, 1,
-        PyDoc_STR("() -> (Rect rect)")},
-       {"DisposeControl", (PyCFunction)CtlObj_DisposeControl, 1,
-        PyDoc_STR("() -> None")},
-       {"TrackControl", (PyCFunction)CtlObj_TrackControl, 1,
-        PyDoc_STR("(Point startPoint [,trackercallback]) -> (ControlPartCode _rv)")},
-       {"HandleControlClick", (PyCFunction)CtlObj_HandleControlClick, 1,
-        PyDoc_STR("(Point startPoint, Integer modifiers, [,trackercallback]) -> (ControlPartCode _rv)")},
-       {"SetControlData", (PyCFunction)CtlObj_SetControlData, 1,
-        PyDoc_STR("(stuff) -> None")},
-       {"GetControlData", (PyCFunction)CtlObj_GetControlData, 1,
-        PyDoc_STR("(part, type) -> String")},
-       {"SetControlData_Handle", (PyCFunction)CtlObj_SetControlData_Handle, 1,
-        PyDoc_STR("(ResObj) -> None")},
-       {"GetControlData_Handle", (PyCFunction)CtlObj_GetControlData_Handle, 1,
-        PyDoc_STR("(part, type) -> ResObj")},
-       {"SetControlData_Callback", (PyCFunction)CtlObj_SetControlData_Callback, 1,
-        PyDoc_STR("(callbackfunc) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define CtlObj_getsetlist NULL
-
-
-static int CtlObj_compare(ControlObject *self, ControlObject *other)
-{
-       unsigned long v, w;
-
-       if (!CtlObj_Check((PyObject *)other))
-       {
-               v=(unsigned long)self;
-               w=(unsigned long)other;
-       }
-       else
-       {
-               v=(unsigned long)self->ob_itself;
-               w=(unsigned long)other->ob_itself;
-       }
-       if( v < w ) return -1;
-       if( v > w ) return 1;
-       return 0;
-}
-
-#define CtlObj_repr NULL
-
-static long CtlObj_hash(ControlObject *self)
-{
-       return (long)self->ob_itself;
-}
-#define CtlObj_tp_init 0
-
-#define CtlObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *CtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       ControlHandle itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CtlObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((ControlObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define CtlObj_tp_free PyObject_Del
-
-
-PyTypeObject Control_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Ctl.Control", /*tp_name*/
-       sizeof(ControlObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CtlObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) CtlObj_compare, /*tp_compare*/
-       (reprfunc) CtlObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CtlObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       CtlObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       CtlObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       CtlObj_tp_init, /* tp_init */
-       CtlObj_tp_alloc, /* tp_alloc */
-       CtlObj_tp_new, /* tp_new */
-       CtlObj_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type Control --------------------- */
-
-
-static PyObject *Ctl_NewControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlHandle _rv;
-       WindowPtr owningWindow;
-       Rect boundsRect;
-       Str255 controlTitle;
-       Boolean initiallyVisible;
-       SInt16 initialValue;
-       SInt16 minimumValue;
-       SInt16 maximumValue;
-       SInt16 procID;
-       SInt32 controlReference;
-#ifndef NewControl
-       PyMac_PRECHECK(NewControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&bhhhhl",
-                             WinObj_Convert, &owningWindow,
-                             PyMac_GetRect, &boundsRect,
-                             PyMac_GetStr255, controlTitle,
-                             &initiallyVisible,
-                             &initialValue,
-                             &minimumValue,
-                             &maximumValue,
-                             &procID,
-                             &controlReference))
-               return NULL;
-       _rv = NewControl(owningWindow,
-                        &boundsRect,
-                        controlTitle,
-                        initiallyVisible,
-                        initialValue,
-                        minimumValue,
-                        maximumValue,
-                        procID,
-                        controlReference);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Ctl_GetNewControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlHandle _rv;
-       SInt16 resourceID;
-       WindowPtr owningWindow;
-#ifndef GetNewControl
-       PyMac_PRECHECK(GetNewControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &resourceID,
-                             WinObj_Convert, &owningWindow))
-               return NULL;
-       _rv = GetNewControl(resourceID,
-                           owningWindow);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Ctl_DrawControls(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr theWindow;
-#ifndef DrawControls
-       PyMac_PRECHECK(DrawControls);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &theWindow))
-               return NULL;
-       DrawControls(theWindow);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ctl_UpdateControls(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr inWindow;
-       RgnHandle inUpdateRegion;
-#ifndef UpdateControls
-       PyMac_PRECHECK(UpdateControls);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &inWindow,
-                             ResObj_Convert, &inUpdateRegion))
-               return NULL;
-       UpdateControls(inWindow,
-                      inUpdateRegion);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ctl_FindControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlPartCode _rv;
-       Point testPoint;
-       WindowPtr theWindow;
-       ControlHandle theControl;
-#ifndef FindControl
-       PyMac_PRECHECK(FindControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &testPoint,
-                             WinObj_Convert, &theWindow))
-               return NULL;
-       _rv = FindControl(testPoint,
-                         theWindow,
-                         &theControl);
-       _res = Py_BuildValue("hO&",
-                            _rv,
-                            CtlObj_WhichControl, theControl);
-       return _res;
-}
-
-static PyObject *Ctl_IdleControls(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr inWindow;
-#ifndef IdleControls
-       PyMac_PRECHECK(IdleControls);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       IdleControls(inWindow);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ctl_GetControlByID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       ControlID inID;
-       ControlHandle outControl;
-#ifndef GetControlByID
-       PyMac_PRECHECK(GetControlByID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &inWindow,
-                             PyControlID_Convert, &inID))
-               return NULL;
-       _err = GetControlByID(inWindow,
-                             &inID,
-                             &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_WhichControl, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_DumpControlHierarchy(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-       FSSpec inDumpFile;
-#ifndef DumpControlHierarchy
-       PyMac_PRECHECK(DumpControlHierarchy);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &inWindow,
-                             PyMac_GetFSSpec, &inDumpFile))
-               return NULL;
-       _err = DumpControlHierarchy(inWindow,
-                                   &inDumpFile);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ctl_CreateRootControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-       ControlHandle outControl;
-#ifndef CreateRootControl
-       PyMac_PRECHECK(CreateRootControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = CreateRootControl(inWindow,
-                                &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_GetRootControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-       ControlHandle outControl;
-#ifndef GetRootControl
-       PyMac_PRECHECK(GetRootControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = GetRootControl(inWindow,
-                             &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_WhichControl, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_GetKeyboardFocus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-       ControlHandle outControl;
-#ifndef GetKeyboardFocus
-       PyMac_PRECHECK(GetKeyboardFocus);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = GetKeyboardFocus(inWindow,
-                               &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_WhichControl, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_SetKeyboardFocus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-       ControlHandle inControl;
-       ControlFocusPart inPart;
-#ifndef SetKeyboardFocus
-       PyMac_PRECHECK(SetKeyboardFocus);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             WinObj_Convert, &inWindow,
-                             CtlObj_Convert, &inControl,
-                             &inPart))
-               return NULL;
-       _err = SetKeyboardFocus(inWindow,
-                               inControl,
-                               inPart);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ctl_AdvanceKeyboardFocus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-#ifndef AdvanceKeyboardFocus
-       PyMac_PRECHECK(AdvanceKeyboardFocus);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = AdvanceKeyboardFocus(inWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ctl_ReverseKeyboardFocus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-#ifndef ReverseKeyboardFocus
-       PyMac_PRECHECK(ReverseKeyboardFocus);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = ReverseKeyboardFocus(inWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ctl_ClearKeyboardFocus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-#ifndef ClearKeyboardFocus
-       PyMac_PRECHECK(ClearKeyboardFocus);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = ClearKeyboardFocus(inWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       Boolean inTracks;
-#ifndef SetAutomaticControlDragTrackingEnabledForWindow
-       PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             WinObj_Convert, &inWindow,
-                             &inTracks))
-               return NULL;
-       _err = SetAutomaticControlDragTrackingEnabledForWindow(inWindow,
-                                                              inTracks);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       Boolean outTracks;
-#ifndef IsAutomaticControlDragTrackingEnabledForWindow
-       PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _err = IsAutomaticControlDragTrackingEnabledForWindow(inWindow,
-                                                             &outTracks);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            outTracks);
-       return _res;
-}
-
-static PyObject *Ctl_CreateBevelButtonControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef title;
-       UInt16 thickness;
-       UInt16 behavior;
-       ControlButtonContentInfo info;
-       SInt16 menuID;
-       UInt16 menuBehavior;
-       UInt16 menuPlacement;
-       ControlHandle outControl;
-#ifndef CreateBevelButtonControl
-       PyMac_PRECHECK(CreateBevelButtonControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&HHO&hHH",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &title,
-                             &thickness,
-                             &behavior,
-                             ControlButtonContentInfo_Convert, &info,
-                             &menuID,
-                             &menuBehavior,
-                             &menuPlacement))
-               return NULL;
-       _err = CreateBevelButtonControl(window,
-                                       &boundsRect,
-                                       title,
-                                       thickness,
-                                       behavior,
-                                       &info,
-                                       menuID,
-                                       menuBehavior,
-                                       menuPlacement,
-                                       &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateSliderControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       SInt32 value;
-       SInt32 minimum;
-       SInt32 maximum;
-       UInt16 orientation;
-       UInt16 numTickMarks;
-       Boolean liveTracking;
-       PyObject* liveTrackingProc;
-       UniversalProcPtr c_callback;
-       ControlHandle outControl;
-#ifndef CreateSliderControl
-       PyMac_PRECHECK(CreateSliderControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lllHHbO",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &value,
-                             &minimum,
-                             &maximum,
-                             &orientation,
-                             &numTickMarks,
-                             &liveTracking,
-                             &liveTrackingProc))
-               return NULL;
-       _err = CreateSliderControl(window,
-                                  &boundsRect,
-                                  value,
-                                  minimum,
-                                  maximum,
-                                  orientation,
-                                  numTickMarks,
-                                  liveTracking,
-                                  myactionproc_upp,
-                                  &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
-       return _res;
-}
-
-static PyObject *Ctl_CreateDisclosureTriangleControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       Rect inBoundsRect;
-       UInt16 inOrientation;
-       CFStringRef inTitle;
-       SInt32 inInitialValue;
-       Boolean inDrawTitle;
-       Boolean inAutoToggles;
-       ControlHandle outControl;
-#ifndef CreateDisclosureTriangleControl
-       PyMac_PRECHECK(CreateDisclosureTriangleControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&HO&lbb",
-                             WinObj_Convert, &inWindow,
-                             PyMac_GetRect, &inBoundsRect,
-                             &inOrientation,
-                             CFStringRefObj_Convert, &inTitle,
-                             &inInitialValue,
-                             &inDrawTitle,
-                             &inAutoToggles))
-               return NULL;
-       _err = CreateDisclosureTriangleControl(inWindow,
-                                              &inBoundsRect,
-                                              inOrientation,
-                                              inTitle,
-                                              inInitialValue,
-                                              inDrawTitle,
-                                              inAutoToggles,
-                                              &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateProgressBarControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       SInt32 value;
-       SInt32 minimum;
-       SInt32 maximum;
-       Boolean indeterminate;
-       ControlHandle outControl;
-#ifndef CreateProgressBarControl
-       PyMac_PRECHECK(CreateProgressBarControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lllb",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &value,
-                             &minimum,
-                             &maximum,
-                             &indeterminate))
-               return NULL;
-       _err = CreateProgressBarControl(window,
-                                       &boundsRect,
-                                       value,
-                                       minimum,
-                                       maximum,
-                                       indeterminate,
-                                       &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateRelevanceBarControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       SInt32 value;
-       SInt32 minimum;
-       SInt32 maximum;
-       ControlHandle outControl;
-#ifndef CreateRelevanceBarControl
-       PyMac_PRECHECK(CreateRelevanceBarControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lll",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &value,
-                             &minimum,
-                             &maximum))
-               return NULL;
-       _err = CreateRelevanceBarControl(window,
-                                        &boundsRect,
-                                        value,
-                                        minimum,
-                                        maximum,
-                                        &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateLittleArrowsControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       SInt32 value;
-       SInt32 minimum;
-       SInt32 maximum;
-       SInt32 increment;
-       ControlHandle outControl;
-#ifndef CreateLittleArrowsControl
-       PyMac_PRECHECK(CreateLittleArrowsControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&llll",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &value,
-                             &minimum,
-                             &maximum,
-                             &increment))
-               return NULL;
-       _err = CreateLittleArrowsControl(window,
-                                        &boundsRect,
-                                        value,
-                                        minimum,
-                                        maximum,
-                                        increment,
-                                        &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateChasingArrowsControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       ControlHandle outControl;
-#ifndef CreateChasingArrowsControl
-       PyMac_PRECHECK(CreateChasingArrowsControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect))
-               return NULL;
-       _err = CreateChasingArrowsControl(window,
-                                         &boundsRect,
-                                         &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateSeparatorControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       ControlHandle outControl;
-#ifndef CreateSeparatorControl
-       PyMac_PRECHECK(CreateSeparatorControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect))
-               return NULL;
-       _err = CreateSeparatorControl(window,
-                                     &boundsRect,
-                                     &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateGroupBoxControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef title;
-       Boolean primary;
-       ControlHandle outControl;
-#ifndef CreateGroupBoxControl
-       PyMac_PRECHECK(CreateGroupBoxControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&b",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &title,
-                             &primary))
-               return NULL;
-       _err = CreateGroupBoxControl(window,
-                                    &boundsRect,
-                                    title,
-                                    primary,
-                                    &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateCheckGroupBoxControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef title;
-       SInt32 initialValue;
-       Boolean primary;
-       Boolean autoToggle;
-       ControlHandle outControl;
-#ifndef CreateCheckGroupBoxControl
-       PyMac_PRECHECK(CreateCheckGroupBoxControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&lbb",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &title,
-                             &initialValue,
-                             &primary,
-                             &autoToggle))
-               return NULL;
-       _err = CreateCheckGroupBoxControl(window,
-                                         &boundsRect,
-                                         title,
-                                         initialValue,
-                                         primary,
-                                         autoToggle,
-                                         &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreatePopupGroupBoxControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef title;
-       Boolean primary;
-       SInt16 menuID;
-       Boolean variableWidth;
-       SInt16 titleWidth;
-       SInt16 titleJustification;
-       Style titleStyle;
-       ControlHandle outControl;
-#ifndef CreatePopupGroupBoxControl
-       PyMac_PRECHECK(CreatePopupGroupBoxControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&bhbhhb",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &title,
-                             &primary,
-                             &menuID,
-                             &variableWidth,
-                             &titleWidth,
-                             &titleJustification,
-                             &titleStyle))
-               return NULL;
-       _err = CreatePopupGroupBoxControl(window,
-                                         &boundsRect,
-                                         title,
-                                         primary,
-                                         menuID,
-                                         variableWidth,
-                                         titleWidth,
-                                         titleJustification,
-                                         titleStyle,
-                                         &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateImageWellControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       ControlButtonContentInfo info;
-       ControlHandle outControl;
-#ifndef CreateImageWellControl
-       PyMac_PRECHECK(CreateImageWellControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             ControlButtonContentInfo_Convert, &info))
-               return NULL;
-       _err = CreateImageWellControl(window,
-                                     &boundsRect,
-                                     &info,
-                                     &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreatePopupArrowControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       UInt16 orientation;
-       UInt16 size;
-       ControlHandle outControl;
-#ifndef CreatePopupArrowControl
-       PyMac_PRECHECK(CreatePopupArrowControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&HH",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &orientation,
-                             &size))
-               return NULL;
-       _err = CreatePopupArrowControl(window,
-                                      &boundsRect,
-                                      orientation,
-                                      size,
-                                      &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreatePlacardControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       ControlHandle outControl;
-#ifndef CreatePlacardControl
-       PyMac_PRECHECK(CreatePlacardControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect))
-               return NULL;
-       _err = CreatePlacardControl(window,
-                                   &boundsRect,
-                                   &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateClockControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       UInt16 clockType;
-       UInt32 clockFlags;
-       ControlHandle outControl;
-#ifndef CreateClockControl
-       PyMac_PRECHECK(CreateClockControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&Hl",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &clockType,
-                             &clockFlags))
-               return NULL;
-       _err = CreateClockControl(window,
-                                 &boundsRect,
-                                 clockType,
-                                 clockFlags,
-                                 &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateUserPaneControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       UInt32 features;
-       ControlHandle outControl;
-#ifndef CreateUserPaneControl
-       PyMac_PRECHECK(CreateUserPaneControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &features))
-               return NULL;
-       _err = CreateUserPaneControl(window,
-                                    &boundsRect,
-                                    features,
-                                    &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateEditTextControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef text;
-       Boolean isPassword;
-       Boolean useInlineInput;
-       ControlFontStyleRec style;
-       ControlHandle outControl;
-#ifndef CreateEditTextControl
-       PyMac_PRECHECK(CreateEditTextControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&bbO&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &text,
-                             &isPassword,
-                             &useInlineInput,
-                             ControlFontStyle_Convert, &style))
-               return NULL;
-       _err = CreateEditTextControl(window,
-                                    &boundsRect,
-                                    text,
-                                    isPassword,
-                                    useInlineInput,
-                                    &style,
-                                    &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateStaticTextControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef text;
-       ControlFontStyleRec style;
-       ControlHandle outControl;
-#ifndef CreateStaticTextControl
-       PyMac_PRECHECK(CreateStaticTextControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &text,
-                             ControlFontStyle_Convert, &style))
-               return NULL;
-       _err = CreateStaticTextControl(window,
-                                      &boundsRect,
-                                      text,
-                                      &style,
-                                      &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreatePictureControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       ControlButtonContentInfo content;
-       Boolean dontTrack;
-       ControlHandle outControl;
-#ifndef CreatePictureControl
-       PyMac_PRECHECK(CreatePictureControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&b",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             ControlButtonContentInfo_Convert, &content,
-                             &dontTrack))
-               return NULL;
-       _err = CreatePictureControl(window,
-                                   &boundsRect,
-                                   &content,
-                                   dontTrack,
-                                   &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateIconControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       Rect inBoundsRect;
-       ControlButtonContentInfo inIconContent;
-       Boolean inDontTrack;
-       ControlHandle outControl;
-#ifndef CreateIconControl
-       PyMac_PRECHECK(CreateIconControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&b",
-                             WinObj_Convert, &inWindow,
-                             PyMac_GetRect, &inBoundsRect,
-                             ControlButtonContentInfo_Convert, &inIconContent,
-                             &inDontTrack))
-               return NULL;
-       _err = CreateIconControl(inWindow,
-                                &inBoundsRect,
-                                &inIconContent,
-                                inDontTrack,
-                                &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateWindowHeaderControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       Boolean isListHeader;
-       ControlHandle outControl;
-#ifndef CreateWindowHeaderControl
-       PyMac_PRECHECK(CreateWindowHeaderControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&b",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &isListHeader))
-               return NULL;
-       _err = CreateWindowHeaderControl(window,
-                                        &boundsRect,
-                                        isListHeader,
-                                        &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreatePushButtonControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef title;
-       ControlHandle outControl;
-#ifndef CreatePushButtonControl
-       PyMac_PRECHECK(CreatePushButtonControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &title))
-               return NULL;
-       _err = CreatePushButtonControl(window,
-                                      &boundsRect,
-                                      title,
-                                      &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreatePushButtonWithIconControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef title;
-       ControlButtonContentInfo icon;
-       UInt16 iconAlignment;
-       ControlHandle outControl;
-#ifndef CreatePushButtonWithIconControl
-       PyMac_PRECHECK(CreatePushButtonWithIconControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&H",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &title,
-                             ControlButtonContentInfo_Convert, &icon,
-                             &iconAlignment))
-               return NULL;
-       _err = CreatePushButtonWithIconControl(window,
-                                              &boundsRect,
-                                              title,
-                                              &icon,
-                                              iconAlignment,
-                                              &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateRadioButtonControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef title;
-       SInt32 initialValue;
-       Boolean autoToggle;
-       ControlHandle outControl;
-#ifndef CreateRadioButtonControl
-       PyMac_PRECHECK(CreateRadioButtonControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&lb",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &title,
-                             &initialValue,
-                             &autoToggle))
-               return NULL;
-       _err = CreateRadioButtonControl(window,
-                                       &boundsRect,
-                                       title,
-                                       initialValue,
-                                       autoToggle,
-                                       &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateCheckBoxControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef title;
-       SInt32 initialValue;
-       Boolean autoToggle;
-       ControlHandle outControl;
-#ifndef CreateCheckBoxControl
-       PyMac_PRECHECK(CreateCheckBoxControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&lb",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &title,
-                             &initialValue,
-                             &autoToggle))
-               return NULL;
-       _err = CreateCheckBoxControl(window,
-                                    &boundsRect,
-                                    title,
-                                    initialValue,
-                                    autoToggle,
-                                    &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateScrollBarControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       SInt32 value;
-       SInt32 minimum;
-       SInt32 maximum;
-       SInt32 viewSize;
-       Boolean liveTracking;
-       PyObject* liveTrackingProc;
-       UniversalProcPtr c_callback;
-       ControlHandle outControl;
-#ifndef CreateScrollBarControl
-       PyMac_PRECHECK(CreateScrollBarControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&llllbO",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &value,
-                             &minimum,
-                             &maximum,
-                             &viewSize,
-                             &liveTracking,
-                             &liveTrackingProc))
-               return NULL;
-       _err = CreateScrollBarControl(window,
-                                     &boundsRect,
-                                     value,
-                                     minimum,
-                                     maximum,
-                                     viewSize,
-                                     liveTracking,
-                                     myactionproc_upp,
-                                     &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
-       return _res;
-}
-
-static PyObject *Ctl_CreatePopupButtonControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef title;
-       SInt16 menuID;
-       Boolean variableWidth;
-       SInt16 titleWidth;
-       SInt16 titleJustification;
-       Style titleStyle;
-       ControlHandle outControl;
-#ifndef CreatePopupButtonControl
-       PyMac_PRECHECK(CreatePopupButtonControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&hbhhb",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &title,
-                             &menuID,
-                             &variableWidth,
-                             &titleWidth,
-                             &titleJustification,
-                             &titleStyle))
-               return NULL;
-       _err = CreatePopupButtonControl(window,
-                                       &boundsRect,
-                                       title,
-                                       menuID,
-                                       variableWidth,
-                                       titleWidth,
-                                       titleJustification,
-                                       titleStyle,
-                                       &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateRadioGroupControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       ControlHandle outControl;
-#ifndef CreateRadioGroupControl
-       PyMac_PRECHECK(CreateRadioGroupControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect))
-               return NULL;
-       _err = CreateRadioGroupControl(window,
-                                      &boundsRect,
-                                      &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateScrollingTextBoxControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       SInt16 contentResID;
-       Boolean autoScroll;
-       UInt32 delayBeforeAutoScroll;
-       UInt32 delayBetweenAutoScroll;
-       UInt16 autoScrollAmount;
-       ControlHandle outControl;
-#ifndef CreateScrollingTextBoxControl
-       PyMac_PRECHECK(CreateScrollingTextBoxControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hbllH",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &contentResID,
-                             &autoScroll,
-                             &delayBeforeAutoScroll,
-                             &delayBetweenAutoScroll,
-                             &autoScrollAmount))
-               return NULL;
-       _err = CreateScrollingTextBoxControl(window,
-                                            &boundsRect,
-                                            contentResID,
-                                            autoScroll,
-                                            delayBeforeAutoScroll,
-                                            delayBetweenAutoScroll,
-                                            autoScrollAmount,
-                                            &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateDisclosureButtonControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       Rect inBoundsRect;
-       SInt32 inValue;
-       Boolean inAutoToggles;
-       ControlHandle outControl;
-#ifndef CreateDisclosureButtonControl
-       PyMac_PRECHECK(CreateDisclosureButtonControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lb",
-                             WinObj_Convert, &inWindow,
-                             PyMac_GetRect, &inBoundsRect,
-                             &inValue,
-                             &inAutoToggles))
-               return NULL;
-       _err = CreateDisclosureButtonControl(inWindow,
-                                            &inBoundsRect,
-                                            inValue,
-                                            inAutoToggles,
-                                            &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateRoundButtonControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inWindow;
-       Rect inBoundsRect;
-       SInt16 inSize;
-       ControlButtonContentInfo inContent;
-       ControlHandle outControl;
-#ifndef CreateRoundButtonControl
-       PyMac_PRECHECK(CreateRoundButtonControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hO&",
-                             WinObj_Convert, &inWindow,
-                             PyMac_GetRect, &inBoundsRect,
-                             &inSize,
-                             ControlButtonContentInfo_Convert, &inContent))
-               return NULL;
-       _err = CreateRoundButtonControl(inWindow,
-                                       &inBoundsRect,
-                                       inSize,
-                                       &inContent,
-                                       &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateDataBrowserControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       OSType style;
-       ControlHandle outControl;
-#ifndef CreateDataBrowserControl
-       PyMac_PRECHECK(CreateDataBrowserControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             PyMac_GetOSType, &style))
-               return NULL;
-       _err = CreateDataBrowserControl(window,
-                                       &boundsRect,
-                                       style,
-                                       &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_CreateEditUnicodeTextControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       CFStringRef text;
-       Boolean isPassword;
-       ControlFontStyleRec style;
-       ControlHandle outControl;
-#ifndef CreateEditUnicodeTextControl
-       PyMac_PRECHECK(CreateEditUnicodeTextControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&bO&",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             CFStringRefObj_Convert, &text,
-                             &isPassword,
-                             ControlFontStyle_Convert, &style))
-               return NULL;
-       _err = CreateEditUnicodeTextControl(window,
-                                           &boundsRect,
-                                           text,
-                                           isPassword,
-                                           &style,
-                                           &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlHandle _rv;
-       Point inWhere;
-       WindowPtr inWindow;
-       SInt16 outPart;
-#ifndef FindControlUnderMouse
-       PyMac_PRECHECK(FindControlUnderMouse);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &inWhere,
-                             WinObj_Convert, &inWindow))
-               return NULL;
-       _rv = FindControlUnderMouse(inWhere,
-                                   inWindow,
-                                   &outPart);
-       _res = Py_BuildValue("O&h",
-                            CtlObj_WhichControl, _rv,
-                            outPart);
-       return _res;
-}
-
-static PyObject *Ctl_as_Control(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlHandle _rv;
-       Handle h;
-#ifndef as_Control
-       PyMac_PRECHECK(as_Control);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &h))
-               return NULL;
-       _rv = as_Control(h);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Ctl_CreateTabsControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr window;
-       Rect boundsRect;
-       UInt16 size;
-       UInt16 direction;
-       int i;
-       UInt16 numTabs;
-       ControlTabEntry tabArray[MAXTABS];
-       ControlHandle outControl;
-       PyObject *tabArrayObj, *tabEntry;
-
-#ifndef CreateTabsControl
-       PyMac_PRECHECK(CreateTabsControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&HHO",
-                             WinObj_Convert, &window,
-                             PyMac_GetRect, &boundsRect,
-                             &size,
-                             &direction,
-                             &tabArrayObj))
-               return NULL;
-
-       i = PySequence_Length(tabArrayObj);
-       if (i == -1)
-               return NULL;
-       if (i > MAXTABS) {
-               PyErr_SetString(Ctl_Error, "Too many tabs");
-               return NULL;
-       }
-       numTabs = i;
-       for (i=0; i<numTabs; i++) {
-               tabEntry = PySequence_GetItem(tabArrayObj, i);
-               if (tabEntry == NULL)
-                       return NULL;
-               if (!PyArg_Parse(tabEntry, "(O&O&B)",
-                                ControlButtonContentInfo_Convert, &tabArray[i].icon,
-                                CFStringRefObj_Convert, &tabArray[i].name,
-                                &tabArray[i].enabled
-                                ))
-                       return NULL;
-       }
-
-       _err = CreateTabsControl(window,
-                                &boundsRect,
-                                size,
-                                direction,
-                                numTabs,
-                                tabArray,
-                                &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyMethodDef Ctl_methods[] = {
-       {"NewControl", (PyCFunction)Ctl_NewControl, 1,
-        PyDoc_STR("(WindowPtr owningWindow, Rect boundsRect, Str255 controlTitle, Boolean initiallyVisible, SInt16 initialValue, SInt16 minimumValue, SInt16 maximumValue, SInt16 procID, SInt32 controlReference) -> (ControlHandle _rv)")},
-       {"GetNewControl", (PyCFunction)Ctl_GetNewControl, 1,
-        PyDoc_STR("(SInt16 resourceID, WindowPtr owningWindow) -> (ControlHandle _rv)")},
-       {"DrawControls", (PyCFunction)Ctl_DrawControls, 1,
-        PyDoc_STR("(WindowPtr theWindow) -> None")},
-       {"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
-        PyDoc_STR("(WindowPtr inWindow, RgnHandle inUpdateRegion) -> None")},
-       {"FindControl", (PyCFunction)Ctl_FindControl, 1,
-        PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
-       {"IdleControls", (PyCFunction)Ctl_IdleControls, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"GetControlByID", (PyCFunction)Ctl_GetControlByID, 1,
-        PyDoc_STR("(WindowPtr inWindow, ControlID inID) -> (ControlHandle outControl)")},
-       {"DumpControlHierarchy", (PyCFunction)Ctl_DumpControlHierarchy, 1,
-        PyDoc_STR("(WindowPtr inWindow, FSSpec inDumpFile) -> None")},
-       {"CreateRootControl", (PyCFunction)Ctl_CreateRootControl, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
-       {"GetRootControl", (PyCFunction)Ctl_GetRootControl, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
-       {"GetKeyboardFocus", (PyCFunction)Ctl_GetKeyboardFocus, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
-       {"SetKeyboardFocus", (PyCFunction)Ctl_SetKeyboardFocus, 1,
-        PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl, ControlFocusPart inPart) -> None")},
-       {"AdvanceKeyboardFocus", (PyCFunction)Ctl_AdvanceKeyboardFocus, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"ReverseKeyboardFocus", (PyCFunction)Ctl_ReverseKeyboardFocus, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"ClearKeyboardFocus", (PyCFunction)Ctl_ClearKeyboardFocus, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> None")},
-       {"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
-        PyDoc_STR("(WindowPtr inWindow, Boolean inTracks) -> None")},
-       {"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
-        PyDoc_STR("(WindowPtr inWindow) -> (Boolean outTracks)")},
-       {"CreateBevelButtonControl", (PyCFunction)Ctl_CreateBevelButtonControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)")},
-       {"CreateSliderControl", (PyCFunction)Ctl_CreateSliderControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
-       {"CreateDisclosureTriangleControl", (PyCFunction)Ctl_CreateDisclosureTriangleControl, 1,
-        PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, UInt16 inOrientation, CFStringRef inTitle, SInt32 inInitialValue, Boolean inDrawTitle, Boolean inAutoToggles) -> (ControlHandle outControl)")},
-       {"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
-       {"CreateRelevanceBarControl", (PyCFunction)Ctl_CreateRelevanceBarControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum) -> (ControlHandle outControl)")},
-       {"CreateLittleArrowsControl", (PyCFunction)Ctl_CreateLittleArrowsControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 increment) -> (ControlHandle outControl)")},
-       {"CreateChasingArrowsControl", (PyCFunction)Ctl_CreateChasingArrowsControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
-       {"CreateSeparatorControl", (PyCFunction)Ctl_CreateSeparatorControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
-       {"CreateGroupBoxControl", (PyCFunction)Ctl_CreateGroupBoxControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary) -> (ControlHandle outControl)")},
-       {"CreateCheckGroupBoxControl", (PyCFunction)Ctl_CreateCheckGroupBoxControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean primary, Boolean autoToggle) -> (ControlHandle outControl)")},
-       {"CreatePopupGroupBoxControl", (PyCFunction)Ctl_CreatePopupGroupBoxControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
-       {"CreateImageWellControl", (PyCFunction)Ctl_CreateImageWellControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo info) -> (ControlHandle outControl)")},
-       {"CreatePopupArrowControl", (PyCFunction)Ctl_CreatePopupArrowControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 orientation, UInt16 size) -> (ControlHandle outControl)")},
-       {"CreatePlacardControl", (PyCFunction)Ctl_CreatePlacardControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
-       {"CreateClockControl", (PyCFunction)Ctl_CreateClockControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 clockType, UInt32 clockFlags) -> (ControlHandle outControl)")},
-       {"CreateUserPaneControl", (PyCFunction)Ctl_CreateUserPaneControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt32 features) -> (ControlHandle outControl)")},
-       {"CreateEditTextControl", (PyCFunction)Ctl_CreateEditTextControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, Boolean useInlineInput, ControlFontStyleRec style) -> (ControlHandle outControl)")},
-       {"CreateStaticTextControl", (PyCFunction)Ctl_CreateStaticTextControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, ControlFontStyleRec style) -> (ControlHandle outControl)")},
-       {"CreatePictureControl", (PyCFunction)Ctl_CreatePictureControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
-       {"CreateIconControl", (PyCFunction)Ctl_CreateIconControl, 1,
-        PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, ControlButtonContentInfo inIconContent, Boolean inDontTrack) -> (ControlHandle outControl)")},
-       {"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
-       {"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title) -> (ControlHandle outControl)")},
-       {"CreatePushButtonWithIconControl", (PyCFunction)Ctl_CreatePushButtonWithIconControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, ControlButtonContentInfo icon, UInt16 iconAlignment) -> (ControlHandle outControl)")},
-       {"CreateRadioButtonControl", (PyCFunction)Ctl_CreateRadioButtonControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
-       {"CreateCheckBoxControl", (PyCFunction)Ctl_CreateCheckBoxControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
-       {"CreateScrollBarControl", (PyCFunction)Ctl_CreateScrollBarControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 viewSize, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
-       {"CreatePopupButtonControl", (PyCFunction)Ctl_CreatePopupButtonControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
-       {"CreateRadioGroupControl", (PyCFunction)Ctl_CreateRadioGroupControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
-       {"CreateScrollingTextBoxControl", (PyCFunction)Ctl_CreateScrollingTextBoxControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount) -> (ControlHandle outControl)")},
-       {"CreateDisclosureButtonControl", (PyCFunction)Ctl_CreateDisclosureButtonControl, 1,
-        PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, SInt32 inValue, Boolean inAutoToggles) -> (ControlHandle outControl)")},
-       {"CreateRoundButtonControl", (PyCFunction)Ctl_CreateRoundButtonControl, 1,
-        PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, SInt16 inSize, ControlButtonContentInfo inContent) -> (ControlHandle outControl)")},
-       {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)")},
-       {"CreateEditUnicodeTextControl", (PyCFunction)Ctl_CreateEditUnicodeTextControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, ControlFontStyleRec style) -> (ControlHandle outControl)")},
-       {"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1,
-        PyDoc_STR("(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)")},
-       {"as_Control", (PyCFunction)Ctl_as_Control, 1,
-        PyDoc_STR("(Handle h) -> (ControlHandle _rv)")},
-       {"CreateTabsControl", (PyCFunction)Ctl_CreateTabsControl, 1,
-        PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 size, UInt16 direction, ControlTabEntry tabArray) -> (ControlHandle outControl)")},
-       {NULL, NULL, 0}
-};
-
-
-
-static PyObject *
-CtlObj_NewUnmanaged(ControlHandle itself)
-{
-        ControlObject *it;
-        if (itself == NULL) return PyMac_Error(resNotFound);
-        it = PyObject_NEW(ControlObject, &Control_Type);
-        if (it == NULL) return NULL;
-        it->ob_itself = itself;
-        it->ob_callbackdict = NULL;
-        return (PyObject *)it;
-}
-
-static PyObject *
-CtlObj_WhichControl(ControlHandle c)
-{
-        PyObject *it;
-
-        if (c == NULL)
-                it = Py_None;
-        else {
-                it = (PyObject *) GetControlReference(c);
-                /*
-                ** If the refcon is zero or doesn't point back to the Python object
-                ** the control is not ours. Return a temporary object.
-                */
-                if (it == NULL || ((ControlObject *)it)->ob_itself != c)
-                        return CtlObj_NewUnmanaged(c);
-        }
-        Py_INCREF(it);
-        return it;
-}
-
-static int
-settrackfunc(PyObject *obj)
-{
-        if (tracker) {
-                PyErr_SetString(Ctl_Error, "Tracker function in use");
-                return 0;
-        }
-        tracker = obj;
-        Py_INCREF(tracker);
-        return 1;
-}
-
-static void
-clrtrackfunc(void)
-{
-        Py_XDECREF(tracker);
-        tracker = 0;
-}
-
-static pascal void
-mytracker(ControlHandle ctl, short part)
-{
-        PyObject *args, *rv=0;
-
-        args = Py_BuildValue("(O&i)", CtlObj_WhichControl, ctl, (int)part);
-        if (args && tracker) {
-                rv = PyEval_CallObject(tracker, args);
-                Py_DECREF(args);
-        }
-        if (rv)
-                Py_DECREF(rv);
-        else {
-                PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\n");
-                PyErr_Print();
-        }
-}
-
-static int
-setcallback(PyObject *myself, OSType which, PyObject *callback, UniversalProcPtr *uppp)
-{
-        ControlObject *self = (ControlObject *)myself;
-        char keybuf[9];
-
-        if ( which == kMyControlActionProcTag )
-                *uppp = (UniversalProcPtr)myactionproc_upp;
-        else if ( which == kControlUserPaneKeyDownProcTag )
-                *uppp = (UniversalProcPtr)mykeydownproc_upp;
-        else if ( which == kControlUserPaneFocusProcTag )
-                *uppp = (UniversalProcPtr)myfocusproc_upp;
-        else if ( which == kControlUserPaneDrawProcTag )
-                *uppp = (UniversalProcPtr)mydrawproc_upp;
-        else if ( which == kControlUserPaneIdleProcTag )
-                *uppp = (UniversalProcPtr)myidleproc_upp;
-        else if ( which == kControlUserPaneHitTestProcTag )
-                *uppp = (UniversalProcPtr)myhittestproc_upp;
-        else if ( which == kControlUserPaneTrackingProcTag )
-                *uppp = (UniversalProcPtr)mytrackingproc_upp;
-        else
-                return -1;
-        /* Only now do we test for clearing of the callback: */
-        if ( callback == Py_None )
-                *uppp = NULL;
-        /* Create the dict if it doesn't exist yet (so we don't get such a dict for every control) */
-        if ( self->ob_callbackdict == NULL )
-                if ( (self->ob_callbackdict = PyDict_New()) == NULL )
-                        return -1;
-        /* And store the Python callback */
-        sprintf(keybuf, "%x", (unsigned)which);
-        if (PyDict_SetItemString(self->ob_callbackdict, keybuf, callback) < 0)
-                return -1;
-        return 0;
-}
-
-static PyObject *
-callcallback(ControlObject *self, OSType which, PyObject *arglist)
-{
-        char keybuf[9];
-        PyObject *func, *rv;
-
-        sprintf(keybuf, "%x", (unsigned)which);
-        if ( self->ob_callbackdict == NULL ||
-                        (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) {
-                PySys_WriteStderr("Control callback %x without callback object\n", (unsigned)which);
-                return NULL;
-        }
-        rv = PyEval_CallObject(func, arglist);
-        if ( rv == NULL ) {
-                PySys_WriteStderr("Exception in control callback %x handler\n", (unsigned)which);
-                PyErr_Print();
-        }
-        return rv;
-}
-
-static pascal void
-myactionproc(ControlHandle control, SInt16 part)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("Oh", ctl_obj, part);
-        rv = callcallback(ctl_obj, kMyControlActionProcTag, arglist);
-        Py_XDECREF(arglist);
-        Py_XDECREF(rv);
-}
-
-static pascal ControlPartCode
-mykeydownproc(ControlHandle control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-        short c_rv = 0;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("Ohhh", ctl_obj, keyCode, charCode, modifiers);
-        rv = callcallback(ctl_obj, kControlUserPaneKeyDownProcTag, arglist);
-        Py_XDECREF(arglist);
-        if ( rv )
-                if (!PyArg_Parse(rv, "h", &c_rv))
-                        PyErr_Clear();
-        Py_XDECREF(rv);
-        return (ControlPartCode)c_rv;
-}
-
-static pascal ControlPartCode
-myfocusproc(ControlHandle control, ControlPartCode part)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-        short c_rv = kControlFocusNoPart;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("Oh", ctl_obj, part);
-        rv = callcallback(ctl_obj, kControlUserPaneFocusProcTag, arglist);
-        Py_XDECREF(arglist);
-        if ( rv )
-                if (!PyArg_Parse(rv, "h", &c_rv))
-                        PyErr_Clear();
-        Py_XDECREF(rv);
-        return (ControlPartCode)c_rv;
-}
-
-static pascal void
-mydrawproc(ControlHandle control, SInt16 part)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("Oh", ctl_obj, part);
-        rv = callcallback(ctl_obj, kControlUserPaneDrawProcTag, arglist);
-        Py_XDECREF(arglist);
-        Py_XDECREF(rv);
-}
-
-static pascal void
-myidleproc(ControlHandle control)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("O", ctl_obj);
-        rv = callcallback(ctl_obj, kControlUserPaneIdleProcTag, arglist);
-        Py_XDECREF(arglist);
-        Py_XDECREF(rv);
-}
-
-static pascal ControlPartCode
-myhittestproc(ControlHandle control, Point where)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-        short c_rv = -1;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, where);
-        rv = callcallback(ctl_obj, kControlUserPaneHitTestProcTag, arglist);
-        Py_XDECREF(arglist);
-        /* Ignore errors, nothing we can do about them */
-        if ( rv )
-                if (!PyArg_Parse(rv, "h", &c_rv))
-                        PyErr_Clear();
-        Py_XDECREF(rv);
-        return (ControlPartCode)c_rv;
-}
-
-static pascal ControlPartCode
-mytrackingproc(ControlHandle control, Point startPt, ControlActionUPP actionProc)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-        short c_rv = -1;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        /* We cannot pass the actionProc without lots of work */
-        arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, startPt);
-        rv = callcallback(ctl_obj, kControlUserPaneTrackingProcTag, arglist);
-        Py_XDECREF(arglist);
-        if ( rv )
-                if (!PyArg_Parse(rv, "h", &c_rv))
-                        PyErr_Clear();
-        Py_XDECREF(rv);
-        return (ControlPartCode)c_rv;
-}
-
-
-void init_Ctl(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-       mytracker_upp = NewControlActionUPP(mytracker);
-       myactionproc_upp = NewControlActionUPP(myactionproc);
-       mykeydownproc_upp = NewControlUserPaneKeyDownUPP(mykeydownproc);
-       myfocusproc_upp = NewControlUserPaneFocusUPP(myfocusproc);
-       mydrawproc_upp = NewControlUserPaneDrawUPP(mydrawproc);
-       myidleproc_upp = NewControlUserPaneIdleUPP(myidleproc);
-       myhittestproc_upp = NewControlUserPaneHitTestUPP(myhittestproc);
-       mytrackingproc_upp = NewControlUserPaneTrackingUPP(mytrackingproc);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert);
-
-
-       m = Py_InitModule("_Ctl", Ctl_methods);
-       d = PyModule_GetDict(m);
-       Ctl_Error = PyMac_GetOSErrException();
-       if (Ctl_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Ctl_Error) != 0)
-               return;
-       Py_TYPE(&Control_Type) = &PyType_Type;
-       if (PyType_Ready(&Control_Type) < 0) return;
-       Py_INCREF(&Control_Type);
-       PyModule_AddObject(m, "Control", (PyObject *)&Control_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Control_Type);
-       PyModule_AddObject(m, "ControlType", (PyObject *)&Control_Type);
-}
-
-/* ======================== End module _Ctl ========================= */
-
diff --git a/Mac/Modules/ctl/ctledit.py b/Mac/Modules/ctl/ctledit.py
deleted file mode 100644 (file)
index fdd9712..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# FindControlUnderMouse() returns an existing control, not a new one,
-# so create this one by hand.
-f = Function(ExistingControlHandle, 'FindControlUnderMouse',
-    (Point, 'inWhere', InMode),
-    (WindowRef, 'inWindow', InMode),
-    (SInt16, 'outPart', OutMode),
-)
-functions.append(f)
-
-f = Function(ControlHandle, 'as_Control',
-        (Handle, 'h', InMode))
-functions.append(f)
-
-f = Method(Handle, 'as_Resource', (ControlHandle, 'ctl', InMode))
-methods.append(f)
-
-f = Method(void, 'GetControlRect', (ControlHandle, 'ctl', InMode), (Rect, 'rect', OutMode))
-methods.append(f)
-
-DisposeControl_body = """
-        if (!PyArg_ParseTuple(_args, ""))
-                return NULL;
-        if ( _self->ob_itself ) {
-                SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
-                DisposeControl(_self->ob_itself);
-                _self->ob_itself = NULL;
-        }
-        Py_INCREF(Py_None);
-        _res = Py_None;
-        return _res;
-"""
-
-f = ManualGenerator("DisposeControl", DisposeControl_body)
-f.docstring = lambda : "() -> None"
-
-methods.append(f)
-
-# All CreateXxxXxxControl() functions return a new object in an output
-# parameter; these should however be managed by us (we're creating them
-# after all), so set the type to ControlRef.
-for f in functions:
-    if f.name.startswith("Create"):
-        v = f.argumentList[-1]
-        if v.type == ExistingControlHandle:
-            v.type = ControlRef
diff --git a/Mac/Modules/ctl/ctlscan.py b/Mac/Modules/ctl/ctlscan.py
deleted file mode 100644 (file)
index 3150a2c..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-# Scan <Controls.h>, generating ctlgen.py.
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-def main():
-#       input = "Controls.h" # Universal Headers < 3.3
-    input = ["Controls.h", "ControlDefinitions.h"] # Universal Headers >= 3.3
-    output = "ctlgen.py"
-    defsoutput = TOOLBOXDIR + "Controls.py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now doing 'import ctlsupport' ===")
-    import ctlsupport
-    print("=== Done.  It's up to you to compile Ctlmodule.c ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in ("ControlHandle", "ControlRef") and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("from Carbon.TextEdit import *\n")
-        self.defsfile.write("from Carbon.QuickDraw import *\n")
-        self.defsfile.write("from Carbon.Dragconst import *\n")
-        self.defsfile.write("from Carbon.CarbonEvents import *\n")
-        self.defsfile.write("from Carbon.Appearance import *\n")
-        self.defsfile.write("kDataBrowserItemAnyState = -1\n")
-        self.defsfile.write("kControlBevelButtonCenterPopupGlyphTag = -1\n")
-        self.defsfile.write("kDataBrowserClientPropertyFlagsMask = 0xFF000000\n")
-        self.defsfile.write("\n")
-
-    def makeblacklistnames(self):
-        return [
-                'FindControlUnderMouse', # Generated manually, returns an existing control, not a new one.
-                'DisposeControl', # Generated manually
-                'KillControls', # Implied by close of dialog
-                'SetCtlAction',
-                'TrackControl', # Generated manually
-                'HandleControlClick',   # Generated manually
-                'SetControlData',       # Generated manually
-                'GetControlData',       # Generated manually
-                'kControlBevelButtonCenterPopupGlyphTag', # Constant with funny definition
-                'kDataBrowserClientPropertyFlagsMask',  # ditto
-                'kDataBrowserItemAnyState',   # and ditto
-                # The following are unavailable for static 68k (appearance manager)
-##                      'GetBevelButtonMenuValue',
-##                      'SetBevelButtonMenuValue',
-##                      'GetBevelButtonMenuHandle',
-##                      'SetBevelButtonTransform',
-                'SetBevelButtonGraphicAlignment',
-                'SetBevelButtonTextAlignment',
-                'SetBevelButtonTextPlacement',
-##                      'SetImageWellTransform',
-##                      'GetTabContentRect',
-##                      'SetTabEnabled',
-##                      'SetDisclosureTriangleLastValue',
-##                      # Unavailable in CW Pro 3 libraries
-##                      'SetUpControlTextColor',
-##                      # Unavailable in Jack's CW Pro 5.1 libraries
-##                      'GetControlRegion',
-##                      'RemoveControlProperty',
-##                      'IsValidControlHandle',
-##                      'SetControl32BitMinimum',
-##                      'GetControl32BitMinimum',
-##                      'SetControl32BitMaximum',
-##                      'GetControl32BitMaximum',
-##                      'SetControl32BitValue',
-##                      'GetControl32BitValue',
-##                      'SetControlViewSize',
-##                      'GetControlViewSize',
-                # Generally Bad News
-                'GetControlProperty',
-                'SetControlProperty',
-                'GetControlPropertySize',
-                'SendControlMessage', # Parameter changed from long to void* from UH3.3 to UH3.4
-                'CreateTabsControl',  # wrote manually
-                'GetControlAction',  # too much effort for too little usefulness
-
-                # too lazy for now
-                'GetImageWellContentInfo',
-                'GetBevelButtonContentInfo',
-                # OS8 only
-                'GetAuxiliaryControlRecord',
-                'SetControlColor',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                'ProcPtr',
-#                       'ControlActionUPP',
-                'Ptr',
-                'ControlDefSpec', # Don't know how to do this yet
-                'ControlDefSpec_ptr', # ditto
-                'Collection', # Ditto
-                # not-yet-supported stuff in Universal Headers 3.4:
-                'ControlColorUPP',
-                'ControlKind',  # XXX easy: 2-tuple containing 2 OSType's
-#                       'ControlTabEntry_ptr', # XXX needed for tabs
-#                       'ControlButtonContentInfoPtr',
-#                       'ControlButtonContentInfo',  # XXX ugh: a union
-#                       'ControlButtonContentInfo_ptr',  # XXX ugh: a union
-                'ListDefSpec_ptr',  # XXX see _Listmodule.c, tricky but possible
-                'DataBrowserItemID_ptr',  # XXX array of UInt32, for BrowserView
-                'DataBrowserItemUPP',
-                'DataBrowserItemDataRef', # XXX void *
-                'DataBrowserCallbacks', # difficult struct
-                'DataBrowserCallbacks_ptr',
-                'DataBrowserCustomCallbacks',
-                'DataBrowserCustomCallbacks_ptr',
-##                      'DataBrowserTableViewColumnDesc',
-##                      'DataBrowserListViewColumnDesc',
-                'CFDataRef',
-                'DataBrowserListViewHeaderDesc', # difficult struct
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
-                 [("InBuffer", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("long", "*", "InMode"),
-                                            ("long", "*", "OutMode")],
-                 [("VarVarOutBuffer", "*", "InOutMode")]),
-
-##                      # For TrackControl
-##                      ([("ProcPtr", "actionProc", "InMode")],
-##                       [("FakeType('(ControlActionUPP)0')", "*", "*")]),
-##                      ([("ControlActionUPP", "actionProc", "InMode")],
-##                       [("FakeType('(ControlActionUPP)0')", "*", "*")]),
-
-                # For GetControlTitle
-                ([('Str255', 'title', 'InMode')],
-                 [('Str255', 'title', 'OutMode')]),
-
-                ([("ControlHandle", "*", "OutMode")],
-                 [("ExistingControlHandle", "*", "*")]),
-                ([("ControlRef", "*", "OutMode")],      # Ditto, for Universal Headers
-                 [("ExistingControlHandle", "*", "*")]),
-
-                ([("Rect_ptr", "*", "ReturnMode")], # GetControlBounds
-                 [("void", "*", "ReturnMode")]),
-
-                ([("DataBrowserListViewColumnDesc", "*", "OutMode")],
-                 [("DataBrowserListViewColumnDesc", "*", "InMode")]),
-
-                ([("ControlButtonContentInfoPtr", 'outContent', "InMode")],
-                 [("ControlButtonContentInfoPtr", '*', "OutMode")]),
-
-                ([("ControlButtonContentInfo", '*', "OutMode")],
-                 [("ControlButtonContentInfo", '*', "InMode")]),
-
-                ([("ControlActionUPP", 'liveTrackingProc', "InMode")],
-                 [("ControlActionUPPNewControl", 'liveTrackingProc', "InMode")]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py
deleted file mode 100644 (file)
index 04fac8b..0000000
+++ /dev/null
@@ -1,826 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Controls.h'            # The Apple header file
-MODNAME = '_Ctl'                                # The name of the module
-OBJECTNAME = 'Control'                  # The basic name of the objects used here
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Ctl'                       # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + 'Handle'      # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-ControlHandle = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
-ControlRef = ControlHandle
-ExistingControlHandle = OpaqueByValueType(OBJECTTYPE, "CtlObj_WhichControl", "BUG")
-
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-CCTabHandle = OpaqueByValueType("CCTabHandle", "ResObj")
-AuxCtlHandle = OpaqueByValueType("AuxCtlHandle", "ResObj")
-ControlPartCode = Type("ControlPartCode", "h")
-DragConstraint = Type("DragConstraint", "H")
-ControlVariant = Type("ControlVariant", "h")
-IconTransformType = Type("IconTransformType", "h")
-EventModifiers = Type("EventModifiers", "H")
-ClickActivationResult = Type("ClickActivationResult", "l")
-ControlButtonGraphicAlignment = Type("ControlButtonGraphicAlignment", "h")
-ControlButtonTextAlignment = Type("ControlButtonTextAlignment", "h")
-ControlButtonTextPlacement = Type("ControlButtonTextPlacement", "h")
-ControlContentType = Type("ControlContentType", "h")
-ControlFocusPart = Type("ControlFocusPart", "h")
-
-ControlFontStyleRec = OpaqueType('ControlFontStyleRec', 'ControlFontStyle')
-ControlFontStyleRec_ptr = ControlFontStyleRec
-ControlID = OpaqueType('ControlID', 'PyControlID')
-ControlID_ptr = ControlID
-
-DragTrackingMessage = Type("DragTrackingMessage", "h")
-DragReference = OpaqueByValueType("DragReference", "DragObj")
-
-CFStringRef = OpaqueByValueType("CFStringRef", "CFStringRefObj")
-CFMutableStringRef = OpaqueByValueType("CFMutableStringRef", "CFMutableStringRefObj")
-CFDataRef = OpaqueByValueType("CFDataRef", "CFDataRefObj")
-
-ControlTabSize = UInt16
-ControlTabDirection = UInt16
-ControlPopupArrowOrientation = UInt16
-ControlPopupArrowSize = UInt16
-ControlClockType = UInt16
-ControlClockFlags = UInt32
-ControlRoundButtonSize = SInt16
-DataBrowserViewStyle = OSType
-DataBrowserItemID = UInt32
-DataBrowserEditCommand = UInt32
-DataBrowserSelectionAnchorDirection = UInt32
-DataBrowserItemState = UInt32
-DataBrowserPropertyID = UInt32
-DataBrowserRevealOptions = UInt8
-DataBrowserSortOrder = UInt16
-DataBrowserSelectionFlags = UInt32
-DataBrowserPropertyFlags = UInt32
-DataBrowserPropertyPart = OSType
-DataBrowserTableViewColumnID = DataBrowserPropertyID
-#DataBrowserTableViewColumnDesc = DataBrowserPropertyDesc
-DataBrowserTableViewHiliteStyle = UInt32
-DataBrowserTableViewRowIndex = UInt32
-DataBrowserTableViewColumnIndex = UInt32
-DataBrowserPropertyType = OSType
-ControlDisclosureTriangleOrientation = UInt16
-
-DataBrowserTableViewColumnDesc = OpaqueType("DataBrowserTableViewColumnDesc",
-                "DataBrowserTableViewColumnDesc")
-DataBrowserListViewColumnDesc = OpaqueType("DataBrowserListViewColumnDesc",
-                "DataBrowserListViewColumnDesc")
-ControlButtonContentInfo = OpaqueType("ControlButtonContentInfo",
-                "ControlButtonContentInfo")
-ControlButtonContentInfoPtr = ControlButtonContentInfo_ptr = ControlButtonContentInfo
-
-ControlTabEntry_ptr = OpaqueType("ControlTabEntry", "ControlTabEntry")
-
-ControlBevelThickness = UInt16
-ControlBevelButtonBehavior = UInt16
-ControlBevelButtonMenuBehavior = UInt16
-ControlBevelButtonMenuPlacement = UInt16
-ControlPushButtonIconAlignment = UInt16
-
-class ControlActionDefinition(Type):
-    def declare(self, name):
-        Output("%s %s;", self.typeName, name)
-        Output("UniversalProcPtr c_callback;")
-    def passInput(self, name):
-        return "myactionproc_upp"
-    def cleanup(self, name):
-        Output("setcallback((PyObject*)_self, kMyControlActionProcTag, actionProc, &c_callback);")
-
-class ControlActionDefinitionNewControl(ControlActionDefinition):
-    def cleanup(self, name):
-        Output("setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);")
-
-ControlActionUPP = ControlActionDefinition("PyObject*", "O")
-ControlActionUPPNewControl = ControlActionDefinitionNewControl("PyObject*", "O")
-ControlSliderOrientation = UInt16
-
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_CtlObj_New(ControlHandle);
-extern int _CtlObj_Convert(PyObject *, ControlHandle *);
-
-#define CtlObj_New _CtlObj_New
-#define CtlObj_Convert _CtlObj_Convert
-#endif
-
-static PyObject *CtlObj_WhichControl(ControlHandle);
-
-#define as_Control(h) ((ControlHandle)h)
-#define as_Resource(ctl) ((Handle)ctl)
-#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
-
-#define MAXTABS 32  /* maximum number of tabs that we support in a tabs control */
-/*
-** Parse/generate ControlFontStyleRec records
-*/
-#if 0 /* Not needed */
-static PyObject *
-ControlFontStyle_New(ControlFontStyleRec *itself)
-{
-
-        return Py_BuildValue("hhhhhhO&O&", itself->flags, itself->font,
-                itself->size, itself->style, itself->mode, itself->just,
-                QdRGB_New, &itself->foreColor, QdRGB_New, &itself->backColor);
-}
-#endif
-
-static int
-ControlFontStyle_Convert(PyObject *v, ControlFontStyleRec *itself)
-{
-        return PyArg_Parse(v, "(hhhhhhO&O&)", &itself->flags,
-                &itself->font, &itself->size, &itself->style, &itself->mode,
-                &itself->just, QdRGB_Convert, &itself->foreColor,
-                QdRGB_Convert, &itself->backColor);
-}
-
-/*
-** Parse/generate ControlID records
-*/
-static PyObject *
-PyControlID_New(ControlID *itself)
-{
-
-        return Py_BuildValue("O&l", PyMac_BuildOSType, itself->signature, itself->id);
-}
-
-static int
-PyControlID_Convert(PyObject *v, ControlID *itself)
-{
-        return PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &itself->signature, &itself->id);
-}
-
-/*
-** generate DataBrowserListViewColumnDesc records
-*/
-static int
-DataBrowserTableViewColumnDesc_Convert(PyObject *v, DataBrowserTableViewColumnDesc *itself)
-{
-        return PyArg_Parse(v, "(lO&l)",
-                           &itself->propertyID,
-                           PyMac_GetOSType, &itself->propertyType,
-                           &itself->propertyFlags);
-}
-
-static int
-ControlButtonContentInfo_Convert(PyObject *v, ControlButtonContentInfo *itself)
-{
-        return PyArg_Parse(v, "(hO&)",
-                           &itself->contentType,
-                           OptResObj_Convert, &itself->u.iconSuite);
-}
-
-static int
-DataBrowserListViewHeaderDesc_Convert(PyObject *v, DataBrowserListViewHeaderDesc *itself)
-{
-        itself->version = kDataBrowserListViewLatestHeaderDesc;
-        return PyArg_Parse(v, "(HHhO&HO&O&)",
-                           &itself->minimumWidth,
-                           &itself->maximumWidth,
-                           &itself->titleOffset,
-                           CFStringRefObj_Convert, &itself->titleString,
-                           &itself->initialOrder,
-                           ControlFontStyle_Convert, &itself->btnFontStyle,
-                           ControlButtonContentInfo_Convert, &itself->btnContentInfo);
-}
-
-static int
-DataBrowserListViewColumnDesc_Convert(PyObject *v, DataBrowserListViewColumnDesc *itself)
-{
-        return PyArg_Parse(v, "(O&O&)",
-                           DataBrowserTableViewColumnDesc_Convert, &itself->propertyDesc,
-                           DataBrowserListViewHeaderDesc_Convert, &itself->headerBtnDesc);
-}
-
-/* TrackControl and HandleControlClick callback support */
-#define kMyControlActionProcTag 'ACTN'  /* not an official tag, only for internal use */
-static PyObject *tracker;
-static ControlActionUPP mytracker_upp;
-static ControlActionUPP myactionproc_upp;
-static ControlUserPaneKeyDownUPP mykeydownproc_upp;
-static ControlUserPaneFocusUPP myfocusproc_upp;
-static ControlUserPaneDrawUPP mydrawproc_upp;
-static ControlUserPaneIdleUPP myidleproc_upp;
-static ControlUserPaneHitTestUPP myhittestproc_upp;
-static ControlUserPaneTrackingUPP mytrackingproc_upp;
-
-static int settrackfunc(PyObject *);    /* forward */
-static void clrtrackfunc(void); /* forward */
-static int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
-"""
-
-finalstuff = finalstuff + """
-static PyObject *
-CtlObj_NewUnmanaged(ControlHandle itself)
-{
-        ControlObject *it;
-        if (itself == NULL) return PyMac_Error(resNotFound);
-        it = PyObject_NEW(ControlObject, &Control_Type);
-        if (it == NULL) return NULL;
-        it->ob_itself = itself;
-        it->ob_callbackdict = NULL;
-        return (PyObject *)it;
-}
-
-static PyObject *
-CtlObj_WhichControl(ControlHandle c)
-{
-        PyObject *it;
-
-        if (c == NULL)
-                it = Py_None;
-        else {
-                it = (PyObject *) GetControlReference(c);
-                /*
-                ** If the refcon is zero or doesn't point back to the Python object
-                ** the control is not ours. Return a temporary object.
-                */
-                if (it == NULL || ((ControlObject *)it)->ob_itself != c)
-                        return CtlObj_NewUnmanaged(c);
-        }
-        Py_INCREF(it);
-        return it;
-}
-
-static int
-settrackfunc(PyObject *obj)
-{
-        if (tracker) {
-                PyErr_SetString(Ctl_Error, "Tracker function in use");
-                return 0;
-        }
-        tracker = obj;
-        Py_INCREF(tracker);
-        return 1;
-}
-
-static void
-clrtrackfunc(void)
-{
-        Py_XDECREF(tracker);
-        tracker = 0;
-}
-
-static pascal void
-mytracker(ControlHandle ctl, short part)
-{
-        PyObject *args, *rv=0;
-
-        args = Py_BuildValue("(O&i)", CtlObj_WhichControl, ctl, (int)part);
-        if (args && tracker) {
-                rv = PyEval_CallObject(tracker, args);
-                Py_DECREF(args);
-        }
-        if (rv)
-                Py_DECREF(rv);
-        else {
-                PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\\n");
-                PyErr_Print();
-        }
-}
-
-static int
-setcallback(PyObject *myself, OSType which, PyObject *callback, UniversalProcPtr *uppp)
-{
-        ControlObject *self = (ControlObject *)myself;
-        char keybuf[9];
-
-        if ( which == kMyControlActionProcTag )
-                *uppp = (UniversalProcPtr)myactionproc_upp;
-        else if ( which == kControlUserPaneKeyDownProcTag )
-                *uppp = (UniversalProcPtr)mykeydownproc_upp;
-        else if ( which == kControlUserPaneFocusProcTag )
-                *uppp = (UniversalProcPtr)myfocusproc_upp;
-        else if ( which == kControlUserPaneDrawProcTag )
-                *uppp = (UniversalProcPtr)mydrawproc_upp;
-        else if ( which == kControlUserPaneIdleProcTag )
-                *uppp = (UniversalProcPtr)myidleproc_upp;
-        else if ( which == kControlUserPaneHitTestProcTag )
-                *uppp = (UniversalProcPtr)myhittestproc_upp;
-        else if ( which == kControlUserPaneTrackingProcTag )
-                *uppp = (UniversalProcPtr)mytrackingproc_upp;
-        else
-                return -1;
-        /* Only now do we test for clearing of the callback: */
-        if ( callback == Py_None )
-                *uppp = NULL;
-        /* Create the dict if it doesn't exist yet (so we don't get such a dict for every control) */
-        if ( self->ob_callbackdict == NULL )
-                if ( (self->ob_callbackdict = PyDict_New()) == NULL )
-                        return -1;
-        /* And store the Python callback */
-        sprintf(keybuf, "%x", (unsigned)which);
-        if (PyDict_SetItemString(self->ob_callbackdict, keybuf, callback) < 0)
-                return -1;
-        return 0;
-}
-
-static PyObject *
-callcallback(ControlObject *self, OSType which, PyObject *arglist)
-{
-        char keybuf[9];
-        PyObject *func, *rv;
-
-        sprintf(keybuf, "%x", (unsigned)which);
-        if ( self->ob_callbackdict == NULL ||
-                        (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) {
-                PySys_WriteStderr("Control callback %x without callback object\\n", (unsigned)which);
-                return NULL;
-        }
-        rv = PyEval_CallObject(func, arglist);
-        if ( rv == NULL ) {
-                PySys_WriteStderr("Exception in control callback %x handler\\n", (unsigned)which);
-                PyErr_Print();
-        }
-        return rv;
-}
-
-static pascal void
-myactionproc(ControlHandle control, SInt16 part)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("Oh", ctl_obj, part);
-        rv = callcallback(ctl_obj, kMyControlActionProcTag, arglist);
-        Py_XDECREF(arglist);
-        Py_XDECREF(rv);
-}
-
-static pascal ControlPartCode
-mykeydownproc(ControlHandle control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-        short c_rv = 0;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("Ohhh", ctl_obj, keyCode, charCode, modifiers);
-        rv = callcallback(ctl_obj, kControlUserPaneKeyDownProcTag, arglist);
-        Py_XDECREF(arglist);
-        if ( rv )
-                if (!PyArg_Parse(rv, "h", &c_rv))
-                        PyErr_Clear();
-        Py_XDECREF(rv);
-        return (ControlPartCode)c_rv;
-}
-
-static pascal ControlPartCode
-myfocusproc(ControlHandle control, ControlPartCode part)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-        short c_rv = kControlFocusNoPart;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("Oh", ctl_obj, part);
-        rv = callcallback(ctl_obj, kControlUserPaneFocusProcTag, arglist);
-        Py_XDECREF(arglist);
-        if ( rv )
-                if (!PyArg_Parse(rv, "h", &c_rv))
-                        PyErr_Clear();
-        Py_XDECREF(rv);
-        return (ControlPartCode)c_rv;
-}
-
-static pascal void
-mydrawproc(ControlHandle control, SInt16 part)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("Oh", ctl_obj, part);
-        rv = callcallback(ctl_obj, kControlUserPaneDrawProcTag, arglist);
-        Py_XDECREF(arglist);
-        Py_XDECREF(rv);
-}
-
-static pascal void
-myidleproc(ControlHandle control)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("O", ctl_obj);
-        rv = callcallback(ctl_obj, kControlUserPaneIdleProcTag, arglist);
-        Py_XDECREF(arglist);
-        Py_XDECREF(rv);
-}
-
-static pascal ControlPartCode
-myhittestproc(ControlHandle control, Point where)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-        short c_rv = -1;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, where);
-        rv = callcallback(ctl_obj, kControlUserPaneHitTestProcTag, arglist);
-        Py_XDECREF(arglist);
-        /* Ignore errors, nothing we can do about them */
-        if ( rv )
-                if (!PyArg_Parse(rv, "h", &c_rv))
-                        PyErr_Clear();
-        Py_XDECREF(rv);
-        return (ControlPartCode)c_rv;
-}
-
-static pascal ControlPartCode
-mytrackingproc(ControlHandle control, Point startPt, ControlActionUPP actionProc)
-{
-        ControlObject *ctl_obj;
-        PyObject *arglist, *rv;
-        short c_rv = -1;
-
-        ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
-        /* We cannot pass the actionProc without lots of work */
-        arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, startPt);
-        rv = callcallback(ctl_obj, kControlUserPaneTrackingProcTag, arglist);
-        Py_XDECREF(arglist);
-        if ( rv )
-                if (!PyArg_Parse(rv, "h", &c_rv))
-                        PyErr_Clear();
-        Py_XDECREF(rv);
-        return (ControlPartCode)c_rv;
-}
-"""
-
-initstuff = initstuff + """
-mytracker_upp = NewControlActionUPP(mytracker);
-myactionproc_upp = NewControlActionUPP(myactionproc);
-mykeydownproc_upp = NewControlUserPaneKeyDownUPP(mykeydownproc);
-myfocusproc_upp = NewControlUserPaneFocusUPP(myfocusproc);
-mydrawproc_upp = NewControlUserPaneDrawUPP(mydrawproc);
-myidleproc_upp = NewControlUserPaneIdleUPP(myidleproc);
-myhittestproc_upp = NewControlUserPaneHitTestUPP(myhittestproc);
-mytrackingproc_upp = NewControlUserPaneTrackingUPP(mytrackingproc);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert);
-"""
-
-class MyObjectDefinition(PEP253Mixin, ObjectIdentityMixin, GlobalObjectDefinition):
-    def outputStructMembers(self):
-        GlobalObjectDefinition.outputStructMembers(self)
-        Output("PyObject *ob_callbackdict;")
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-    def outputInitStructMembers(self):
-        GlobalObjectDefinition.outputInitStructMembers(self)
-        Output("SetControlReference(itself, (long)it);")
-        Output("it->ob_callbackdict = NULL;")
-    def outputCleanupStructMembers(self):
-        Output("Py_XDECREF(self->ob_callbackdict);")
-        Output("if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */")
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-exec(open('ctledit.py').read())
-
-# add the populated lists to the generator groups
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-# Manual generator for TrackControl, due to callback ideosyncracies
-trackcontrol_body = """
-ControlPartCode _rv;
-Point startPoint;
-ControlActionUPP upp = 0;
-PyObject *callback = 0;
-
-if (!PyArg_ParseTuple(_args, "O&|O",
-                      PyMac_GetPoint, &startPoint, &callback))
-        return NULL;
-if (callback && callback != Py_None) {
-        if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
-                upp = (ControlActionUPP)-1;
-        else {
-                settrackfunc(callback);
-                upp = mytracker_upp;
-        }
-}
-_rv = TrackControl(_self->ob_itself,
-                   startPoint,
-                   upp);
-clrtrackfunc();
-_res = Py_BuildValue("h",
-                     _rv);
-return _res;
-"""
-
-f = ManualGenerator("TrackControl", trackcontrol_body);
-f.docstring = lambda: "(Point startPoint [,trackercallback]) -> (ControlPartCode _rv)"
-object.add(f)
-
-# CJW - added 5/12/99
-# Manual generator for HandleControlClick, as for TrackControl
-handlecontrolclick_body = """
-ControlPartCode _rv;
-Point startPoint;
-SInt16 modifiers;
-ControlActionUPP upp = 0;
-PyObject *callback = 0;
-
-if (!PyArg_ParseTuple(_args, "O&h|O",
-                      PyMac_GetPoint, &startPoint,
-                      &modifiers,
-                      &callback))
-        return NULL;
-if (callback && callback != Py_None) {
-        if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
-                upp = (ControlActionUPP)-1;
-        else {
-                settrackfunc(callback);
-                upp = mytracker_upp;
-        }
-}
-_rv = HandleControlClick(_self->ob_itself,
-                   startPoint,
-                   modifiers,
-                   upp);
-clrtrackfunc();
-_res = Py_BuildValue("h",
-                     _rv);
-return _res;
-"""
-
-f = ManualGenerator("HandleControlClick", handlecontrolclick_body);
-f.docstring = lambda: "(Point startPoint, Integer modifiers, [,trackercallback]) -> (ControlPartCode _rv)"
-object.add(f)
-
-# Manual Generator for SetControlData
-setcontroldata_body = """
-OSErr _err;
-ControlPartCode inPart;
-ResType inTagName;
-Size bufferSize;
-Ptr buffer;
-
-if (!PyArg_ParseTuple(_args, "hO&s#",
-                      &inPart,
-                      PyMac_GetOSType, &inTagName,
-                      &buffer, &bufferSize))
-        return NULL;
-
-_err = SetControlData(_self->ob_itself,
-                      inPart,
-                      inTagName,
-                      bufferSize,
-                      buffer);
-
-if (_err != noErr)
-        return PyMac_Error(_err);
-_res = Py_None;
-return _res;
-"""
-
-f = ManualGenerator("SetControlData", setcontroldata_body);
-f.docstring = lambda: "(stuff) -> None"
-object.add(f)
-
-# Manual Generator for GetControlData
-getcontroldata_body = """
-OSErr _err;
-ControlPartCode inPart;
-ResType inTagName;
-Size bufferSize;
-Ptr buffer;
-Size outSize;
-
-if (!PyArg_ParseTuple(_args, "hO&",
-                      &inPart,
-                      PyMac_GetOSType, &inTagName))
-        return NULL;
-
-/* allocate a buffer for the data */
-_err = GetControlDataSize(_self->ob_itself,
-                          inPart,
-                          inTagName,
-                          &bufferSize);
-if (_err != noErr)
-        return PyMac_Error(_err);
-buffer = PyMem_NEW(char, bufferSize);
-if (buffer == NULL)
-        return PyErr_NoMemory();
-
-_err = GetControlData(_self->ob_itself,
-                      inPart,
-                      inTagName,
-                      bufferSize,
-                      buffer,
-                      &outSize);
-
-if (_err != noErr) {
-        PyMem_DEL(buffer);
-        return PyMac_Error(_err);
-}
-_res = Py_BuildValue("s#", buffer, outSize);
-PyMem_DEL(buffer);
-return _res;
-"""
-
-f = ManualGenerator("GetControlData", getcontroldata_body);
-f.docstring = lambda: "(part, type) -> String"
-object.add(f)
-
-# Manual Generator for SetControlData_Handle
-setcontroldata_handle_body = """
-OSErr _err;
-ControlPartCode inPart;
-ResType inTagName;
-Handle buffer;
-
-if (!PyArg_ParseTuple(_args, "hO&O&",
-                      &inPart,
-                      PyMac_GetOSType, &inTagName,
-                      OptResObj_Convert, &buffer))
-        return NULL;
-
-_err = SetControlData(_self->ob_itself,
-                      inPart,
-                      inTagName,
-                      sizeof(buffer),
-                      (Ptr)&buffer);
-
-if (_err != noErr)
-        return PyMac_Error(_err);
-_res = Py_None;
-return _res;
-"""
-
-f = ManualGenerator("SetControlData_Handle", setcontroldata_handle_body);
-f.docstring = lambda: "(ResObj) -> None"
-object.add(f)
-
-# Manual Generator for GetControlData_Handle
-getcontroldata_handle_body = """
-OSErr _err;
-ControlPartCode inPart;
-ResType inTagName;
-Size bufferSize;
-Handle hdl;
-
-if (!PyArg_ParseTuple(_args, "hO&",
-                      &inPart,
-                      PyMac_GetOSType, &inTagName))
-        return NULL;
-
-/* Check it is handle-sized */
-_err = GetControlDataSize(_self->ob_itself,
-                          inPart,
-                          inTagName,
-                          &bufferSize);
-if (_err != noErr)
-        return PyMac_Error(_err);
-if (bufferSize != sizeof(Handle)) {
-        PyErr_SetString(Ctl_Error, "GetControlDataSize() != sizeof(Handle)");
-        return NULL;
-}
-
-_err = GetControlData(_self->ob_itself,
-                      inPart,
-                      inTagName,
-                      sizeof(Handle),
-                      (Ptr)&hdl,
-                      &bufferSize);
-
-if (_err != noErr) {
-        return PyMac_Error(_err);
-}
-_res = Py_BuildValue("O&", OptResObj_New, hdl);
-return _res;
-"""
-
-f = ManualGenerator("GetControlData_Handle", getcontroldata_handle_body);
-f.docstring = lambda: "(part, type) -> ResObj"
-object.add(f)
-
-# Manual Generator for SetControlData_Callback
-setcontroldata_callback_body = """
-OSErr _err;
-ControlPartCode inPart;
-ResType inTagName;
-PyObject *callback;
-UniversalProcPtr c_callback;
-
-if (!PyArg_ParseTuple(_args, "hO&O",
-                      &inPart,
-                      PyMac_GetOSType, &inTagName,
-                      &callback))
-        return NULL;
-
-if ( setcallback((PyObject *)_self, inTagName, callback, &c_callback) < 0 )
-        return NULL;
-_err = SetControlData(_self->ob_itself,
-                      inPart,
-                      inTagName,
-                      sizeof(c_callback),
-                      (Ptr)&c_callback);
-
-if (_err != noErr)
-        return PyMac_Error(_err);
-_res = Py_None;
-return _res;
-"""
-
-f = ManualGenerator("SetControlData_Callback", setcontroldata_callback_body);
-f.docstring = lambda: "(callbackfunc) -> None"
-object.add(f)
-
-
-
-createtabscontrol_body = """\
-OSStatus _err;
-WindowPtr window;
-Rect boundsRect;
-UInt16 size;
-UInt16 direction;
-int i;
-UInt16 numTabs;
-ControlTabEntry tabArray[MAXTABS];
-ControlHandle outControl;
-PyObject *tabArrayObj, *tabEntry;
-
-#ifndef CreateTabsControl
-PyMac_PRECHECK(CreateTabsControl);
-#endif
-if (!PyArg_ParseTuple(_args, "O&O&HHO",
-                      WinObj_Convert, &window,
-                      PyMac_GetRect, &boundsRect,
-                      &size,
-                      &direction,
-                      &tabArrayObj))
-        return NULL;
-
-i = PySequence_Length(tabArrayObj);
-if (i == -1)
-        return NULL;
-if (i > MAXTABS) {
-        PyErr_SetString(Ctl_Error, "Too many tabs");
-        return NULL;
-}
-numTabs = i;
-for (i=0; i<numTabs; i++) {
-        tabEntry = PySequence_GetItem(tabArrayObj, i);
-        if (tabEntry == NULL)
-                return NULL;
-        if (!PyArg_Parse(tabEntry, "(O&O&B)",
-                         ControlButtonContentInfo_Convert, &tabArray[i].icon,
-                         CFStringRefObj_Convert, &tabArray[i].name,
-                         &tabArray[i].enabled
-                         ))
-                return NULL;
-}
-
-_err = CreateTabsControl(window,
-                         &boundsRect,
-                         size,
-                         direction,
-                         numTabs,
-                         tabArray,
-                         &outControl);
-if (_err != noErr) return PyMac_Error(_err);
-_res = Py_BuildValue("O&",
-                     CtlObj_New, outControl);
-return _res;"""
-
-f = ManualGenerator("CreateTabsControl", createtabscontrol_body)
-f.docstring = lambda: "(WindowPtr window, Rect boundsRect, UInt16 size, UInt16 direction, ControlTabEntry tabArray) -> (ControlHandle outControl)"
-module.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c
deleted file mode 100644 (file)
index 866b357..0000000
+++ /dev/null
@@ -1,1595 +0,0 @@
-
-/* ========================== Module _Dlg =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_DlgObj_New(DialogRef);
-extern PyObject *_DlgObj_WhichDialog(DialogRef);
-extern int _DlgObj_Convert(PyObject *, DialogRef *);
-
-#define DlgObj_New _DlgObj_New
-#define DlgObj_WhichDialog _DlgObj_WhichDialog
-#define DlgObj_Convert _DlgObj_Convert
-#endif
-
-/* XXX Shouldn't this be a stack? */
-static PyObject *Dlg_FilterProc_callback = NULL;
-
-static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
-                                         EventRecord *event,
-                                         short *itemHit)
-{
-        Boolean rv;
-        PyObject *args, *res;
-        PyObject *callback = Dlg_FilterProc_callback;
-        if (callback == NULL)
-                return 0; /* Default behavior */
-        Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
-        args = Py_BuildValue("O&O&", DlgObj_WhichDialog, dialog, PyMac_BuildEventRecord, event);
-        if (args == NULL)
-                res = NULL;
-        else {
-                res = PyEval_CallObject(callback, args);
-                Py_DECREF(args);
-        }
-        if (res == NULL) {
-                PySys_WriteStderr("Exception in Dialog Filter\n");
-                PyErr_Print();
-                *itemHit = -1; /* Fake return item */
-                return 1; /* We handled it */
-        }
-        else {
-                Dlg_FilterProc_callback = callback;
-                if (PyLong_Check(res)) {
-                        *itemHit = PyLong_AsLong(res);
-                        rv = 1;
-                }
-                else
-                        rv = PyObject_IsTrue(res);
-        }
-        Py_DECREF(res);
-        return rv;
-}
-
-static ModalFilterUPP
-Dlg_PassFilterProc(PyObject *callback)
-{
-        PyObject *tmp = Dlg_FilterProc_callback;
-        static ModalFilterUPP UnivFilterUpp = NULL;
-
-        Dlg_FilterProc_callback = NULL;
-        if (callback == Py_None) {
-                Py_XDECREF(tmp);
-                return NULL;
-        }
-        Py_INCREF(callback);
-        Dlg_FilterProc_callback = callback;
-        Py_XDECREF(tmp);
-        if ( UnivFilterUpp == NULL )
-                UnivFilterUpp = NewModalFilterUPP(&Dlg_UnivFilterProc);
-        return UnivFilterUpp;
-}
-
-static PyObject *Dlg_UserItemProc_callback = NULL;
-
-static pascal void Dlg_UnivUserItemProc(DialogPtr dialog,
-                                         short item)
-{
-        PyObject *args, *res;
-
-        if (Dlg_UserItemProc_callback == NULL)
-                return; /* Default behavior */
-        Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
-        args = Py_BuildValue("O&h", DlgObj_WhichDialog, dialog, item);
-        if (args == NULL)
-                res = NULL;
-        else {
-                res = PyEval_CallObject(Dlg_UserItemProc_callback, args);
-                Py_DECREF(args);
-        }
-        if (res == NULL) {
-                PySys_WriteStderr("Exception in Dialog UserItem proc\n");
-                PyErr_Print();
-        }
-        Py_XDECREF(res);
-        return;
-}
-
-#if 0
-/*
-** Treating DialogObjects as WindowObjects is (I think) illegal under Carbon.
-** However, as they are still identical under MacOS9 Carbon this is a problem, even
-** if we neatly call GetDialogWindow() at the right places: there's one refcon field
-** and it points to the DialogObject, so WinObj_WhichWindow will smartly return the
-** dialog object, and therefore we still don't have a WindowObject.
-** I'll leave the chaining code in place for now, with this comment to warn the
-** unsuspecting victims (i.e. me, probably, in a few weeks:-)
-*/
-extern PyMethodChain WinObj_chain;
-#endif
-
-static PyObject *Dlg_Error;
-
-/* ----------------------- Object type Dialog ----------------------- */
-
-PyTypeObject Dialog_Type;
-
-#define DlgObj_Check(x) (Py_TYPE(x) == &Dialog_Type || PyObject_TypeCheck((x), &Dialog_Type))
-
-typedef struct DialogObject {
-       PyObject_HEAD
-       DialogPtr ob_itself;
-} DialogObject;
-
-PyObject *DlgObj_New(DialogPtr itself)
-{
-       DialogObject *it;
-       if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }
-       it = PyObject_NEW(DialogObject, &Dialog_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       SetWRefCon(GetDialogWindow(itself), (long)it);
-       return (PyObject *)it;
-}
-
-int DlgObj_Convert(PyObject *v, DialogPtr *p_itself)
-{
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       if (PyLong_Check(v)) { *p_itself = (DialogPtr)PyLong_AsLong(v);
-                             return 1; }
-       if (!DlgObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Dialog required");
-               return 0;
-       }
-       *p_itself = ((DialogObject *)v)->ob_itself;
-       return 1;
-}
-
-static void DlgObj_dealloc(DialogObject *self)
-{
-       DisposeDialog(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *DlgObj_DrawDialog(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DrawDialog
-       PyMac_PRECHECK(DrawDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DrawDialog(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_UpdateDialog(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle updateRgn;
-#ifndef UpdateDialog
-       PyMac_PRECHECK(UpdateDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &updateRgn))
-               return NULL;
-       UpdateDialog(_self->ob_itself,
-                    updateRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_HideDialogItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex itemNo;
-#ifndef HideDialogItem
-       PyMac_PRECHECK(HideDialogItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &itemNo))
-               return NULL;
-       HideDialogItem(_self->ob_itself,
-                      itemNo);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_ShowDialogItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex itemNo;
-#ifndef ShowDialogItem
-       PyMac_PRECHECK(ShowDialogItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &itemNo))
-               return NULL;
-       ShowDialogItem(_self->ob_itself,
-                      itemNo);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_FindDialogItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndexZeroBased _rv;
-       Point thePt;
-#ifndef FindDialogItem
-       PyMac_PRECHECK(FindDialogItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &thePt))
-               return NULL;
-       _rv = FindDialogItem(_self->ob_itself,
-                            thePt);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *DlgObj_DialogCut(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DialogCut
-       PyMac_PRECHECK(DialogCut);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DialogCut(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_DialogPaste(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DialogPaste
-       PyMac_PRECHECK(DialogPaste);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DialogPaste(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_DialogCopy(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DialogCopy
-       PyMac_PRECHECK(DialogCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DialogCopy(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_DialogDelete(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DialogDelete
-       PyMac_PRECHECK(DialogDelete);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DialogDelete(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_GetDialogItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex itemNo;
-       DialogItemType itemType;
-       Handle item;
-       Rect box;
-#ifndef GetDialogItem
-       PyMac_PRECHECK(GetDialogItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &itemNo))
-               return NULL;
-       GetDialogItem(_self->ob_itself,
-                     itemNo,
-                     &itemType,
-                     &item,
-                     &box);
-       _res = Py_BuildValue("hO&O&",
-                            itemType,
-                            OptResObj_New, item,
-                            PyMac_BuildRect, &box);
-       return _res;
-}
-
-static PyObject *DlgObj_SetDialogItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex itemNo;
-       DialogItemType itemType;
-       Handle item;
-       Rect box;
-#ifndef SetDialogItem
-       PyMac_PRECHECK(SetDialogItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhO&O&",
-                             &itemNo,
-                             &itemType,
-                             ResObj_Convert, &item,
-                             PyMac_GetRect, &box))
-               return NULL;
-       SetDialogItem(_self->ob_itself,
-                     itemNo,
-                     itemType,
-                     item,
-                     &box);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_SelectDialogItemText(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex itemNo;
-       SInt16 strtSel;
-       SInt16 endSel;
-#ifndef SelectDialogItemText
-       PyMac_PRECHECK(SelectDialogItemText);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhh",
-                             &itemNo,
-                             &strtSel,
-                             &endSel))
-               return NULL;
-       SelectDialogItemText(_self->ob_itself,
-                            itemNo,
-                            strtSel,
-                            endSel);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_AppendDITL(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle theHandle;
-       DITLMethod method;
-#ifndef AppendDITL
-       PyMac_PRECHECK(AppendDITL);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             ResObj_Convert, &theHandle,
-                             &method))
-               return NULL;
-       AppendDITL(_self->ob_itself,
-                  theHandle,
-                  method);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_CountDITL(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex _rv;
-#ifndef CountDITL
-       PyMac_PRECHECK(CountDITL);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CountDITL(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *DlgObj_ShortenDITL(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex numberItems;
-#ifndef ShortenDITL
-       PyMac_PRECHECK(ShortenDITL);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &numberItems))
-               return NULL;
-       ShortenDITL(_self->ob_itself,
-                   numberItems);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_InsertDialogItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       DialogItemIndex afterItem;
-       DialogItemType itemType;
-       Handle itemHandle;
-       Rect box;
-#ifndef InsertDialogItem
-       PyMac_PRECHECK(InsertDialogItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhO&O&",
-                             &afterItem,
-                             &itemType,
-                             ResObj_Convert, &itemHandle,
-                             PyMac_GetRect, &box))
-               return NULL;
-       _err = InsertDialogItem(_self->ob_itself,
-                               afterItem,
-                               itemType,
-                               itemHandle,
-                               &box);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_RemoveDialogItems(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       DialogItemIndex itemNo;
-       DialogItemIndex amountToRemove;
-       Boolean disposeItemData;
-#ifndef RemoveDialogItems
-       PyMac_PRECHECK(RemoveDialogItems);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhb",
-                             &itemNo,
-                             &amountToRemove,
-                             &disposeItemData))
-               return NULL;
-       _err = RemoveDialogItems(_self->ob_itself,
-                                itemNo,
-                                amountToRemove,
-                                disposeItemData);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_StdFilterProc(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord event;
-       DialogItemIndex itemHit;
-#ifndef StdFilterProc
-       PyMac_PRECHECK(StdFilterProc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetEventRecord, &event,
-                             &itemHit))
-               return NULL;
-       _rv = StdFilterProc(_self->ob_itself,
-                           &event,
-                           &itemHit);
-       _res = Py_BuildValue("bO&h",
-                            _rv,
-                            PyMac_BuildEventRecord, &event,
-                            itemHit);
-       return _res;
-}
-
-static PyObject *DlgObj_SetDialogDefaultItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DialogItemIndex newItem;
-#ifndef SetDialogDefaultItem
-       PyMac_PRECHECK(SetDialogDefaultItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &newItem))
-               return NULL;
-       _err = SetDialogDefaultItem(_self->ob_itself,
-                                   newItem);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_SetDialogCancelItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DialogItemIndex newItem;
-#ifndef SetDialogCancelItem
-       PyMac_PRECHECK(SetDialogCancelItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &newItem))
-               return NULL;
-       _err = SetDialogCancelItem(_self->ob_itself,
-                                  newItem);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_SetDialogTracksCursor(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Boolean tracks;
-#ifndef SetDialogTracksCursor
-       PyMac_PRECHECK(SetDialogTracksCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &tracks))
-               return NULL;
-       _err = SetDialogTracksCursor(_self->ob_itself,
-                                    tracks);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_AutoSizeDialog(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef AutoSizeDialog
-       PyMac_PRECHECK(AutoSizeDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = AutoSizeDialog(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_GetDialogItemAsControl(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItemNo;
-       ControlHandle outControl;
-#ifndef GetDialogItemAsControl
-       PyMac_PRECHECK(GetDialogItemAsControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItemNo))
-               return NULL;
-       _err = GetDialogItemAsControl(_self->ob_itself,
-                                     inItemNo,
-                                     &outControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, outControl);
-       return _res;
-}
-
-static PyObject *DlgObj_MoveDialogItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItemNo;
-       SInt16 inHoriz;
-       SInt16 inVert;
-#ifndef MoveDialogItem
-       PyMac_PRECHECK(MoveDialogItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhh",
-                             &inItemNo,
-                             &inHoriz,
-                             &inVert))
-               return NULL;
-       _err = MoveDialogItem(_self->ob_itself,
-                             inItemNo,
-                             inHoriz,
-                             inVert);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_SizeDialogItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItemNo;
-       SInt16 inWidth;
-       SInt16 inHeight;
-#ifndef SizeDialogItem
-       PyMac_PRECHECK(SizeDialogItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhh",
-                             &inItemNo,
-                             &inWidth,
-                             &inHeight))
-               return NULL;
-       _err = SizeDialogItem(_self->ob_itself,
-                             inItemNo,
-                             inWidth,
-                             inHeight);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_AppendDialogItemList(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 ditlID;
-       DITLMethod method;
-#ifndef AppendDialogItemList
-       PyMac_PRECHECK(AppendDialogItemList);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &ditlID,
-                             &method))
-               return NULL;
-       _err = AppendDialogItemList(_self->ob_itself,
-                                   ditlID,
-                                   method);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_SetDialogTimeout(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt16 inButtonToPress;
-       UInt32 inSecondsToWait;
-#ifndef SetDialogTimeout
-       PyMac_PRECHECK(SetDialogTimeout);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &inButtonToPress,
-                             &inSecondsToWait))
-               return NULL;
-       _err = SetDialogTimeout(_self->ob_itself,
-                               inButtonToPress,
-                               inSecondsToWait);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_GetDialogTimeout(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt16 outButtonToPress;
-       UInt32 outSecondsToWait;
-       UInt32 outSecondsRemaining;
-#ifndef GetDialogTimeout
-       PyMac_PRECHECK(GetDialogTimeout);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDialogTimeout(_self->ob_itself,
-                               &outButtonToPress,
-                               &outSecondsToWait,
-                               &outSecondsRemaining);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hll",
-                            outButtonToPress,
-                            outSecondsToWait,
-                            outSecondsRemaining);
-       return _res;
-}
-
-static PyObject *DlgObj_SetModalDialogEventMask(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       EventMask inMask;
-#ifndef SetModalDialogEventMask
-       PyMac_PRECHECK(SetModalDialogEventMask);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &inMask))
-               return NULL;
-       _err = SetModalDialogEventMask(_self->ob_itself,
-                                      inMask);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_GetModalDialogEventMask(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       EventMask outMask;
-#ifndef GetModalDialogEventMask
-       PyMac_PRECHECK(GetModalDialogEventMask);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetModalDialogEventMask(_self->ob_itself,
-                                      &outMask);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            outMask);
-       return _res;
-}
-
-static PyObject *DlgObj_GetDialogWindow(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-#ifndef GetDialogWindow
-       PyMac_PRECHECK(GetDialogWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetDialogWindow(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *DlgObj_GetDialogTextEditHandle(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TEHandle _rv;
-#ifndef GetDialogTextEditHandle
-       PyMac_PRECHECK(GetDialogTextEditHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetDialogTextEditHandle(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *DlgObj_GetDialogDefaultItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef GetDialogDefaultItem
-       PyMac_PRECHECK(GetDialogDefaultItem);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetDialogDefaultItem(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *DlgObj_GetDialogCancelItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef GetDialogCancelItem
-       PyMac_PRECHECK(GetDialogCancelItem);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetDialogCancelItem(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *DlgObj_GetDialogKeyboardFocusItem(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef GetDialogKeyboardFocusItem
-       PyMac_PRECHECK(GetDialogKeyboardFocusItem);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetDialogKeyboardFocusItem(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *DlgObj_SetPortDialogPort(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef SetPortDialogPort
-       PyMac_PRECHECK(SetPortDialogPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       SetPortDialogPort(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DlgObj_GetDialogPort(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr _rv;
-#ifndef GetDialogPort
-       PyMac_PRECHECK(GetDialogPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetDialogPort(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, _rv);
-       return _res;
-}
-
-static PyMethodDef DlgObj_methods[] = {
-       {"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
-        PyDoc_STR("() -> None")},
-       {"UpdateDialog", (PyCFunction)DlgObj_UpdateDialog, 1,
-        PyDoc_STR("(RgnHandle updateRgn) -> None")},
-       {"HideDialogItem", (PyCFunction)DlgObj_HideDialogItem, 1,
-        PyDoc_STR("(DialogItemIndex itemNo) -> None")},
-       {"ShowDialogItem", (PyCFunction)DlgObj_ShowDialogItem, 1,
-        PyDoc_STR("(DialogItemIndex itemNo) -> None")},
-       {"FindDialogItem", (PyCFunction)DlgObj_FindDialogItem, 1,
-        PyDoc_STR("(Point thePt) -> (DialogItemIndexZeroBased _rv)")},
-       {"DialogCut", (PyCFunction)DlgObj_DialogCut, 1,
-        PyDoc_STR("() -> None")},
-       {"DialogPaste", (PyCFunction)DlgObj_DialogPaste, 1,
-        PyDoc_STR("() -> None")},
-       {"DialogCopy", (PyCFunction)DlgObj_DialogCopy, 1,
-        PyDoc_STR("() -> None")},
-       {"DialogDelete", (PyCFunction)DlgObj_DialogDelete, 1,
-        PyDoc_STR("() -> None")},
-       {"GetDialogItem", (PyCFunction)DlgObj_GetDialogItem, 1,
-        PyDoc_STR("(DialogItemIndex itemNo) -> (DialogItemType itemType, Handle item, Rect box)")},
-       {"SetDialogItem", (PyCFunction)DlgObj_SetDialogItem, 1,
-        PyDoc_STR("(DialogItemIndex itemNo, DialogItemType itemType, Handle item, Rect box) -> None")},
-       {"SelectDialogItemText", (PyCFunction)DlgObj_SelectDialogItemText, 1,
-        PyDoc_STR("(DialogItemIndex itemNo, SInt16 strtSel, SInt16 endSel) -> None")},
-       {"AppendDITL", (PyCFunction)DlgObj_AppendDITL, 1,
-        PyDoc_STR("(Handle theHandle, DITLMethod method) -> None")},
-       {"CountDITL", (PyCFunction)DlgObj_CountDITL, 1,
-        PyDoc_STR("() -> (DialogItemIndex _rv)")},
-       {"ShortenDITL", (PyCFunction)DlgObj_ShortenDITL, 1,
-        PyDoc_STR("(DialogItemIndex numberItems) -> None")},
-       {"InsertDialogItem", (PyCFunction)DlgObj_InsertDialogItem, 1,
-        PyDoc_STR("(DialogItemIndex afterItem, DialogItemType itemType, Handle itemHandle, Rect box) -> None")},
-       {"RemoveDialogItems", (PyCFunction)DlgObj_RemoveDialogItems, 1,
-        PyDoc_STR("(DialogItemIndex itemNo, DialogItemIndex amountToRemove, Boolean disposeItemData) -> None")},
-       {"StdFilterProc", (PyCFunction)DlgObj_StdFilterProc, 1,
-        PyDoc_STR("(EventRecord event, DialogItemIndex itemHit) -> (Boolean _rv, EventRecord event, DialogItemIndex itemHit)")},
-       {"SetDialogDefaultItem", (PyCFunction)DlgObj_SetDialogDefaultItem, 1,
-        PyDoc_STR("(DialogItemIndex newItem) -> None")},
-       {"SetDialogCancelItem", (PyCFunction)DlgObj_SetDialogCancelItem, 1,
-        PyDoc_STR("(DialogItemIndex newItem) -> None")},
-       {"SetDialogTracksCursor", (PyCFunction)DlgObj_SetDialogTracksCursor, 1,
-        PyDoc_STR("(Boolean tracks) -> None")},
-       {"AutoSizeDialog", (PyCFunction)DlgObj_AutoSizeDialog, 1,
-        PyDoc_STR("() -> None")},
-       {"GetDialogItemAsControl", (PyCFunction)DlgObj_GetDialogItemAsControl, 1,
-        PyDoc_STR("(SInt16 inItemNo) -> (ControlHandle outControl)")},
-       {"MoveDialogItem", (PyCFunction)DlgObj_MoveDialogItem, 1,
-        PyDoc_STR("(SInt16 inItemNo, SInt16 inHoriz, SInt16 inVert) -> None")},
-       {"SizeDialogItem", (PyCFunction)DlgObj_SizeDialogItem, 1,
-        PyDoc_STR("(SInt16 inItemNo, SInt16 inWidth, SInt16 inHeight) -> None")},
-       {"AppendDialogItemList", (PyCFunction)DlgObj_AppendDialogItemList, 1,
-        PyDoc_STR("(SInt16 ditlID, DITLMethod method) -> None")},
-       {"SetDialogTimeout", (PyCFunction)DlgObj_SetDialogTimeout, 1,
-        PyDoc_STR("(SInt16 inButtonToPress, UInt32 inSecondsToWait) -> None")},
-       {"GetDialogTimeout", (PyCFunction)DlgObj_GetDialogTimeout, 1,
-        PyDoc_STR("() -> (SInt16 outButtonToPress, UInt32 outSecondsToWait, UInt32 outSecondsRemaining)")},
-       {"SetModalDialogEventMask", (PyCFunction)DlgObj_SetModalDialogEventMask, 1,
-        PyDoc_STR("(EventMask inMask) -> None")},
-       {"GetModalDialogEventMask", (PyCFunction)DlgObj_GetModalDialogEventMask, 1,
-        PyDoc_STR("() -> (EventMask outMask)")},
-       {"GetDialogWindow", (PyCFunction)DlgObj_GetDialogWindow, 1,
-        PyDoc_STR("() -> (WindowPtr _rv)")},
-       {"GetDialogTextEditHandle", (PyCFunction)DlgObj_GetDialogTextEditHandle, 1,
-        PyDoc_STR("() -> (TEHandle _rv)")},
-       {"GetDialogDefaultItem", (PyCFunction)DlgObj_GetDialogDefaultItem, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"GetDialogCancelItem", (PyCFunction)DlgObj_GetDialogCancelItem, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"GetDialogKeyboardFocusItem", (PyCFunction)DlgObj_GetDialogKeyboardFocusItem, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"SetPortDialogPort", (PyCFunction)DlgObj_SetPortDialogPort, 1,
-        PyDoc_STR("() -> None")},
-       {"GetDialogPort", (PyCFunction)DlgObj_GetDialogPort, 1,
-        PyDoc_STR("() -> (CGrafPtr _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define DlgObj_getsetlist NULL
-
-
-static int DlgObj_compare(DialogObject *self, DialogObject *other)
-{
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-#define DlgObj_repr NULL
-
-static int DlgObj_hash(DialogObject *self)
-{
-       return (int)self->ob_itself;
-}
-#define DlgObj_tp_init 0
-
-#define DlgObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *DlgObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       DialogPtr itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, DlgObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((DialogObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define DlgObj_tp_free PyObject_Del
-
-
-PyTypeObject Dialog_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Dlg.Dialog", /*tp_name*/
-       sizeof(DialogObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) DlgObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) DlgObj_compare, /*tp_compare*/
-       (reprfunc) DlgObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) DlgObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       DlgObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       DlgObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       DlgObj_tp_init, /* tp_init */
-       DlgObj_tp_alloc, /* tp_alloc */
-       DlgObj_tp_new, /* tp_new */
-       DlgObj_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type Dialog --------------------- */
-
-
-static PyObject *Dlg_NewDialog(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogPtr _rv;
-       Rect boundsRect;
-       Str255 title;
-       Boolean visible;
-       SInt16 procID;
-       WindowPtr behind;
-       Boolean goAwayFlag;
-       SInt32 refCon;
-       Handle items;
-#ifndef NewDialog
-       PyMac_PRECHECK(NewDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
-                             PyMac_GetRect, &boundsRect,
-                             PyMac_GetStr255, title,
-                             &visible,
-                             &procID,
-                             WinObj_Convert, &behind,
-                             &goAwayFlag,
-                             &refCon,
-                             ResObj_Convert, &items))
-               return NULL;
-       _rv = NewDialog((void *)0,
-                       &boundsRect,
-                       title,
-                       visible,
-                       procID,
-                       behind,
-                       goAwayFlag,
-                       refCon,
-                       items);
-       _res = Py_BuildValue("O&",
-                            DlgObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Dlg_GetNewDialog(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogPtr _rv;
-       SInt16 dialogID;
-       WindowPtr behind;
-#ifndef GetNewDialog
-       PyMac_PRECHECK(GetNewDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &dialogID,
-                             WinObj_Convert, &behind))
-               return NULL;
-       _rv = GetNewDialog(dialogID,
-                          (void *)0,
-                          behind);
-       _res = Py_BuildValue("O&",
-                            DlgObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Dlg_NewColorDialog(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogPtr _rv;
-       Rect boundsRect;
-       Str255 title;
-       Boolean visible;
-       SInt16 procID;
-       WindowPtr behind;
-       Boolean goAwayFlag;
-       SInt32 refCon;
-       Handle items;
-#ifndef NewColorDialog
-       PyMac_PRECHECK(NewColorDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
-                             PyMac_GetRect, &boundsRect,
-                             PyMac_GetStr255, title,
-                             &visible,
-                             &procID,
-                             WinObj_Convert, &behind,
-                             &goAwayFlag,
-                             &refCon,
-                             ResObj_Convert, &items))
-               return NULL;
-       _rv = NewColorDialog((void *)0,
-                            &boundsRect,
-                            title,
-                            visible,
-                            procID,
-                            behind,
-                            goAwayFlag,
-                            refCon,
-                            items);
-       _res = Py_BuildValue("O&",
-                            DlgObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Dlg_ModalDialog(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PyObject* modalFilter;
-       DialogItemIndex itemHit;
-#ifndef ModalDialog
-       PyMac_PRECHECK(ModalDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "O",
-                             &modalFilter))
-               return NULL;
-       ModalDialog(Dlg_PassFilterProc(modalFilter),
-                   &itemHit);
-       _res = Py_BuildValue("h",
-                            itemHit);
-       return _res;
-}
-
-static PyObject *Dlg_IsDialogEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord theEvent;
-#ifndef IsDialogEvent
-       PyMac_PRECHECK(IsDialogEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &theEvent))
-               return NULL;
-       _rv = IsDialogEvent(&theEvent);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Dlg_DialogSelect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord theEvent;
-       DialogPtr theDialog;
-       DialogItemIndex itemHit;
-#ifndef DialogSelect
-       PyMac_PRECHECK(DialogSelect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &theEvent))
-               return NULL;
-       _rv = DialogSelect(&theEvent,
-                          &theDialog,
-                          &itemHit);
-       _res = Py_BuildValue("bO&h",
-                            _rv,
-                            DlgObj_WhichDialog, theDialog,
-                            itemHit);
-       return _res;
-}
-
-static PyObject *Dlg_Alert(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex _rv;
-       SInt16 alertID;
-       PyObject* modalFilter;
-#ifndef Alert
-       PyMac_PRECHECK(Alert);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO",
-                             &alertID,
-                             &modalFilter))
-               return NULL;
-       _rv = Alert(alertID,
-                   Dlg_PassFilterProc(modalFilter));
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Dlg_StopAlert(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex _rv;
-       SInt16 alertID;
-       PyObject* modalFilter;
-#ifndef StopAlert
-       PyMac_PRECHECK(StopAlert);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO",
-                             &alertID,
-                             &modalFilter))
-               return NULL;
-       _rv = StopAlert(alertID,
-                       Dlg_PassFilterProc(modalFilter));
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Dlg_NoteAlert(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex _rv;
-       SInt16 alertID;
-       PyObject* modalFilter;
-#ifndef NoteAlert
-       PyMac_PRECHECK(NoteAlert);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO",
-                             &alertID,
-                             &modalFilter))
-               return NULL;
-       _rv = NoteAlert(alertID,
-                       Dlg_PassFilterProc(modalFilter));
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Dlg_CautionAlert(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogItemIndex _rv;
-       SInt16 alertID;
-       PyObject* modalFilter;
-#ifndef CautionAlert
-       PyMac_PRECHECK(CautionAlert);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO",
-                             &alertID,
-                             &modalFilter))
-               return NULL;
-       _rv = CautionAlert(alertID,
-                          Dlg_PassFilterProc(modalFilter));
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Dlg_ParamText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 param0;
-       Str255 param1;
-       Str255 param2;
-       Str255 param3;
-#ifndef ParamText
-       PyMac_PRECHECK(ParamText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             PyMac_GetStr255, param0,
-                             PyMac_GetStr255, param1,
-                             PyMac_GetStr255, param2,
-                             PyMac_GetStr255, param3))
-               return NULL;
-       ParamText(param0,
-                 param1,
-                 param2,
-                 param3);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Dlg_GetDialogItemText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle item;
-       Str255 text;
-#ifndef GetDialogItemText
-       PyMac_PRECHECK(GetDialogItemText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &item))
-               return NULL;
-       GetDialogItemText(item,
-                         text);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildStr255, text);
-       return _res;
-}
-
-static PyObject *Dlg_SetDialogItemText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle item;
-       Str255 text;
-#ifndef SetDialogItemText
-       PyMac_PRECHECK(SetDialogItemText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &item,
-                             PyMac_GetStr255, text))
-               return NULL;
-       SetDialogItemText(item,
-                         text);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Dlg_GetAlertStage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef GetAlertStage
-       PyMac_PRECHECK(GetAlertStage);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetAlertStage();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Dlg_SetDialogFont(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 fontNum;
-#ifndef SetDialogFont
-       PyMac_PRECHECK(SetDialogFont);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &fontNum))
-               return NULL;
-       SetDialogFont(fontNum);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Dlg_ResetAlertStage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ResetAlertStage
-       PyMac_PRECHECK(ResetAlertStage);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ResetAlertStage();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Dlg_GetParamText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 param0;
-       Str255 param1;
-       Str255 param2;
-       Str255 param3;
-#ifndef GetParamText
-       PyMac_PRECHECK(GetParamText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             PyMac_GetStr255, param0,
-                             PyMac_GetStr255, param1,
-                             PyMac_GetStr255, param2,
-                             PyMac_GetStr255, param3))
-               return NULL;
-       GetParamText(param0,
-                    param1,
-                    param2,
-                    param3);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Dlg_NewFeaturesDialog(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogPtr _rv;
-       Rect inBoundsRect;
-       Str255 inTitle;
-       Boolean inIsVisible;
-       SInt16 inProcID;
-       WindowPtr inBehind;
-       Boolean inGoAwayFlag;
-       SInt32 inRefCon;
-       Handle inItemListHandle;
-       UInt32 inFlags;
-#ifndef NewFeaturesDialog
-       PyMac_PRECHECK(NewFeaturesDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&l",
-                             PyMac_GetRect, &inBoundsRect,
-                             PyMac_GetStr255, inTitle,
-                             &inIsVisible,
-                             &inProcID,
-                             WinObj_Convert, &inBehind,
-                             &inGoAwayFlag,
-                             &inRefCon,
-                             ResObj_Convert, &inItemListHandle,
-                             &inFlags))
-               return NULL;
-       _rv = NewFeaturesDialog((void *)0,
-                               &inBoundsRect,
-                               inTitle,
-                               inIsVisible,
-                               inProcID,
-                               inBehind,
-                               inGoAwayFlag,
-                               inRefCon,
-                               inItemListHandle,
-                               inFlags);
-       _res = Py_BuildValue("O&",
-                            DlgObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Dlg_GetDialogFromWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DialogPtr _rv;
-       WindowPtr window;
-#ifndef GetDialogFromWindow
-       PyMac_PRECHECK(GetDialogFromWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &window))
-               return NULL;
-       _rv = GetDialogFromWindow(window);
-       _res = Py_BuildValue("O&",
-                            DlgObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Dlg_SetUserItemHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-               PyObject *new = NULL;
-
-
-               if (!PyArg_ParseTuple(_args, "|O", &new))
-                       return NULL;
-
-               if (Dlg_UserItemProc_callback && new && new != Py_None) {
-                       PyErr_SetString(Dlg_Error, "Another UserItemProc is already installed");
-                       return NULL;
-               }
-
-               if (new == NULL || new == Py_None) {
-                       new = NULL;
-                       _res = Py_None;
-                       Py_INCREF(Py_None);
-               } else {
-                       Py_INCREF(new);
-                       _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemUPP(Dlg_UnivUserItemProc));
-               }
-
-               Dlg_UserItemProc_callback = new;
-               return _res;
-
-}
-
-static PyMethodDef Dlg_methods[] = {
-       {"NewDialog", (PyCFunction)Dlg_NewDialog, 1,
-        PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, SInt16 procID, WindowPtr behind, Boolean goAwayFlag, SInt32 refCon, Handle items) -> (DialogPtr _rv)")},
-       {"GetNewDialog", (PyCFunction)Dlg_GetNewDialog, 1,
-        PyDoc_STR("(SInt16 dialogID, WindowPtr behind) -> (DialogPtr _rv)")},
-       {"NewColorDialog", (PyCFunction)Dlg_NewColorDialog, 1,
-        PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, SInt16 procID, WindowPtr behind, Boolean goAwayFlag, SInt32 refCon, Handle items) -> (DialogPtr _rv)")},
-       {"ModalDialog", (PyCFunction)Dlg_ModalDialog, 1,
-        PyDoc_STR("(PyObject* modalFilter) -> (DialogItemIndex itemHit)")},
-       {"IsDialogEvent", (PyCFunction)Dlg_IsDialogEvent, 1,
-        PyDoc_STR("(EventRecord theEvent) -> (Boolean _rv)")},
-       {"DialogSelect", (PyCFunction)Dlg_DialogSelect, 1,
-        PyDoc_STR("(EventRecord theEvent) -> (Boolean _rv, DialogPtr theDialog, DialogItemIndex itemHit)")},
-       {"Alert", (PyCFunction)Dlg_Alert, 1,
-        PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
-       {"StopAlert", (PyCFunction)Dlg_StopAlert, 1,
-        PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
-       {"NoteAlert", (PyCFunction)Dlg_NoteAlert, 1,
-        PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
-       {"CautionAlert", (PyCFunction)Dlg_CautionAlert, 1,
-        PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
-       {"ParamText", (PyCFunction)Dlg_ParamText, 1,
-        PyDoc_STR("(Str255 param0, Str255 param1, Str255 param2, Str255 param3) -> None")},
-       {"GetDialogItemText", (PyCFunction)Dlg_GetDialogItemText, 1,
-        PyDoc_STR("(Handle item) -> (Str255 text)")},
-       {"SetDialogItemText", (PyCFunction)Dlg_SetDialogItemText, 1,
-        PyDoc_STR("(Handle item, Str255 text) -> None")},
-       {"GetAlertStage", (PyCFunction)Dlg_GetAlertStage, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"SetDialogFont", (PyCFunction)Dlg_SetDialogFont, 1,
-        PyDoc_STR("(SInt16 fontNum) -> None")},
-       {"ResetAlertStage", (PyCFunction)Dlg_ResetAlertStage, 1,
-        PyDoc_STR("() -> None")},
-       {"GetParamText", (PyCFunction)Dlg_GetParamText, 1,
-        PyDoc_STR("(Str255 param0, Str255 param1, Str255 param2, Str255 param3) -> None")},
-       {"NewFeaturesDialog", (PyCFunction)Dlg_NewFeaturesDialog, 1,
-        PyDoc_STR("(Rect inBoundsRect, Str255 inTitle, Boolean inIsVisible, SInt16 inProcID, WindowPtr inBehind, Boolean inGoAwayFlag, SInt32 inRefCon, Handle inItemListHandle, UInt32 inFlags) -> (DialogPtr _rv)")},
-       {"GetDialogFromWindow", (PyCFunction)Dlg_GetDialogFromWindow, 1,
-        PyDoc_STR("(WindowPtr window) -> (DialogPtr _rv)")},
-       {"SetUserItemHandler", (PyCFunction)Dlg_SetUserItemHandler, 1,
-        PyDoc_STR(NULL)},
-       {NULL, NULL, 0}
-};
-
-
-
-/* Return the WindowPtr corresponding to a DialogObject */
-#if 0
-WindowPtr
-DlgObj_ConvertToWindow(PyObject *self)
-{
-        if ( DlgObj_Check(self) )
-                return GetDialogWindow(((DialogObject *)self)->ob_itself);
-        return NULL;
-}
-#endif
-/* Return the object corresponding to the dialog, or None */
-
-PyObject *
-DlgObj_WhichDialog(DialogPtr d)
-{
-        PyObject *it;
-
-        if (d == NULL) {
-                it = Py_None;
-                Py_INCREF(it);
-        } else {
-                WindowPtr w = GetDialogWindow(d);
-
-                it = (PyObject *) GetWRefCon(w);
-                if (it == NULL || ((DialogObject *)it)->ob_itself != d || !DlgObj_Check(it)) {
-#if 0
-                        /* Should do this, but we don't have an ob_freeit for dialogs yet. */
-                        it = WinObj_New(w);
-                        ((WindowObject *)it)->ob_freeit = NULL;
-#else
-                        it = Py_None;
-                        Py_INCREF(it);
-#endif
-                } else {
-                        Py_INCREF(it);
-                }
-        }
-        return it;
-}
-
-
-void init_Dlg(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_WhichDialog);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DialogPtr, DlgObj_Convert);
-
-
-       m = Py_InitModule("_Dlg", Dlg_methods);
-       d = PyModule_GetDict(m);
-       Dlg_Error = PyMac_GetOSErrException();
-       if (Dlg_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Dlg_Error) != 0)
-               return;
-       Py_TYPE(&Dialog_Type) = &PyType_Type;
-       if (PyType_Ready(&Dialog_Type) < 0) return;
-       Py_INCREF(&Dialog_Type);
-       PyModule_AddObject(m, "Dialog", (PyObject *)&Dialog_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Dialog_Type);
-       PyModule_AddObject(m, "DialogType", (PyObject *)&Dialog_Type);
-}
-
-/* ======================== End module _Dlg ========================= */
-
diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py
deleted file mode 100644 (file)
index d63cffd..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-LONG = "Dialogs"
-SHORT = "dlg"
-OBJECT = "DialogPtr"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in ("DialogPtr", "DialogRef") and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                'InitDialogs',
-                'ErrorSound',
-                # Dialogs are disposed when the object is deleted
-                'CloseDialog',
-                'DisposDialog',
-                'DisposeDialog',
-                'UpdtDialog',
-                'CouldAlert',
-                'FreeAlert',
-                'CouldDialog',
-                'FreeDialog',
-                'GetStdFilterProc',
-                'GetDialogParent',
-##                      # Can't find these in the CW Pro 3 libraries
-                'SetDialogMovableModal',
-                'GetDialogControlNotificationProc',
-                'SetGrafPortOfDialog', # Funny, and probably not useful
-                # Can't find these:
-                'CloseStandardSheet',
-                'RunStandardAlert',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "AlertStdAlertParamPtr",        # Too much work, for now
-                "AlertStdAlertParamRec",        # ditto
-                "AlertStdAlertParamRec_ptr",    # ditto
-                "AlertStdCFStringAlertParamPtr",        # ditto
-                "AlertStdCFStringAlertParamRec",
-                "AlertStdCFStringAlertParamRec_ptr",
-                "QTModelessCallbackProcPtr",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("Str255", "*", "InMode")],
-                 [("*", "*", "OutMode")]),
-
-                ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
-                 [("InBuffer", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("long", "*", "InMode"),
-                                            ("long", "*", "OutMode")],
-                 [("VarVarOutBuffer", "*", "InOutMode")]),
-
-                # GetDialogItem return handle is optional
-                ([("Handle", "item", "OutMode")],
-                 [("OptHandle", "item", "OutMode")]),
-
-                # NewDialog ETC.
-                ([("void", "*", "OutMode")],
-                 [("NullStorage", "*", "InMode")]),
-
-                ([("DialogPtr", "*", "OutMode")],
-                 [("ExistingDialogPtr", "*", "*")]),
-                ([("DialogRef", "*", "OutMode")],
-                 [("ExistingDialogPtr", "*", "*")]),
-                ([("WindowPtr", "*", "OutMode")],
-                 [("ExistingWindowPtr", "*", "*")]),
-                ([("WindowPtr", "*", "ReturnMode")],
-                 [("ExistingWindowPtr", "*", "*")]),
-
-                # StdFilterProc
-                ([('EventRecord', 'event', 'OutMode'),
-                  ('DialogItemIndex', 'itemHit', 'OutMode')],
-                 [('EventRecord', 'event', 'InOutMode'),
-                  ('DialogItemIndex', 'itemHit', 'InOutMode')])
-
-                ]
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
deleted file mode 100644 (file)
index fcff5c0..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-# This script generates the Dialogs interface for Python.
-# It uses the "bgen" package to generate C code.
-# It execs the file dlggen.py which contain the function definitions
-# (dlggen.py was generated by dlgscan.py, scanning the <Dialogs.h> header file).
-
-from macsupport import *
-
-# Create the type objects
-
-DialogPtr = OpaqueByValueType("DialogPtr", "DlgObj")
-DialogRef = DialogPtr
-
-# An OptHandle is either a handle or None (in case NULL is passed in).
-# This is needed for GetDialogItem().
-OptHandle = OpaqueByValueType("Handle", "OptResObj")
-
-ModalFilterProcPtr = InputOnlyType("PyObject*", "O")
-ModalFilterProcPtr.passInput = lambda name: "Dlg_PassFilterProc(%s)" % name
-ModalFilterUPP = ModalFilterProcPtr
-
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-TEHandle = OpaqueByValueType("TEHandle", "ResObj")
-CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
-
-DITLMethod = Type("DITLMethod", "h")
-DialogItemIndex = Type("DialogItemIndex", "h")
-DialogItemType = Type("DialogItemType", "h")
-DialogItemIndexZeroBased = Type("DialogItemIndexZeroBased", "h")
-AlertType = Type("AlertType", "h")
-StringPtr = Str255
-EventMask = Type("EventMask", "H")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_DlgObj_New(DialogRef);
-extern PyObject *_DlgObj_WhichDialog(DialogRef);
-extern int _DlgObj_Convert(PyObject *, DialogRef *);
-
-#define DlgObj_New _DlgObj_New
-#define DlgObj_WhichDialog _DlgObj_WhichDialog
-#define DlgObj_Convert _DlgObj_Convert
-#endif
-
-/* XXX Shouldn't this be a stack? */
-static PyObject *Dlg_FilterProc_callback = NULL;
-
-static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
-                                         EventRecord *event,
-                                         short *itemHit)
-{
-        Boolean rv;
-        PyObject *args, *res;
-        PyObject *callback = Dlg_FilterProc_callback;
-        if (callback == NULL)
-                return 0; /* Default behavior */
-        Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
-        args = Py_BuildValue("O&O&", DlgObj_WhichDialog, dialog, PyMac_BuildEventRecord, event);
-        if (args == NULL)
-                res = NULL;
-        else {
-                res = PyEval_CallObject(callback, args);
-                Py_DECREF(args);
-        }
-        if (res == NULL) {
-                PySys_WriteStderr("Exception in Dialog Filter\\n");
-                PyErr_Print();
-                *itemHit = -1; /* Fake return item */
-                return 1; /* We handled it */
-        }
-        else {
-                Dlg_FilterProc_callback = callback;
-                if (PyInt_Check(res)) {
-                        *itemHit = PyInt_AsLong(res);
-                        rv = 1;
-                }
-                else
-                        rv = PyObject_IsTrue(res);
-        }
-        Py_DECREF(res);
-        return rv;
-}
-
-static ModalFilterUPP
-Dlg_PassFilterProc(PyObject *callback)
-{
-        PyObject *tmp = Dlg_FilterProc_callback;
-        static ModalFilterUPP UnivFilterUpp = NULL;
-
-        Dlg_FilterProc_callback = NULL;
-        if (callback == Py_None) {
-                Py_XDECREF(tmp);
-                return NULL;
-        }
-        Py_INCREF(callback);
-        Dlg_FilterProc_callback = callback;
-        Py_XDECREF(tmp);
-        if ( UnivFilterUpp == NULL )
-                UnivFilterUpp = NewModalFilterUPP(&Dlg_UnivFilterProc);
-        return UnivFilterUpp;
-}
-
-static PyObject *Dlg_UserItemProc_callback = NULL;
-
-static pascal void Dlg_UnivUserItemProc(DialogPtr dialog,
-                                         short item)
-{
-        PyObject *args, *res;
-
-        if (Dlg_UserItemProc_callback == NULL)
-                return; /* Default behavior */
-        Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
-        args = Py_BuildValue("O&h", DlgObj_WhichDialog, dialog, item);
-        if (args == NULL)
-                res = NULL;
-        else {
-                res = PyEval_CallObject(Dlg_UserItemProc_callback, args);
-                Py_DECREF(args);
-        }
-        if (res == NULL) {
-                PySys_WriteStderr("Exception in Dialog UserItem proc\\n");
-                PyErr_Print();
-        }
-        Py_XDECREF(res);
-        return;
-}
-
-#if 0
-/*
-** Treating DialogObjects as WindowObjects is (I think) illegal under Carbon.
-** However, as they are still identical under MacOS9 Carbon this is a problem, even
-** if we neatly call GetDialogWindow() at the right places: there's one refcon field
-** and it points to the DialogObject, so WinObj_WhichWindow will smartly return the
-** dialog object, and therefore we still don't have a WindowObject.
-** I'll leave the chaining code in place for now, with this comment to warn the
-** unsuspecting victims (i.e. me, probably, in a few weeks:-)
-*/
-extern PyMethodChain WinObj_chain;
-#endif
-"""
-
-finalstuff = finalstuff + """
-/* Return the WindowPtr corresponding to a DialogObject */
-#if 0
-WindowPtr
-DlgObj_ConvertToWindow(PyObject *self)
-{
-        if ( DlgObj_Check(self) )
-                return GetDialogWindow(((DialogObject *)self)->ob_itself);
-        return NULL;
-}
-#endif
-/* Return the object corresponding to the dialog, or None */
-
-PyObject *
-DlgObj_WhichDialog(DialogPtr d)
-{
-        PyObject *it;
-
-        if (d == NULL) {
-                it = Py_None;
-                Py_INCREF(it);
-        } else {
-                WindowPtr w = GetDialogWindow(d);
-
-                it = (PyObject *) GetWRefCon(w);
-                if (it == NULL || ((DialogObject *)it)->ob_itself != d || !DlgObj_Check(it)) {
-#if 0
-                        /* Should do this, but we don't have an ob_freeit for dialogs yet. */
-                        it = WinObj_New(w);
-                        ((WindowObject *)it)->ob_freeit = NULL;
-#else
-                        it = Py_None;
-                        Py_INCREF(it);
-#endif
-                } else {
-                        Py_INCREF(it);
-                }
-        }
-        return it;
-}
-"""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_WhichDialog);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DialogPtr, DlgObj_Convert);
-"""
-
-
-# Define a class which specializes our object definition
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def __init__(self, name, prefix = None, itselftype = None):
-        GlobalObjectDefinition.__init__(self, name, prefix, itselftype)
-## This won't work in Carbon, so we disable it for all MacPythons:-(
-## But see the comment above:-((
-##              self.basechain = "&WinObj_chain"
-
-    def outputInitStructMembers(self):
-        GlobalObjectDefinition.outputInitStructMembers(self)
-        Output("SetWRefCon(GetDialogWindow(itself), (long)it);")
-
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }")
-
-    def outputCheckConvertArg(self):
-        Output("if (v == Py_None) { *p_itself = NULL; return 1; }")
-        Output("if (PyInt_Check(v)) { *p_itself = (DialogPtr)PyInt_AsLong(v);")
-        Output("                      return 1; }")
-
-    def outputCompare(self):
-        Output()
-        Output("static int %s_compare(%s *self, %s *other)", self.prefix, self.objecttype, self.objecttype)
-        OutLbrace()
-        Output("if ( self->ob_itself > other->ob_itself ) return 1;")
-        Output("if ( self->ob_itself < other->ob_itself ) return -1;")
-        Output("return 0;")
-        OutRbrace()
-
-    def outputHash(self):
-        Output()
-        Output("static int %s_hash(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("return (int)self->ob_itself;")
-        OutRbrace()
-
-    def outputFreeIt(self, itselfname):
-        Output("DisposeDialog(%s);", itselfname)
-
-# Create the generator groups and link them
-module = MacModule('_Dlg', 'Dlg', includestuff, finalstuff, initstuff)
-object = MyObjectDefinition('Dialog', 'DlgObj', 'DialogPtr')
-module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open("dlggen.py").read())
-
-# add the populated lists to the generator groups
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-setuseritembody = """
-        PyObject *new = NULL;
-
-
-        if (!PyArg_ParseTuple(_args, "|O", &new))
-                return NULL;
-
-        if (Dlg_UserItemProc_callback && new && new != Py_None) {
-                PyErr_SetString(Dlg_Error, "Another UserItemProc is already installed");
-                return NULL;
-        }
-
-        if (new == NULL || new == Py_None) {
-                new = NULL;
-                _res = Py_None;
-                Py_INCREF(Py_None);
-        } else {
-                Py_INCREF(new);
-                _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemUPP(Dlg_UnivUserItemProc));
-        }
-
-        Dlg_UserItemProc_callback = new;
-        return _res;
-"""
-f = ManualGenerator("SetUserItemHandler", setuseritembody)
-module.add(f)
-
-# generate output
-SetOutputFileName('_Dlgmodule.c')
-module.generate()
diff --git a/Mac/Modules/drag/_Dragmodule.c b/Mac/Modules/drag/_Dragmodule.c
deleted file mode 100644 (file)
index ce2c034..0000000
+++ /dev/null
@@ -1,1148 +0,0 @@
-
-/* ========================== Module _Drag ========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-/* Callback glue routines */
-DragTrackingHandlerUPP dragglue_TrackingHandlerUPP;
-DragReceiveHandlerUPP dragglue_ReceiveHandlerUPP;
-DragSendDataUPP dragglue_SendDataUPP;
-#if 0
-DragInputUPP dragglue_InputUPP;
-DragDrawingUPP dragglue_DrawingUPP;
-#endif
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_DragObj_New(DragRef);
-extern int _DragObj_Convert(PyObject *, DragRef *);
-
-#define DragObj_New _DragObj_New
-#define DragObj_Convert _DragObj_Convert
-#endif
-
-static PyObject *Drag_Error;
-
-/* ---------------------- Object type DragObj ----------------------- */
-
-PyTypeObject DragObj_Type;
-
-#define DragObj_Check(x) (Py_TYPE(x) == &DragObj_Type || PyObject_TypeCheck((x), &DragObj_Type))
-
-typedef struct DragObjObject {
-       PyObject_HEAD
-       DragRef ob_itself;
-       PyObject *sendproc;
-} DragObjObject;
-
-PyObject *DragObj_New(DragRef itself)
-{
-       DragObjObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Drag_Error,"Cannot create null Drag");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(DragObjObject, &DragObj_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       it->sendproc = NULL;
-       return (PyObject *)it;
-}
-
-int DragObj_Convert(PyObject *v, DragRef *p_itself)
-{
-       if (!DragObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "DragObj required");
-               return 0;
-       }
-       *p_itself = ((DragObjObject *)v)->ob_itself;
-       return 1;
-}
-
-static void DragObj_dealloc(DragObjObject *self)
-{
-       Py_XDECREF(self->sendproc);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *DragObj_DisposeDrag(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef DisposeDrag
-       PyMac_PRECHECK(DisposeDrag);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = DisposeDrag(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_AddDragItemFlavor(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ItemReference theItemRef;
-       FlavorType theType;
-       char *dataPtr__in__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-       FlavorFlags theFlags;
-#ifndef AddDragItemFlavor
-       PyMac_PRECHECK(AddDragItemFlavor);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&z#l",
-                             &theItemRef,
-                             PyMac_GetOSType, &theType,
-                             &dataPtr__in__, &dataPtr__in_len__,
-                             &theFlags))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = AddDragItemFlavor(_self->ob_itself,
-                                theItemRef,
-                                theType,
-                                dataPtr__in__, dataPtr__len__,
-                                theFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_SetDragItemFlavorData(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ItemReference theItemRef;
-       FlavorType theType;
-       char *dataPtr__in__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-       UInt32 dataOffset;
-#ifndef SetDragItemFlavorData
-       PyMac_PRECHECK(SetDragItemFlavorData);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&z#l",
-                             &theItemRef,
-                             PyMac_GetOSType, &theType,
-                             &dataPtr__in__, &dataPtr__in_len__,
-                             &dataOffset))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = SetDragItemFlavorData(_self->ob_itself,
-                                    theItemRef,
-                                    theType,
-                                    dataPtr__in__, dataPtr__len__,
-                                    dataOffset);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_SetDragImage(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PixMapHandle imagePixMap;
-       RgnHandle imageRgn;
-       Point imageOffsetPt;
-       DragImageFlags theImageFlags;
-#ifndef SetDragImage
-       PyMac_PRECHECK(SetDragImage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&l",
-                             ResObj_Convert, &imagePixMap,
-                             ResObj_Convert, &imageRgn,
-                             PyMac_GetPoint, &imageOffsetPt,
-                             &theImageFlags))
-               return NULL;
-       _err = SetDragImage(_self->ob_itself,
-                           imagePixMap,
-                           imageRgn,
-                           imageOffsetPt,
-                           theImageFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_ChangeDragBehaviors(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DragBehaviors inBehaviorsToSet;
-       DragBehaviors inBehaviorsToClear;
-#ifndef ChangeDragBehaviors
-       PyMac_PRECHECK(ChangeDragBehaviors);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &inBehaviorsToSet,
-                             &inBehaviorsToClear))
-               return NULL;
-       _err = ChangeDragBehaviors(_self->ob_itself,
-                                  inBehaviorsToSet,
-                                  inBehaviorsToClear);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_TrackDrag(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       EventRecord theEvent;
-       RgnHandle theRegion;
-#ifndef TrackDrag
-       PyMac_PRECHECK(TrackDrag);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetEventRecord, &theEvent,
-                             ResObj_Convert, &theRegion))
-               return NULL;
-       _err = TrackDrag(_self->ob_itself,
-                        &theEvent,
-                        theRegion);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_CountDragItems(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UInt16 numItems;
-#ifndef CountDragItems
-       PyMac_PRECHECK(CountDragItems);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CountDragItems(_self->ob_itself,
-                             &numItems);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            numItems);
-       return _res;
-}
-
-static PyObject *DragObj_GetDragItemReferenceNumber(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UInt16 index;
-       ItemReference theItemRef;
-#ifndef GetDragItemReferenceNumber
-       PyMac_PRECHECK(GetDragItemReferenceNumber);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &index))
-               return NULL;
-       _err = GetDragItemReferenceNumber(_self->ob_itself,
-                                         index,
-                                         &theItemRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            theItemRef);
-       return _res;
-}
-
-static PyObject *DragObj_CountDragItemFlavors(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ItemReference theItemRef;
-       UInt16 numFlavors;
-#ifndef CountDragItemFlavors
-       PyMac_PRECHECK(CountDragItemFlavors);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &theItemRef))
-               return NULL;
-       _err = CountDragItemFlavors(_self->ob_itself,
-                                   theItemRef,
-                                   &numFlavors);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            numFlavors);
-       return _res;
-}
-
-static PyObject *DragObj_GetFlavorType(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ItemReference theItemRef;
-       UInt16 index;
-       FlavorType theType;
-#ifndef GetFlavorType
-       PyMac_PRECHECK(GetFlavorType);
-#endif
-       if (!PyArg_ParseTuple(_args, "lH",
-                             &theItemRef,
-                             &index))
-               return NULL;
-       _err = GetFlavorType(_self->ob_itself,
-                            theItemRef,
-                            index,
-                            &theType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildOSType, theType);
-       return _res;
-}
-
-static PyObject *DragObj_GetFlavorFlags(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ItemReference theItemRef;
-       FlavorType theType;
-       FlavorFlags theFlags;
-#ifndef GetFlavorFlags
-       PyMac_PRECHECK(GetFlavorFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &theItemRef,
-                             PyMac_GetOSType, &theType))
-               return NULL;
-       _err = GetFlavorFlags(_self->ob_itself,
-                             theItemRef,
-                             theType,
-                             &theFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            theFlags);
-       return _res;
-}
-
-static PyObject *DragObj_GetFlavorDataSize(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ItemReference theItemRef;
-       FlavorType theType;
-       Size dataSize;
-#ifndef GetFlavorDataSize
-       PyMac_PRECHECK(GetFlavorDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &theItemRef,
-                             PyMac_GetOSType, &theType))
-               return NULL;
-       _err = GetFlavorDataSize(_self->ob_itself,
-                                theItemRef,
-                                theType,
-                                &dataSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            dataSize);
-       return _res;
-}
-
-static PyObject *DragObj_GetFlavorData(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ItemReference theItemRef;
-       FlavorType theType;
-       char *dataPtr__out__;
-       long dataPtr__len__;
-       int dataPtr__in_len__;
-       UInt32 dataOffset;
-#ifndef GetFlavorData
-       PyMac_PRECHECK(GetFlavorData);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&il",
-                             &theItemRef,
-                             PyMac_GetOSType, &theType,
-                             &dataPtr__in_len__,
-                             &dataOffset))
-               return NULL;
-       if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
-       {
-               PyErr_NoMemory();
-               goto dataPtr__error__;
-       }
-       dataPtr__len__ = dataPtr__in_len__;
-       _err = GetFlavorData(_self->ob_itself,
-                            theItemRef,
-                            theType,
-                            dataPtr__out__, &dataPtr__len__,
-                            dataOffset);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("s#",
-                            dataPtr__out__, (int)dataPtr__len__);
-       free(dataPtr__out__);
- dataPtr__error__: ;
-       return _res;
-}
-
-static PyObject *DragObj_GetDragItemBounds(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ItemReference theItemRef;
-       Rect itemBounds;
-#ifndef GetDragItemBounds
-       PyMac_PRECHECK(GetDragItemBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &theItemRef))
-               return NULL;
-       _err = GetDragItemBounds(_self->ob_itself,
-                                theItemRef,
-                                &itemBounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &itemBounds);
-       return _res;
-}
-
-static PyObject *DragObj_SetDragItemBounds(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ItemReference theItemRef;
-       Rect itemBounds;
-#ifndef SetDragItemBounds
-       PyMac_PRECHECK(SetDragItemBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &theItemRef,
-                             PyMac_GetRect, &itemBounds))
-               return NULL;
-       _err = SetDragItemBounds(_self->ob_itself,
-                                theItemRef,
-                                &itemBounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_GetDropLocation(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEDesc dropLocation;
-#ifndef GetDropLocation
-       PyMac_PRECHECK(GetDropLocation);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDropLocation(_self->ob_itself,
-                              &dropLocation);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &dropLocation);
-       return _res;
-}
-
-static PyObject *DragObj_SetDropLocation(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AEDesc dropLocation;
-#ifndef SetDropLocation
-       PyMac_PRECHECK(SetDropLocation);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             AEDesc_Convert, &dropLocation))
-               return NULL;
-       _err = SetDropLocation(_self->ob_itself,
-                              &dropLocation);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_GetDragAttributes(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DragAttributes flags;
-#ifndef GetDragAttributes
-       PyMac_PRECHECK(GetDragAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDragAttributes(_self->ob_itself,
-                                &flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            flags);
-       return _res;
-}
-
-static PyObject *DragObj_GetDragMouse(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Point mouse;
-       Point globalPinnedMouse;
-#ifndef GetDragMouse
-       PyMac_PRECHECK(GetDragMouse);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDragMouse(_self->ob_itself,
-                           &mouse,
-                           &globalPinnedMouse);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildPoint, mouse,
-                            PyMac_BuildPoint, globalPinnedMouse);
-       return _res;
-}
-
-static PyObject *DragObj_SetDragMouse(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Point globalPinnedMouse;
-#ifndef SetDragMouse
-       PyMac_PRECHECK(SetDragMouse);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &globalPinnedMouse))
-               return NULL;
-       _err = SetDragMouse(_self->ob_itself,
-                           globalPinnedMouse);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_GetDragOrigin(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Point globalInitialMouse;
-#ifndef GetDragOrigin
-       PyMac_PRECHECK(GetDragOrigin);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDragOrigin(_self->ob_itself,
-                            &globalInitialMouse);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, globalInitialMouse);
-       return _res;
-}
-
-static PyObject *DragObj_GetDragModifiers(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 modifiers;
-       SInt16 mouseDownModifiers;
-       SInt16 mouseUpModifiers;
-#ifndef GetDragModifiers
-       PyMac_PRECHECK(GetDragModifiers);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDragModifiers(_self->ob_itself,
-                               &modifiers,
-                               &mouseDownModifiers,
-                               &mouseUpModifiers);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hhh",
-                            modifiers,
-                            mouseDownModifiers,
-                            mouseUpModifiers);
-       return _res;
-}
-
-static PyObject *DragObj_ShowDragHilite(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       RgnHandle hiliteFrame;
-       Boolean inside;
-#ifndef ShowDragHilite
-       PyMac_PRECHECK(ShowDragHilite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             ResObj_Convert, &hiliteFrame,
-                             &inside))
-               return NULL;
-       _err = ShowDragHilite(_self->ob_itself,
-                             hiliteFrame,
-                             inside);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_HideDragHilite(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef HideDragHilite
-       PyMac_PRECHECK(HideDragHilite);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = HideDragHilite(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_DragPreScroll(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 dH;
-       SInt16 dV;
-#ifndef DragPreScroll
-       PyMac_PRECHECK(DragPreScroll);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &dH,
-                             &dV))
-               return NULL;
-       _err = DragPreScroll(_self->ob_itself,
-                            dH,
-                            dV);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_DragPostScroll(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef DragPostScroll
-       PyMac_PRECHECK(DragPostScroll);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = DragPostScroll(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *DragObj_UpdateDragHilite(DragObjObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       RgnHandle updateRgn;
-#ifndef UpdateDragHilite
-       PyMac_PRECHECK(UpdateDragHilite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &updateRgn))
-               return NULL;
-       _err = UpdateDragHilite(_self->ob_itself,
-                               updateRgn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef DragObj_methods[] = {
-       {"DisposeDrag", (PyCFunction)DragObj_DisposeDrag, 1,
-        PyDoc_STR("() -> None")},
-       {"AddDragItemFlavor", (PyCFunction)DragObj_AddDragItemFlavor, 1,
-        PyDoc_STR("(ItemReference theItemRef, FlavorType theType, Buffer dataPtr, FlavorFlags theFlags) -> None")},
-       {"SetDragItemFlavorData", (PyCFunction)DragObj_SetDragItemFlavorData, 1,
-        PyDoc_STR("(ItemReference theItemRef, FlavorType theType, Buffer dataPtr, UInt32 dataOffset) -> None")},
-       {"SetDragImage", (PyCFunction)DragObj_SetDragImage, 1,
-        PyDoc_STR("(PixMapHandle imagePixMap, RgnHandle imageRgn, Point imageOffsetPt, DragImageFlags theImageFlags) -> None")},
-       {"ChangeDragBehaviors", (PyCFunction)DragObj_ChangeDragBehaviors, 1,
-        PyDoc_STR("(DragBehaviors inBehaviorsToSet, DragBehaviors inBehaviorsToClear) -> None")},
-       {"TrackDrag", (PyCFunction)DragObj_TrackDrag, 1,
-        PyDoc_STR("(EventRecord theEvent, RgnHandle theRegion) -> None")},
-       {"CountDragItems", (PyCFunction)DragObj_CountDragItems, 1,
-        PyDoc_STR("() -> (UInt16 numItems)")},
-       {"GetDragItemReferenceNumber", (PyCFunction)DragObj_GetDragItemReferenceNumber, 1,
-        PyDoc_STR("(UInt16 index) -> (ItemReference theItemRef)")},
-       {"CountDragItemFlavors", (PyCFunction)DragObj_CountDragItemFlavors, 1,
-        PyDoc_STR("(ItemReference theItemRef) -> (UInt16 numFlavors)")},
-       {"GetFlavorType", (PyCFunction)DragObj_GetFlavorType, 1,
-        PyDoc_STR("(ItemReference theItemRef, UInt16 index) -> (FlavorType theType)")},
-       {"GetFlavorFlags", (PyCFunction)DragObj_GetFlavorFlags, 1,
-        PyDoc_STR("(ItemReference theItemRef, FlavorType theType) -> (FlavorFlags theFlags)")},
-       {"GetFlavorDataSize", (PyCFunction)DragObj_GetFlavorDataSize, 1,
-        PyDoc_STR("(ItemReference theItemRef, FlavorType theType) -> (Size dataSize)")},
-       {"GetFlavorData", (PyCFunction)DragObj_GetFlavorData, 1,
-        PyDoc_STR("(ItemReference theItemRef, FlavorType theType, Buffer dataPtr, UInt32 dataOffset) -> (Buffer dataPtr)")},
-       {"GetDragItemBounds", (PyCFunction)DragObj_GetDragItemBounds, 1,
-        PyDoc_STR("(ItemReference theItemRef) -> (Rect itemBounds)")},
-       {"SetDragItemBounds", (PyCFunction)DragObj_SetDragItemBounds, 1,
-        PyDoc_STR("(ItemReference theItemRef, Rect itemBounds) -> None")},
-       {"GetDropLocation", (PyCFunction)DragObj_GetDropLocation, 1,
-        PyDoc_STR("() -> (AEDesc dropLocation)")},
-       {"SetDropLocation", (PyCFunction)DragObj_SetDropLocation, 1,
-        PyDoc_STR("(AEDesc dropLocation) -> None")},
-       {"GetDragAttributes", (PyCFunction)DragObj_GetDragAttributes, 1,
-        PyDoc_STR("() -> (DragAttributes flags)")},
-       {"GetDragMouse", (PyCFunction)DragObj_GetDragMouse, 1,
-        PyDoc_STR("() -> (Point mouse, Point globalPinnedMouse)")},
-       {"SetDragMouse", (PyCFunction)DragObj_SetDragMouse, 1,
-        PyDoc_STR("(Point globalPinnedMouse) -> None")},
-       {"GetDragOrigin", (PyCFunction)DragObj_GetDragOrigin, 1,
-        PyDoc_STR("() -> (Point globalInitialMouse)")},
-       {"GetDragModifiers", (PyCFunction)DragObj_GetDragModifiers, 1,
-        PyDoc_STR("() -> (SInt16 modifiers, SInt16 mouseDownModifiers, SInt16 mouseUpModifiers)")},
-       {"ShowDragHilite", (PyCFunction)DragObj_ShowDragHilite, 1,
-        PyDoc_STR("(RgnHandle hiliteFrame, Boolean inside) -> None")},
-       {"HideDragHilite", (PyCFunction)DragObj_HideDragHilite, 1,
-        PyDoc_STR("() -> None")},
-       {"DragPreScroll", (PyCFunction)DragObj_DragPreScroll, 1,
-        PyDoc_STR("(SInt16 dH, SInt16 dV) -> None")},
-       {"DragPostScroll", (PyCFunction)DragObj_DragPostScroll, 1,
-        PyDoc_STR("() -> None")},
-       {"UpdateDragHilite", (PyCFunction)DragObj_UpdateDragHilite, 1,
-        PyDoc_STR("(RgnHandle updateRgn) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define DragObj_getsetlist NULL
-
-
-#define DragObj_compare NULL
-
-#define DragObj_repr NULL
-
-#define DragObj_hash NULL
-#define DragObj_tp_init 0
-
-#define DragObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *DragObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       DragRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, DragObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((DragObjObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define DragObj_tp_free PyObject_Del
-
-
-PyTypeObject DragObj_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Drag.DragObj", /*tp_name*/
-       sizeof(DragObjObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) DragObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) DragObj_compare, /*tp_compare*/
-       (reprfunc) DragObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) DragObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       DragObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       DragObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       DragObj_tp_init, /* tp_init */
-       DragObj_tp_alloc, /* tp_alloc */
-       DragObj_tp_new, /* tp_new */
-       DragObj_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type DragObj --------------------- */
-
-
-static PyObject *Drag_NewDrag(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DragRef theDrag;
-#ifndef NewDrag
-       PyMac_PRECHECK(NewDrag);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = NewDrag(&theDrag);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            DragObj_New, theDrag);
-       return _res;
-}
-
-static PyObject *Drag_GetDragHiliteColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr window;
-       RGBColor color;
-#ifndef GetDragHiliteColor
-       PyMac_PRECHECK(GetDragHiliteColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &window))
-               return NULL;
-       _err = GetDragHiliteColor(window,
-                                 &color);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &color);
-       return _res;
-}
-
-static PyObject *Drag_WaitMouseMoved(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point initialMouse;
-#ifndef WaitMouseMoved
-       PyMac_PRECHECK(WaitMouseMoved);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &initialMouse))
-               return NULL;
-       _rv = WaitMouseMoved(initialMouse);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Drag_ZoomRects(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect fromRect;
-       Rect toRect;
-       SInt16 zoomSteps;
-       ZoomAcceleration acceleration;
-#ifndef ZoomRects
-       PyMac_PRECHECK(ZoomRects);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hh",
-                             PyMac_GetRect, &fromRect,
-                             PyMac_GetRect, &toRect,
-                             &zoomSteps,
-                             &acceleration))
-               return NULL;
-       _err = ZoomRects(&fromRect,
-                        &toRect,
-                        zoomSteps,
-                        acceleration);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Drag_ZoomRegion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       RgnHandle region;
-       Point zoomDistance;
-       SInt16 zoomSteps;
-       ZoomAcceleration acceleration;
-#ifndef ZoomRegion
-       PyMac_PRECHECK(ZoomRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hh",
-                             ResObj_Convert, &region,
-                             PyMac_GetPoint, &zoomDistance,
-                             &zoomSteps,
-                             &acceleration))
-               return NULL;
-       _err = ZoomRegion(region,
-                         zoomDistance,
-                         zoomSteps,
-                         acceleration);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Drag_InstallTrackingHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-           PyObject *callback;
-           WindowPtr theWindow = NULL;
-           OSErr _err;
-
-           if ( !PyArg_ParseTuple(_args, "O|O&", &callback, WinObj_Convert, &theWindow) )
-               return NULL;
-           Py_INCREF(callback);        /* Cannot decref later, too bad */
-           _err = InstallTrackingHandler(dragglue_TrackingHandlerUPP, theWindow, (void *)callback);
-               if (_err != noErr) return PyMac_Error(_err);
-               Py_INCREF(Py_None);
-               _res = Py_None;
-               return _res;
-
-}
-
-static PyObject *Drag_InstallReceiveHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-           PyObject *callback;
-           WindowPtr theWindow = NULL;
-           OSErr _err;
-
-           if ( !PyArg_ParseTuple(_args, "O|O&", &callback, WinObj_Convert, &theWindow) )
-               return NULL;
-           Py_INCREF(callback);        /* Cannot decref later, too bad */
-           _err = InstallReceiveHandler(dragglue_ReceiveHandlerUPP, theWindow, (void *)callback);
-               if (_err != noErr) return PyMac_Error(_err);
-               Py_INCREF(Py_None);
-               _res = Py_None;
-               return _res;
-
-}
-
-static PyObject *Drag_RemoveTrackingHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-           WindowPtr theWindow = NULL;
-           OSErr _err;
-
-           if ( !PyArg_ParseTuple(_args, "|O&", WinObj_Convert, &theWindow) )
-               return NULL;
-           _err = RemoveTrackingHandler(dragglue_TrackingHandlerUPP, theWindow);
-               if (_err != noErr) return PyMac_Error(_err);
-               Py_INCREF(Py_None);
-               _res = Py_None;
-               return _res;
-
-}
-
-static PyObject *Drag_RemoveReceiveHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-           WindowPtr theWindow = NULL;
-           OSErr _err;
-
-           if ( !PyArg_ParseTuple(_args, "|O&", WinObj_Convert, &theWindow) )
-               return NULL;
-           _err = RemoveReceiveHandler(dragglue_ReceiveHandlerUPP, theWindow);
-               if (_err != noErr) return PyMac_Error(_err);
-               Py_INCREF(Py_None);
-               _res = Py_None;
-               return _res;
-
-}
-
-static PyMethodDef Drag_methods[] = {
-       {"NewDrag", (PyCFunction)Drag_NewDrag, 1,
-        PyDoc_STR("() -> (DragRef theDrag)")},
-       {"GetDragHiliteColor", (PyCFunction)Drag_GetDragHiliteColor, 1,
-        PyDoc_STR("(WindowPtr window) -> (RGBColor color)")},
-       {"WaitMouseMoved", (PyCFunction)Drag_WaitMouseMoved, 1,
-        PyDoc_STR("(Point initialMouse) -> (Boolean _rv)")},
-       {"ZoomRects", (PyCFunction)Drag_ZoomRects, 1,
-        PyDoc_STR("(Rect fromRect, Rect toRect, SInt16 zoomSteps, ZoomAcceleration acceleration) -> None")},
-       {"ZoomRegion", (PyCFunction)Drag_ZoomRegion, 1,
-        PyDoc_STR("(RgnHandle region, Point zoomDistance, SInt16 zoomSteps, ZoomAcceleration acceleration) -> None")},
-       {"InstallTrackingHandler", (PyCFunction)Drag_InstallTrackingHandler, 1,
-        PyDoc_STR(NULL)},
-       {"InstallReceiveHandler", (PyCFunction)Drag_InstallReceiveHandler, 1,
-        PyDoc_STR(NULL)},
-       {"RemoveTrackingHandler", (PyCFunction)Drag_RemoveTrackingHandler, 1,
-        PyDoc_STR(NULL)},
-       {"RemoveReceiveHandler", (PyCFunction)Drag_RemoveReceiveHandler, 1,
-        PyDoc_STR(NULL)},
-       {NULL, NULL, 0}
-};
-
-
-
-static pascal OSErr
-dragglue_TrackingHandler(DragTrackingMessage theMessage, WindowPtr theWindow,
-                         void *handlerRefCon, DragReference theDrag)
-{
-        PyObject *args, *rv;
-        int i;
-
-        args = Py_BuildValue("hO&O&", theMessage, DragObj_New, theDrag, WinObj_WhichWindow, theWindow);
-        if ( args == NULL )
-                return -1;
-        rv = PyEval_CallObject((PyObject *)handlerRefCon, args);
-        Py_DECREF(args);
-        if ( rv == NULL ) {
-                PySys_WriteStderr("Drag: Exception in TrackingHandler\n");
-                PyErr_Print();
-                return -1;
-        }
-        i = -1;
-        if ( rv == Py_None )
-                i = 0;
-        else
-                PyArg_Parse(rv, "l", &i);
-        Py_DECREF(rv);
-        return i;
-}
-
-static pascal OSErr
-dragglue_ReceiveHandler(WindowPtr theWindow, void *handlerRefCon,
-                        DragReference theDrag)
-{
-        PyObject *args, *rv;
-        int i;
-
-        args = Py_BuildValue("O&O&", DragObj_New, theDrag, WinObj_WhichWindow, theWindow);
-        if ( args == NULL )
-                return -1;
-        rv = PyEval_CallObject((PyObject *)handlerRefCon, args);
-        Py_DECREF(args);
-        if ( rv == NULL ) {
-                PySys_WriteStderr("Drag: Exception in ReceiveHandler\n");
-                PyErr_Print();
-                return -1;
-        }
-        i = -1;
-        if ( rv == Py_None )
-                i = 0;
-        else
-                PyArg_Parse(rv, "l", &i);
-        Py_DECREF(rv);
-        return i;
-}
-
-static pascal OSErr
-dragglue_SendData(FlavorType theType, void *dragSendRefCon,
-                      ItemReference theItem, DragReference theDrag)
-{
-        DragObjObject *self = (DragObjObject *)dragSendRefCon;
-        PyObject *args, *rv;
-        int i;
-
-        if ( self->sendproc == NULL )
-                return -1;
-        args = Py_BuildValue("O&l", PyMac_BuildOSType, theType, theItem);
-        if ( args == NULL )
-                return -1;
-        rv = PyEval_CallObject(self->sendproc, args);
-        Py_DECREF(args);
-        if ( rv == NULL ) {
-                PySys_WriteStderr("Drag: Exception in SendDataHandler\n");
-                PyErr_Print();
-                return -1;
-        }
-        i = -1;
-        if ( rv == Py_None )
-                i = 0;
-        else
-                PyArg_Parse(rv, "l", &i);
-        Py_DECREF(rv);
-        return i;
-}
-
-#if 0
-static pascal OSErr
-dragglue_Input(Point *mouse, short *modifiers,
-                   void *dragSendRefCon, DragReference theDrag)
-{
-    return 0;
-}
-
-static pascal OSErr
-dragglue_Drawing(xxxx
-                   void *dragSendRefCon, DragReference theDrag)
-{
-    return 0;
-}
-#endif
-
-
-
-void init_Drag(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(DragRef, DragObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragRef, DragObj_Convert);
-
-
-       m = Py_InitModule("_Drag", Drag_methods);
-       d = PyModule_GetDict(m);
-       Drag_Error = PyMac_GetOSErrException();
-       if (Drag_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Drag_Error) != 0)
-               return;
-       Py_TYPE(&DragObj_Type) = &PyType_Type;
-       if (PyType_Ready(&DragObj_Type) < 0) return;
-       Py_INCREF(&DragObj_Type);
-       PyModule_AddObject(m, "DragObj", (PyObject *)&DragObj_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&DragObj_Type);
-       PyModule_AddObject(m, "DragObjType", (PyObject *)&DragObj_Type);
-
-       dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler);
-       dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler);
-       dragglue_SendDataUPP = NewDragSendDataUPP(dragglue_SendData);
-#if 0
-       dragglue_InputUPP = NewDragInputUPP(dragglue_Input);
-       dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing);
-#endif
-
-
-}
-
-/* ======================== End module _Drag ======================== */
-
diff --git a/Mac/Modules/drag/dragscan.py b/Mac/Modules/drag/dragscan.py
deleted file mode 100644 (file)
index cafdb5f..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-# Scan <Drag.h>, generating draggen.py.
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR, INCLUDEDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-MISSING_DEFINES="""
-kDragHasLeftSenderWindow        = (1 << 0)
-kDragInsideSenderApplication = (1 << 1)
-kDragInsideSenderWindow         = (1 << 2)
-kDragRegionAndImage                     = (1 << 4)
-flavorSenderOnly                        = (1 << 0)
-flavorSenderTranslated          = (1 << 1)
-flavorNotSaved                          = (1 << 2)
-flavorSystemTranslated          = (1 << 8)
-"""
-
-
-def main():
-    input = INCLUDEDIR + "Drag.h"
-    output = "draggen.py"
-    defsoutput = TOOLBOXDIR + "Dragconst.py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now doing 'import dragsupport' ===")
-    import dragsupport
-    print("=== Done.  It's up to you to compile Dragmodule.c ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in ('DragReference', 'DragRef') and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("from Carbon.TextEdit import *\n")
-        self.defsfile.write("from Carbon.QuickDraw import *\n")
-        self.defsfile.write("fkDragActionAll = -1\n")
-        self.defsfile.write("\n")
-        # Defines unparseable in Drag.h
-        self.defsfile.write(MISSING_DEFINES)
-
-    def makeblacklistnames(self):
-        return [
-                "kDragActionAll",
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "DragTrackingHandlerUPP",
-                "DragReceiveHandlerUPP",
-                "DragSendDataUPP",
-                "DragInputUPP",
-                "DragDrawingUPP",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("void_ptr", "*", "InMode"), ("Size", "*", "InMode")],
-                 [("OptionalInBuffer", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("Size", "*", "OutMode")],
-                 [("VarOutBuffer", "*", "InOutMode")]),
-
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/drag/dragsupport.py b/Mac/Modules/drag/dragsupport.py
deleted file mode 100644 (file)
index bb1a918..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Drag.h'                # The Apple header file
-MODNAME = '_Drag'                               # The name of the module
-OBJECTNAME = 'DragObj'                  # The basic name of the objects used here
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Drag'                      # The prefix for module-wide routines
-OBJECTTYPE = 'DragRef'  # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-DragRef = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
-DragItemRef = Type("ItemReference", "l")
-# Old names
-DragReference = DragRef
-ItemReference = DragItemRef
-
-PixMapHandle = OpaqueByValueType("PixMapHandle", "ResObj")
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-AEDesc = OpaqueType('AEDesc')
-AEDesc_ptr = AEDesc
-RGBColor = OpaqueType("RGBColor", "QdRGB")
-
-FlavorType = OSTypeType("FlavorType")
-DragAttributes = Type("DragAttributes", "l")
-DragBehaviors = Type("DragBehaviors", "l")
-DragImageFlags = Type("DragImageFlags", "l")
-DragImageTranslucency = Type("DragImageTranslucency", "l")
-DragRegionMessage = Type("DragRegionMessage", "h")
-ZoomAcceleration = Type("ZoomAcceleration", "h")
-FlavorFlags = Type("FlavorFlags", "l")
-DragTrackingMessage = Type("DragTrackingMessage", "h")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-/* Callback glue routines */
-DragTrackingHandlerUPP dragglue_TrackingHandlerUPP;
-DragReceiveHandlerUPP dragglue_ReceiveHandlerUPP;
-DragSendDataUPP dragglue_SendDataUPP;
-#if 0
-DragInputUPP dragglue_InputUPP;
-DragDrawingUPP dragglue_DrawingUPP;
-#endif
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_DragObj_New(DragRef);
-extern int _DragObj_Convert(PyObject *, DragRef *);
-
-#define DragObj_New _DragObj_New
-#define DragObj_Convert _DragObj_Convert
-#endif
-"""
-
-finalstuff = finalstuff + """
-static pascal OSErr
-dragglue_TrackingHandler(DragTrackingMessage theMessage, WindowPtr theWindow,
-                         void *handlerRefCon, DragReference theDrag)
-{
-        PyObject *args, *rv;
-        int i;
-
-        args = Py_BuildValue("hO&O&", theMessage, DragObj_New, theDrag, WinObj_WhichWindow, theWindow);
-        if ( args == NULL )
-                return -1;
-        rv = PyEval_CallObject((PyObject *)handlerRefCon, args);
-        Py_DECREF(args);
-        if ( rv == NULL ) {
-                PySys_WriteStderr("Drag: Exception in TrackingHandler\\n");
-                PyErr_Print();
-                return -1;
-        }
-        i = -1;
-        if ( rv == Py_None )
-                i = 0;
-        else
-                PyArg_Parse(rv, "l", &i);
-        Py_DECREF(rv);
-        return i;
-}
-
-static pascal OSErr
-dragglue_ReceiveHandler(WindowPtr theWindow, void *handlerRefCon,
-                        DragReference theDrag)
-{
-        PyObject *args, *rv;
-        int i;
-
-        args = Py_BuildValue("O&O&", DragObj_New, theDrag, WinObj_WhichWindow, theWindow);
-        if ( args == NULL )
-                return -1;
-        rv = PyEval_CallObject((PyObject *)handlerRefCon, args);
-        Py_DECREF(args);
-        if ( rv == NULL ) {
-                PySys_WriteStderr("Drag: Exception in ReceiveHandler\\n");
-                PyErr_Print();
-                return -1;
-        }
-        i = -1;
-        if ( rv == Py_None )
-                i = 0;
-        else
-                PyArg_Parse(rv, "l", &i);
-        Py_DECREF(rv);
-        return i;
-}
-
-static pascal OSErr
-dragglue_SendData(FlavorType theType, void *dragSendRefCon,
-                      ItemReference theItem, DragReference theDrag)
-{
-        DragObjObject *self = (DragObjObject *)dragSendRefCon;
-        PyObject *args, *rv;
-        int i;
-
-        if ( self->sendproc == NULL )
-                return -1;
-        args = Py_BuildValue("O&l", PyMac_BuildOSType, theType, theItem);
-        if ( args == NULL )
-                return -1;
-        rv = PyEval_CallObject(self->sendproc, args);
-        Py_DECREF(args);
-        if ( rv == NULL ) {
-                PySys_WriteStderr("Drag: Exception in SendDataHandler\\n");
-                PyErr_Print();
-                return -1;
-        }
-        i = -1;
-        if ( rv == Py_None )
-                i = 0;
-        else
-                PyArg_Parse(rv, "l", &i);
-        Py_DECREF(rv);
-        return i;
-}
-
-#if 0
-static pascal OSErr
-dragglue_Input(Point *mouse, short *modifiers,
-                   void *dragSendRefCon, DragReference theDrag)
-{
-    return 0;
-}
-
-static pascal OSErr
-dragglue_Drawing(xxxx
-                   void *dragSendRefCon, DragReference theDrag)
-{
-    return 0;
-}
-#endif
-
-"""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(DragRef, DragObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragRef, DragObj_Convert);
-"""
-
-variablestuff = """
-dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler);
-dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler);
-dragglue_SendDataUPP = NewDragSendDataUPP(dragglue_SendData);
-#if 0
-dragglue_InputUPP = NewDragInputUPP(dragglue_Input);
-dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing);
-#endif
-"""
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output("""if (itself == NULL) {
-                                PyErr_SetString(Drag_Error,"Cannot create null Drag");
-                                return NULL;
-                        }""")
-    def outputFreeIt(self, itselfname):
-        ## Output("DisposeDrag(%s);", itselfname)
-        Output("Py_XDECREF(self->sendproc);")
-        ## Output("Py_XDECREF(self->inputproc);")
-        ## Output("Py_XDECREF(self->drawingproc);")
-
-    def outputStructMembers(self):
-        GlobalObjectDefinition.outputStructMembers(self)
-        Output("PyObject *sendproc;")
-        ## Output("PyObject *inputproc;")
-        ## Output("PyObject *drawingproc;")
-
-    def outputInitStructMembers(self):
-        GlobalObjectDefinition.outputInitStructMembers(self)
-        Output("it->sendproc = NULL;")
-        ## Output("it->inputproc = NULL;")
-        ## Output("it->drawingproc = NULL;")
-
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff, variablestuff)
-object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-# Manual generators for the callbacks
-
-installtracking_body = """
-    PyObject *callback;
-    WindowPtr theWindow = NULL;
-    OSErr _err;
-
-    if ( !PyArg_ParseTuple(_args, "O|O&", &callback, WinObj_Convert, &theWindow) )
-        return NULL;
-    Py_INCREF(callback);        /* Cannot decref later, too bad */
-    _err = InstallTrackingHandler(dragglue_TrackingHandlerUPP, theWindow, (void *)callback);
-        if (_err != noErr) return PyMac_Error(_err);
-        Py_INCREF(Py_None);
-        _res = Py_None;
-        return _res;
-"""
-installtracking = ManualGenerator("InstallTrackingHandler", installtracking_body)
-module.add(installtracking)
-
-installreceive_body = """
-    PyObject *callback;
-    WindowPtr theWindow = NULL;
-    OSErr _err;
-
-    if ( !PyArg_ParseTuple(_args, "O|O&", &callback, WinObj_Convert, &theWindow) )
-        return NULL;
-    Py_INCREF(callback);        /* Cannot decref later, too bad */
-    _err = InstallReceiveHandler(dragglue_ReceiveHandlerUPP, theWindow, (void *)callback);
-        if (_err != noErr) return PyMac_Error(_err);
-        Py_INCREF(Py_None);
-        _res = Py_None;
-        return _res;
-"""
-installreceive = ManualGenerator("InstallReceiveHandler", installreceive_body)
-module.add(installreceive)
-
-removetracking_body = """
-    WindowPtr theWindow = NULL;
-    OSErr _err;
-
-    if ( !PyArg_ParseTuple(_args, "|O&", WinObj_Convert, &theWindow) )
-        return NULL;
-    _err = RemoveTrackingHandler(dragglue_TrackingHandlerUPP, theWindow);
-        if (_err != noErr) return PyMac_Error(_err);
-        Py_INCREF(Py_None);
-        _res = Py_None;
-        return _res;
-"""
-removetracking = ManualGenerator("RemoveTrackingHandler", removetracking_body)
-module.add(removetracking)
-
-removereceive_body = """
-    WindowPtr theWindow = NULL;
-    OSErr _err;
-
-    if ( !PyArg_ParseTuple(_args, "|O&", WinObj_Convert, &theWindow) )
-        return NULL;
-    _err = RemoveReceiveHandler(dragglue_ReceiveHandlerUPP, theWindow);
-        if (_err != noErr) return PyMac_Error(_err);
-        Py_INCREF(Py_None);
-        _res = Py_None;
-        return _res;
-"""
-removereceive = ManualGenerator("RemoveReceiveHandler", removereceive_body)
-module.add(removereceive)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/evt/_Evtmodule.c b/Mac/Modules/evt/_Evtmodule.c
deleted file mode 100644 (file)
index f7129cf..0000000
+++ /dev/null
@@ -1,548 +0,0 @@
-
-/* ========================== Module _Evt =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-
-static PyObject *Evt_Error;
-
-static PyObject *Evt_GetMouse(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point mouseLoc;
-#ifndef GetMouse
-       PyMac_PRECHECK(GetMouse);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetMouse(&mouseLoc);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, mouseLoc);
-       return _res;
-}
-
-static PyObject *Evt_Button(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef Button
-       PyMac_PRECHECK(Button);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = Button();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_StillDown(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef StillDown
-       PyMac_PRECHECK(StillDown);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = StillDown();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_WaitMouseUp(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef WaitMouseUp
-       PyMac_PRECHECK(WaitMouseUp);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = WaitMouseUp();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_GetCaretTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-#ifndef GetCaretTime
-       PyMac_PRECHECK(GetCaretTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetCaretTime();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_GetKeys(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       KeyMap theKeys__out__;
-#ifndef GetKeys
-       PyMac_PRECHECK(GetKeys);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetKeys(theKeys__out__);
-       _res = Py_BuildValue("s#",
-                            (char *)&theKeys__out__, (int)sizeof(KeyMap));
-       return _res;
-}
-
-static PyObject *Evt_GetDblTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-#ifndef GetDblTime
-       PyMac_PRECHECK(GetDblTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetDblTime();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_SetEventMask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventMask value;
-#ifndef SetEventMask
-       PyMac_PRECHECK(SetEventMask);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &value))
-               return NULL;
-       SetEventMask(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Evt_GetNextEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventMask eventMask;
-       EventRecord theEvent;
-#ifndef GetNextEvent
-       PyMac_PRECHECK(GetNextEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &eventMask))
-               return NULL;
-       _rv = GetNextEvent(eventMask,
-                          &theEvent);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildEventRecord, &theEvent);
-       return _res;
-}
-
-static PyObject *Evt_EventAvail(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventMask eventMask;
-       EventRecord theEvent;
-#ifndef EventAvail
-       PyMac_PRECHECK(EventAvail);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &eventMask))
-               return NULL;
-       _rv = EventAvail(eventMask,
-                        &theEvent);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildEventRecord, &theEvent);
-       return _res;
-}
-
-static PyObject *Evt_PostEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       EventKind eventNum;
-       UInt32 eventMsg;
-#ifndef PostEvent
-       PyMac_PRECHECK(PostEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "Hl",
-                             &eventNum,
-                             &eventMsg))
-               return NULL;
-       _err = PostEvent(eventNum,
-                        eventMsg);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Evt_FlushEvents(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventMask whichMask;
-       EventMask stopMask;
-#ifndef FlushEvents
-       PyMac_PRECHECK(FlushEvents);
-#endif
-       if (!PyArg_ParseTuple(_args, "HH",
-                             &whichMask,
-                             &stopMask))
-               return NULL;
-       FlushEvents(whichMask,
-                   stopMask);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Evt_GetGlobalMouse(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point globalMouse;
-#ifndef GetGlobalMouse
-       PyMac_PRECHECK(GetGlobalMouse);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetGlobalMouse(&globalMouse);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, globalMouse);
-       return _res;
-}
-
-static PyObject *Evt_GetCurrentKeyModifiers(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-#ifndef GetCurrentKeyModifiers
-       PyMac_PRECHECK(GetCurrentKeyModifiers);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetCurrentKeyModifiers();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_CheckEventQueueForUserCancel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef CheckEventQueueForUserCancel
-       PyMac_PRECHECK(CheckEventQueueForUserCancel);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CheckEventQueueForUserCancel();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_KeyScript(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short code;
-#ifndef KeyScript
-       PyMac_PRECHECK(KeyScript);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &code))
-               return NULL;
-       KeyScript(code);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Evt_IsCmdChar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord event;
-       short test;
-#ifndef IsCmdChar
-       PyMac_PRECHECK(IsCmdChar);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetEventRecord, &event,
-                             &test))
-               return NULL;
-       _rv = IsCmdChar(&event,
-                       test);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_LMGetKeyThresh(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef LMGetKeyThresh
-       PyMac_PRECHECK(LMGetKeyThresh);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetKeyThresh();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_LMSetKeyThresh(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 value;
-#ifndef LMSetKeyThresh
-       PyMac_PRECHECK(LMSetKeyThresh);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &value))
-               return NULL;
-       LMSetKeyThresh(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Evt_LMGetKeyRepThresh(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef LMGetKeyRepThresh
-       PyMac_PRECHECK(LMGetKeyRepThresh);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetKeyRepThresh();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_LMSetKeyRepThresh(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 value;
-#ifndef LMSetKeyRepThresh
-       PyMac_PRECHECK(LMSetKeyRepThresh);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &value))
-               return NULL;
-       LMSetKeyRepThresh(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Evt_LMGetKbdLast(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 _rv;
-#ifndef LMGetKbdLast
-       PyMac_PRECHECK(LMGetKbdLast);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetKbdLast();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_LMSetKbdLast(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 value;
-#ifndef LMSetKbdLast
-       PyMac_PRECHECK(LMSetKbdLast);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &value))
-               return NULL;
-       LMSetKbdLast(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Evt_LMGetKbdType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 _rv;
-#ifndef LMGetKbdType
-       PyMac_PRECHECK(LMGetKbdType);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetKbdType();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_LMSetKbdType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 value;
-#ifndef LMSetKbdType
-       PyMac_PRECHECK(LMSetKbdType);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &value))
-               return NULL;
-       LMSetKbdType(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Evt_TickCount(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-#ifndef TickCount
-       PyMac_PRECHECK(TickCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TickCount();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Evt_WaitNextEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       Boolean _rv;
-       EventMask eventMask;
-       EventRecord theEvent;
-       UInt32 sleep;
-       Handle mouseregion = (Handle)0;
-
-       if (!PyArg_ParseTuple(_args, "Hl|O&",
-                             &eventMask,
-                             &sleep,
-                             OptResObj_Convert, &mouseregion))
-               return NULL;
-       _rv = WaitNextEvent(eventMask,
-                           &theEvent,
-                           sleep,
-                           (RgnHandle)mouseregion);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildEventRecord, &theEvent);
-       return _res;
-
-}
-
-static PyMethodDef Evt_methods[] = {
-       {"GetMouse", (PyCFunction)Evt_GetMouse, 1,
-        PyDoc_STR("() -> (Point mouseLoc)")},
-       {"Button", (PyCFunction)Evt_Button, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"StillDown", (PyCFunction)Evt_StillDown, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"WaitMouseUp", (PyCFunction)Evt_WaitMouseUp, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"GetCaretTime", (PyCFunction)Evt_GetCaretTime, 1,
-        PyDoc_STR("() -> (UInt32 _rv)")},
-       {"GetKeys", (PyCFunction)Evt_GetKeys, 1,
-        PyDoc_STR("() -> (KeyMap theKeys)")},
-       {"GetDblTime", (PyCFunction)Evt_GetDblTime, 1,
-        PyDoc_STR("() -> (UInt32 _rv)")},
-       {"SetEventMask", (PyCFunction)Evt_SetEventMask, 1,
-        PyDoc_STR("(EventMask value) -> None")},
-       {"GetNextEvent", (PyCFunction)Evt_GetNextEvent, 1,
-        PyDoc_STR("(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)")},
-       {"EventAvail", (PyCFunction)Evt_EventAvail, 1,
-        PyDoc_STR("(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)")},
-       {"PostEvent", (PyCFunction)Evt_PostEvent, 1,
-        PyDoc_STR("(EventKind eventNum, UInt32 eventMsg) -> None")},
-       {"FlushEvents", (PyCFunction)Evt_FlushEvents, 1,
-        PyDoc_STR("(EventMask whichMask, EventMask stopMask) -> None")},
-       {"GetGlobalMouse", (PyCFunction)Evt_GetGlobalMouse, 1,
-        PyDoc_STR("() -> (Point globalMouse)")},
-       {"GetCurrentKeyModifiers", (PyCFunction)Evt_GetCurrentKeyModifiers, 1,
-        PyDoc_STR("() -> (UInt32 _rv)")},
-       {"CheckEventQueueForUserCancel", (PyCFunction)Evt_CheckEventQueueForUserCancel, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"KeyScript", (PyCFunction)Evt_KeyScript, 1,
-        PyDoc_STR("(short code) -> None")},
-       {"IsCmdChar", (PyCFunction)Evt_IsCmdChar, 1,
-        PyDoc_STR("(EventRecord event, short test) -> (Boolean _rv)")},
-       {"LMGetKeyThresh", (PyCFunction)Evt_LMGetKeyThresh, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"LMSetKeyThresh", (PyCFunction)Evt_LMSetKeyThresh, 1,
-        PyDoc_STR("(SInt16 value) -> None")},
-       {"LMGetKeyRepThresh", (PyCFunction)Evt_LMGetKeyRepThresh, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"LMSetKeyRepThresh", (PyCFunction)Evt_LMSetKeyRepThresh, 1,
-        PyDoc_STR("(SInt16 value) -> None")},
-       {"LMGetKbdLast", (PyCFunction)Evt_LMGetKbdLast, 1,
-        PyDoc_STR("() -> (UInt8 _rv)")},
-       {"LMSetKbdLast", (PyCFunction)Evt_LMSetKbdLast, 1,
-        PyDoc_STR("(UInt8 value) -> None")},
-       {"LMGetKbdType", (PyCFunction)Evt_LMGetKbdType, 1,
-        PyDoc_STR("() -> (UInt8 _rv)")},
-       {"LMSetKbdType", (PyCFunction)Evt_LMSetKbdType, 1,
-        PyDoc_STR("(UInt8 value) -> None")},
-       {"TickCount", (PyCFunction)Evt_TickCount, 1,
-        PyDoc_STR("() -> (UInt32 _rv)")},
-       {"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1,
-        PyDoc_STR("(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Evt(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_Evt", Evt_methods);
-       d = PyModule_GetDict(m);
-       Evt_Error = PyMac_GetOSErrException();
-       if (Evt_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Evt_Error) != 0)
-               return;
-}
-
-/* ======================== End module _Evt ========================= */
-
diff --git a/Mac/Modules/evt/evtedit.py b/Mac/Modules/evt/evtedit.py
deleted file mode 100644 (file)
index 02087e1..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-f = Function(void, 'SystemClick',
-    (EventRecord_ptr, 'theEvent', InMode),
-    (WindowPtr, 'theWindow', InMode),
-)
-functions.append(f)
-
-f = Function(UInt32, 'TickCount',
-)
-functions.append(f)
diff --git a/Mac/Modules/evt/evtscan.py b/Mac/Modules/evt/evtscan.py
deleted file mode 100644 (file)
index ddb158a..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "Events"
-SHORT = "evt"
-OBJECT = "NOTUSED"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            # This is non-functional today
-            if t == OBJECT and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "KeyTranslate",
-                "GetEventMask",         # I cannot seem to find this routine...
-                "WaitNextEvent",        # Manually generated because of optional region
-                # Constants with funny definitions
-                "osEvtMessageMask",
-                # OS8 calls
-                'SystemEvent',
-                'SystemTask',
-                'SystemClick',
-                'GetOSEvent',
-                'OSEventAvail',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "EvQElPtr", "QHdrPtr"
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
-                 [("InBuffer", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("long", "*", "InMode"),
-                                            ("long", "*", "OutMode")],
-                 [("VarVarOutBuffer", "*", "InOutMode")]),
-
-                ([("void", "wStorage", "OutMode")],
-                 [("NullStorage", "*", "InMode")]),
-
-                # GetKeys
-                ([('KeyMap', 'theKeys', 'InMode')],
-                 [('*', '*', 'OutMode')]),
-
-                # GetTicker
-                ([('unsigned long', '*', '*')],
-                 [('unsigned_long', '*', '*')]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/evt/evtsupport.py b/Mac/Modules/evt/evtsupport.py
deleted file mode 100644 (file)
index 8deef92..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Events.h'              # The Apple header file
-MODNAME = '_Evt'                                # The name of the module
-OBJECTNAME = 'Event'                    # The basic name of the objects used here
-KIND = 'Record'                         # Usually 'Ptr' or 'Handle'
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Evt'                       # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + KIND          # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
-
-RgnHandle = FakeType("(RgnHandle)0")
-# XXXX Should be next, but this will break a lot of code...
-# RgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
-
-KeyMap = ArrayOutputBufferType("KeyMap")
-##MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
-##MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
-EventMask = Type("EventMask", "H")
-EventKind = Type("EventKind", "H")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-"""
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-##Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-exec(open(INPUTFILE).read())
-
-# Move TickCount here, for convenience
-f = Function(UInt32, 'TickCount',
-)
-functions.append(f)
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-
-WaitNextEvent_body = """
-Boolean _rv;
-EventMask eventMask;
-EventRecord theEvent;
-UInt32 sleep;
-Handle mouseregion = (Handle)0;
-
-if (!PyArg_ParseTuple(_args, "Hl|O&",
-                      &eventMask,
-                      &sleep,
-                      OptResObj_Convert, &mouseregion))
-        return NULL;
-_rv = WaitNextEvent(eventMask,
-                    &theEvent,
-                    sleep,
-                    (RgnHandle)mouseregion);
-_res = Py_BuildValue("bO&",
-                     _rv,
-                     PyMac_BuildEventRecord, &theEvent);
-return _res;
-"""
-f = ManualGenerator("WaitNextEvent", WaitNextEvent_body);
-f.docstring = lambda: "(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)"
-module.add(f)
-
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c
deleted file mode 100644 (file)
index 4125dba..0000000
+++ /dev/null
@@ -1,3287 +0,0 @@
-
-/* ========================== Module _File ========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern int _PyMac_GetFSSpec(PyObject *v, FSSpec *spec);
-extern int _PyMac_GetFSRef(PyObject *v, FSRef *fsr);
-extern PyObject *_PyMac_BuildFSSpec(FSSpec *spec);
-extern PyObject *_PyMac_BuildFSRef(FSRef *spec);
-
-#define PyMac_GetFSSpec _PyMac_GetFSSpec
-#define PyMac_GetFSRef _PyMac_GetFSRef
-#define PyMac_BuildFSSpec _PyMac_BuildFSSpec
-#define PyMac_BuildFSRef _PyMac_BuildFSRef
-#else
-extern int PyMac_GetFSSpec(PyObject *v, FSSpec *spec);
-extern int PyMac_GetFSRef(PyObject *v, FSRef *fsr);
-extern PyObject *PyMac_BuildFSSpec(FSSpec *spec);
-extern PyObject *PyMac_BuildFSRef(FSRef *spec);
-#endif
-
-/* Forward declarations */
-static PyObject *FInfo_New(FInfo *itself);
-static PyObject *FSRef_New(FSRef *itself);
-static PyObject *FSSpec_New(FSSpec *itself);
-static PyObject *Alias_New(AliasHandle itself);
-static int FInfo_Convert(PyObject *v, FInfo *p_itself);
-#define FSRef_Convert PyMac_GetFSRef
-#define FSSpec_Convert PyMac_GetFSSpec
-static int Alias_Convert(PyObject *v, AliasHandle *p_itself);
-
-/*
-** UTCDateTime records
-*/
-static int
-UTCDateTime_Convert(PyObject *v, UTCDateTime *ptr)
-{
-        return PyArg_Parse(v, "(HlH)", &ptr->highSeconds, &ptr->lowSeconds, &ptr->fraction);
-}
-
-static PyObject *
-UTCDateTime_New(UTCDateTime *ptr)
-{
-        return Py_BuildValue("(HlH)", ptr->highSeconds, ptr->lowSeconds, ptr->fraction);
-}
-
-/*
-** Optional fsspec and fsref pointers. None will pass NULL
-*/
-static int
-myPyMac_GetOptFSSpecPtr(PyObject *v, FSSpec **spec)
-{
-        if (v == Py_None) {
-                *spec = NULL;
-                return 1;
-        }
-        return PyMac_GetFSSpec(v, *spec);
-}
-
-static int
-myPyMac_GetOptFSRefPtr(PyObject *v, FSRef **ref)
-{
-        if (v == Py_None) {
-                *ref = NULL;
-                return 1;
-        }
-        return PyMac_GetFSRef(v, *ref);
-}
-
-/*
-** Parse/generate objsect
-*/
-static PyObject *
-PyMac_BuildHFSUniStr255(HFSUniStr255 *itself)
-{
-
-        return Py_BuildValue("u#", itself->unicode, itself->length);
-}
-
-static OSErr
-_PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
-{
-       FSRef fsr;
-       OSErr err;
-
-       *path = '\0';
-       err = FSpMakeFSRef(fss, &fsr);
-       if (err == fnfErr) {
-               /* FSSpecs can point to non-existing files, fsrefs can't. */
-               FSSpec fss2;
-               int tocopy;
-
-               err = FSMakeFSSpec(fss->vRefNum, fss->parID,
-                                  (unsigned char*)"", &fss2);
-               if (err)
-                       return err;
-               err = FSpMakeFSRef(&fss2, &fsr);
-               if (err)
-                       return err;
-               err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len-1);
-               if (err)
-                       return err;
-               /* This part is not 100% safe: we append the filename part, but
-               ** I'm not sure that we don't run afoul of the various 8bit
-               ** encodings here. Will have to look this up at some point...
-               */
-               strcat(path, "/");
-               tocopy = fss->name[0];
-               if ((strlen(path) + tocopy) >= len)
-                       tocopy = len - strlen(path) - 1;
-               if (tocopy > 0)
-                       strncat(path, (char*)fss->name+1, tocopy);
-       }
-       else {
-               if (err)
-                       return err;
-               err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len);
-               if (err)
-                       return err;
-       }
-       return 0;
-}
-
-
-static PyObject *File_Error;
-
-/* ------------------- Object type FSCatalogInfo -------------------- */
-
-static PyTypeObject FSCatalogInfo_Type;
-
-#define FSCatalogInfo_Check(x) (Py_TYPE(x) == &FSCatalogInfo_Type || PyObject_TypeCheck((x), &FSCatalogInfo_Type))
-
-typedef struct FSCatalogInfoObject {
-       PyObject_HEAD
-       FSCatalogInfo ob_itself;
-} FSCatalogInfoObject;
-
-static PyObject *FSCatalogInfo_New(FSCatalogInfo *itself)
-{
-       FSCatalogInfoObject *it;
-       if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }
-       it = PyObject_NEW(FSCatalogInfoObject, &FSCatalogInfo_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = *itself;
-       return (PyObject *)it;
-}
-
-static int FSCatalogInfo_Convert(PyObject *v, FSCatalogInfo *p_itself)
-{
-       if (!FSCatalogInfo_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "FSCatalogInfo required");
-               return 0;
-       }
-       *p_itself = ((FSCatalogInfoObject *)v)->ob_itself;
-       return 1;
-}
-
-static void FSCatalogInfo_dealloc(FSCatalogInfoObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyMethodDef FSCatalogInfo_methods[] = {
-       {NULL, NULL, 0}
-};
-
-static PyObject *FSCatalogInfo_get_nodeFlags(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("H", self->ob_itself.nodeFlags);
-}
-
-static int FSCatalogInfo_set_nodeFlags(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "H", &self->ob_itself.nodeFlags)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_volume(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("h", self->ob_itself.volume);
-}
-
-static int FSCatalogInfo_set_volume(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "h", &self->ob_itself.volume)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_parentDirID(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_itself.parentDirID);
-}
-
-static int FSCatalogInfo_set_parentDirID(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "l", &self->ob_itself.parentDirID)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_nodeID(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_itself.nodeID);
-}
-
-static int FSCatalogInfo_set_nodeID(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "l", &self->ob_itself.nodeID)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_createDate(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.createDate);
-}
-
-static int FSCatalogInfo_set_createDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.createDate)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_contentModDate(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.contentModDate);
-}
-
-static int FSCatalogInfo_set_contentModDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.contentModDate)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_attributeModDate(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.attributeModDate);
-}
-
-static int FSCatalogInfo_set_attributeModDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.attributeModDate)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_accessDate(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.accessDate);
-}
-
-static int FSCatalogInfo_set_accessDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.accessDate)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_backupDate(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.backupDate);
-}
-
-static int FSCatalogInfo_set_backupDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.backupDate)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_permissions(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("(llll)", self->ob_itself.permissions[0], self->ob_itself.permissions[1], self->ob_itself.permissions[2], self->ob_itself.permissions[3]);
-}
-
-static int FSCatalogInfo_set_permissions(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "(llll)", &self->ob_itself.permissions[0], &self->ob_itself.permissions[1], &self->ob_itself.permissions[2], &self->ob_itself.permissions[3])-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_valence(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_itself.valence);
-}
-
-static int FSCatalogInfo_set_valence(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "l", &self->ob_itself.valence)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_dataLogicalSize(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_itself.dataLogicalSize);
-}
-
-static int FSCatalogInfo_set_dataLogicalSize(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "l", &self->ob_itself.dataLogicalSize)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_dataPhysicalSize(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_itself.dataPhysicalSize);
-}
-
-static int FSCatalogInfo_set_dataPhysicalSize(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "l", &self->ob_itself.dataPhysicalSize)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_rsrcLogicalSize(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_itself.rsrcLogicalSize);
-}
-
-static int FSCatalogInfo_set_rsrcLogicalSize(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "l", &self->ob_itself.rsrcLogicalSize)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_rsrcPhysicalSize(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_itself.rsrcPhysicalSize);
-}
-
-static int FSCatalogInfo_set_rsrcPhysicalSize(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "l", &self->ob_itself.rsrcPhysicalSize)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_sharingFlags(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_itself.sharingFlags);
-}
-
-static int FSCatalogInfo_set_sharingFlags(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "l", &self->ob_itself.sharingFlags)-1;
-       return 0;
-}
-
-static PyObject *FSCatalogInfo_get_userPrivileges(FSCatalogInfoObject *self, void *closure)
-{
-       return Py_BuildValue("b", self->ob_itself.userPrivileges);
-}
-
-static int FSCatalogInfo_set_userPrivileges(FSCatalogInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "b", &self->ob_itself.userPrivileges)-1;
-       return 0;
-}
-
-static PyGetSetDef FSCatalogInfo_getsetlist[] = {
-       {"nodeFlags", (getter)FSCatalogInfo_get_nodeFlags, (setter)FSCatalogInfo_set_nodeFlags, NULL},
-       {"volume", (getter)FSCatalogInfo_get_volume, (setter)FSCatalogInfo_set_volume, NULL},
-       {"parentDirID", (getter)FSCatalogInfo_get_parentDirID, (setter)FSCatalogInfo_set_parentDirID, NULL},
-       {"nodeID", (getter)FSCatalogInfo_get_nodeID, (setter)FSCatalogInfo_set_nodeID, NULL},
-       {"createDate", (getter)FSCatalogInfo_get_createDate, (setter)FSCatalogInfo_set_createDate, NULL},
-       {"contentModDate", (getter)FSCatalogInfo_get_contentModDate, (setter)FSCatalogInfo_set_contentModDate, NULL},
-       {"attributeModDate", (getter)FSCatalogInfo_get_attributeModDate, (setter)FSCatalogInfo_set_attributeModDate, NULL},
-       {"accessDate", (getter)FSCatalogInfo_get_accessDate, (setter)FSCatalogInfo_set_accessDate, NULL},
-       {"backupDate", (getter)FSCatalogInfo_get_backupDate, (setter)FSCatalogInfo_set_backupDate, NULL},
-       {"permissions", (getter)FSCatalogInfo_get_permissions, (setter)FSCatalogInfo_set_permissions, NULL},
-       {"valence", (getter)FSCatalogInfo_get_valence, (setter)FSCatalogInfo_set_valence, NULL},
-       {"dataLogicalSize", (getter)FSCatalogInfo_get_dataLogicalSize, (setter)FSCatalogInfo_set_dataLogicalSize, NULL},
-       {"dataPhysicalSize", (getter)FSCatalogInfo_get_dataPhysicalSize, (setter)FSCatalogInfo_set_dataPhysicalSize, NULL},
-       {"rsrcLogicalSize", (getter)FSCatalogInfo_get_rsrcLogicalSize, (setter)FSCatalogInfo_set_rsrcLogicalSize, NULL},
-       {"rsrcPhysicalSize", (getter)FSCatalogInfo_get_rsrcPhysicalSize, (setter)FSCatalogInfo_set_rsrcPhysicalSize, NULL},
-       {"sharingFlags", (getter)FSCatalogInfo_get_sharingFlags, (setter)FSCatalogInfo_set_sharingFlags, NULL},
-       {"userPrivileges", (getter)FSCatalogInfo_get_userPrivileges, (setter)FSCatalogInfo_set_userPrivileges, NULL},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define FSCatalogInfo_compare NULL
-
-#define FSCatalogInfo_repr NULL
-
-#define FSCatalogInfo_hash NULL
-static int FSCatalogInfo_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       static char *kw[] = {
-                   "nodeFlags",
-                   "volume",
-                   "parentDirID",
-                   "nodeID",
-                   "createDate",
-                   "contentModDate",
-                   "atributeModDate",
-                   "accessDate",
-                   "backupDate",
-                   "valence",
-                   "dataLogicalSize",
-                   "dataPhysicalSize",
-                   "rsrcLogicalSize",
-                   "rsrcPhysicalSize",
-                   "sharingFlags",
-                   "userPrivileges"
-                   , 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|HhllO&O&O&O&O&llllllb", kw, &((FSCatalogInfoObject *)_self)->ob_itself.nodeFlags,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.volume,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.parentDirID,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.nodeID,
-                   UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.createDate,
-                   UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.contentModDate,
-                   UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.attributeModDate,
-                   UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.accessDate,
-                   UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.backupDate,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.valence,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.dataLogicalSize,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.dataPhysicalSize,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.rsrcLogicalSize,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.rsrcPhysicalSize,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.sharingFlags,
-                   &((FSCatalogInfoObject *)_self)->ob_itself.userPrivileges))
-       {
-               return -1;
-       }
-       return 0;
-}
-
-#define FSCatalogInfo_tp_alloc PyType_GenericAlloc
-
-static PyObject *FSCatalogInfo_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       memset(&((FSCatalogInfoObject *)self)->ob_itself, 0, sizeof(FSCatalogInfo));
-       return self;
-}
-
-#define FSCatalogInfo_tp_free PyObject_Del
-
-
-static PyTypeObject FSCatalogInfo_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "Carbon.File.FSCatalogInfo", /*tp_name*/
-       sizeof(FSCatalogInfoObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) FSCatalogInfo_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) FSCatalogInfo_compare, /*tp_compare*/
-       (reprfunc) FSCatalogInfo_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) FSCatalogInfo_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       FSCatalogInfo_methods, /* tp_methods */
-       0, /*tp_members*/
-       FSCatalogInfo_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       FSCatalogInfo_tp_init, /* tp_init */
-       FSCatalogInfo_tp_alloc, /* tp_alloc */
-       FSCatalogInfo_tp_new, /* tp_new */
-       FSCatalogInfo_tp_free, /* tp_free */
-};
-
-/* ----------------- End object type FSCatalogInfo ------------------ */
-
-
-/* ----------------------- Object type FInfo ------------------------ */
-
-static PyTypeObject FInfo_Type;
-
-#define FInfo_Check(x) (Py_TYPE(x) == &FInfo_Type || PyObject_TypeCheck((x), &FInfo_Type))
-
-typedef struct FInfoObject {
-       PyObject_HEAD
-       FInfo ob_itself;
-} FInfoObject;
-
-static PyObject *FInfo_New(FInfo *itself)
-{
-       FInfoObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(FInfoObject, &FInfo_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = *itself;
-       return (PyObject *)it;
-}
-
-static int FInfo_Convert(PyObject *v, FInfo *p_itself)
-{
-       if (!FInfo_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "FInfo required");
-               return 0;
-       }
-       *p_itself = ((FInfoObject *)v)->ob_itself;
-       return 1;
-}
-
-static void FInfo_dealloc(FInfoObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyMethodDef FInfo_methods[] = {
-       {NULL, NULL, 0}
-};
-
-static PyObject *FInfo_get_Type(FInfoObject *self, void *closure)
-{
-       return Py_BuildValue("O&", PyMac_BuildOSType, self->ob_itself.fdType);
-}
-
-static int FInfo_set_Type(FInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "O&", PyMac_GetOSType, &self->ob_itself.fdType)-1;
-       return 0;
-}
-
-static PyObject *FInfo_get_Creator(FInfoObject *self, void *closure)
-{
-       return Py_BuildValue("O&", PyMac_BuildOSType, self->ob_itself.fdCreator);
-}
-
-static int FInfo_set_Creator(FInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "O&", PyMac_GetOSType, &self->ob_itself.fdCreator)-1;
-       return 0;
-}
-
-static PyObject *FInfo_get_Flags(FInfoObject *self, void *closure)
-{
-       return Py_BuildValue("H", self->ob_itself.fdFlags);
-}
-
-static int FInfo_set_Flags(FInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "H", &self->ob_itself.fdFlags)-1;
-       return 0;
-}
-
-static PyObject *FInfo_get_Location(FInfoObject *self, void *closure)
-{
-       return Py_BuildValue("O&", PyMac_BuildPoint, self->ob_itself.fdLocation);
-}
-
-static int FInfo_set_Location(FInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "O&", PyMac_GetPoint, &self->ob_itself.fdLocation)-1;
-       return 0;
-}
-
-static PyObject *FInfo_get_Fldr(FInfoObject *self, void *closure)
-{
-       return Py_BuildValue("h", self->ob_itself.fdFldr);
-}
-
-static int FInfo_set_Fldr(FInfoObject *self, PyObject *v, void *closure)
-{
-       return PyArg_Parse(v, "h", &self->ob_itself.fdFldr)-1;
-       return 0;
-}
-
-static PyGetSetDef FInfo_getsetlist[] = {
-       {"Type", (getter)FInfo_get_Type, (setter)FInfo_set_Type, "4-char file type"},
-       {"Creator", (getter)FInfo_get_Creator, (setter)FInfo_set_Creator, "4-char file creator"},
-       {"Flags", (getter)FInfo_get_Flags, (setter)FInfo_set_Flags, "Finder flag bits"},
-       {"Location", (getter)FInfo_get_Location, (setter)FInfo_set_Location, "(x, y) location of the file's icon in its parent finder window"},
-       {"Fldr", (getter)FInfo_get_Fldr, (setter)FInfo_set_Fldr, "Original folder, for 'put away'"},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define FInfo_compare NULL
-
-#define FInfo_repr NULL
-
-#define FInfo_hash NULL
-static int FInfo_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       FInfo *itself = NULL;
-       static char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "|O&", kw, FInfo_Convert, &itself))
-       {
-               if (itself) memcpy(&((FInfoObject *)_self)->ob_itself, itself, sizeof(FInfo));
-               return 0;
-       }
-       return -1;
-}
-
-#define FInfo_tp_alloc PyType_GenericAlloc
-
-static PyObject *FInfo_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       memset(&((FInfoObject *)self)->ob_itself, 0, sizeof(FInfo));
-       return self;
-}
-
-#define FInfo_tp_free PyObject_Del
-
-
-static PyTypeObject FInfo_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "Carbon.File.FInfo", /*tp_name*/
-       sizeof(FInfoObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) FInfo_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) FInfo_compare, /*tp_compare*/
-       (reprfunc) FInfo_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) FInfo_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       FInfo_methods, /* tp_methods */
-       0, /*tp_members*/
-       FInfo_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       FInfo_tp_init, /* tp_init */
-       FInfo_tp_alloc, /* tp_alloc */
-       FInfo_tp_new, /* tp_new */
-       FInfo_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type FInfo ---------------------- */
-
-
-/* ----------------------- Object type Alias ------------------------ */
-
-static PyTypeObject Alias_Type;
-
-#define Alias_Check(x) (Py_TYPE(x) == &Alias_Type || PyObject_TypeCheck((x), &Alias_Type))
-
-typedef struct AliasObject {
-       PyObject_HEAD
-       AliasHandle ob_itself;
-       void (*ob_freeit)(AliasHandle ptr);
-} AliasObject;
-
-static PyObject *Alias_New(AliasHandle itself)
-{
-       AliasObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(AliasObject, &Alias_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       it->ob_freeit = NULL;
-       return (PyObject *)it;
-}
-
-static int Alias_Convert(PyObject *v, AliasHandle *p_itself)
-{
-       if (!Alias_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Alias required");
-               return 0;
-       }
-       *p_itself = ((AliasObject *)v)->ob_itself;
-       return 1;
-}
-
-static void Alias_dealloc(AliasObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit(self->ob_itself);
-       }
-       self->ob_itself = NULL;
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *Alias_ResolveAlias(AliasObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fromFile__buf__;
-       FSSpec *fromFile = &fromFile__buf__;
-       FSSpec target;
-       Boolean wasChanged;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             myPyMac_GetOptFSSpecPtr, &fromFile))
-               return NULL;
-       _err = ResolveAlias(fromFile,
-                           _self->ob_itself,
-                           &target,
-                           &wasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            FSSpec_New, &target,
-                            wasChanged);
-       return _res;
-}
-
-static PyObject *Alias_GetAliasInfo(AliasObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AliasInfoType index;
-       Str63 theString;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &index))
-               return NULL;
-       _err = GetAliasInfo(_self->ob_itself,
-                           index,
-                           theString);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildStr255, theString);
-       return _res;
-}
-
-static PyObject *Alias_ResolveAliasWithMountFlags(AliasObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fromFile__buf__;
-       FSSpec *fromFile = &fromFile__buf__;
-       FSSpec target;
-       Boolean wasChanged;
-       unsigned long mountFlags;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             myPyMac_GetOptFSSpecPtr, &fromFile,
-                             &mountFlags))
-               return NULL;
-       _err = ResolveAliasWithMountFlags(fromFile,
-                                         _self->ob_itself,
-                                         &target,
-                                         &wasChanged,
-                                         mountFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            FSSpec_New, &target,
-                            wasChanged);
-       return _res;
-}
-
-static PyObject *Alias_FollowFinderAlias(AliasObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fromFile__buf__;
-       FSSpec *fromFile = &fromFile__buf__;
-       Boolean logon;
-       FSSpec target;
-       Boolean wasChanged;
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             myPyMac_GetOptFSSpecPtr, &fromFile,
-                             &logon))
-               return NULL;
-       _err = FollowFinderAlias(fromFile,
-                                _self->ob_itself,
-                                logon,
-                                &target,
-                                &wasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            FSSpec_New, &target,
-                            wasChanged);
-       return _res;
-}
-
-static PyObject *Alias_FSResolveAliasWithMountFlags(AliasObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef fromFile__buf__;
-       FSRef *fromFile = &fromFile__buf__;
-       FSRef target;
-       Boolean wasChanged;
-       unsigned long mountFlags;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             myPyMac_GetOptFSRefPtr, &fromFile,
-                             &mountFlags))
-               return NULL;
-       _err = FSResolveAliasWithMountFlags(fromFile,
-                                           _self->ob_itself,
-                                           &target,
-                                           &wasChanged,
-                                           mountFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            FSRef_New, &target,
-                            wasChanged);
-       return _res;
-}
-
-static PyObject *Alias_FSResolveAlias(AliasObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef fromFile__buf__;
-       FSRef *fromFile = &fromFile__buf__;
-       FSRef target;
-       Boolean wasChanged;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             myPyMac_GetOptFSRefPtr, &fromFile))
-               return NULL;
-       _err = FSResolveAlias(fromFile,
-                             _self->ob_itself,
-                             &target,
-                             &wasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            FSRef_New, &target,
-                            wasChanged);
-       return _res;
-}
-
-static PyObject *Alias_FSFollowFinderAlias(AliasObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef fromFile;
-       Boolean logon;
-       FSRef target;
-       Boolean wasChanged;
-       if (!PyArg_ParseTuple(_args, "b",
-                             &logon))
-               return NULL;
-       _err = FSFollowFinderAlias(&fromFile,
-                                  _self->ob_itself,
-                                  logon,
-                                  &target,
-                                  &wasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&b",
-                            FSRef_New, &fromFile,
-                            FSRef_New, &target,
-                            wasChanged);
-       return _res;
-}
-
-static PyMethodDef Alias_methods[] = {
-       {"ResolveAlias", (PyCFunction)Alias_ResolveAlias, 1,
-        PyDoc_STR("(FSSpec fromFile) -> (FSSpec target, Boolean wasChanged)")},
-       {"GetAliasInfo", (PyCFunction)Alias_GetAliasInfo, 1,
-        PyDoc_STR("(AliasInfoType index) -> (Str63 theString)")},
-       {"ResolveAliasWithMountFlags", (PyCFunction)Alias_ResolveAliasWithMountFlags, 1,
-        PyDoc_STR("(FSSpec fromFile, unsigned long mountFlags) -> (FSSpec target, Boolean wasChanged)")},
-       {"FollowFinderAlias", (PyCFunction)Alias_FollowFinderAlias, 1,
-        PyDoc_STR("(FSSpec fromFile, Boolean logon) -> (FSSpec target, Boolean wasChanged)")},
-       {"FSResolveAliasWithMountFlags", (PyCFunction)Alias_FSResolveAliasWithMountFlags, 1,
-        PyDoc_STR("(FSRef fromFile, unsigned long mountFlags) -> (FSRef target, Boolean wasChanged)")},
-       {"FSResolveAlias", (PyCFunction)Alias_FSResolveAlias, 1,
-        PyDoc_STR("(FSRef fromFile) -> (FSRef target, Boolean wasChanged)")},
-       {"FSFollowFinderAlias", (PyCFunction)Alias_FSFollowFinderAlias, 1,
-        PyDoc_STR("(Boolean logon) -> (FSRef fromFile, FSRef target, Boolean wasChanged)")},
-       {NULL, NULL, 0}
-};
-
-static PyObject *Alias_get_data(AliasObject *self, void *closure)
-{
-       int size;
-                           PyObject *rv;
-
-                           size = GetHandleSize((Handle)self->ob_itself);
-                           HLock((Handle)self->ob_itself);
-                           rv = PyString_FromStringAndSize(*(Handle)self->ob_itself, size);
-                           HUnlock((Handle)self->ob_itself);
-                           return rv;
-                   
-}
-
-#define Alias_set_data NULL
-
-static PyGetSetDef Alias_getsetlist[] = {
-       {"data", (getter)Alias_get_data, (setter)Alias_set_data, "Raw data of the alias object"},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define Alias_compare NULL
-
-#define Alias_repr NULL
-
-#define Alias_hash NULL
-static int Alias_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       AliasHandle itself = NULL;
-       char *rawdata = NULL;
-       int rawdatalen = 0;
-       Handle h;
-       static char *kw[] = {"itself", "rawdata", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|O&s#", kw, Alias_Convert, &itself, &rawdata, &rawdatalen))
-       return -1;
-       if (itself && rawdata)
-       {
-               PyErr_SetString(PyExc_TypeError, "Only one of itself or rawdata may be specified");
-               return -1;
-       }
-       if (!itself && !rawdata)
-       {
-               PyErr_SetString(PyExc_TypeError, "One of itself or rawdata must be specified");
-               return -1;
-       }
-       if (rawdata)
-       {
-               if ((h = NewHandle(rawdatalen)) == NULL)
-               {
-                       PyErr_NoMemory();
-                       return -1;
-               }
-               HLock(h);
-               memcpy((char *)*h, rawdata, rawdatalen);
-               HUnlock(h);
-               ((AliasObject *)_self)->ob_itself = (AliasHandle)h;
-               return 0;
-       }
-       ((AliasObject *)_self)->ob_itself = itself;
-       return 0;
-}
-
-#define Alias_tp_alloc PyType_GenericAlloc
-
-static PyObject *Alias_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((AliasObject *)self)->ob_itself = NULL;
-       return self;
-}
-
-#define Alias_tp_free PyObject_Del
-
-
-static PyTypeObject Alias_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "Carbon.File.Alias", /*tp_name*/
-       sizeof(AliasObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) Alias_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) Alias_compare, /*tp_compare*/
-       (reprfunc) Alias_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) Alias_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       Alias_methods, /* tp_methods */
-       0, /*tp_members*/
-       Alias_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       Alias_tp_init, /* tp_init */
-       Alias_tp_alloc, /* tp_alloc */
-       Alias_tp_new, /* tp_new */
-       Alias_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type Alias ---------------------- */
-
-
-/* ----------------------- Object type FSSpec ----------------------- */
-
-static PyTypeObject FSSpec_Type;
-
-#define FSSpec_Check(x) ((x)->ob_type == &FSSpec_Type || PyObject_TypeCheck((x), &FSSpec_Type))
-
-typedef struct FSSpecObject {
-       PyObject_HEAD
-       FSSpec ob_itself;
-} FSSpecObject;
-
-static PyObject *FSSpec_New(FSSpec *itself)
-{
-       FSSpecObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(FSSpecObject, &FSSpec_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = *itself;
-       return (PyObject *)it;
-}
-
-static void FSSpec_dealloc(FSSpecObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *FSSpec_FSpOpenDF(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt8 permission;
-       short refNum;
-       if (!PyArg_ParseTuple(_args, "b",
-                             &permission))
-               return NULL;
-       _err = FSpOpenDF(&_self->ob_itself,
-                        permission,
-                        &refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            refNum);
-       return _res;
-}
-
-static PyObject *FSSpec_FSpOpenRF(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt8 permission;
-       short refNum;
-       if (!PyArg_ParseTuple(_args, "b",
-                             &permission))
-               return NULL;
-       _err = FSpOpenRF(&_self->ob_itself,
-                        permission,
-                        &refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            refNum);
-       return _res;
-}
-
-static PyObject *FSSpec_FSpCreate(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType creator;
-       OSType fileType;
-       ScriptCode scriptTag;
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &fileType,
-                             &scriptTag))
-               return NULL;
-       _err = FSpCreate(&_self->ob_itself,
-                        creator,
-                        fileType,
-                        scriptTag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSSpec_FSpDirCreate(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ScriptCode scriptTag;
-       long createdDirID;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &scriptTag))
-               return NULL;
-       _err = FSpDirCreate(&_self->ob_itself,
-                           scriptTag,
-                           &createdDirID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            createdDirID);
-       return _res;
-}
-
-static PyObject *FSSpec_FSpDelete(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSpDelete(&_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSSpec_FSpGetFInfo(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FInfo fndrInfo;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSpGetFInfo(&_self->ob_itself,
-                          &fndrInfo);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            FInfo_New, &fndrInfo);
-       return _res;
-}
-
-static PyObject *FSSpec_FSpSetFInfo(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FInfo fndrInfo;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             FInfo_Convert, &fndrInfo))
-               return NULL;
-       _err = FSpSetFInfo(&_self->ob_itself,
-                          &fndrInfo);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSSpec_FSpSetFLock(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSpSetFLock(&_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSSpec_FSpRstFLock(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSpRstFLock(&_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSSpec_FSpRename(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Str255 newName;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, newName))
-               return NULL;
-       _err = FSpRename(&_self->ob_itself,
-                        newName);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSSpec_FSpCatMove(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec dest;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             FSSpec_Convert, &dest))
-               return NULL;
-       _err = FSpCatMove(&_self->ob_itself,
-                         &dest);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSSpec_FSpExchangeFiles(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec dest;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             FSSpec_Convert, &dest))
-               return NULL;
-       _err = FSpExchangeFiles(&_self->ob_itself,
-                               &dest);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSSpec_FSpMakeFSRef(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef newRef;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSpMakeFSRef(&_self->ob_itself,
-                           &newRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            FSRef_New, &newRef);
-       return _res;
-}
-
-static PyObject *FSSpec_NewAliasMinimal(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AliasHandle alias;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = NewAliasMinimal(&_self->ob_itself,
-                              &alias);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            Alias_New, alias);
-       return _res;
-}
-
-static PyObject *FSSpec_IsAliasFile(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Boolean aliasFileFlag;
-       Boolean folderFlag;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = IsAliasFile(&_self->ob_itself,
-                          &aliasFileFlag,
-                          &folderFlag);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("bb",
-                            aliasFileFlag,
-                            folderFlag);
-       return _res;
-}
-
-static PyObject *FSSpec_as_pathname(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       char strbuf[1024];
-       OSErr err;
-
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       err = _PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf));
-       if ( err ) {
-               PyMac_Error(err);
-               return NULL;
-       }
-       _res = PyUnicode_FromString(strbuf);
-       return _res;
-
-}
-
-static PyObject *FSSpec_as_tuple(FSSpecObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _res = Py_BuildValue("(iis#)", _self->ob_itself.vRefNum, _self->ob_itself.parID,
-                                               &_self->ob_itself.name[1], _self->ob_itself.name[0]);
-       return _res;
-
-}
-
-static PyMethodDef FSSpec_methods[] = {
-       {"FSpOpenDF", (PyCFunction)FSSpec_FSpOpenDF, 1,
-        PyDoc_STR("(SInt8 permission) -> (short refNum)")},
-       {"FSpOpenRF", (PyCFunction)FSSpec_FSpOpenRF, 1,
-        PyDoc_STR("(SInt8 permission) -> (short refNum)")},
-       {"FSpCreate", (PyCFunction)FSSpec_FSpCreate, 1,
-        PyDoc_STR("(OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
-       {"FSpDirCreate", (PyCFunction)FSSpec_FSpDirCreate, 1,
-        PyDoc_STR("(ScriptCode scriptTag) -> (long createdDirID)")},
-       {"FSpDelete", (PyCFunction)FSSpec_FSpDelete, 1,
-        PyDoc_STR("() -> None")},
-       {"FSpGetFInfo", (PyCFunction)FSSpec_FSpGetFInfo, 1,
-        PyDoc_STR("() -> (FInfo fndrInfo)")},
-       {"FSpSetFInfo", (PyCFunction)FSSpec_FSpSetFInfo, 1,
-        PyDoc_STR("(FInfo fndrInfo) -> None")},
-       {"FSpSetFLock", (PyCFunction)FSSpec_FSpSetFLock, 1,
-        PyDoc_STR("() -> None")},
-       {"FSpRstFLock", (PyCFunction)FSSpec_FSpRstFLock, 1,
-        PyDoc_STR("() -> None")},
-       {"FSpRename", (PyCFunction)FSSpec_FSpRename, 1,
-        PyDoc_STR("(Str255 newName) -> None")},
-       {"FSpCatMove", (PyCFunction)FSSpec_FSpCatMove, 1,
-        PyDoc_STR("(FSSpec dest) -> None")},
-       {"FSpExchangeFiles", (PyCFunction)FSSpec_FSpExchangeFiles, 1,
-        PyDoc_STR("(FSSpec dest) -> None")},
-       {"FSpMakeFSRef", (PyCFunction)FSSpec_FSpMakeFSRef, 1,
-        PyDoc_STR("() -> (FSRef newRef)")},
-       {"NewAliasMinimal", (PyCFunction)FSSpec_NewAliasMinimal, 1,
-        PyDoc_STR("() -> (AliasHandle alias)")},
-       {"IsAliasFile", (PyCFunction)FSSpec_IsAliasFile, 1,
-        PyDoc_STR("() -> (Boolean aliasFileFlag, Boolean folderFlag)")},
-       {"as_pathname", (PyCFunction)FSSpec_as_pathname, 1,
-        PyDoc_STR("() -> string")},
-       {"as_tuple", (PyCFunction)FSSpec_as_tuple, 1,
-        PyDoc_STR("() -> (vRefNum, dirID, name)")},
-       {NULL, NULL, 0}
-};
-
-static PyObject *FSSpec_get_data(FSSpecObject *self, void *closure)
-{
-       return PyString_FromStringAndSize((char *)&self->ob_itself, sizeof(self->ob_itself));
-}
-
-#define FSSpec_set_data NULL
-
-static PyGetSetDef FSSpec_getsetlist[] = {
-       {"data", (getter)FSSpec_get_data, (setter)FSSpec_set_data, "Raw data of the FSSpec object"},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define FSSpec_compare NULL
-
-static PyObject * FSSpec_repr(FSSpecObject *self)
-{
-       char buf[512];
-       PyOS_snprintf(buf, sizeof(buf), "%s((%d, %ld, '%.*s'))",
-               Py_TYPE(self)->tp_name,
-               self->ob_itself.vRefNum,
-               self->ob_itself.parID,
-               self->ob_itself.name[0], self->ob_itself.name+1);
-       return PyUnicode_FromString(buf);
-}
-
-#define FSSpec_hash NULL
-static int FSSpec_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *v = NULL;
-       char *rawdata = NULL;
-       int rawdatalen = 0;
-       static char *kw[] = {"itself", "rawdata", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
-       return -1;
-       if (v && rawdata)
-       {
-               PyErr_SetString(PyExc_TypeError, "Only one of itself or rawdata may be specified");
-               return -1;
-       }
-       if (!v && !rawdata)
-       {
-               PyErr_SetString(PyExc_TypeError, "One of itself or rawdata must be specified");
-               return -1;
-       }
-       if (rawdata)
-       {
-               if (rawdatalen != sizeof(FSSpec))
-               {
-                       PyErr_SetString(PyExc_TypeError, "FSSpec rawdata incorrect size");
-                       return -1;
-               }
-               memcpy(&((FSSpecObject *)_self)->ob_itself, rawdata, rawdatalen);
-               return 0;
-       }
-       if (PyMac_GetFSSpec(v, &((FSSpecObject *)_self)->ob_itself)) return 0;
-       return -1;
-}
-
-#define FSSpec_tp_alloc PyType_GenericAlloc
-
-static PyObject *FSSpec_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       memset(&((FSSpecObject *)self)->ob_itself, 0, sizeof(FSSpec));
-       return self;
-}
-
-#define FSSpec_tp_free PyObject_Del
-
-
-static PyTypeObject FSSpec_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "Carbon.File.FSSpec", /*tp_name*/
-       sizeof(FSSpecObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) FSSpec_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) FSSpec_compare, /*tp_compare*/
-       (reprfunc) FSSpec_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) FSSpec_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       FSSpec_methods, /* tp_methods */
-       0, /*tp_members*/
-       FSSpec_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       FSSpec_tp_init, /* tp_init */
-       FSSpec_tp_alloc, /* tp_alloc */
-       FSSpec_tp_new, /* tp_new */
-       FSSpec_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type FSSpec --------------------- */
-
-
-/* ----------------------- Object type FSRef ------------------------ */
-
-static PyTypeObject FSRef_Type;
-
-#define FSRef_Check(x) ((x)->ob_type == &FSRef_Type || PyObject_TypeCheck((x), &FSRef_Type))
-
-typedef struct FSRefObject {
-       PyObject_HEAD
-       FSRef ob_itself;
-} FSRefObject;
-
-static PyObject *FSRef_New(FSRef *itself)
-{
-       FSRefObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(FSRefObject, &FSRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = *itself;
-       return (PyObject *)it;
-}
-
-static void FSRef_dealloc(FSRefObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *FSRef_FSMakeFSRefUnicode(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UniChar *nameLength__in__;
-       UniCharCount nameLength__len__;
-       int nameLength__in_len__;
-       TextEncoding textEncodingHint;
-       FSRef newRef;
-       if (!PyArg_ParseTuple(_args, "u#l",
-                             &nameLength__in__, &nameLength__in_len__,
-                             &textEncodingHint))
-               return NULL;
-       nameLength__len__ = nameLength__in_len__;
-       _err = FSMakeFSRefUnicode(&_self->ob_itself,
-                                 nameLength__len__, nameLength__in__,
-                                 textEncodingHint,
-                                 &newRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            FSRef_New, &newRef);
-       return _res;
-}
-
-static PyObject *FSRef_FSCompareFSRefs(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef ref2;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             FSRef_Convert, &ref2))
-               return NULL;
-       _err = FSCompareFSRefs(&_self->ob_itself,
-                              &ref2);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSRef_FSCreateFileUnicode(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UniChar *nameLength__in__;
-       UniCharCount nameLength__len__;
-       int nameLength__in_len__;
-       FSCatalogInfoBitmap whichInfo;
-       FSCatalogInfo catalogInfo;
-       FSRef newRef;
-       FSSpec newSpec;
-       if (!PyArg_ParseTuple(_args, "u#lO&",
-                             &nameLength__in__, &nameLength__in_len__,
-                             &whichInfo,
-                             FSCatalogInfo_Convert, &catalogInfo))
-               return NULL;
-       nameLength__len__ = nameLength__in_len__;
-       _err = FSCreateFileUnicode(&_self->ob_itself,
-                                  nameLength__len__, nameLength__in__,
-                                  whichInfo,
-                                  &catalogInfo,
-                                  &newRef,
-                                  &newSpec);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            FSRef_New, &newRef,
-                            FSSpec_New, &newSpec);
-       return _res;
-}
-
-static PyObject *FSRef_FSCreateDirectoryUnicode(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UniChar *nameLength__in__;
-       UniCharCount nameLength__len__;
-       int nameLength__in_len__;
-       FSCatalogInfoBitmap whichInfo;
-       FSCatalogInfo catalogInfo;
-       FSRef newRef;
-       FSSpec newSpec;
-       UInt32 newDirID;
-       if (!PyArg_ParseTuple(_args, "u#lO&",
-                             &nameLength__in__, &nameLength__in_len__,
-                             &whichInfo,
-                             FSCatalogInfo_Convert, &catalogInfo))
-               return NULL;
-       nameLength__len__ = nameLength__in_len__;
-       _err = FSCreateDirectoryUnicode(&_self->ob_itself,
-                                       nameLength__len__, nameLength__in__,
-                                       whichInfo,
-                                       &catalogInfo,
-                                       &newRef,
-                                       &newSpec,
-                                       &newDirID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&l",
-                            FSRef_New, &newRef,
-                            FSSpec_New, &newSpec,
-                            newDirID);
-       return _res;
-}
-
-static PyObject *FSRef_FSDeleteObject(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSDeleteObject(&_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSRef_FSMoveObject(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef destDirectory;
-       FSRef newRef;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             FSRef_Convert, &destDirectory))
-               return NULL;
-       _err = FSMoveObject(&_self->ob_itself,
-                           &destDirectory,
-                           &newRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            FSRef_New, &newRef);
-       return _res;
-}
-
-static PyObject *FSRef_FSExchangeObjects(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef destRef;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             FSRef_Convert, &destRef))
-               return NULL;
-       _err = FSExchangeObjects(&_self->ob_itself,
-                                &destRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSRef_FSRenameUnicode(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UniChar *nameLength__in__;
-       UniCharCount nameLength__len__;
-       int nameLength__in_len__;
-       TextEncoding textEncodingHint;
-       FSRef newRef;
-       if (!PyArg_ParseTuple(_args, "u#l",
-                             &nameLength__in__, &nameLength__in_len__,
-                             &textEncodingHint))
-               return NULL;
-       nameLength__len__ = nameLength__in_len__;
-       _err = FSRenameUnicode(&_self->ob_itself,
-                              nameLength__len__, nameLength__in__,
-                              textEncodingHint,
-                              &newRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            FSRef_New, &newRef);
-       return _res;
-}
-
-static PyObject *FSRef_FSGetCatalogInfo(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSCatalogInfoBitmap whichInfo;
-       FSCatalogInfo catalogInfo;
-       HFSUniStr255 outName;
-       FSSpec fsSpec;
-       FSRef parentRef;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &whichInfo))
-               return NULL;
-       _err = FSGetCatalogInfo(&_self->ob_itself,
-                               whichInfo,
-                               &catalogInfo,
-                               &outName,
-                               &fsSpec,
-                               &parentRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&O&O&",
-                            FSCatalogInfo_New, &catalogInfo,
-                            PyMac_BuildHFSUniStr255, &outName,
-                            FSSpec_New, &fsSpec,
-                            FSRef_New, &parentRef);
-       return _res;
-}
-
-static PyObject *FSRef_FSSetCatalogInfo(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSCatalogInfoBitmap whichInfo;
-       FSCatalogInfo catalogInfo;
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &whichInfo,
-                             FSCatalogInfo_Convert, &catalogInfo))
-               return NULL;
-       _err = FSSetCatalogInfo(&_self->ob_itself,
-                               whichInfo,
-                               &catalogInfo);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSRef_FSCreateFork(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UniChar *forkNameLength__in__;
-       UniCharCount forkNameLength__len__;
-       int forkNameLength__in_len__;
-       if (!PyArg_ParseTuple(_args, "u#",
-                             &forkNameLength__in__, &forkNameLength__in_len__))
-               return NULL;
-       forkNameLength__len__ = forkNameLength__in_len__;
-       _err = FSCreateFork(&_self->ob_itself,
-                           forkNameLength__len__, forkNameLength__in__);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSRef_FSDeleteFork(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UniChar *forkNameLength__in__;
-       UniCharCount forkNameLength__len__;
-       int forkNameLength__in_len__;
-       if (!PyArg_ParseTuple(_args, "u#",
-                             &forkNameLength__in__, &forkNameLength__in_len__))
-               return NULL;
-       forkNameLength__len__ = forkNameLength__in_len__;
-       _err = FSDeleteFork(&_self->ob_itself,
-                           forkNameLength__len__, forkNameLength__in__);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSRef_FSOpenFork(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UniChar *forkNameLength__in__;
-       UniCharCount forkNameLength__len__;
-       int forkNameLength__in_len__;
-       SInt8 permissions;
-       SInt16 forkRefNum;
-       if (!PyArg_ParseTuple(_args, "u#b",
-                             &forkNameLength__in__, &forkNameLength__in_len__,
-                             &permissions))
-               return NULL;
-       forkNameLength__len__ = forkNameLength__in_len__;
-       _err = FSOpenFork(&_self->ob_itself,
-                         forkNameLength__len__, forkNameLength__in__,
-                         permissions,
-                         &forkRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            forkRefNum);
-       return _res;
-}
-
-static PyObject *FSRef_FNNotify(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FNMessage message;
-       OptionBits flags;
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &message,
-                             &flags))
-               return NULL;
-       _err = FNNotify(&_self->ob_itself,
-                       message,
-                       flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *FSRef_FSNewAliasMinimal(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       AliasHandle inAlias;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSNewAliasMinimal(&_self->ob_itself,
-                                &inAlias);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            Alias_New, inAlias);
-       return _res;
-}
-
-static PyObject *FSRef_FSIsAliasFile(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Boolean aliasFileFlag;
-       Boolean folderFlag;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSIsAliasFile(&_self->ob_itself,
-                            &aliasFileFlag,
-                            &folderFlag);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("bb",
-                            aliasFileFlag,
-                            folderFlag);
-       return _res;
-}
-
-static PyObject *FSRef_FSRefMakePath(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       OSStatus _err;
-#define MAXPATHNAME 1024
-       UInt8 path[MAXPATHNAME];
-       UInt32 maxPathSize = MAXPATHNAME;
-
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSRefMakePath(&_self->ob_itself,
-                                                path,
-                                                maxPathSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("s", path);
-       return _res;
-
-}
-
-static PyObject *FSRef_as_pathname(FSRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _res = FSRef_FSRefMakePath(_self, _args);
-       return _res;
-
-}
-
-static PyMethodDef FSRef_methods[] = {
-       {"FSMakeFSRefUnicode", (PyCFunction)FSRef_FSMakeFSRefUnicode, 1,
-        PyDoc_STR("(Buffer nameLength, TextEncoding textEncodingHint) -> (FSRef newRef)")},
-       {"FSCompareFSRefs", (PyCFunction)FSRef_FSCompareFSRefs, 1,
-        PyDoc_STR("(FSRef ref2) -> None")},
-       {"FSCreateFileUnicode", (PyCFunction)FSRef_FSCreateFileUnicode, 1,
-        PyDoc_STR("(Buffer nameLength, FSCatalogInfoBitmap whichInfo, FSCatalogInfo catalogInfo) -> (FSRef newRef, FSSpec newSpec)")},
-       {"FSCreateDirectoryUnicode", (PyCFunction)FSRef_FSCreateDirectoryUnicode, 1,
-        PyDoc_STR("(Buffer nameLength, FSCatalogInfoBitmap whichInfo, FSCatalogInfo catalogInfo) -> (FSRef newRef, FSSpec newSpec, UInt32 newDirID)")},
-       {"FSDeleteObject", (PyCFunction)FSRef_FSDeleteObject, 1,
-        PyDoc_STR("() -> None")},
-       {"FSMoveObject", (PyCFunction)FSRef_FSMoveObject, 1,
-        PyDoc_STR("(FSRef destDirectory) -> (FSRef newRef)")},
-       {"FSExchangeObjects", (PyCFunction)FSRef_FSExchangeObjects, 1,
-        PyDoc_STR("(FSRef destRef) -> None")},
-       {"FSRenameUnicode", (PyCFunction)FSRef_FSRenameUnicode, 1,
-        PyDoc_STR("(Buffer nameLength, TextEncoding textEncodingHint) -> (FSRef newRef)")},
-       {"FSGetCatalogInfo", (PyCFunction)FSRef_FSGetCatalogInfo, 1,
-        PyDoc_STR("(FSCatalogInfoBitmap whichInfo) -> (FSCatalogInfo catalogInfo, HFSUniStr255 outName, FSSpec fsSpec, FSRef parentRef)")},
-       {"FSSetCatalogInfo", (PyCFunction)FSRef_FSSetCatalogInfo, 1,
-        PyDoc_STR("(FSCatalogInfoBitmap whichInfo, FSCatalogInfo catalogInfo) -> None")},
-       {"FSCreateFork", (PyCFunction)FSRef_FSCreateFork, 1,
-        PyDoc_STR("(Buffer forkNameLength) -> None")},
-       {"FSDeleteFork", (PyCFunction)FSRef_FSDeleteFork, 1,
-        PyDoc_STR("(Buffer forkNameLength) -> None")},
-       {"FSOpenFork", (PyCFunction)FSRef_FSOpenFork, 1,
-        PyDoc_STR("(Buffer forkNameLength, SInt8 permissions) -> (SInt16 forkRefNum)")},
-       {"FNNotify", (PyCFunction)FSRef_FNNotify, 1,
-        PyDoc_STR("(FNMessage message, OptionBits flags) -> None")},
-       {"FSNewAliasMinimal", (PyCFunction)FSRef_FSNewAliasMinimal, 1,
-        PyDoc_STR("() -> (AliasHandle inAlias)")},
-       {"FSIsAliasFile", (PyCFunction)FSRef_FSIsAliasFile, 1,
-        PyDoc_STR("() -> (Boolean aliasFileFlag, Boolean folderFlag)")},
-       {"FSRefMakePath", (PyCFunction)FSRef_FSRefMakePath, 1,
-        PyDoc_STR("() -> string")},
-       {"as_pathname", (PyCFunction)FSRef_as_pathname, 1,
-        PyDoc_STR("() -> string")},
-       {NULL, NULL, 0}
-};
-
-static PyObject *FSRef_get_data(FSRefObject *self, void *closure)
-{
-       return PyString_FromStringAndSize((char *)&self->ob_itself, sizeof(self->ob_itself));
-}
-
-#define FSRef_set_data NULL
-
-static PyGetSetDef FSRef_getsetlist[] = {
-       {"data", (getter)FSRef_get_data, (setter)FSRef_set_data, "Raw data of the FSRef object"},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define FSRef_compare NULL
-
-#define FSRef_repr NULL
-
-#define FSRef_hash NULL
-static int FSRef_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *v = NULL;
-       char *rawdata = NULL;
-       int rawdatalen = 0;
-       static char *kw[] = {"itself", "rawdata", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
-       return -1;
-       if (v && rawdata)
-       {
-               PyErr_SetString(PyExc_TypeError, "Only one of itself or rawdata may be specified");
-               return -1;
-       }
-       if (!v && !rawdata)
-       {
-               PyErr_SetString(PyExc_TypeError, "One of itself or rawdata must be specified");
-               return -1;
-       }
-       if (rawdata)
-       {
-               if (rawdatalen != sizeof(FSRef))
-               {
-                       PyErr_SetString(PyExc_TypeError, "FSRef rawdata incorrect size");
-                       return -1;
-               }
-               memcpy(&((FSRefObject *)_self)->ob_itself, rawdata, rawdatalen);
-               return 0;
-       }
-       if (PyMac_GetFSRef(v, &((FSRefObject *)_self)->ob_itself)) return 0;
-       return -1;
-}
-
-#define FSRef_tp_alloc PyType_GenericAlloc
-
-static PyObject *FSRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       memset(&((FSRefObject *)self)->ob_itself, 0, sizeof(FSRef));
-       return self;
-}
-
-#define FSRef_tp_free PyObject_Del
-
-
-static PyTypeObject FSRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "Carbon.File.FSRef", /*tp_name*/
-       sizeof(FSRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) FSRef_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) FSRef_compare, /*tp_compare*/
-       (reprfunc) FSRef_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) FSRef_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       FSRef_methods, /* tp_methods */
-       0, /*tp_members*/
-       FSRef_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       FSRef_tp_init, /* tp_init */
-       FSRef_tp_alloc, /* tp_alloc */
-       FSRef_tp_new, /* tp_new */
-       FSRef_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type FSRef ---------------------- */
-
-
-static PyObject *File_UnmountVol(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Str63 volName;
-       short vRefNum;
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetStr255, volName,
-                             &vRefNum))
-               return NULL;
-       _err = UnmountVol(volName,
-                         vRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_FlushVol(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Str63 volName;
-       short vRefNum;
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetStr255, volName,
-                             &vRefNum))
-               return NULL;
-       _err = FlushVol(volName,
-                       vRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_HSetVol(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Str63 volName;
-       short vRefNum;
-       long dirID;
-       if (!PyArg_ParseTuple(_args, "O&hl",
-                             PyMac_GetStr255, volName,
-                             &vRefNum,
-                             &dirID))
-               return NULL;
-       _err = HSetVol(volName,
-                      vRefNum,
-                      dirID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_FSClose(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short refNum;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       _err = FSClose(refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_Allocate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short refNum;
-       long count;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       _err = Allocate(refNum,
-                       &count);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            count);
-       return _res;
-}
-
-static PyObject *File_GetEOF(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short refNum;
-       long logEOF;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       _err = GetEOF(refNum,
-                     &logEOF);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            logEOF);
-       return _res;
-}
-
-static PyObject *File_SetEOF(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short refNum;
-       long logEOF;
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &refNum,
-                             &logEOF))
-               return NULL;
-       _err = SetEOF(refNum,
-                     logEOF);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_GetFPos(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short refNum;
-       long filePos;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       _err = GetFPos(refNum,
-                      &filePos);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            filePos);
-       return _res;
-}
-
-static PyObject *File_SetFPos(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short refNum;
-       short posMode;
-       long posOff;
-       if (!PyArg_ParseTuple(_args, "hhl",
-                             &refNum,
-                             &posMode,
-                             &posOff))
-               return NULL;
-       _err = SetFPos(refNum,
-                      posMode,
-                      posOff);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_GetVRefNum(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short fileRefNum;
-       short vRefNum;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &fileRefNum))
-               return NULL;
-       _err = GetVRefNum(fileRefNum,
-                         &vRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            vRefNum);
-       return _res;
-}
-
-static PyObject *File_HGetVol(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       StringPtr volName;
-       short vRefNum;
-       long dirID;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, &volName))
-               return NULL;
-       _err = HGetVol(volName,
-                      &vRefNum,
-                      &dirID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hl",
-                            vRefNum,
-                            dirID);
-       return _res;
-}
-
-static PyObject *File_HOpen(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       SInt8 permission;
-       short refNum;
-       if (!PyArg_ParseTuple(_args, "hlO&b",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName,
-                             &permission))
-               return NULL;
-       _err = HOpen(vRefNum,
-                    dirID,
-                    fileName,
-                    permission,
-                    &refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            refNum);
-       return _res;
-}
-
-static PyObject *File_HOpenDF(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       SInt8 permission;
-       short refNum;
-       if (!PyArg_ParseTuple(_args, "hlO&b",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName,
-                             &permission))
-               return NULL;
-       _err = HOpenDF(vRefNum,
-                      dirID,
-                      fileName,
-                      permission,
-                      &refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            refNum);
-       return _res;
-}
-
-static PyObject *File_HOpenRF(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       SInt8 permission;
-       short refNum;
-       if (!PyArg_ParseTuple(_args, "hlO&b",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName,
-                             &permission))
-               return NULL;
-       _err = HOpenRF(vRefNum,
-                      dirID,
-                      fileName,
-                      permission,
-                      &refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            refNum);
-       return _res;
-}
-
-static PyObject *File_AllocContig(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short refNum;
-       long count;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       _err = AllocContig(refNum,
-                          &count);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            count);
-       return _res;
-}
-
-static PyObject *File_HCreate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       OSType creator;
-       OSType fileType;
-       if (!PyArg_ParseTuple(_args, "hlO&O&O&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName,
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &fileType))
-               return NULL;
-       _err = HCreate(vRefNum,
-                      dirID,
-                      fileName,
-                      creator,
-                      fileType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_DirCreate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long parentDirID;
-       Str255 directoryName;
-       long createdDirID;
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &vRefNum,
-                             &parentDirID,
-                             PyMac_GetStr255, directoryName))
-               return NULL;
-       _err = DirCreate(vRefNum,
-                        parentDirID,
-                        directoryName,
-                        &createdDirID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            createdDirID);
-       return _res;
-}
-
-static PyObject *File_HDelete(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName))
-               return NULL;
-       _err = HDelete(vRefNum,
-                      dirID,
-                      fileName);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_HGetFInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       FInfo fndrInfo;
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName))
-               return NULL;
-       _err = HGetFInfo(vRefNum,
-                        dirID,
-                        fileName,
-                        &fndrInfo);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            FInfo_New, &fndrInfo);
-       return _res;
-}
-
-static PyObject *File_HSetFInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       FInfo fndrInfo;
-       if (!PyArg_ParseTuple(_args, "hlO&O&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName,
-                             FInfo_Convert, &fndrInfo))
-               return NULL;
-       _err = HSetFInfo(vRefNum,
-                        dirID,
-                        fileName,
-                        &fndrInfo);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_HSetFLock(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName))
-               return NULL;
-       _err = HSetFLock(vRefNum,
-                        dirID,
-                        fileName);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_HRstFLock(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName))
-               return NULL;
-       _err = HRstFLock(vRefNum,
-                        dirID,
-                        fileName);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_HRename(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 oldName;
-       Str255 newName;
-       if (!PyArg_ParseTuple(_args, "hlO&O&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, oldName,
-                             PyMac_GetStr255, newName))
-               return NULL;
-       _err = HRename(vRefNum,
-                      dirID,
-                      oldName,
-                      newName);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_CatMove(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 oldName;
-       long newDirID;
-       Str255 newName;
-       if (!PyArg_ParseTuple(_args, "hlO&lO&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, oldName,
-                             &newDirID,
-                             PyMac_GetStr255, newName))
-               return NULL;
-       _err = CatMove(vRefNum,
-                      dirID,
-                      oldName,
-                      newDirID,
-                      newName);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_FSMakeFSSpec(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       FSSpec spec;
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName))
-               return NULL;
-       _err = FSMakeFSSpec(vRefNum,
-                           dirID,
-                           fileName,
-                           &spec);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            FSSpec_New, &spec);
-       return _res;
-}
-
-static PyObject *File_FSGetForkPosition(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 forkRefNum;
-       SInt64 position;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &forkRefNum))
-               return NULL;
-       _err = FSGetForkPosition(forkRefNum,
-                                &position);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("L",
-                            position);
-       return _res;
-}
-
-static PyObject *File_FSSetForkPosition(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 forkRefNum;
-       UInt16 positionMode;
-       SInt64 positionOffset;
-       if (!PyArg_ParseTuple(_args, "hHL",
-                             &forkRefNum,
-                             &positionMode,
-                             &positionOffset))
-               return NULL;
-       _err = FSSetForkPosition(forkRefNum,
-                                positionMode,
-                                positionOffset);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_FSGetForkSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 forkRefNum;
-       SInt64 forkSize;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &forkRefNum))
-               return NULL;
-       _err = FSGetForkSize(forkRefNum,
-                            &forkSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("L",
-                            forkSize);
-       return _res;
-}
-
-static PyObject *File_FSSetForkSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 forkRefNum;
-       UInt16 positionMode;
-       SInt64 positionOffset;
-       if (!PyArg_ParseTuple(_args, "hHL",
-                             &forkRefNum,
-                             &positionMode,
-                             &positionOffset))
-               return NULL;
-       _err = FSSetForkSize(forkRefNum,
-                            positionMode,
-                            positionOffset);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_FSAllocateFork(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 forkRefNum;
-       FSAllocationFlags flags;
-       UInt16 positionMode;
-       SInt64 positionOffset;
-       UInt64 requestCount;
-       UInt64 actualCount;
-       if (!PyArg_ParseTuple(_args, "hHHLL",
-                             &forkRefNum,
-                             &flags,
-                             &positionMode,
-                             &positionOffset,
-                             &requestCount))
-               return NULL;
-       _err = FSAllocateFork(forkRefNum,
-                             flags,
-                             positionMode,
-                             positionOffset,
-                             requestCount,
-                             &actualCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("L",
-                            actualCount);
-       return _res;
-}
-
-static PyObject *File_FSFlushFork(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 forkRefNum;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &forkRefNum))
-               return NULL;
-       _err = FSFlushFork(forkRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_FSCloseFork(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 forkRefNum;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &forkRefNum))
-               return NULL;
-       _err = FSCloseFork(forkRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_FSGetDataForkName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       HFSUniStr255 dataForkName;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSGetDataForkName(&dataForkName);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildHFSUniStr255, &dataForkName);
-       return _res;
-}
-
-static PyObject *File_FSGetResourceForkName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       HFSUniStr255 resourceForkName;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FSGetResourceForkName(&resourceForkName);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildHFSUniStr255, &resourceForkName);
-       return _res;
-}
-
-static PyObject *File_FSPathMakeRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt8 * path;
-       FSRef ref;
-       Boolean isDirectory;
-       if (!PyArg_ParseTuple(_args, "s",
-                             &path))
-               return NULL;
-       _err = FSPathMakeRef(path,
-                            &ref,
-                            &isDirectory);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            FSRef_New, &ref,
-                            isDirectory);
-       return _res;
-}
-
-static PyObject *File_FNNotifyByPath(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt8 * path;
-       FNMessage message;
-       OptionBits flags;
-       if (!PyArg_ParseTuple(_args, "sll",
-                             &path,
-                             &message,
-                             &flags))
-               return NULL;
-       _err = FNNotifyByPath(path,
-                             message,
-                             flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_FNNotifyAll(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FNMessage message;
-       OptionBits flags;
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &message,
-                             &flags))
-               return NULL;
-       _err = FNNotifyAll(message,
-                          flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *File_NewAlias(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fromFile__buf__;
-       FSSpec *fromFile = &fromFile__buf__;
-       FSSpec target;
-       AliasHandle alias;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             myPyMac_GetOptFSSpecPtr, &fromFile,
-                             FSSpec_Convert, &target))
-               return NULL;
-       _err = NewAlias(fromFile,
-                       &target,
-                       &alias);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            Alias_New, alias);
-       return _res;
-}
-
-static PyObject *File_NewAliasMinimalFromFullPath(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       char *fullPath__in__;
-       int fullPath__len__;
-       int fullPath__in_len__;
-       Str32 zoneName;
-       Str31 serverName;
-       AliasHandle alias;
-       if (!PyArg_ParseTuple(_args, "s#O&O&",
-                             &fullPath__in__, &fullPath__in_len__,
-                             PyMac_GetStr255, zoneName,
-                             PyMac_GetStr255, serverName))
-               return NULL;
-       fullPath__len__ = fullPath__in_len__;
-       _err = NewAliasMinimalFromFullPath(fullPath__len__, fullPath__in__,
-                                          zoneName,
-                                          serverName,
-                                          &alias);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            Alias_New, alias);
-       return _res;
-}
-
-static PyObject *File_ResolveAliasFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec theSpec;
-       Boolean resolveAliasChains;
-       Boolean targetIsFolder;
-       Boolean wasAliased;
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             FSSpec_Convert, &theSpec,
-                             &resolveAliasChains))
-               return NULL;
-       _err = ResolveAliasFile(&theSpec,
-                               resolveAliasChains,
-                               &targetIsFolder,
-                               &wasAliased);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&bb",
-                            FSSpec_New, &theSpec,
-                            targetIsFolder,
-                            wasAliased);
-       return _res;
-}
-
-static PyObject *File_ResolveAliasFileWithMountFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec theSpec;
-       Boolean resolveAliasChains;
-       Boolean targetIsFolder;
-       Boolean wasAliased;
-       unsigned long mountFlags;
-       if (!PyArg_ParseTuple(_args, "O&bl",
-                             FSSpec_Convert, &theSpec,
-                             &resolveAliasChains,
-                             &mountFlags))
-               return NULL;
-       _err = ResolveAliasFileWithMountFlags(&theSpec,
-                                             resolveAliasChains,
-                                             &targetIsFolder,
-                                             &wasAliased,
-                                             mountFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&bb",
-                            FSSpec_New, &theSpec,
-                            targetIsFolder,
-                            wasAliased);
-       return _res;
-}
-
-static PyObject *File_UpdateAlias(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fromFile__buf__;
-       FSSpec *fromFile = &fromFile__buf__;
-       FSSpec target;
-       AliasHandle alias;
-       Boolean wasChanged;
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             myPyMac_GetOptFSSpecPtr, &fromFile,
-                             FSSpec_Convert, &target,
-                             Alias_Convert, &alias))
-               return NULL;
-       _err = UpdateAlias(fromFile,
-                          &target,
-                          alias,
-                          &wasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            wasChanged);
-       return _res;
-}
-
-static PyObject *File_ResolveAliasFileWithMountFlagsNoUI(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec theSpec;
-       Boolean resolveAliasChains;
-       Boolean targetIsFolder;
-       Boolean wasAliased;
-       unsigned long mountFlags;
-       if (!PyArg_ParseTuple(_args, "O&bl",
-                             FSSpec_Convert, &theSpec,
-                             &resolveAliasChains,
-                             &mountFlags))
-               return NULL;
-       _err = ResolveAliasFileWithMountFlagsNoUI(&theSpec,
-                                                 resolveAliasChains,
-                                                 &targetIsFolder,
-                                                 &wasAliased,
-                                                 mountFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&bb",
-                            FSSpec_New, &theSpec,
-                            targetIsFolder,
-                            wasAliased);
-       return _res;
-}
-
-static PyObject *File_FSNewAlias(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef fromFile__buf__;
-       FSRef *fromFile = &fromFile__buf__;
-       FSRef target;
-       AliasHandle inAlias;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             myPyMac_GetOptFSRefPtr, &fromFile,
-                             FSRef_Convert, &target))
-               return NULL;
-       _err = FSNewAlias(fromFile,
-                         &target,
-                         &inAlias);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            Alias_New, inAlias);
-       return _res;
-}
-
-static PyObject *File_FSResolveAliasFileWithMountFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef theRef;
-       Boolean resolveAliasChains;
-       Boolean targetIsFolder;
-       Boolean wasAliased;
-       unsigned long mountFlags;
-       if (!PyArg_ParseTuple(_args, "O&bl",
-                             FSRef_Convert, &theRef,
-                             &resolveAliasChains,
-                             &mountFlags))
-               return NULL;
-       _err = FSResolveAliasFileWithMountFlags(&theRef,
-                                               resolveAliasChains,
-                                               &targetIsFolder,
-                                               &wasAliased,
-                                               mountFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&bb",
-                            FSRef_New, &theRef,
-                            targetIsFolder,
-                            wasAliased);
-       return _res;
-}
-
-static PyObject *File_FSResolveAliasFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef theRef;
-       Boolean resolveAliasChains;
-       Boolean targetIsFolder;
-       Boolean wasAliased;
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             FSRef_Convert, &theRef,
-                             &resolveAliasChains))
-               return NULL;
-       _err = FSResolveAliasFile(&theRef,
-                                 resolveAliasChains,
-                                 &targetIsFolder,
-                                 &wasAliased);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&bb",
-                            FSRef_New, &theRef,
-                            targetIsFolder,
-                            wasAliased);
-       return _res;
-}
-
-static PyObject *File_FSUpdateAlias(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef fromFile__buf__;
-       FSRef *fromFile = &fromFile__buf__;
-       FSRef target;
-       AliasHandle alias;
-       Boolean wasChanged;
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             myPyMac_GetOptFSRefPtr, &fromFile,
-                             FSRef_Convert, &target,
-                             Alias_Convert, &alias))
-               return NULL;
-       _err = FSUpdateAlias(fromFile,
-                            &target,
-                            alias,
-                            &wasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            wasChanged);
-       return _res;
-}
-
-static PyObject *File_pathname(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       PyObject *obj;
-
-       if (!PyArg_ParseTuple(_args, "O", &obj))
-               return NULL;
-       if (PyString_Check(obj) || PyUnicode_Check(obj))
-               return PyUnicode_FromObject(obj);
-       _res = PyObject_CallMethod(obj, "as_pathname", NULL);
-       return _res;
-
-}
-
-static PyMethodDef File_methods[] = {
-       {"UnmountVol", (PyCFunction)File_UnmountVol, 1,
-        PyDoc_STR("(Str63 volName, short vRefNum) -> None")},
-       {"FlushVol", (PyCFunction)File_FlushVol, 1,
-        PyDoc_STR("(Str63 volName, short vRefNum) -> None")},
-       {"HSetVol", (PyCFunction)File_HSetVol, 1,
-        PyDoc_STR("(Str63 volName, short vRefNum, long dirID) -> None")},
-       {"FSClose", (PyCFunction)File_FSClose, 1,
-        PyDoc_STR("(short refNum) -> None")},
-       {"Allocate", (PyCFunction)File_Allocate, 1,
-        PyDoc_STR("(short refNum) -> (long count)")},
-       {"GetEOF", (PyCFunction)File_GetEOF, 1,
-        PyDoc_STR("(short refNum) -> (long logEOF)")},
-       {"SetEOF", (PyCFunction)File_SetEOF, 1,
-        PyDoc_STR("(short refNum, long logEOF) -> None")},
-       {"GetFPos", (PyCFunction)File_GetFPos, 1,
-        PyDoc_STR("(short refNum) -> (long filePos)")},
-       {"SetFPos", (PyCFunction)File_SetFPos, 1,
-        PyDoc_STR("(short refNum, short posMode, long posOff) -> None")},
-       {"GetVRefNum", (PyCFunction)File_GetVRefNum, 1,
-        PyDoc_STR("(short fileRefNum) -> (short vRefNum)")},
-       {"HGetVol", (PyCFunction)File_HGetVol, 1,
-        PyDoc_STR("(StringPtr volName) -> (short vRefNum, long dirID)")},
-       {"HOpen", (PyCFunction)File_HOpen, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SInt8 permission) -> (short refNum)")},
-       {"HOpenDF", (PyCFunction)File_HOpenDF, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SInt8 permission) -> (short refNum)")},
-       {"HOpenRF", (PyCFunction)File_HOpenRF, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SInt8 permission) -> (short refNum)")},
-       {"AllocContig", (PyCFunction)File_AllocContig, 1,
-        PyDoc_STR("(short refNum) -> (long count)")},
-       {"HCreate", (PyCFunction)File_HCreate, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, OSType creator, OSType fileType) -> None")},
-       {"DirCreate", (PyCFunction)File_DirCreate, 1,
-        PyDoc_STR("(short vRefNum, long parentDirID, Str255 directoryName) -> (long createdDirID)")},
-       {"HDelete", (PyCFunction)File_HDelete, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
-       {"HGetFInfo", (PyCFunction)File_HGetFInfo, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> (FInfo fndrInfo)")},
-       {"HSetFInfo", (PyCFunction)File_HSetFInfo, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, FInfo fndrInfo) -> None")},
-       {"HSetFLock", (PyCFunction)File_HSetFLock, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
-       {"HRstFLock", (PyCFunction)File_HRstFLock, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
-       {"HRename", (PyCFunction)File_HRename, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 oldName, Str255 newName) -> None")},
-       {"CatMove", (PyCFunction)File_CatMove, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 oldName, long newDirID, Str255 newName) -> None")},
-       {"FSMakeFSSpec", (PyCFunction)File_FSMakeFSSpec, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> (FSSpec spec)")},
-       {"FSGetForkPosition", (PyCFunction)File_FSGetForkPosition, 1,
-        PyDoc_STR("(SInt16 forkRefNum) -> (SInt64 position)")},
-       {"FSSetForkPosition", (PyCFunction)File_FSSetForkPosition, 1,
-        PyDoc_STR("(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset) -> None")},
-       {"FSGetForkSize", (PyCFunction)File_FSGetForkSize, 1,
-        PyDoc_STR("(SInt16 forkRefNum) -> (SInt64 forkSize)")},
-       {"FSSetForkSize", (PyCFunction)File_FSSetForkSize, 1,
-        PyDoc_STR("(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset) -> None")},
-       {"FSAllocateFork", (PyCFunction)File_FSAllocateFork, 1,
-        PyDoc_STR("(SInt16 forkRefNum, FSAllocationFlags flags, UInt16 positionMode, SInt64 positionOffset, UInt64 requestCount) -> (UInt64 actualCount)")},
-       {"FSFlushFork", (PyCFunction)File_FSFlushFork, 1,
-        PyDoc_STR("(SInt16 forkRefNum) -> None")},
-       {"FSCloseFork", (PyCFunction)File_FSCloseFork, 1,
-        PyDoc_STR("(SInt16 forkRefNum) -> None")},
-       {"FSGetDataForkName", (PyCFunction)File_FSGetDataForkName, 1,
-        PyDoc_STR("() -> (HFSUniStr255 dataForkName)")},
-       {"FSGetResourceForkName", (PyCFunction)File_FSGetResourceForkName, 1,
-        PyDoc_STR("() -> (HFSUniStr255 resourceForkName)")},
-       {"FSPathMakeRef", (PyCFunction)File_FSPathMakeRef, 1,
-        PyDoc_STR("(UInt8 * path) -> (FSRef ref, Boolean isDirectory)")},
-       {"FNNotifyByPath", (PyCFunction)File_FNNotifyByPath, 1,
-        PyDoc_STR("(UInt8 * path, FNMessage message, OptionBits flags) -> None")},
-       {"FNNotifyAll", (PyCFunction)File_FNNotifyAll, 1,
-        PyDoc_STR("(FNMessage message, OptionBits flags) -> None")},
-       {"NewAlias", (PyCFunction)File_NewAlias, 1,
-        PyDoc_STR("(FSSpec fromFile, FSSpec target) -> (AliasHandle alias)")},
-       {"NewAliasMinimalFromFullPath", (PyCFunction)File_NewAliasMinimalFromFullPath, 1,
-        PyDoc_STR("(Buffer fullPath, Str32 zoneName, Str31 serverName) -> (AliasHandle alias)")},
-       {"ResolveAliasFile", (PyCFunction)File_ResolveAliasFile, 1,
-        PyDoc_STR("(FSSpec theSpec, Boolean resolveAliasChains) -> (FSSpec theSpec, Boolean targetIsFolder, Boolean wasAliased)")},
-       {"ResolveAliasFileWithMountFlags", (PyCFunction)File_ResolveAliasFileWithMountFlags, 1,
-        PyDoc_STR("(FSSpec theSpec, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSSpec theSpec, Boolean targetIsFolder, Boolean wasAliased)")},
-       {"UpdateAlias", (PyCFunction)File_UpdateAlias, 1,
-        PyDoc_STR("(FSSpec fromFile, FSSpec target, AliasHandle alias) -> (Boolean wasChanged)")},
-       {"ResolveAliasFileWithMountFlagsNoUI", (PyCFunction)File_ResolveAliasFileWithMountFlagsNoUI, 1,
-        PyDoc_STR("(FSSpec theSpec, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSSpec theSpec, Boolean targetIsFolder, Boolean wasAliased)")},
-       {"FSNewAlias", (PyCFunction)File_FSNewAlias, 1,
-        PyDoc_STR("(FSRef fromFile, FSRef target) -> (AliasHandle inAlias)")},
-       {"FSResolveAliasFileWithMountFlags", (PyCFunction)File_FSResolveAliasFileWithMountFlags, 1,
-        PyDoc_STR("(FSRef theRef, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
-       {"FSResolveAliasFile", (PyCFunction)File_FSResolveAliasFile, 1,
-        PyDoc_STR("(FSRef theRef, Boolean resolveAliasChains) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
-       {"FSUpdateAlias", (PyCFunction)File_FSUpdateAlias, 1,
-        PyDoc_STR("(FSRef fromFile, FSRef target, AliasHandle alias) -> (Boolean wasChanged)")},
-       {"pathname", (PyCFunction)File_pathname, 1,
-        PyDoc_STR("(str|FSSpec|FSref) -> pathname")},
-       {NULL, NULL, 0}
-};
-
-
-
-int
-PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
-{
-        Str255 path;
-        short refnum;
-        long parid;
-        OSErr err;
-        FSRef fsr;
-
-        if (FSSpec_Check(v)) {
-                *spec = ((FSSpecObject *)v)->ob_itself;
-                return 1;
-        }
-
-        if (PyArg_Parse(v, "(hlO&)",
-                                                &refnum, &parid, PyMac_GetStr255, &path)) {
-                err = FSMakeFSSpec(refnum, parid, path, spec);
-                if ( err && err != fnfErr ) {
-                        PyMac_Error(err);
-                        return 0;
-                }
-                return 1;
-        }
-        PyErr_Clear();
-        /* Otherwise we try to go via an FSRef. On OSX we go all the way,
-        ** on OS9 we accept only a real FSRef object
-        */
-        if ( PyMac_GetFSRef(v, &fsr) ) {
-                err = FSGetCatalogInfo(&fsr, kFSCatInfoNone, NULL, NULL, spec, NULL);
-                if (err != noErr) {
-                        PyMac_Error(err);
-                        return 0;
-                }
-                return 1;
-        }
-        return 0;
-}
-
-int
-PyMac_GetFSRef(PyObject *v, FSRef *fsr)
-{
-        OSStatus err;
-        FSSpec fss;
-
-        if (FSRef_Check(v)) {
-                *fsr = ((FSRefObject *)v)->ob_itself;
-                return 1;
-        }
-
-        /* On OSX we now try a pathname */
-        if ( PyString_Check(v) || PyUnicode_Check(v)) {
-                unsigned char *path = NULL;
-                if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
-                        return 0;
-                if ( (err=FSPathMakeRef(path, fsr, NULL)) )
-                        PyMac_Error(err);
-                PyMem_Free(path);
-                return !err;
-        }
-        /* XXXX Should try unicode here too */
-        /* Otherwise we try to go via an FSSpec */
-        if (FSSpec_Check(v)) {
-                fss = ((FSSpecObject *)v)->ob_itself;
-                if ((err=FSpMakeFSRef(&fss, fsr)) == 0)
-                        return 1;
-                PyMac_Error(err);
-                return 0;
-        }
-        PyErr_SetString(PyExc_TypeError, "FSRef, FSSpec or pathname required");
-        return 0;
-}
-
-extern PyObject *
-PyMac_BuildFSSpec(FSSpec *spec)
-{
-        return FSSpec_New(spec);
-}
-
-extern PyObject *
-PyMac_BuildFSRef(FSRef *spec)
-{
-        return FSRef_New(spec);
-}
-
-
-void init_File(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(FSSpec *, PyMac_BuildFSSpec);
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(FSRef *, PyMac_BuildFSRef);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(FSSpec, PyMac_GetFSSpec);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(FSRef, PyMac_GetFSRef);
-
-
-       m = Py_InitModule("_File", File_methods);
-       d = PyModule_GetDict(m);
-       File_Error = PyMac_GetOSErrException();
-       if (File_Error == NULL ||
-           PyDict_SetItemString(d, "Error", File_Error) != 0)
-               return;
-       Py_TYPE(&FSCatalogInfo_Type) = &PyType_Type;
-       if (PyType_Ready(&FSCatalogInfo_Type) < 0) return;
-       Py_INCREF(&FSCatalogInfo_Type);
-       PyModule_AddObject(m, "FSCatalogInfo", (PyObject *)&FSCatalogInfo_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&FSCatalogInfo_Type);
-       PyModule_AddObject(m, "FSCatalogInfoType", (PyObject *)&FSCatalogInfo_Type);
-       Py_TYPE(&FInfo_Type) = &PyType_Type;
-       if (PyType_Ready(&FInfo_Type) < 0) return;
-       Py_INCREF(&FInfo_Type);
-       PyModule_AddObject(m, "FInfo", (PyObject *)&FInfo_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&FInfo_Type);
-       PyModule_AddObject(m, "FInfoType", (PyObject *)&FInfo_Type);
-       Py_TYPE(&Alias_Type) = &PyType_Type;
-       if (PyType_Ready(&Alias_Type) < 0) return;
-       Py_INCREF(&Alias_Type);
-       PyModule_AddObject(m, "Alias", (PyObject *)&Alias_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Alias_Type);
-       PyModule_AddObject(m, "AliasType", (PyObject *)&Alias_Type);
-       Py_TYPE(&FSSpec_Type) = &PyType_Type;
-       if (PyType_Ready(&FSSpec_Type) < 0) return;
-       Py_INCREF(&FSSpec_Type);
-       PyModule_AddObject(m, "FSSpec", (PyObject *)&FSSpec_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&FSSpec_Type);
-       PyModule_AddObject(m, "FSSpecType", (PyObject *)&FSSpec_Type);
-       Py_TYPE(&FSRef_Type) = &PyType_Type;
-       if (PyType_Ready(&FSRef_Type) < 0) return;
-       Py_INCREF(&FSRef_Type);
-       PyModule_AddObject(m, "FSRef", (PyObject *)&FSRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&FSRef_Type);
-       PyModule_AddObject(m, "FSRefType", (PyObject *)&FSRef_Type);
-}
-
-/* ======================== End module _File ======================== */
-
diff --git a/Mac/Modules/file/filescan.py b/Mac/Modules/file/filescan.py
deleted file mode 100644 (file)
index d843a73..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner_OSX
-
-LONG = "Files"
-SHORT = "file"
-
-def main():
-    input = ["Files.h", "Aliases.h", "Finder.h"]
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    scanner.gentypetest(SHORT+"typetest.py")
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner_OSX):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            # Funny special case
-            if len(arglist) > 2:
-                t, n, m = arglist[1]
-                if t == "AliasHandle" and m == "InMode":
-                    classname = "Arg2MethodGenerator"
-                    listname = "alias_methods"
-                    return classname, listname
-            # Normal cases
-            t, n, m = arglist[0]
-            if t == "AliasHandle" and m == "InMode":
-                classname = "Method"
-                listname = "alias_methods"
-            if t == "FSSpec_ptr" and m == "InMode":
-                classname = "Method"
-                listname = "fsspec_methods"
-            if t == "FSRef_ptr" and m == "InMode":
-                classname = "Method"
-                listname = "fsref_methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                # Constants with incompatible definitions
-                "kioACAccessOwnerMask",
-                "kFSCatInfoReserved",
-                "kFSIterateReserved",
-                "kSystemFolderType",
-
-                "FSRefMakePath", # Do this manually
-#                       "ResolveAlias", # Do this manually
-#                       "ResolveAliasWithMountFlags", # Do this manually
-#                       "FollowFinderAlias", # Do this manually
-
-                "FSRead", # Couldn't be bothered
-                "FSWrite", # ditto
-                "FSReadFork", # ditto
-                "FSWriteFork", # ditto
-
-                # Old routines:
-                "GetWDInfo",
-                "OpenWD",
-                "CloseWD",
-                "FInitQueue",
-                "rstflock",
-                "setflock",
-                "setfinfo",
-                "fsrename",
-                "fsdelete",
-                "create",
-                "flushvol",
-                "eject",
-                "umountvol",
-                "setvol",
-                "getvol",
-                "getfinfo",
-                "getvinfo",
-                "fsopen",
-                "RstFLock",
-                "SetFLock",
-                "SetFInfo",
-                "Rename",
-                "OpenRF",
-                "FSDelete",
-                "Create",
-                "GetVol",
-                "GetFInfo",
-                "GetVInfo",
-                "FSOpen",
-                "Eject",
-                "SetVol",
-                "openrf",
-                "unmountvol",
-                "OpenDF",
-
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "CInfoPBPtr", # Old stuff
-                "CMovePBPtr", # Old stuff
-                "ParmBlkPtr", # Old stuff
-                "HParmBlkPtr", # Old stuff
-                "DTPBPtr", # Old stuff
-                "FCBPBPtr", # Old stuff
-                "QHdrPtr", # Old stuff
-                "CSParamPtr", # Old stuff
-                "FSCatalogBulkParam", # old stuff
-                "FSForkCBInfoParam", # old stuff
-                "FSForkIOParam", # old stuff
-                "FSRefParam",  # old stuff
-                "FSVolumeInfoParam", # old stuff
-                "WDPBPtr", # old stuff
-                "XCInfoPBPtr", # old stuff
-                "XVolumeParamPtr", # old stuff
-
-
-                "CatPositionRec", # State variable, not too difficult
-                "FSIterator", # Should become an object
-                "FSForkInfo", # Lots of fields, difficult struct
-                "FSSearchParams", # Also catsearch stuff
-                "FSVolumeInfo", # big struct
-                "FSVolumeInfo_ptr", # big struct
-
-                "IOCompletionProcPtr", # proc pointer
-                "IOCompletionUPP", # Proc pointer
-                "AliasFilterProcPtr",
-                "AliasFilterUPP",
-                "FNSubscriptionUPP",
-
-                "FNSubscriptionRef", # Lazy, for now.
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                # Various ways to give pathnames
-                ([('char_ptr', '*', 'InMode')],
-                 [('stringptr', '*', 'InMode')]
-                ),
-
-                # Unicode filenames passed as length, buffer
-                ([('UniCharCount', '*', 'InMode'),
-                  ('UniChar_ptr', '*', 'InMode')],
-                 [('UnicodeReverseInBuffer', '*', 'InMode')]
-                ),
-                # Wrong guess
-                ([('Str63', 'theString', 'InMode')],
-                 [('Str63', 'theString', 'OutMode')]),
-
-                # Yet another way to give a pathname:-)
-                ([('short', 'fullPathLength', 'InMode'),
-                  ('void_ptr', 'fullPath', 'InMode')],
-                 [('FullPathName', 'fullPath', 'InMode')]),
-
-                # Various ResolveAliasFileXXXX functions
-                ([('FSSpec', 'theSpec', 'OutMode')],
-                 [('FSSpec_ptr', 'theSpec', 'InOutMode')]),
-
-                ([('FSRef', 'theRef', 'OutMode')],
-                 [('FSRef_ptr', 'theRef', 'InOutMode')]),
-
-                # The optional FSSpec to all ResolveAlias and NewAlias methods
-                ([('FSSpec_ptr', 'fromFile', 'InMode')],
-         [('OptFSSpecPtr', 'fromFile', 'InMode')]),
-
-                ([('FSRef_ptr', 'fromFile', 'InMode')],
-         [('OptFSRefPtr', 'fromFile', 'InMode')]),
-
-##              # FSCatalogInfo input handling
-##                      ([('FSCatalogInfoBitmap', 'whichInfo', 'InMode'),
-##                ('FSCatalogInfo_ptr', 'catalogInfo', 'InMode')],
-##               [('FSCatalogInfoAndBitmap_in', 'catalogInfo', 'InMode')]),
-##
-##              # FSCatalogInfo output handling
-##                      ([('FSCatalogInfoBitmap', 'whichInfo', 'InMode'),
-##                ('FSCatalogInfo', 'catalogInfo', 'OutMode')],
-##               [('FSCatalogInfoAndBitmap_out', 'catalogInfo', 'InOutMode')]),
-##
-
-        ]
-
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("true = True\n")
-        self.defsfile.write("false = False\n")
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/file/filesupport.py b/Mac/Modules/file/filesupport.py
deleted file mode 100644 (file)
index 8211724..0000000
+++ /dev/null
@@ -1,897 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-#
-# XXXX TO DO:
-# - Implement correct missing FSSpec handling for Alias methods
-# - Implement FInfo
-
-import string
-
-# Declarations that change for each manager
-#MACHEADERFILE = 'Files.h'              # The Apple header file
-MODNAME = '_File'                               # The name of the module
-LONGMODNAME = 'Carbon.File'             # The "normal" external name of the module
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'File'                      # The prefix for module-wide routines
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Various integers:
-SInt64 = Type("SInt64", "L")
-UInt64 = Type("UInt64", "L")
-FNMessage = Type("FNMessage", "l")
-FSAllocationFlags = Type("FSAllocationFlags", "H")
-FSCatalogInfoBitmap = Type("FSCatalogInfoBitmap", "l")
-FSIteratorFlags = Type("FSIteratorFlags", "l")
-FSVolumeRefNum = Type("FSVolumeRefNum", "h")
-AliasInfoType = Type("AliasInfoType", "h")
-
-# Various types of strings:
-#class UniCharCountBuffer(InputOnlyType):
-#       pass
-class VarReverseInputBufferType(ReverseInputBufferMixin, VarInputBufferType):
-    pass
-FullPathName = VarReverseInputBufferType()
-ConstStr31Param = OpaqueArrayType("Str31", "PyMac_BuildStr255", "PyMac_GetStr255")
-ConstStr32Param = OpaqueArrayType("Str32", "PyMac_BuildStr255", "PyMac_GetStr255")
-ConstStr63Param = OpaqueArrayType("Str63", "PyMac_BuildStr255", "PyMac_GetStr255")
-Str63 = OpaqueArrayType("Str63", "PyMac_BuildStr255", "PyMac_GetStr255")
-
-HFSUniStr255 = OpaqueType("HFSUniStr255", "PyMac_BuildHFSUniStr255", "PyMac_GetHFSUniStr255")
-UInt8_ptr = InputOnlyType("UInt8 *", "s")
-
-# Other types:
-class OptionalFSxxxType(OpaqueByValueType):
-    def declare(self, name):
-        Output("%s %s__buf__;", self.typeName, name)
-        Output("%s *%s = &%s__buf__;", self.typeName, name, name)
-
-class FSCatalogInfoAndBitmapType(InputOnlyType):
-
-    def __init__(self):
-        InputOnlyType.__init__(self, "BUG", "BUG")
-
-    def declare(self, name):
-        Output("PyObject *%s__object = NULL;", name)
-        Output("FSCatalogInfoBitmap %s__bitmap = 0;", name)
-        Output("FSCatalogInfo %s;", name)
-
-    def getargsFormat(self):
-        return "lO"
-
-    def getargsArgs(self, name):
-        return "%s__bitmap, %s__object"%(name, name)
-
-    def getargsCheck(self, name):
-        Output("if (!convert_FSCatalogInfo(%s__object, %s__bitmap, &%s)) return NULL;", name, name, name)
-
-    def passInput(self, name):
-        return "%s__bitmap, &%s"% (name, name)
-
-    def passOutput(self, name):
-        return "%s__bitmap, &%s"% (name, name)
-
-    def mkvalueFormat(self):
-        return "O"
-
-    def mkvalueArgs(self, name):
-        return "%s__object" % (name)
-
-    def xxxxmkvalueCheck(self, name):
-        Output("if ((%s__object = new_FSCatalogInfo(%s__bitmap, &%s)) == NULL) return NULL;", name, name)
-
-class FSCatalogInfoAndBitmap_inType(FSCatalogInfoAndBitmapType, InputOnlyMixIn):
-
-    def xxxxmkvalueCheck(self, name):
-        pass
-
-class FSCatalogInfoAndBitmap_outType(FSCatalogInfoAndBitmapType):
-
-    def getargsFormat(self):
-        return "l"
-
-    def getargsArgs(self, name):
-        return "%s__bitmap" % name
-
-    def getargsCheck(self, name):
-        pass
-
-FInfo = OpaqueType("FInfo", "FInfo")
-FInfo_ptr = OpaqueType("FInfo", "FInfo")
-AliasHandle = OpaqueByValueType("AliasHandle", "Alias")
-FSSpec = OpaqueType("FSSpec", "FSSpec")
-FSSpec_ptr = OpaqueType("FSSpec", "FSSpec")
-OptFSSpecPtr = OptionalFSxxxType("FSSpec", "BUG", "myPyMac_GetOptFSSpecPtr")
-FSRef = OpaqueType("FSRef", "FSRef")
-FSRef_ptr = OpaqueType("FSRef", "FSRef")
-OptFSRefPtr = OptionalFSxxxType("FSRef", "BUG", "myPyMac_GetOptFSRefPtr")
-FSCatalogInfo = OpaqueType("FSCatalogInfo", "FSCatalogInfo")
-FSCatalogInfo_ptr = OpaqueType("FSCatalogInfo", "FSCatalogInfo")
-
-# To be done:
-#CatPositionRec
-#FSCatalogInfo
-#FSForkInfo
-#FSIterator
-#FSVolumeInfo
-#FSSpecArrayPtr
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern int _PyMac_GetFSSpec(PyObject *v, FSSpec *spec);
-extern int _PyMac_GetFSRef(PyObject *v, FSRef *fsr);
-extern PyObject *_PyMac_BuildFSSpec(FSSpec *spec);
-extern PyObject *_PyMac_BuildFSRef(FSRef *spec);
-
-#define PyMac_GetFSSpec _PyMac_GetFSSpec
-#define PyMac_GetFSRef _PyMac_GetFSRef
-#define PyMac_BuildFSSpec _PyMac_BuildFSSpec
-#define PyMac_BuildFSRef _PyMac_BuildFSRef
-#else
-extern int PyMac_GetFSSpec(PyObject *v, FSSpec *spec);
-extern int PyMac_GetFSRef(PyObject *v, FSRef *fsr);
-extern PyObject *PyMac_BuildFSSpec(FSSpec *spec);
-extern PyObject *PyMac_BuildFSRef(FSRef *spec);
-#endif
-
-/* Forward declarations */
-static PyObject *FInfo_New(FInfo *itself);
-static PyObject *FSRef_New(FSRef *itself);
-static PyObject *FSSpec_New(FSSpec *itself);
-static PyObject *Alias_New(AliasHandle itself);
-static int FInfo_Convert(PyObject *v, FInfo *p_itself);
-#define FSRef_Convert PyMac_GetFSRef
-#define FSSpec_Convert PyMac_GetFSSpec
-static int Alias_Convert(PyObject *v, AliasHandle *p_itself);
-
-/*
-** UTCDateTime records
-*/
-static int
-UTCDateTime_Convert(PyObject *v, UTCDateTime *ptr)
-{
-        return PyArg_Parse(v, "(HlH)", &ptr->highSeconds, &ptr->lowSeconds, &ptr->fraction);
-}
-
-static PyObject *
-UTCDateTime_New(UTCDateTime *ptr)
-{
-        return Py_BuildValue("(HlH)", ptr->highSeconds, ptr->lowSeconds, ptr->fraction);
-}
-
-/*
-** Optional fsspec and fsref pointers. None will pass NULL
-*/
-static int
-myPyMac_GetOptFSSpecPtr(PyObject *v, FSSpec **spec)
-{
-        if (v == Py_None) {
-                *spec = NULL;
-                return 1;
-        }
-        return PyMac_GetFSSpec(v, *spec);
-}
-
-static int
-myPyMac_GetOptFSRefPtr(PyObject *v, FSRef **ref)
-{
-        if (v == Py_None) {
-                *ref = NULL;
-                return 1;
-        }
-        return PyMac_GetFSRef(v, *ref);
-}
-
-/*
-** Parse/generate objsect
-*/
-static PyObject *
-PyMac_BuildHFSUniStr255(HFSUniStr255 *itself)
-{
-
-        return Py_BuildValue("u#", itself->unicode, itself->length);
-}
-
-/*
-** Get pathname for a given FSSpec
-*/
-static OSErr
-_PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
-{
-        FSRef fsr;
-        OSErr err;
-
-        *path = '\0';
-        err = FSpMakeFSRef(fss, &fsr);
-        if (err == fnfErr) {
-                /* FSSpecs can point to non-existing files, fsrefs can't. */
-                FSSpec fss2;
-                int tocopy;
-
-                err = FSMakeFSSpec(fss->vRefNum, fss->parID, "", &fss2);
-                if (err)
-                        return err;
-                err = FSpMakeFSRef(&fss2, &fsr);
-                if (err)
-                        return err;
-                err = (OSErr)FSRefMakePath(&fsr, path, len-1);
-                if (err)
-                        return err;
-                /* This part is not 100% safe: we append the filename part, but
-                ** I'm not sure that we don't run afoul of the various 8bit
-                ** encodings here. Will have to look this up at some point...
-                */
-                strcat(path, "/");
-                tocopy = fss->name[0];
-                if ((strlen(path) + tocopy) >= len)
-                        tocopy = len - strlen(path) - 1;
-                if (tocopy > 0)
-                        strncat(path, fss->name+1, tocopy);
-        }
-        else {
-                if (err)
-                        return err;
-                err = (OSErr)FSRefMakePath(&fsr, path, len);
-                if (err)
-                        return err;
-        }
-        return 0;
-}
-
-"""
-
-finalstuff = finalstuff + """
-int
-PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
-{
-        Str255 path;
-        short refnum;
-        long parid;
-        OSErr err;
-        FSRef fsr;
-
-        if (FSSpec_Check(v)) {
-                *spec = ((FSSpecObject *)v)->ob_itself;
-                return 1;
-        }
-
-        if (PyArg_Parse(v, "(hlO&)",
-                                                &refnum, &parid, PyMac_GetStr255, &path)) {
-                err = FSMakeFSSpec(refnum, parid, path, spec);
-                if ( err && err != fnfErr ) {
-                        PyMac_Error(err);
-                        return 0;
-                }
-                return 1;
-        }
-        PyErr_Clear();
-        /* Otherwise we try to go via an FSRef. On OSX we go all the way,
-        ** on OS9 we accept only a real FSRef object
-        */
-        if ( PyMac_GetFSRef(v, &fsr) ) {
-                err = FSGetCatalogInfo(&fsr, kFSCatInfoNone, NULL, NULL, spec, NULL);
-                if (err != noErr) {
-                        PyMac_Error(err);
-                        return 0;
-                }
-                return 1;
-        }
-        return 0;
-}
-
-int
-PyMac_GetFSRef(PyObject *v, FSRef *fsr)
-{
-        OSStatus err;
-        FSSpec fss;
-
-        if (FSRef_Check(v)) {
-                *fsr = ((FSRefObject *)v)->ob_itself;
-                return 1;
-        }
-
-        /* On OSX we now try a pathname */
-        if ( PyString_Check(v) || PyUnicode_Check(v)) {
-                char *path = NULL;
-                if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
-                        return 0;
-                if ( (err=FSPathMakeRef(path, fsr, NULL)) )
-                        PyMac_Error(err);
-                PyMem_Free(path);
-                return !err;
-        }
-        /* XXXX Should try unicode here too */
-        /* Otherwise we try to go via an FSSpec */
-        if (FSSpec_Check(v)) {
-                fss = ((FSSpecObject *)v)->ob_itself;
-                if ((err=FSpMakeFSRef(&fss, fsr)) == 0)
-                        return 1;
-                PyMac_Error(err);
-                return 0;
-        }
-        PyErr_SetString(PyExc_TypeError, "FSRef, FSSpec or pathname required");
-        return 0;
-}
-
-extern PyObject *
-PyMac_BuildFSSpec(FSSpec *spec)
-{
-        return FSSpec_New(spec);
-}
-
-extern PyObject *
-PyMac_BuildFSRef(FSRef *spec)
-{
-        return FSRef_New(spec);
-}
-"""
-
-initstuff = initstuff + """
-PyMac_INIT_TOOLBOX_OBJECT_NEW(FSSpec *, PyMac_BuildFSSpec);
-PyMac_INIT_TOOLBOX_OBJECT_NEW(FSRef *, PyMac_BuildFSRef);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(FSSpec, PyMac_GetFSSpec);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(FSRef, PyMac_GetFSRef);
-"""
-
-exec(open(string.lower(MODPREFIX) + 'typetest.py').read())
-
-# Our object types:
-class FSCatalogInfoDefinition(PEP253Mixin, ObjectDefinition):
-    getsetlist = [
-            ("nodeFlags",
-             "return Py_BuildValue(\"H\", self->ob_itself.nodeFlags);",
-             "return PyArg_Parse(v, \"H\", &self->ob_itself.nodeFlags)-1;",
-             None
-            ),
-            ("volume",
-             "return Py_BuildValue(\"h\", self->ob_itself.volume);",
-             "return PyArg_Parse(v, \"h\", &self->ob_itself.volume)-1;",
-             None
-            ),
-            ("parentDirID",
-             "return Py_BuildValue(\"l\", self->ob_itself.parentDirID);",
-             "return PyArg_Parse(v, \"l\", &self->ob_itself.parentDirID)-1;",
-             None
-            ),
-            ("nodeID",
-             "return Py_BuildValue(\"l\", self->ob_itself.nodeID);",
-             "return PyArg_Parse(v, \"l\", &self->ob_itself.nodeID)-1;",
-             None
-            ),
-            ("createDate",
-             "return Py_BuildValue(\"O&\", UTCDateTime_New, &self->ob_itself.createDate);",
-             "return PyArg_Parse(v, \"O&\", UTCDateTime_Convert, &self->ob_itself.createDate)-1;",
-             None
-            ),
-            ("contentModDate",
-             "return Py_BuildValue(\"O&\", UTCDateTime_New, &self->ob_itself.contentModDate);",
-             "return PyArg_Parse(v, \"O&\", UTCDateTime_Convert, &self->ob_itself.contentModDate)-1;",
-             None
-            ),
-            ("attributeModDate",
-             "return Py_BuildValue(\"O&\", UTCDateTime_New, &self->ob_itself.attributeModDate);",
-             "return PyArg_Parse(v, \"O&\", UTCDateTime_Convert, &self->ob_itself.attributeModDate)-1;",
-             None
-            ),
-            ("accessDate",
-             "return Py_BuildValue(\"O&\", UTCDateTime_New, &self->ob_itself.accessDate);",
-             "return PyArg_Parse(v, \"O&\", UTCDateTime_Convert, &self->ob_itself.accessDate)-1;",
-             None
-            ),
-            ("backupDate",
-             "return Py_BuildValue(\"O&\", UTCDateTime_New, &self->ob_itself.backupDate);",
-             "return PyArg_Parse(v, \"O&\", UTCDateTime_Convert, &self->ob_itself.backupDate)-1;",
-             None
-            ),
-            ("permissions",
-             "return Py_BuildValue(\"(llll)\", self->ob_itself.permissions[0], self->ob_itself.permissions[1], self->ob_itself.permissions[2], self->ob_itself.permissions[3]);",
-             "return PyArg_Parse(v, \"(llll)\", &self->ob_itself.permissions[0], &self->ob_itself.permissions[1], &self->ob_itself.permissions[2], &self->ob_itself.permissions[3])-1;",
-             None
-            ),
-            # XXXX FinderInfo TBD
-            # XXXX FinderXInfo TBD
-            ("valence",
-             "return Py_BuildValue(\"l\", self->ob_itself.valence);",
-             "return PyArg_Parse(v, \"l\", &self->ob_itself.valence)-1;",
-             None
-            ),
-            ("dataLogicalSize",
-             "return Py_BuildValue(\"l\", self->ob_itself.dataLogicalSize);",
-             "return PyArg_Parse(v, \"l\", &self->ob_itself.dataLogicalSize)-1;",
-             None
-            ),
-            ("dataPhysicalSize",
-             "return Py_BuildValue(\"l\", self->ob_itself.dataPhysicalSize);",
-             "return PyArg_Parse(v, \"l\", &self->ob_itself.dataPhysicalSize)-1;",
-             None
-            ),
-            ("rsrcLogicalSize",
-             "return Py_BuildValue(\"l\", self->ob_itself.rsrcLogicalSize);",
-             "return PyArg_Parse(v, \"l\", &self->ob_itself.rsrcLogicalSize)-1;",
-             None
-            ),
-            ("rsrcPhysicalSize",
-             "return Py_BuildValue(\"l\", self->ob_itself.rsrcPhysicalSize);",
-             "return PyArg_Parse(v, \"l\", &self->ob_itself.rsrcPhysicalSize)-1;",
-             None
-            ),
-            ("sharingFlags",
-             "return Py_BuildValue(\"l\", self->ob_itself.sharingFlags);",
-             "return PyArg_Parse(v, \"l\", &self->ob_itself.sharingFlags)-1;",
-             None
-            ),
-            ("userPrivileges",
-             "return Py_BuildValue(\"b\", self->ob_itself.userPrivileges);",
-             "return PyArg_Parse(v, \"b\", &self->ob_itself.userPrivileges)-1;",
-             None
-            ),
-    ]
-    # The same info, but in a different form
-    INITFORMAT = "HhllO&O&O&O&O&llllllb"
-    INITARGS = """&((FSCatalogInfoObject *)_self)->ob_itself.nodeFlags,
-            &((FSCatalogInfoObject *)_self)->ob_itself.volume,
-            &((FSCatalogInfoObject *)_self)->ob_itself.parentDirID,
-            &((FSCatalogInfoObject *)_self)->ob_itself.nodeID,
-            UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.createDate,
-            UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.contentModDate,
-            UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.attributeModDate,
-            UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.accessDate,
-            UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.backupDate,
-            &((FSCatalogInfoObject *)_self)->ob_itself.valence,
-            &((FSCatalogInfoObject *)_self)->ob_itself.dataLogicalSize,
-            &((FSCatalogInfoObject *)_self)->ob_itself.dataPhysicalSize,
-            &((FSCatalogInfoObject *)_self)->ob_itself.rsrcLogicalSize,
-            &((FSCatalogInfoObject *)_self)->ob_itself.rsrcPhysicalSize,
-            &((FSCatalogInfoObject *)_self)->ob_itself.sharingFlags,
-            &((FSCatalogInfoObject *)_self)->ob_itself.userPrivileges"""
-    INITNAMES = """
-            "nodeFlags",
-            "volume",
-            "parentDirID",
-            "nodeID",
-            "createDate",
-            "contentModDate",
-            "atributeModDate",
-            "accessDate",
-            "backupDate",
-            "valence",
-            "dataLogicalSize",
-            "dataPhysicalSize",
-            "rsrcLogicalSize",
-            "rsrcPhysicalSize",
-            "sharingFlags",
-            "userPrivileges"
-            """
-
-    def __init__(self, name, prefix, itselftype):
-        ObjectDefinition.__init__(self, name, prefix, itselftype)
-        self.argref = "*"       # Store FSSpecs, but pass them by address
-
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }")
-
-    def output_tp_newBody(self):
-        Output("PyObject *self;");
-        Output()
-        Output("if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;")
-        Output("memset(&((%s *)self)->ob_itself, 0, sizeof(%s));",
-                self.objecttype, self.itselftype)
-        Output("return self;")
-
-    def output_tp_initBody(self):
-        Output("static char *kw[] = {%s, 0};", self.INITNAMES)
-        Output()
-        Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|%s\", kw, %s))",
-                self.INITFORMAT, self.INITARGS)
-        OutLbrace()
-        Output("return -1;")
-        OutRbrace()
-        Output("return 0;")
-
-class FInfoDefinition(PEP253Mixin, ObjectDefinition):
-    getsetlist = [
-            ("Type",
-             "return Py_BuildValue(\"O&\", PyMac_BuildOSType, self->ob_itself.fdType);",
-             "return PyArg_Parse(v, \"O&\", PyMac_GetOSType, &self->ob_itself.fdType)-1;",
-             "4-char file type"
-            ),
-            ("Creator",
-             "return Py_BuildValue(\"O&\", PyMac_BuildOSType, self->ob_itself.fdCreator);",
-             "return PyArg_Parse(v, \"O&\", PyMac_GetOSType, &self->ob_itself.fdCreator)-1;",
-             "4-char file creator"
-            ),
-            ("Flags",
-             "return Py_BuildValue(\"H\", self->ob_itself.fdFlags);",
-             "return PyArg_Parse(v, \"H\", &self->ob_itself.fdFlags)-1;",
-             "Finder flag bits"
-            ),
-            ("Location",
-             "return Py_BuildValue(\"O&\", PyMac_BuildPoint, self->ob_itself.fdLocation);",
-             "return PyArg_Parse(v, \"O&\", PyMac_GetPoint, &self->ob_itself.fdLocation)-1;",
-             "(x, y) location of the file's icon in its parent finder window"
-            ),
-            ("Fldr",
-             "return Py_BuildValue(\"h\", self->ob_itself.fdFldr);",
-             "return PyArg_Parse(v, \"h\", &self->ob_itself.fdFldr)-1;",
-             "Original folder, for 'put away'"
-            ),
-
-    ]
-
-    def __init__(self, name, prefix, itselftype):
-        ObjectDefinition.__init__(self, name, prefix, itselftype)
-        self.argref = "*"       # Store FSSpecs, but pass them by address
-
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-
-    def output_tp_newBody(self):
-        Output("PyObject *self;");
-        Output()
-        Output("if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;")
-        Output("memset(&((%s *)self)->ob_itself, 0, sizeof(%s));",
-                self.objecttype, self.itselftype)
-        Output("return self;")
-
-    def output_tp_initBody(self):
-        Output("%s *itself = NULL;", self.itselftype)
-        Output("static char *kw[] = {\"itself\", 0};")
-        Output()
-        Output("if (PyArg_ParseTupleAndKeywords(_args, _kwds, \"|O&\", kw, FInfo_Convert, &itself))")
-        OutLbrace()
-        Output("if (itself) memcpy(&((%s *)_self)->ob_itself, itself, sizeof(%s));",
-                self.objecttype, self.itselftype)
-        Output("return 0;")
-        OutRbrace()
-        Output("return -1;")
-
-class FSSpecDefinition(PEP253Mixin, ObjectDefinition):
-    getsetlist = [
-            ("data",
-             "return PyString_FromStringAndSize((char *)&self->ob_itself, sizeof(self->ob_itself));",
-             None,
-             "Raw data of the FSSpec object"
-            )
-    ]
-
-    def __init__(self, name, prefix, itselftype):
-        ObjectDefinition.__init__(self, name, prefix, itselftype)
-        self.argref = "*"       # Store FSSpecs, but pass them by address
-
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-
-    # We do Convert ourselves (with PyMac_GetFSxxx)
-    def outputConvert(self):
-        pass
-
-    def output_tp_newBody(self):
-        Output("PyObject *self;");
-        Output()
-        Output("if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;")
-        Output("memset(&((%s *)self)->ob_itself, 0, sizeof(%s));",
-                self.objecttype, self.itselftype)
-        Output("return self;")
-
-    def output_tp_initBody(self):
-        Output("PyObject *v = NULL;")
-        Output("char *rawdata = NULL;")
-        Output("int rawdatalen = 0;")
-        Output("static char *kw[] = {\"itself\", \"rawdata\", 0};")
-        Output()
-        Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|Os#\", kw, &v, &rawdata, &rawdatalen))")
-        Output("return -1;")
-        Output("if (v && rawdata)")
-        OutLbrace()
-        Output("PyErr_SetString(PyExc_TypeError, \"Only one of itself or rawdata may be specified\");")
-        Output("return -1;")
-        OutRbrace()
-        Output("if (!v && !rawdata)")
-        OutLbrace()
-        Output("PyErr_SetString(PyExc_TypeError, \"One of itself or rawdata must be specified\");")
-        Output("return -1;")
-        OutRbrace()
-        Output("if (rawdata)")
-        OutLbrace()
-        Output("if (rawdatalen != sizeof(%s))", self.itselftype)
-        OutLbrace()
-        Output("PyErr_SetString(PyExc_TypeError, \"%s rawdata incorrect size\");",
-                self.itselftype)
-        Output("return -1;")
-        OutRbrace()
-        Output("memcpy(&((%s *)_self)->ob_itself, rawdata, rawdatalen);", self.objecttype)
-        Output("return 0;")
-        OutRbrace()
-        Output("if (PyMac_GetFSSpec(v, &((%s *)_self)->ob_itself)) return 0;", self.objecttype)
-        Output("return -1;")
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[512];")
-        Output("""PyOS_snprintf(buf, sizeof(buf), \"%%s((%%d, %%ld, '%%.*s'))\",
-        self->ob_type->tp_name,
-        self->ob_itself.vRefNum,
-        self->ob_itself.parID,
-        self->ob_itself.name[0], self->ob_itself.name+1);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-class FSRefDefinition(PEP253Mixin, ObjectDefinition):
-    getsetlist = [
-            ("data",
-             "return PyString_FromStringAndSize((char *)&self->ob_itself, sizeof(self->ob_itself));",
-             None,
-             "Raw data of the FSRef object"
-            )
-    ]
-
-    def __init__(self, name, prefix, itselftype):
-        ObjectDefinition.__init__(self, name, prefix, itselftype)
-        self.argref = "*"       # Store FSRefs, but pass them by address
-
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-
-    # We do Convert ourselves (with PyMac_GetFSxxx)
-    def outputConvert(self):
-        pass
-
-    def output_tp_newBody(self):
-        Output("PyObject *self;");
-        Output()
-        Output("if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;")
-        Output("memset(&((%s *)self)->ob_itself, 0, sizeof(%s));",
-                self.objecttype, self.itselftype)
-        Output("return self;")
-
-    def output_tp_initBody(self):
-        Output("PyObject *v = NULL;")
-        Output("char *rawdata = NULL;")
-        Output("int rawdatalen = 0;")
-        Output("static char *kw[] = {\"itself\", \"rawdata\", 0};")
-        Output()
-        Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|Os#\", kw, &v, &rawdata, &rawdatalen))")
-        Output("return -1;")
-        Output("if (v && rawdata)")
-        OutLbrace()
-        Output("PyErr_SetString(PyExc_TypeError, \"Only one of itself or rawdata may be specified\");")
-        Output("return -1;")
-        OutRbrace()
-        Output("if (!v && !rawdata)")
-        OutLbrace()
-        Output("PyErr_SetString(PyExc_TypeError, \"One of itself or rawdata must be specified\");")
-        Output("return -1;")
-        OutRbrace()
-        Output("if (rawdata)")
-        OutLbrace()
-        Output("if (rawdatalen != sizeof(%s))", self.itselftype)
-        OutLbrace()
-        Output("PyErr_SetString(PyExc_TypeError, \"%s rawdata incorrect size\");",
-                self.itselftype)
-        Output("return -1;")
-        OutRbrace()
-        Output("memcpy(&((%s *)_self)->ob_itself, rawdata, rawdatalen);", self.objecttype)
-        Output("return 0;")
-        OutRbrace()
-        Output("if (PyMac_GetFSRef(v, &((%s *)_self)->ob_itself)) return 0;", self.objecttype)
-        Output("return -1;")
-
-class AliasDefinition(PEP253Mixin, ObjectDefinition):
-    # XXXX Should inherit from resource?
-    getsetlist = [
-            ("data",
-             """int size;
-                    PyObject *rv;
-
-                    size = GetHandleSize((Handle)self->ob_itself);
-                    HLock((Handle)self->ob_itself);
-                    rv = PyString_FromStringAndSize(*(Handle)self->ob_itself, size);
-                    HUnlock((Handle)self->ob_itself);
-                    return rv;
-            """,
-             None,
-             "Raw data of the alias object"
-            )
-    ]
-
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-
-    def outputStructMembers(self):
-        ObjectDefinition.outputStructMembers(self)
-        Output("void (*ob_freeit)(%s ptr);", self.itselftype)
-
-    def outputInitStructMembers(self):
-        ObjectDefinition.outputInitStructMembers(self)
-        Output("it->ob_freeit = NULL;")
-
-    def outputCleanupStructMembers(self):
-        Output("if (self->ob_freeit && self->ob_itself)")
-        OutLbrace()
-        Output("self->ob_freeit(self->ob_itself);")
-        OutRbrace()
-        Output("self->ob_itself = NULL;")
-
-    def output_tp_newBody(self):
-        Output("PyObject *self;");
-        Output()
-        Output("if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;")
-        Output("((%s *)self)->ob_itself = NULL;", self.objecttype)
-        Output("return self;")
-
-    def output_tp_initBody(self):
-        Output("%s itself = NULL;", self.itselftype)
-        Output("char *rawdata = NULL;")
-        Output("int rawdatalen = 0;")
-        Output("Handle h;")
-        Output("static char *kw[] = {\"itself\", \"rawdata\", 0};")
-        Output()
-        Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|O&s#\", kw, %s_Convert, &itself, &rawdata, &rawdatalen))",
-                self.prefix)
-        Output("return -1;")
-        Output("if (itself && rawdata)")
-        OutLbrace()
-        Output("PyErr_SetString(PyExc_TypeError, \"Only one of itself or rawdata may be specified\");")
-        Output("return -1;")
-        OutRbrace()
-        Output("if (!itself && !rawdata)")
-        OutLbrace()
-        Output("PyErr_SetString(PyExc_TypeError, \"One of itself or rawdata must be specified\");")
-        Output("return -1;")
-        OutRbrace()
-        Output("if (rawdata)")
-        OutLbrace()
-        Output("if ((h = NewHandle(rawdatalen)) == NULL)")
-        OutLbrace()
-        Output("PyErr_NoMemory();")
-        Output("return -1;")
-        OutRbrace()
-        Output("HLock(h);")
-        Output("memcpy((char *)*h, rawdata, rawdatalen);")
-        Output("HUnlock(h);")
-        Output("((%s *)_self)->ob_itself = (%s)h;", self.objecttype, self.itselftype)
-        Output("return 0;")
-        OutRbrace()
-        Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
-        Output("return 0;")
-
-# Alias methods come in two flavors: those with the alias as arg1 and
-# those with the alias as arg 2.
-class Arg2MethodGenerator(OSErrMethodGenerator):
-    """Similar to MethodGenerator, but has self as second argument"""
-
-    def parseArgumentList(self, args):
-        args0, arg1, argsrest = args[:1], args[1], args[2:]
-        t0, n0, m0 = arg1
-        args = args0 + argsrest
-        if m0 != InMode:
-            raise ValueError("method's 'self' must be 'InMode'")
-        self.itself = Variable(t0, "_self->ob_itself", SelfMode)
-        FunctionGenerator.parseArgumentList(self, args)
-        self.argumentList.insert(2, self.itself)
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff,
-        longname=LONGMODNAME)
-
-fscataloginfoobject = FSCatalogInfoDefinition('FSCatalogInfo', 'FSCatalogInfo', 'FSCatalogInfo')
-finfoobject = FInfoDefinition('FInfo', 'FInfo', 'FInfo')
-aliasobject = AliasDefinition('Alias', 'Alias', 'AliasHandle')
-fsspecobject = FSSpecDefinition('FSSpec', 'FSSpec', 'FSSpec')
-fsrefobject = FSRefDefinition('FSRef', 'FSRef', 'FSRef')
-
-module.addobject(fscataloginfoobject)
-module.addobject(finfoobject)
-module.addobject(aliasobject)
-module.addobject(fsspecobject)
-module.addobject(fsrefobject)
-
-# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-Method = OSErrMethodGenerator
-
-# Create and populate the lists
-functions = []
-alias_methods = []
-fsref_methods = []
-fsspec_methods = []
-exec(open(INPUTFILE).read())
-
-# Manual generators:
-FSRefMakePath_body = """
-OSStatus _err;
-#define MAXPATHNAME 1024
-UInt8 path[MAXPATHNAME];
-UInt32 maxPathSize = MAXPATHNAME;
-
-if (!PyArg_ParseTuple(_args, ""))
-        return NULL;
-_err = FSRefMakePath(&_self->ob_itself,
-                                         path,
-                                         maxPathSize);
-if (_err != noErr) return PyMac_Error(_err);
-_res = Py_BuildValue("s", path);
-return _res;
-"""
-f = ManualGenerator("FSRefMakePath", FSRefMakePath_body)
-f.docstring = lambda: "() -> string"
-fsref_methods.append(f)
-
-FSRef_as_pathname_body = """
-if (!PyArg_ParseTuple(_args, ""))
-        return NULL;
-_res = FSRef_FSRefMakePath(_self, _args);
-return _res;
-"""
-f = ManualGenerator("as_pathname", FSRef_as_pathname_body)
-f.docstring = lambda: "() -> string"
-fsref_methods.append(f)
-
-FSSpec_as_pathname_body = """
-char strbuf[1024];
-OSErr err;
-
-if (!PyArg_ParseTuple(_args, ""))
-        return NULL;
-err = _PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf));
-if ( err ) {
-        PyMac_Error(err);
-        return NULL;
-}
-_res = PyString_FromString(strbuf);
-return _res;
-"""
-f = ManualGenerator("as_pathname", FSSpec_as_pathname_body)
-f.docstring = lambda: "() -> string"
-fsspec_methods.append(f)
-
-FSSpec_as_tuple_body = """
-if (!PyArg_ParseTuple(_args, ""))
-        return NULL;
-_res = Py_BuildValue("(iis#)", _self->ob_itself.vRefNum, _self->ob_itself.parID,
-                                        &_self->ob_itself.name[1], _self->ob_itself.name[0]);
-return _res;
-"""
-f = ManualGenerator("as_tuple", FSSpec_as_tuple_body)
-f.docstring = lambda: "() -> (vRefNum, dirID, name)"
-fsspec_methods.append(f)
-
-pathname_body = """
-PyObject *obj;
-
-if (!PyArg_ParseTuple(_args, "O", &obj))
-        return NULL;
-if (PyString_Check(obj)) {
-        Py_INCREF(obj);
-        return obj;
-}
-if (PyUnicode_Check(obj))
-        return PyUnicode_AsEncodedString(obj, "utf8", "strict");
-_res = PyObject_CallMethod(obj, "as_pathname", NULL);
-return _res;
-"""
-f = ManualGenerator("pathname", pathname_body)
-f.docstring = lambda: "(str|unicode|FSSpec|FSref) -> pathname"
-functions.append(f)
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in alias_methods: aliasobject.add(f)
-for f in fsspec_methods: fsspecobject.add(f)
-for f in fsref_methods: fsrefobject.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/fm/_Fmmodule.c b/Mac/Modules/fm/_Fmmodule.c
deleted file mode 100644 (file)
index 890af54..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-
-/* =========================== Module _Fm =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-
-/*
-** Parse/generate ComponentDescriptor records
-*/
-static PyObject *
-FMRec_New(FMetricRec *itself)
-{
-
-        return Py_BuildValue("O&O&O&O&O&",
-                PyMac_BuildFixed, itself->ascent,
-                PyMac_BuildFixed, itself->descent,
-                PyMac_BuildFixed, itself->leading,
-                PyMac_BuildFixed, itself->widMax,
-                ResObj_New, itself->wTabHandle);
-}
-
-#if 0
-/* Not needed... */
-static int
-FMRec_Convert(PyObject *v, FMetricRec *p_itself)
-{
-        return PyArg_ParseTuple(v, "O&O&O&O&O&",
-                PyMac_GetFixed, &itself->ascent,
-                PyMac_GetFixed, &itself->descent,
-                PyMac_GetFixed, &itself->leading,
-                PyMac_GetFixed, &itself->widMax,
-                ResObj_Convert, &itself->wTabHandle);
-}
-#endif
-
-
-static PyObject *Fm_Error;
-
-static PyObject *Fm_GetFontName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short familyID;
-       Str255 name;
-#ifndef GetFontName
-       PyMac_PRECHECK(GetFontName);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &familyID))
-               return NULL;
-       GetFontName(familyID,
-                   name);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildStr255, name);
-       return _res;
-}
-
-static PyObject *Fm_GetFNum(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 name;
-       short familyID;
-#ifndef GetFNum
-       PyMac_PRECHECK(GetFNum);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, name))
-               return NULL;
-       GetFNum(name,
-               &familyID);
-       _res = Py_BuildValue("h",
-                            familyID);
-       return _res;
-}
-
-static PyObject *Fm_RealFont(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       short fontNum;
-       short size;
-#ifndef RealFont
-       PyMac_PRECHECK(RealFont);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &fontNum,
-                             &size))
-               return NULL;
-       _rv = RealFont(fontNum,
-                      size);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Fm_SetFScaleDisable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean fscaleDisable;
-#ifndef SetFScaleDisable
-       PyMac_PRECHECK(SetFScaleDisable);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &fscaleDisable))
-               return NULL;
-       SetFScaleDisable(fscaleDisable);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Fm_FontMetrics(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       FMetricRec theMetrics;
-#ifndef FontMetrics
-       PyMac_PRECHECK(FontMetrics);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       FontMetrics(&theMetrics);
-       _res = Py_BuildValue("O&",
-                            FMRec_New, &theMetrics);
-       return _res;
-}
-
-static PyObject *Fm_SetFractEnable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean fractEnable;
-#ifndef SetFractEnable
-       PyMac_PRECHECK(SetFractEnable);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &fractEnable))
-               return NULL;
-       SetFractEnable(fractEnable);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Fm_GetDefFontSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetDefFontSize
-       PyMac_PRECHECK(GetDefFontSize);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetDefFontSize();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Fm_IsOutline(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point numer;
-       Point denom;
-#ifndef IsOutline
-       PyMac_PRECHECK(IsOutline);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &numer,
-                             PyMac_GetPoint, &denom))
-               return NULL;
-       _rv = IsOutline(numer,
-                       denom);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Fm_SetOutlinePreferred(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean outlinePreferred;
-#ifndef SetOutlinePreferred
-       PyMac_PRECHECK(SetOutlinePreferred);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &outlinePreferred))
-               return NULL;
-       SetOutlinePreferred(outlinePreferred);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Fm_GetOutlinePreferred(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef GetOutlinePreferred
-       PyMac_PRECHECK(GetOutlinePreferred);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetOutlinePreferred();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Fm_SetPreserveGlyph(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean preserveGlyph;
-#ifndef SetPreserveGlyph
-       PyMac_PRECHECK(SetPreserveGlyph);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &preserveGlyph))
-               return NULL;
-       SetPreserveGlyph(preserveGlyph);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Fm_GetPreserveGlyph(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef GetPreserveGlyph
-       PyMac_PRECHECK(GetPreserveGlyph);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPreserveGlyph();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Fm_GetSysFont(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetSysFont
-       PyMac_PRECHECK(GetSysFont);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetSysFont();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Fm_GetAppFont(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetAppFont
-       PyMac_PRECHECK(GetAppFont);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetAppFont();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Fm_QDTextBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *inText__in__;
-       int inText__len__;
-       int inText__in_len__;
-       Rect bounds;
-#ifndef QDTextBounds
-       PyMac_PRECHECK(QDTextBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             &inText__in__, &inText__in_len__))
-               return NULL;
-       inText__len__ = inText__in_len__;
-       QDTextBounds(inText__len__, inText__in__,
-                    &bounds);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyMethodDef Fm_methods[] = {
-       {"GetFontName", (PyCFunction)Fm_GetFontName, 1,
-        PyDoc_STR("(short familyID) -> (Str255 name)")},
-       {"GetFNum", (PyCFunction)Fm_GetFNum, 1,
-        PyDoc_STR("(Str255 name) -> (short familyID)")},
-       {"RealFont", (PyCFunction)Fm_RealFont, 1,
-        PyDoc_STR("(short fontNum, short size) -> (Boolean _rv)")},
-       {"SetFScaleDisable", (PyCFunction)Fm_SetFScaleDisable, 1,
-        PyDoc_STR("(Boolean fscaleDisable) -> None")},
-       {"FontMetrics", (PyCFunction)Fm_FontMetrics, 1,
-        PyDoc_STR("() -> (FMetricRec theMetrics)")},
-       {"SetFractEnable", (PyCFunction)Fm_SetFractEnable, 1,
-        PyDoc_STR("(Boolean fractEnable) -> None")},
-       {"GetDefFontSize", (PyCFunction)Fm_GetDefFontSize, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"IsOutline", (PyCFunction)Fm_IsOutline, 1,
-        PyDoc_STR("(Point numer, Point denom) -> (Boolean _rv)")},
-       {"SetOutlinePreferred", (PyCFunction)Fm_SetOutlinePreferred, 1,
-        PyDoc_STR("(Boolean outlinePreferred) -> None")},
-       {"GetOutlinePreferred", (PyCFunction)Fm_GetOutlinePreferred, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"SetPreserveGlyph", (PyCFunction)Fm_SetPreserveGlyph, 1,
-        PyDoc_STR("(Boolean preserveGlyph) -> None")},
-       {"GetPreserveGlyph", (PyCFunction)Fm_GetPreserveGlyph, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"GetSysFont", (PyCFunction)Fm_GetSysFont, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetAppFont", (PyCFunction)Fm_GetAppFont, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"QDTextBounds", (PyCFunction)Fm_QDTextBounds, 1,
-        PyDoc_STR("(Buffer inText) -> (Rect bounds)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Fm(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_Fm", Fm_methods);
-       d = PyModule_GetDict(m);
-       Fm_Error = PyMac_GetOSErrException();
-       if (Fm_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Fm_Error) != 0)
-               return;
-}
-
-/* ========================= End module _Fm ========================= */
-
diff --git a/Mac/Modules/fm/fmscan.py b/Mac/Modules/fm/fmscan.py
deleted file mode 100644 (file)
index 193afc7..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "Fonts"
-SHORT = "fm"
-
-def main():
-    input = "Fonts.h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "OutlineMetrics",       # Too complicated
-                "AntiTextIsAntiAliased",        # XXXX Missing from library...
-                "AntiTextGetEnabled",
-                "AntiTextSetEnabled",
-                "AntiTextGetApplicationAware",
-                "AntiTextSetApplicationAware",
-                # These are tricky: they're not Carbon dependent or anything, but they
-                # exist only on 8.6 or later (both in Carbon and Classic).
-                # Disabling them is the easiest path.
-                'SetAntiAliasedTextEnabled',
-                'IsAntiAliasedTextEnabled',
-                # OS8-only
-                'InitFonts',
-                'SetFontLock',
-                'FlushFonts',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "FMInput_ptr",  # Not needed for now
-                "FMOutPtr",             # Ditto
-##                      "void_ptr",             # Don't know how to do this right now
-                "FontInfo",             # Ditto
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([('Str255', '*', 'InMode')], [('Str255', '*', 'OutMode')]),
-                ([('FMetricRecPtr', 'theMetrics', 'InMode')], [('FMetricRecPtr', 'theMetrics', 'OutMode')]),
-                ([('short', 'byteCount', 'InMode'), ('void_ptr', 'textAddr', 'InMode'),],
-                 [('TextBuffer', 'inText', 'InMode')]),
-                ]
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("kNilOptions = 0\n")
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/fm/fmsupport.py b/Mac/Modules/fm/fmsupport.py
deleted file mode 100644 (file)
index 8e2b8b3..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Fonts.h'               # The Apple header file
-MODNAME = '_Fm'                         # The name of the module
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Fm'                        # The prefix for module-wide routines
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-class RevVarInputBufferType(VarInputBufferType):
-    def passInput(self, name):
-        return "%s__len__, %s__in__" % (name, name)
-
-TextBuffer = RevVarInputBufferType()
-
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-
-/*
-** Parse/generate ComponentDescriptor records
-*/
-static PyObject *
-FMRec_New(FMetricRec *itself)
-{
-
-        return Py_BuildValue("O&O&O&O&O&",
-                PyMac_BuildFixed, itself->ascent,
-                PyMac_BuildFixed, itself->descent,
-                PyMac_BuildFixed, itself->leading,
-                PyMac_BuildFixed, itself->widMax,
-                ResObj_New, itself->wTabHandle);
-}
-
-#if 0
-/* Not needed... */
-static int
-FMRec_Convert(PyObject *v, FMetricRec *p_itself)
-{
-        return PyArg_ParseTuple(v, "O&O&O&O&O&",
-                PyMac_GetFixed, &itself->ascent,
-                PyMac_GetFixed, &itself->descent,
-                PyMac_GetFixed, &itself->leading,
-                PyMac_GetFixed, &itself->widMax,
-                ResObj_Convert, &itself->wTabHandle);
-}
-#endif
-
-"""
-
-FMetricRecPtr = OpaqueType('FMetricRec', 'FMRec')
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-
-# Create and populate the lists
-functions = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/folder/_Foldermodule.c b/Mac/Modules/folder/_Foldermodule.c
deleted file mode 100644 (file)
index bd33b8e..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-
-/* ========================= Module _Folder ========================= */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-
-static PyObject *Folder_Error;
-
-static PyObject *Folder_FindFolder(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       OSType folderType;
-       Boolean createFolder;
-       short foundVRefNum;
-       long foundDirID;
-       if (!PyArg_ParseTuple(_args, "hO&b",
-                             &vRefNum,
-                             PyMac_GetOSType, &folderType,
-                             &createFolder))
-               return NULL;
-       _err = FindFolder(vRefNum,
-                         folderType,
-                         createFolder,
-                         &foundVRefNum,
-                         &foundDirID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hl",
-                            foundVRefNum,
-                            foundDirID);
-       return _res;
-}
-
-static PyObject *Folder_ReleaseFolder(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       OSType folderType;
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &vRefNum,
-                             PyMac_GetOSType, &folderType))
-               return NULL;
-       _err = ReleaseFolder(vRefNum,
-                            folderType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Folder_FSFindFolder(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       OSType folderType;
-       Boolean createFolder;
-       FSRef foundRef;
-       if (!PyArg_ParseTuple(_args, "hO&b",
-                             &vRefNum,
-                             PyMac_GetOSType, &folderType,
-                             &createFolder))
-               return NULL;
-       _err = FSFindFolder(vRefNum,
-                           folderType,
-                           createFolder,
-                           &foundRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFSRef, &foundRef);
-       return _res;
-}
-
-static PyObject *Folder_AddFolderDescriptor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FolderType foldType;
-       FolderDescFlags flags;
-       FolderClass foldClass;
-       FolderLocation foldLocation;
-       OSType badgeSignature;
-       OSType badgeType;
-       Str255 name;
-       Boolean replaceFlag;
-       if (!PyArg_ParseTuple(_args, "O&lO&O&O&O&O&b",
-                             PyMac_GetOSType, &foldType,
-                             &flags,
-                             PyMac_GetOSType, &foldClass,
-                             PyMac_GetOSType, &foldLocation,
-                             PyMac_GetOSType, &badgeSignature,
-                             PyMac_GetOSType, &badgeType,
-                             PyMac_GetStr255, name,
-                             &replaceFlag))
-               return NULL;
-       _err = AddFolderDescriptor(foldType,
-                                  flags,
-                                  foldClass,
-                                  foldLocation,
-                                  badgeSignature,
-                                  badgeType,
-                                  name,
-                                  replaceFlag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Folder_GetFolderTypes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UInt32 requestedTypeCount;
-       UInt32 totalTypeCount;
-       FolderType theTypes;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &requestedTypeCount))
-               return NULL;
-       _err = GetFolderTypes(requestedTypeCount,
-                             &totalTypeCount,
-                             &theTypes);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("lO&",
-                            totalTypeCount,
-                            PyMac_BuildOSType, theTypes);
-       return _res;
-}
-
-static PyObject *Folder_RemoveFolderDescriptor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FolderType foldType;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &foldType))
-               return NULL;
-       _err = RemoveFolderDescriptor(foldType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Folder_GetFolderName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       OSType foldType;
-       short foundVRefNum;
-       Str255 name;
-       if (!PyArg_ParseTuple(_args, "hO&O&",
-                             &vRefNum,
-                             PyMac_GetOSType, &foldType,
-                             PyMac_GetStr255, name))
-               return NULL;
-       _err = GetFolderName(vRefNum,
-                            foldType,
-                            &foundVRefNum,
-                            name);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            foundVRefNum);
-       return _res;
-}
-
-static PyObject *Folder_AddFolderRouting(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType fileType;
-       FolderType routeFromFolder;
-       FolderType routeToFolder;
-       RoutingFlags flags;
-       Boolean replaceFlag;
-       if (!PyArg_ParseTuple(_args, "O&O&O&lb",
-                             PyMac_GetOSType, &fileType,
-                             PyMac_GetOSType, &routeFromFolder,
-                             PyMac_GetOSType, &routeToFolder,
-                             &flags,
-                             &replaceFlag))
-               return NULL;
-       _err = AddFolderRouting(fileType,
-                               routeFromFolder,
-                               routeToFolder,
-                               flags,
-                               replaceFlag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Folder_RemoveFolderRouting(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType fileType;
-       FolderType routeFromFolder;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &fileType,
-                             PyMac_GetOSType, &routeFromFolder))
-               return NULL;
-       _err = RemoveFolderRouting(fileType,
-                                  routeFromFolder);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Folder_FindFolderRouting(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType fileType;
-       FolderType routeFromFolder;
-       FolderType routeToFolder;
-       RoutingFlags flags;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &fileType,
-                             PyMac_GetOSType, &routeFromFolder))
-               return NULL;
-       _err = FindFolderRouting(fileType,
-                                routeFromFolder,
-                                &routeToFolder,
-                                &flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&l",
-                            PyMac_BuildOSType, routeToFolder,
-                            flags);
-       return _res;
-}
-
-static PyObject *Folder_InvalidateFolderDescriptorCache(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &vRefNum,
-                             &dirID))
-               return NULL;
-       _err = InvalidateFolderDescriptorCache(vRefNum,
-                                              dirID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Folder_IdentifyFolder(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short vRefNum;
-       long dirID;
-       FolderType foldType;
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &vRefNum,
-                             &dirID))
-               return NULL;
-       _err = IdentifyFolder(vRefNum,
-                             dirID,
-                             &foldType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildOSType, foldType);
-       return _res;
-}
-
-static PyMethodDef Folder_methods[] = {
-       {"FindFolder", (PyCFunction)Folder_FindFolder, 1,
-        PyDoc_STR("(short vRefNum, OSType folderType, Boolean createFolder) -> (short foundVRefNum, long foundDirID)")},
-       {"ReleaseFolder", (PyCFunction)Folder_ReleaseFolder, 1,
-        PyDoc_STR("(short vRefNum, OSType folderType) -> None")},
-       {"FSFindFolder", (PyCFunction)Folder_FSFindFolder, 1,
-        PyDoc_STR("(short vRefNum, OSType folderType, Boolean createFolder) -> (FSRef foundRef)")},
-       {"AddFolderDescriptor", (PyCFunction)Folder_AddFolderDescriptor, 1,
-        PyDoc_STR("(FolderType foldType, FolderDescFlags flags, FolderClass foldClass, FolderLocation foldLocation, OSType badgeSignature, OSType badgeType, Str255 name, Boolean replaceFlag) -> None")},
-       {"GetFolderTypes", (PyCFunction)Folder_GetFolderTypes, 1,
-        PyDoc_STR("(UInt32 requestedTypeCount) -> (UInt32 totalTypeCount, FolderType theTypes)")},
-       {"RemoveFolderDescriptor", (PyCFunction)Folder_RemoveFolderDescriptor, 1,
-        PyDoc_STR("(FolderType foldType) -> None")},
-       {"GetFolderName", (PyCFunction)Folder_GetFolderName, 1,
-        PyDoc_STR("(short vRefNum, OSType foldType, Str255 name) -> (short foundVRefNum)")},
-       {"AddFolderRouting", (PyCFunction)Folder_AddFolderRouting, 1,
-        PyDoc_STR("(OSType fileType, FolderType routeFromFolder, FolderType routeToFolder, RoutingFlags flags, Boolean replaceFlag) -> None")},
-       {"RemoveFolderRouting", (PyCFunction)Folder_RemoveFolderRouting, 1,
-        PyDoc_STR("(OSType fileType, FolderType routeFromFolder) -> None")},
-       {"FindFolderRouting", (PyCFunction)Folder_FindFolderRouting, 1,
-        PyDoc_STR("(OSType fileType, FolderType routeFromFolder) -> (FolderType routeToFolder, RoutingFlags flags)")},
-       {"InvalidateFolderDescriptorCache", (PyCFunction)Folder_InvalidateFolderDescriptorCache, 1,
-        PyDoc_STR("(short vRefNum, long dirID) -> None")},
-       {"IdentifyFolder", (PyCFunction)Folder_IdentifyFolder, 1,
-        PyDoc_STR("(short vRefNum, long dirID) -> (FolderType foldType)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Folder(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_Folder", Folder_methods);
-       d = PyModule_GetDict(m);
-       Folder_Error = PyMac_GetOSErrException();
-       if (Folder_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Folder_Error) != 0)
-               return;
-}
-
-/* ======================= End module _Folder ======================= */
-
diff --git a/Mac/Modules/folder/folderscan.py b/Mac/Modules/folder/folderscan.py
deleted file mode 100644 (file)
index 6345e49..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner_OSX
-
-LONG = "Folders"
-SHORT = "folder"
-OBJECT = "NOTUSED"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    scanner.gentypetest(SHORT+"typetest.py")
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner_OSX):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            # This is non-functional today
-            if t == OBJECT and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "FindFolderExtended", # Has funny void* argument
-                "FSFindFolderExtended", # ditto
-                "FolderManagerRegisterCallNotificationProcs", # ditto
-
-                "FindFolderEx", # Non-MacOS routine
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "FolderManagerNotificationProcPtr",
-                "FolderManagerNotificationUPP",
-                "FolderRouting", # To be done, not difficult
-                "FolderDesc", # To be done, not difficult
-
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ]
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("true = True\n")
-        self.defsfile.write("false = False\n")
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/folder/foldersupport.py b/Mac/Modules/folder/foldersupport.py
deleted file mode 100644 (file)
index 224b545..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Folders.h'             # The Apple header file
-MODNAME = '_Folder'                             # The name of the module
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Folder'                    # The prefix for module-wide routines
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-ConstStrFileNameParam = ConstStr255Param
-StrFileName = Str255
-FolderClass = OSTypeType("FolderClass")
-# FolderDesc
-FolderDescFlags = Type("FolderDescFlags", "l")
-FolderLocation = OSTypeType("FolderLocation")
-# FolderRouting
-FolderType = OSTypeType("FolderType")
-RoutingFlags = Type("RoutingFlags", "l")
-
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-"""
-
-exec(open(string.lower(MODPREFIX) + 'typetest.py').read())
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-
-# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-
-# Create and populate the lists
-functions = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/gestaltmodule.c b/Mac/Modules/gestaltmodule.c
deleted file mode 100644 (file)
index 387f93c..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/***********************************************************
-Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam,
-The Netherlands.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Stichting Mathematisch
-Centrum or CWI not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior permission.
-
-STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
-THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
-FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
-OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-******************************************************************/
-
-/* Macintosh Gestalt interface */
-
-#include "Python.h"
-#include "pymactoolbox.h"
-
-#include <Carbon/Carbon.h>
-
-static PyObject *
-gestalt_gestalt(PyObject *self, PyObject *args)
-{
-       OSErr iErr;
-       OSType selector;
-       long response;
-       if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &selector))
-               return NULL;
-       iErr = Gestalt ( selector, &response );
-       if (iErr != 0) 
-               return PyMac_Error(iErr);
-       return PyLong_FromLong(response);
-}
-
-static struct PyMethodDef gestalt_methods[] = {
-       {"gestalt", gestalt_gestalt, METH_VARARGS},
-       {NULL, NULL} /* Sentinel */
-};
-
-void
-initgestalt(void)
-{
-       Py_InitModule("gestalt", gestalt_methods);
-}
diff --git a/Mac/Modules/help/_Helpmodule.c b/Mac/Modules/help/_Helpmodule.c
deleted file mode 100644 (file)
index b9c9599..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-
-/* ========================== Module _Help ========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-static PyObject *Help_Error;
-
-static PyObject *Help_HMGetHelpMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuRef outHelpMenu;
-       MenuItemIndex outFirstCustomItemIndex;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = HMGetHelpMenu(&outHelpMenu,
-                            &outFirstCustomItemIndex);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&H",
-                            MenuObj_New, outHelpMenu,
-                            outFirstCustomItemIndex);
-       return _res;
-}
-
-static PyObject *Help_HMAreHelpTagsDisplayed(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = HMAreHelpTagsDisplayed();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Help_HMSetHelpTagsDisplayed(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean inDisplayTags;
-       if (!PyArg_ParseTuple(_args, "b",
-                             &inDisplayTags))
-               return NULL;
-       _err = HMSetHelpTagsDisplayed(inDisplayTags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Help_HMSetTagDelay(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Duration inDelay;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inDelay))
-               return NULL;
-       _err = HMSetTagDelay(inDelay);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Help_HMGetTagDelay(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Duration outDelay;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = HMGetTagDelay(&outDelay);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outDelay);
-       return _res;
-}
-
-static PyObject *Help_HMSetMenuHelpFromBalloonRsrc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuRef inMenu;
-       SInt16 inHmnuRsrcID;
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             MenuObj_Convert, &inMenu,
-                             &inHmnuRsrcID))
-               return NULL;
-       _err = HMSetMenuHelpFromBalloonRsrc(inMenu,
-                                           inHmnuRsrcID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Help_HMSetDialogHelpFromBalloonRsrc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       DialogPtr inDialog;
-       SInt16 inHdlgRsrcID;
-       SInt16 inItemStart;
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             DlgObj_Convert, &inDialog,
-                             &inHdlgRsrcID,
-                             &inItemStart))
-               return NULL;
-       _err = HMSetDialogHelpFromBalloonRsrc(inDialog,
-                                             inHdlgRsrcID,
-                                             inItemStart);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Help_HMHideTag(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = HMHideTag();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef Help_methods[] = {
-       {"HMGetHelpMenu", (PyCFunction)Help_HMGetHelpMenu, 1,
-        PyDoc_STR("() -> (MenuRef outHelpMenu, MenuItemIndex outFirstCustomItemIndex)")},
-       {"HMAreHelpTagsDisplayed", (PyCFunction)Help_HMAreHelpTagsDisplayed, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"HMSetHelpTagsDisplayed", (PyCFunction)Help_HMSetHelpTagsDisplayed, 1,
-        PyDoc_STR("(Boolean inDisplayTags) -> None")},
-       {"HMSetTagDelay", (PyCFunction)Help_HMSetTagDelay, 1,
-        PyDoc_STR("(Duration inDelay) -> None")},
-       {"HMGetTagDelay", (PyCFunction)Help_HMGetTagDelay, 1,
-        PyDoc_STR("() -> (Duration outDelay)")},
-       {"HMSetMenuHelpFromBalloonRsrc", (PyCFunction)Help_HMSetMenuHelpFromBalloonRsrc, 1,
-        PyDoc_STR("(MenuRef inMenu, SInt16 inHmnuRsrcID) -> None")},
-       {"HMSetDialogHelpFromBalloonRsrc", (PyCFunction)Help_HMSetDialogHelpFromBalloonRsrc, 1,
-        PyDoc_STR("(DialogPtr inDialog, SInt16 inHdlgRsrcID, SInt16 inItemStart) -> None")},
-       {"HMHideTag", (PyCFunction)Help_HMHideTag, 1,
-        PyDoc_STR("() -> None")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Help(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_Help", Help_methods);
-       d = PyModule_GetDict(m);
-       Help_Error = PyMac_GetOSErrException();
-       if (Help_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Help_Error) != 0)
-               return;
-}
-
-/* ======================== End module _Help ======================== */
-
diff --git a/Mac/Modules/help/helpscan.py b/Mac/Modules/help/helpscan.py
deleted file mode 100644 (file)
index e928a5b..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "MacHelp"
-SHORT = "help"
-OBJECT = "NOTUSED"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            # This is non-functional today
-            if t == OBJECT and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-    def makeblacklistnames(self):
-        return [
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-##                      "TipFunctionUPP",
-##                      "HMMessageRecord",
-##                      "HMMessageRecord_ptr",
-                "HMWindowContentUPP",
-                "HMMenuTitleContentUPP",
-                "HMControlContentUPP",
-                "HMMenuItemContentUPP",
-                # For the moment
-                "HMHelpContentRec",
-                "HMHelpContentRec_ptr",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-##                      ([("WindowPtr", "*", "OutMode")],
-##                       [("ExistingWindowPtr", "*", "*")]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/help/helpsupport.py b/Mac/Modules/help/helpsupport.py
deleted file mode 100644 (file)
index 37117ee..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MODNAME = '_Help'                               # The name of the module
-OBJECTNAME = 'UNUSED'                   # The basic name of the objects used here
-KIND = 'Record'                         # Usually 'Ptr' or 'Handle'
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Help'                      # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + KIND          # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-MenuRef = OpaqueByValueType("MenuRef", "MenuObj")
-MenuItemIndex = Type("MenuItemIndex", "H")
-
-#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
-
-#RgnHandle = FakeType("(RgnHandle)0")
-# XXXX Should be next, but this will break a lot of code...
-# RgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
-
-#KeyMap = ArrayOutputBufferType("KeyMap")
-##MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
-##MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
-#EventMask = Type("EventMask", "H")
-#EventKind = Type("EventKind", "H")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-"""
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-    def outputCheckConvertArg(self):
-        OutLbrace("if (DlgObj_Check(v))")
-        Output("*p_itself = ((WindowObject *)v)->ob_itself;")
-        Output("return 1;")
-        OutRbrace()
-        Out("""
-        if (v == Py_None) { *p_itself = NULL; return 1; }
-        if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }
-        """)
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-##object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-##module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-##Method = OSErrMethodGenerator
-
-# Create and populate the lists
-functions = []
-##methods = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-##for f in methods: object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/ibcarbon/IBCarbonscan.py b/Mac/Modules/ibcarbon/IBCarbonscan.py
deleted file mode 100644 (file)
index d39a770..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# IBCarbonscan.py
-
-import sys
-
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner_OSX
-
-def main():
-    print("---Scanning IBCarbonRuntime.h---")
-    input = ["IBCarbonRuntime.h"]
-    output = "IBCarbongen.py"
-    defsoutput = TOOLBOXDIR + "IBCarbonRuntime.py"
-    scanner = IBCarbon_Scanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("--done scanning, importing--")
-    import IBCarbonsupport
-    print("done")
-
-class IBCarbon_Scanner(Scanner_OSX):
-
-    def destination(self, type, name, arglist):
-        classname = "IBCarbonFunction"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t == "IBNibRef" and m == "InMode":
-                classname = "IBCarbonMethod"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "DisposeNibReference",                          # taken care of by destructor
-                "CreateNibReferenceWithCFBundle",  ## need to wrap CFBundle.h properly first
-                ]
-
-    def makerepairinstructions(self):
-        return []
-
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/ibcarbon/IBCarbonsupport.py b/Mac/Modules/ibcarbon/IBCarbonsupport.py
deleted file mode 100644 (file)
index 8744b69..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# IBCarbonsupport.py
-
-from macsupport import *
-
-IBNibRef = OpaqueByValueType('IBNibRef', 'IBNibRefObj')
-#CFBundleRef = OpaqueByValueType('CFBundleRef')
-
-IBCarbonFunction = OSErrFunctionGenerator
-IBCarbonMethod = OSErrMethodGenerator
-
-includestuff = """
-#include <Carbon/Carbon.h>
-#include "pymactoolbox.h"
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern int _CFStringRefObj_Convert(PyObject *, CFStringRef *);
-#endif
-
-"""
-
-initstuff = """
-
-"""
-
-module = MacModule('_IBCarbon', 'IBCarbon', includestuff, finalstuff, initstuff)
-
-class CFReleaserObject(PEP253Mixin, GlobalObjectDefinition):
-    def outputFreeIt(self, name):
-        Output("CFRelease(%s);" % name)
-
-class CFNibDesc(PEP253Mixin, GlobalObjectDefinition):
-    def outputFreeIt(self, name):
-        Output("DisposeNibReference(%s);" % name)
-
-#cfstringobject = CFReleaserObject("CFStringRef")
-#module.addobject(cfstringobject)
-#cfbundleobject = CFReleaserObject("CFBundleRef")
-#module.addobject(cfbundleobject)
-ibnibobject = CFNibDesc("IBNibRef", "IBNibRefObj")
-module.addobject(ibnibobject)
-
-functions = []
-methods = []
-
-exec(open('IBCarbongen.py').read())
-
-for f in functions: module.add(f)
-for m in methods: ibnibobject.add(m)
-
-SetOutputFileName('_IBCarbon.c')
-module.generate()
diff --git a/Mac/Modules/ibcarbon/_IBCarbon.c b/Mac/Modules/ibcarbon/_IBCarbon.c
deleted file mode 100644 (file)
index 91f694b..0000000
+++ /dev/null
@@ -1,261 +0,0 @@
-
-/* ======================== Module _IBCarbon ======================== */
-
-#include "Python.h"
-
-
-
-#include <Carbon/Carbon.h>
-#include "pymactoolbox.h"
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern int _CFStringRefObj_Convert(PyObject *, CFStringRef *);
-#endif
-
-
-static PyObject *IBCarbon_Error;
-
-/* ---------------------- Object type IBNibRef ---------------------- */
-
-PyTypeObject IBNibRef_Type;
-
-#define IBNibRefObj_Check(x) (Py_TYPE(x) == &IBNibRef_Type || PyObject_TypeCheck((x), &IBNibRef_Type))
-
-typedef struct IBNibRefObject {
-       PyObject_HEAD
-       IBNibRef ob_itself;
-} IBNibRefObject;
-
-PyObject *IBNibRefObj_New(IBNibRef itself)
-{
-       IBNibRefObject *it;
-       it = PyObject_NEW(IBNibRefObject, &IBNibRef_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int IBNibRefObj_Convert(PyObject *v, IBNibRef *p_itself)
-{
-       if (!IBNibRefObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "IBNibRef required");
-               return 0;
-       }
-       *p_itself = ((IBNibRefObject *)v)->ob_itself;
-       return 1;
-}
-
-static void IBNibRefObj_dealloc(IBNibRefObject *self)
-{
-       DisposeNibReference(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *IBNibRefObj_CreateWindowFromNib(IBNibRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inName;
-       WindowPtr outWindow;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &inName))
-               return NULL;
-       _err = CreateWindowFromNib(_self->ob_itself,
-                                  inName,
-                                  &outWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, outWindow);
-       return _res;
-}
-
-static PyObject *IBNibRefObj_CreateMenuFromNib(IBNibRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inName;
-       MenuHandle outMenuRef;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &inName))
-               return NULL;
-       _err = CreateMenuFromNib(_self->ob_itself,
-                                inName,
-                                &outMenuRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, outMenuRef);
-       return _res;
-}
-
-static PyObject *IBNibRefObj_CreateMenuBarFromNib(IBNibRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inName;
-       Handle outMenuBar;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &inName))
-               return NULL;
-       _err = CreateMenuBarFromNib(_self->ob_itself,
-                                   inName,
-                                   &outMenuBar);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, outMenuBar);
-       return _res;
-}
-
-static PyObject *IBNibRefObj_SetMenuBarFromNib(IBNibRefObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inName;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &inName))
-               return NULL;
-       _err = SetMenuBarFromNib(_self->ob_itself,
-                                inName);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef IBNibRefObj_methods[] = {
-       {"CreateWindowFromNib", (PyCFunction)IBNibRefObj_CreateWindowFromNib, 1,
-        PyDoc_STR("(CFStringRef inName) -> (WindowPtr outWindow)")},
-       {"CreateMenuFromNib", (PyCFunction)IBNibRefObj_CreateMenuFromNib, 1,
-        PyDoc_STR("(CFStringRef inName) -> (MenuHandle outMenuRef)")},
-       {"CreateMenuBarFromNib", (PyCFunction)IBNibRefObj_CreateMenuBarFromNib, 1,
-        PyDoc_STR("(CFStringRef inName) -> (Handle outMenuBar)")},
-       {"SetMenuBarFromNib", (PyCFunction)IBNibRefObj_SetMenuBarFromNib, 1,
-        PyDoc_STR("(CFStringRef inName) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define IBNibRefObj_getsetlist NULL
-
-
-#define IBNibRefObj_compare NULL
-
-#define IBNibRefObj_repr NULL
-
-#define IBNibRefObj_hash NULL
-#define IBNibRefObj_tp_init 0
-
-#define IBNibRefObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *IBNibRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       IBNibRef itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, IBNibRefObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((IBNibRefObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define IBNibRefObj_tp_free PyObject_Del
-
-
-PyTypeObject IBNibRef_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_IBCarbon.IBNibRef", /*tp_name*/
-       sizeof(IBNibRefObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) IBNibRefObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) IBNibRefObj_compare, /*tp_compare*/
-       (reprfunc) IBNibRefObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) IBNibRefObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       IBNibRefObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       IBNibRefObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       IBNibRefObj_tp_init, /* tp_init */
-       IBNibRefObj_tp_alloc, /* tp_alloc */
-       IBNibRefObj_tp_new, /* tp_new */
-       IBNibRefObj_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type IBNibRef -------------------- */
-
-
-static PyObject *IBCarbon_CreateNibReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inNibName;
-       IBNibRef outNibRef;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &inNibName))
-               return NULL;
-       _err = CreateNibReference(inNibName,
-                                 &outNibRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            IBNibRefObj_New, outNibRef);
-       return _res;
-}
-
-static PyMethodDef IBCarbon_methods[] = {
-       {"CreateNibReference", (PyCFunction)IBCarbon_CreateNibReference, 1,
-        PyDoc_STR("(CFStringRef inNibName) -> (IBNibRef outNibRef)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_IBCarbon(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-
-       m = Py_InitModule("_IBCarbon", IBCarbon_methods);
-       d = PyModule_GetDict(m);
-       IBCarbon_Error = PyMac_GetOSErrException();
-       if (IBCarbon_Error == NULL ||
-           PyDict_SetItemString(d, "Error", IBCarbon_Error) != 0)
-               return;
-       Py_TYPE(&IBNibRef_Type) = &PyType_Type;
-       if (PyType_Ready(&IBNibRef_Type) < 0) return;
-       Py_INCREF(&IBNibRef_Type);
-       PyModule_AddObject(m, "IBNibRef", (PyObject *)&IBNibRef_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&IBNibRef_Type);
-       PyModule_AddObject(m, "IBNibRefType", (PyObject *)&IBNibRef_Type);
-}
-
-/* ====================== End module _IBCarbon ====================== */
-
diff --git a/Mac/Modules/icgluemodule.c b/Mac/Modules/icgluemodule.c
deleted file mode 100644 (file)
index 5ea6c72..0000000
+++ /dev/null
@@ -1,474 +0,0 @@
-/***********************************************************
-Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam,
-The Netherlands.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Stichting Mathematisch
-Centrum or CWI or Corporation for National Research Initiatives or
-CNRI not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-While CWI is the initial source for this software, a modified version
-is made available by the Corporation for National Research Initiatives
-(CNRI) at the Internet address ftp://ftp.python.org.
-
-STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
-CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-******************************************************************/
-
-#include "Python.h"
-#include "pymactoolbox.h"
-
-extern int ResObj_Convert(PyObject *, Handle *); /* From Resmodule.c */
-
-#include <Carbon/Carbon.h>
-
-static PyObject *ErrorObject;
-
-/* ----------------------------------------------------- */
-
-/* Declarations for objects of type ic_instance */
-
-typedef struct {
-       PyObject_HEAD
-       ICInstance inst;
-} iciobject;
-
-static PyTypeObject Icitype;
-
-
-
-/* ---------------------------------------------------------------- */
-
-
-static char ici_ICGetSeed__doc__[] = 
-"()->int; Returns int that changes when configuration does"
-;
-
-static PyObject *
-ici_ICGetSeed(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       long seed;
-       
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       if ((err=ICGetSeed(self->inst, &seed)) != 0 )
-               return PyMac_Error(err);
-       return Py_BuildValue("i", (int)seed);
-}
-
-
-static char ici_ICBegin__doc__[] = 
-"(perm)->None; Lock config file for read/write"
-;
-
-static PyObject *
-ici_ICBegin(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       int perm;
-       
-       if (!PyArg_ParseTuple(args, "i", &perm))
-               return NULL;
-       if ((err=ICBegin(self->inst, (ICPerm)perm)) != 0 )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char ici_ICFindPrefHandle__doc__[] = 
-"(key, handle)->attrs; Lookup key, store result in handle, return attributes"
-;
-
-static PyObject *
-ici_ICFindPrefHandle(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       Str255 key;
-       ICAttr attr;
-       Handle h;
-       
-       if (!PyArg_ParseTuple(args, "O&O&", PyMac_GetStr255, &key, ResObj_Convert, &h))
-               return NULL;
-       if ((err=ICFindPrefHandle(self->inst, key, &attr, h)) != 0 )
-               return PyMac_Error(err);
-       return Py_BuildValue("i", (int)attr);
-}
-
-
-static char ici_ICSetPref__doc__[] = 
-"(key, attr, data)->None; Set preference key to data with attributes"
-;
-
-static PyObject *
-ici_ICSetPref(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       Str255 key;
-       int attr;
-       char *data;
-       int datalen;
-       
-       if (!PyArg_ParseTuple(args, "O&is#", PyMac_GetStr255, &key, &attr, 
-                                       &data, &datalen))
-               return NULL;
-       if ((err=ICSetPref(self->inst, key, (ICAttr)attr, (Ptr)data, 
-                       (long)datalen)) != 0)
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char ici_ICCountPref__doc__[] = 
-"()->int; Return number of preferences"
-;
-
-static PyObject *
-ici_ICCountPref(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       long count;
-       
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       if ((err=ICCountPref(self->inst, &count)) != 0 )
-               return PyMac_Error(err);
-       return Py_BuildValue("i", (int)count);
-}
-
-
-static char ici_ICGetIndPref__doc__[] = 
-"(num)->key; Return key of preference with given index"
-;
-
-static PyObject *
-ici_ICGetIndPref(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       long num;
-       Str255 key;
-       
-       if (!PyArg_ParseTuple(args, "l", &num))
-               return NULL;
-       if ((err=ICGetIndPref(self->inst, num, key)) != 0 )
-               return PyMac_Error(err);
-       return Py_BuildValue("O&", PyMac_BuildStr255, key);
-}
-
-
-static char ici_ICDeletePref__doc__[] = 
-"(key)->None; Delete preference"
-;
-
-static PyObject *
-ici_ICDeletePref(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       Str255 key;
-
-       if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, key))
-               return NULL;
-       if ((err=ICDeletePref(self->inst, key)) != 0 )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char ici_ICEnd__doc__[] = 
-"()->None; Unlock file after ICBegin call"
-;
-
-static PyObject *
-ici_ICEnd(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       if ((err=ICEnd(self->inst)) != 0 )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char ici_ICEditPreferences__doc__[] = 
-"(key)->None; Ask user to edit preferences, staring with key"
-;
-
-static PyObject *
-ici_ICEditPreferences(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       Str255 key;
-       
-       if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, key))
-               return NULL;
-       if ((err=ICEditPreferences(self->inst, key)) != 0 )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char ici_ICParseURL__doc__[] = 
-"(hint, data, selStart, selEnd, handle)->selStart, selEnd; Find an URL, return in handle"
-;
-
-static PyObject *
-ici_ICParseURL(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       Str255 hint;
-       char *data;
-       int datalen;
-       long selStart, selEnd;
-       Handle h;
-       
-       if (!PyArg_ParseTuple(args, "O&s#llO&", PyMac_GetStr255, hint, &data, &datalen,
-                               &selStart, &selEnd, ResObj_Convert, &h))
-               return NULL;
-       if ((err=ICParseURL(self->inst, hint, (Ptr)data, (long)datalen,
-                               &selStart, &selEnd, h)) != 0 )
-               return PyMac_Error(err);
-       return Py_BuildValue("ii", (int)selStart, (int)selEnd);
-}
-
-
-static char ici_ICLaunchURL__doc__[] = 
-"(hint, data, selStart, selEnd)->None; Find an URL and launch the correct app"
-;
-
-static PyObject *
-ici_ICLaunchURL(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       Str255 hint;
-       char *data;
-       int datalen;
-       long selStart, selEnd;
-       
-       if (!PyArg_ParseTuple(args, "O&s#ll", PyMac_GetStr255, hint, &data, &datalen,
-                               &selStart, &selEnd))
-               return NULL;
-       if ((err=ICLaunchURL(self->inst, hint, (Ptr)data, (long)datalen,
-                               &selStart, &selEnd)) != 0 )
-               return PyMac_Error(err);
-       return Py_BuildValue("ii", (int)selStart, (int)selEnd);
-}
-
-
-static char ici_ICMapFilename__doc__[] = 
-"(filename)->mapinfo; Get filemap info for given filename"
-;
-
-static PyObject *
-ici_ICMapFilename(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       Str255 filename;
-       ICMapEntry entry;
-       
-       if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, filename))
-               return NULL;
-       if ((err=ICMapFilename(self->inst, filename, &entry)) != 0 )
-               return PyMac_Error(err);
-       return Py_BuildValue("hO&O&O&lO&O&O&O&O&", entry.version, 
-               PyMac_BuildOSType, entry.fileType,
-               PyMac_BuildOSType, entry.fileCreator, 
-               PyMac_BuildOSType, entry.postCreator, 
-               entry.flags,
-               PyMac_BuildStr255, entry.extension,
-               PyMac_BuildStr255, entry.creatorAppName,
-               PyMac_BuildStr255, entry.postAppName,
-               PyMac_BuildStr255, entry.MIMEType,
-               PyMac_BuildStr255, entry.entryName);
-}
-
-
-static char ici_ICMapTypeCreator__doc__[] = 
-"(type, creator, filename)->mapinfo; Get filemap info for given tp/cr/filename"
-;
-
-static PyObject *
-ici_ICMapTypeCreator(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       OSType type, creator;
-       Str255 filename;
-       ICMapEntry entry;
-       
-       if (!PyArg_ParseTuple(args, "O&O&O&",
-                       PyMac_GetOSType, &type,
-                       PyMac_GetOSType, &creator,
-                       PyMac_GetStr255, filename))
-               return NULL;
-       if ((err=ICMapTypeCreator(self->inst, type, creator, filename, &entry)) != 0 )
-               return PyMac_Error(err);
-       return Py_BuildValue("hO&O&O&lO&O&O&O&O&", entry.version, 
-               PyMac_BuildOSType, entry.fileType,
-               PyMac_BuildOSType, entry.fileCreator, 
-               PyMac_BuildOSType, entry.postCreator, 
-               entry.flags,
-               PyMac_BuildStr255, entry.extension,
-               PyMac_BuildStr255, entry.creatorAppName,
-               PyMac_BuildStr255, entry.postAppName,
-               PyMac_BuildStr255, entry.MIMEType,
-               PyMac_BuildStr255, entry.entryName);
-}
-
-
-static struct PyMethodDef ici_methods[] = {
- {"ICGetSeed", (PyCFunction)ici_ICGetSeed,     METH_VARARGS,   ici_ICGetSeed__doc__},
- {"ICBegin",   (PyCFunction)ici_ICBegin,       METH_VARARGS,   ici_ICBegin__doc__},
- {"ICFindPrefHandle",  (PyCFunction)ici_ICFindPrefHandle,      METH_VARARGS,   ici_ICFindPrefHandle__doc__},
- {"ICSetPref", (PyCFunction)ici_ICSetPref,     METH_VARARGS,   ici_ICSetPref__doc__},
- {"ICCountPref",       (PyCFunction)ici_ICCountPref,   METH_VARARGS,   ici_ICCountPref__doc__},
- {"ICGetIndPref",      (PyCFunction)ici_ICGetIndPref,  METH_VARARGS,   ici_ICGetIndPref__doc__},
- {"ICDeletePref",      (PyCFunction)ici_ICDeletePref,  METH_VARARGS,   ici_ICDeletePref__doc__},
- {"ICEnd",     (PyCFunction)ici_ICEnd, METH_VARARGS,   ici_ICEnd__doc__},
- {"ICEditPreferences", (PyCFunction)ici_ICEditPreferences,     METH_VARARGS,   ici_ICEditPreferences__doc__},
- {"ICParseURL",        (PyCFunction)ici_ICParseURL,    METH_VARARGS,   ici_ICParseURL__doc__},
- {"ICLaunchURL",       (PyCFunction)ici_ICLaunchURL,   METH_VARARGS,   ici_ICLaunchURL__doc__},
- {"ICMapFilename",     (PyCFunction)ici_ICMapFilename, METH_VARARGS,   ici_ICMapFilename__doc__},
- {"ICMapTypeCreator",  (PyCFunction)ici_ICMapTypeCreator,      METH_VARARGS,   ici_ICMapTypeCreator__doc__},
-       {NULL,          NULL}           /* sentinel */
-};
-
-/* ---------- */
-
-
-static iciobject *
-newiciobject(OSType creator)
-{
-       iciobject *self;
-       OSStatus err;
-       
-       self = PyObject_NEW(iciobject, &Icitype);
-       if (self == NULL)
-               return NULL;
-       if ((err=ICStart(&self->inst, creator)) != 0 ) {
-               (void)PyMac_Error(err);
-               PyObject_DEL(self);
-               return NULL;
-       }
-       return self;
-}
-
-
-static void
-ici_dealloc(iciobject *self)
-{
-       (void)ICStop(self->inst);
-       PyObject_DEL(self);
-}
-
-static PyObject *
-ici_getattr(iciobject *self, char *name)
-{
-       return Py_FindMethod(ici_methods, (PyObject *)self, name);
-}
-
-static char Icitype__doc__[] = 
-"Internet Config instance"
-;
-
-static PyTypeObject Icitype = {
-       PyVarObject_HEAD_INIT(&PyType_Type, 0)
-       "icglue.ic_instance",           /*tp_name*/
-       sizeof(iciobject),              /*tp_basicsize*/
-       0,                              /*tp_itemsize*/
-       /* methods */
-       (destructor)ici_dealloc,        /*tp_dealloc*/
-       (printfunc)0,           /*tp_print*/
-       (getattrfunc)ici_getattr,       /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc)0,             /*tp_compare*/
-       (reprfunc)0,            /*tp_repr*/
-       0,                      /*tp_as_number*/
-       0,              /*tp_as_sequence*/
-       0,              /*tp_as_mapping*/
-       (hashfunc)0,            /*tp_hash*/
-       (ternaryfunc)0,         /*tp_call*/
-       (reprfunc)0,            /*tp_str*/
-
-       /* Space for future expansion */
-       0L,0L,0L,0L,
-       Icitype__doc__ /* Documentation string */
-};
-
-/* End of code for ic_instance objects */
-/* -------------------------------------------------------- */
-
-
-static char ic_ICStart__doc__[] =
-"(OSType)->ic_instance; Create an Internet Config instance"
-;
-
-static PyObject *
-ic_ICStart(PyObject *self, PyObject *args)
-{
-       OSType creator;
-
-       if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &creator))
-               return NULL;
-       return (PyObject *)newiciobject(creator);
-}
-
-/* List of methods defined in the module */
-
-static struct PyMethodDef ic_methods[] = {
-       {"ICStart",     (PyCFunction)ic_ICStart,        METH_VARARGS,   ic_ICStart__doc__},
-       {NULL,   (PyCFunction)NULL, 0, NULL}            /* sentinel */
-};
-
-
-/* Initialization function for the module (*must* be called initicglue) */
-
-static char icglue_module_documentation[] = 
-"Implements low-level Internet Config interface"
-;
-
-void
-initicglue(void)
-{
-       PyObject *m, *d;
-
-       /* Create the module and add the functions */
-       m = Py_InitModule4("icglue", ic_methods,
-               icglue_module_documentation,
-               (PyObject*)NULL,PYTHON_API_VERSION);
-
-       /* Add some symbolic constants to the module */
-       d = PyModule_GetDict(m);
-       ErrorObject = PyMac_GetOSErrException();
-       if (ErrorObject == NULL ||
-           PyDict_SetItemString(d, "error", ErrorObject) != 0)
-               return;
-
-       /* XXXX Add constants here */
-       
-       /* Check for errors */
-       if (PyErr_Occurred())
-               Py_FatalError("can't initialize module icglue");
-}
-
diff --git a/Mac/Modules/icn/_Icnmodule.c b/Mac/Modules/icn/_Icnmodule.c
deleted file mode 100644 (file)
index 2b43ed4..0000000
+++ /dev/null
@@ -1,1599 +0,0 @@
-
-/* ========================== Module _Icn =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-
-static PyObject *Icn_Error;
-
-static PyObject *Icn_GetCIcon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CIconHandle _rv;
-       SInt16 iconID;
-#ifndef GetCIcon
-       PyMac_PRECHECK(GetCIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &iconID))
-               return NULL;
-       _rv = GetCIcon(iconID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Icn_PlotCIcon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect theRect;
-       CIconHandle theIcon;
-#ifndef PlotCIcon
-       PyMac_PRECHECK(PlotCIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &theRect,
-                             ResObj_Convert, &theIcon))
-               return NULL;
-       PlotCIcon(&theRect,
-                 theIcon);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_DisposeCIcon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CIconHandle theIcon;
-#ifndef DisposeCIcon
-       PyMac_PRECHECK(DisposeCIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theIcon))
-               return NULL;
-       DisposeCIcon(theIcon);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_GetIcon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       SInt16 iconID;
-#ifndef GetIcon
-       PyMac_PRECHECK(GetIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &iconID))
-               return NULL;
-       _rv = GetIcon(iconID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Icn_PlotIcon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect theRect;
-       Handle theIcon;
-#ifndef PlotIcon
-       PyMac_PRECHECK(PlotIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &theRect,
-                             ResObj_Convert, &theIcon))
-               return NULL;
-       PlotIcon(&theRect,
-                theIcon);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_PlotIconID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect theRect;
-       IconAlignmentType align;
-       IconTransformType transform;
-       SInt16 theResID;
-#ifndef PlotIconID
-       PyMac_PRECHECK(PlotIconID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhh",
-                             PyMac_GetRect, &theRect,
-                             &align,
-                             &transform,
-                             &theResID))
-               return NULL;
-       _err = PlotIconID(&theRect,
-                         align,
-                         transform,
-                         theResID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_NewIconSuite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconSuiteRef theIconSuite;
-#ifndef NewIconSuite
-       PyMac_PRECHECK(NewIconSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = NewIconSuite(&theIconSuite);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theIconSuite);
-       return _res;
-}
-
-static PyObject *Icn_AddIconToSuite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle theIconData;
-       IconSuiteRef theSuite;
-       ResType theType;
-#ifndef AddIconToSuite
-       PyMac_PRECHECK(AddIconToSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &theIconData,
-                             ResObj_Convert, &theSuite,
-                             PyMac_GetOSType, &theType))
-               return NULL;
-       _err = AddIconToSuite(theIconData,
-                             theSuite,
-                             theType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_GetIconFromSuite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle theIconData;
-       IconSuiteRef theSuite;
-       ResType theType;
-#ifndef GetIconFromSuite
-       PyMac_PRECHECK(GetIconFromSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &theSuite,
-                             PyMac_GetOSType, &theType))
-               return NULL;
-       _err = GetIconFromSuite(&theIconData,
-                               theSuite,
-                               theType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theIconData);
-       return _res;
-}
-
-static PyObject *Icn_GetIconSuite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconSuiteRef theIconSuite;
-       SInt16 theResID;
-       IconSelectorValue selector;
-#ifndef GetIconSuite
-       PyMac_PRECHECK(GetIconSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &theResID,
-                             &selector))
-               return NULL;
-       _err = GetIconSuite(&theIconSuite,
-                           theResID,
-                           selector);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theIconSuite);
-       return _res;
-}
-
-static PyObject *Icn_DisposeIconSuite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconSuiteRef theIconSuite;
-       Boolean disposeData;
-#ifndef DisposeIconSuite
-       PyMac_PRECHECK(DisposeIconSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             ResObj_Convert, &theIconSuite,
-                             &disposeData))
-               return NULL;
-       _err = DisposeIconSuite(theIconSuite,
-                               disposeData);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_PlotIconSuite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect theRect;
-       IconAlignmentType align;
-       IconTransformType transform;
-       IconSuiteRef theIconSuite;
-#ifndef PlotIconSuite
-       PyMac_PRECHECK(PlotIconSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhO&",
-                             PyMac_GetRect, &theRect,
-                             &align,
-                             &transform,
-                             ResObj_Convert, &theIconSuite))
-               return NULL;
-       _err = PlotIconSuite(&theRect,
-                            align,
-                            transform,
-                            theIconSuite);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_LoadIconCache(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect theRect;
-       IconAlignmentType align;
-       IconTransformType transform;
-       IconCacheRef theIconCache;
-#ifndef LoadIconCache
-       PyMac_PRECHECK(LoadIconCache);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhO&",
-                             PyMac_GetRect, &theRect,
-                             &align,
-                             &transform,
-                             ResObj_Convert, &theIconCache))
-               return NULL;
-       _err = LoadIconCache(&theRect,
-                            align,
-                            transform,
-                            theIconCache);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_GetLabel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 labelNumber;
-       RGBColor labelColor;
-       Str255 labelString;
-#ifndef GetLabel
-       PyMac_PRECHECK(GetLabel);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &labelNumber,
-                             PyMac_GetStr255, labelString))
-               return NULL;
-       _err = GetLabel(labelNumber,
-                       &labelColor,
-                       labelString);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &labelColor);
-       return _res;
-}
-
-static PyObject *Icn_PtInIconID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point testPt;
-       Rect iconRect;
-       IconAlignmentType align;
-       SInt16 iconID;
-#ifndef PtInIconID
-       PyMac_PRECHECK(PtInIconID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hh",
-                             PyMac_GetPoint, &testPt,
-                             PyMac_GetRect, &iconRect,
-                             &align,
-                             &iconID))
-               return NULL;
-       _rv = PtInIconID(testPt,
-                        &iconRect,
-                        align,
-                        iconID);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Icn_PtInIconSuite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point testPt;
-       Rect iconRect;
-       IconAlignmentType align;
-       IconSuiteRef theIconSuite;
-#ifndef PtInIconSuite
-       PyMac_PRECHECK(PtInIconSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hO&",
-                             PyMac_GetPoint, &testPt,
-                             PyMac_GetRect, &iconRect,
-                             &align,
-                             ResObj_Convert, &theIconSuite))
-               return NULL;
-       _rv = PtInIconSuite(testPt,
-                           &iconRect,
-                           align,
-                           theIconSuite);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Icn_RectInIconID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Rect testRect;
-       Rect iconRect;
-       IconAlignmentType align;
-       SInt16 iconID;
-#ifndef RectInIconID
-       PyMac_PRECHECK(RectInIconID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hh",
-                             PyMac_GetRect, &testRect,
-                             PyMac_GetRect, &iconRect,
-                             &align,
-                             &iconID))
-               return NULL;
-       _rv = RectInIconID(&testRect,
-                          &iconRect,
-                          align,
-                          iconID);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Icn_RectInIconSuite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Rect testRect;
-       Rect iconRect;
-       IconAlignmentType align;
-       IconSuiteRef theIconSuite;
-#ifndef RectInIconSuite
-       PyMac_PRECHECK(RectInIconSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hO&",
-                             PyMac_GetRect, &testRect,
-                             PyMac_GetRect, &iconRect,
-                             &align,
-                             ResObj_Convert, &theIconSuite))
-               return NULL;
-       _rv = RectInIconSuite(&testRect,
-                             &iconRect,
-                             align,
-                             theIconSuite);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Icn_IconIDToRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       RgnHandle theRgn;
-       Rect iconRect;
-       IconAlignmentType align;
-       SInt16 iconID;
-#ifndef IconIDToRgn
-       PyMac_PRECHECK(IconIDToRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hh",
-                             ResObj_Convert, &theRgn,
-                             PyMac_GetRect, &iconRect,
-                             &align,
-                             &iconID))
-               return NULL;
-       _err = IconIDToRgn(theRgn,
-                          &iconRect,
-                          align,
-                          iconID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_IconSuiteToRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       RgnHandle theRgn;
-       Rect iconRect;
-       IconAlignmentType align;
-       IconSuiteRef theIconSuite;
-#ifndef IconSuiteToRgn
-       PyMac_PRECHECK(IconSuiteToRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hO&",
-                             ResObj_Convert, &theRgn,
-                             PyMac_GetRect, &iconRect,
-                             &align,
-                             ResObj_Convert, &theIconSuite))
-               return NULL;
-       _err = IconSuiteToRgn(theRgn,
-                             &iconRect,
-                             align,
-                             theIconSuite);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_SetSuiteLabel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconSuiteRef theSuite;
-       SInt16 theLabel;
-#ifndef SetSuiteLabel
-       PyMac_PRECHECK(SetSuiteLabel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             ResObj_Convert, &theSuite,
-                             &theLabel))
-               return NULL;
-       _err = SetSuiteLabel(theSuite,
-                            theLabel);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_GetSuiteLabel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-       IconSuiteRef theSuite;
-#ifndef GetSuiteLabel
-       PyMac_PRECHECK(GetSuiteLabel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theSuite))
-               return NULL;
-       _rv = GetSuiteLabel(theSuite);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Icn_PlotIconHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect theRect;
-       IconAlignmentType align;
-       IconTransformType transform;
-       Handle theIcon;
-#ifndef PlotIconHandle
-       PyMac_PRECHECK(PlotIconHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhO&",
-                             PyMac_GetRect, &theRect,
-                             &align,
-                             &transform,
-                             ResObj_Convert, &theIcon))
-               return NULL;
-       _err = PlotIconHandle(&theRect,
-                             align,
-                             transform,
-                             theIcon);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_PlotSICNHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect theRect;
-       IconAlignmentType align;
-       IconTransformType transform;
-       Handle theSICN;
-#ifndef PlotSICNHandle
-       PyMac_PRECHECK(PlotSICNHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhO&",
-                             PyMac_GetRect, &theRect,
-                             &align,
-                             &transform,
-                             ResObj_Convert, &theSICN))
-               return NULL;
-       _err = PlotSICNHandle(&theRect,
-                             align,
-                             transform,
-                             theSICN);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_PlotCIconHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect theRect;
-       IconAlignmentType align;
-       IconTransformType transform;
-       CIconHandle theCIcon;
-#ifndef PlotCIconHandle
-       PyMac_PRECHECK(PlotCIconHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhO&",
-                             PyMac_GetRect, &theRect,
-                             &align,
-                             &transform,
-                             ResObj_Convert, &theCIcon))
-               return NULL;
-       _err = PlotCIconHandle(&theRect,
-                              align,
-                              transform,
-                              theCIcon);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_IconRefToIconFamily(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef theIconRef;
-       IconSelectorValue whichIcons;
-       IconFamilyHandle iconFamily;
-#ifndef IconRefToIconFamily
-       PyMac_PRECHECK(IconRefToIconFamily);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ResObj_Convert, &theIconRef,
-                             &whichIcons))
-               return NULL;
-       _err = IconRefToIconFamily(theIconRef,
-                                  whichIcons,
-                                  &iconFamily);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, iconFamily);
-       return _res;
-}
-
-static PyObject *Icn_IconFamilyToIconSuite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconFamilyHandle iconFamily;
-       IconSelectorValue whichIcons;
-       IconSuiteRef iconSuite;
-#ifndef IconFamilyToIconSuite
-       PyMac_PRECHECK(IconFamilyToIconSuite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ResObj_Convert, &iconFamily,
-                             &whichIcons))
-               return NULL;
-       _err = IconFamilyToIconSuite(iconFamily,
-                                    whichIcons,
-                                    &iconSuite);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, iconSuite);
-       return _res;
-}
-
-static PyObject *Icn_IconSuiteToIconFamily(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconSuiteRef iconSuite;
-       IconSelectorValue whichIcons;
-       IconFamilyHandle iconFamily;
-#ifndef IconSuiteToIconFamily
-       PyMac_PRECHECK(IconSuiteToIconFamily);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ResObj_Convert, &iconSuite,
-                             &whichIcons))
-               return NULL;
-       _err = IconSuiteToIconFamily(iconSuite,
-                                    whichIcons,
-                                    &iconFamily);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, iconFamily);
-       return _res;
-}
-
-static PyObject *Icn_SetIconFamilyData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconFamilyHandle iconFamily;
-       OSType iconType;
-       Handle h;
-#ifndef SetIconFamilyData
-       PyMac_PRECHECK(SetIconFamilyData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &iconFamily,
-                             PyMac_GetOSType, &iconType,
-                             ResObj_Convert, &h))
-               return NULL;
-       _err = SetIconFamilyData(iconFamily,
-                                iconType,
-                                h);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_GetIconFamilyData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconFamilyHandle iconFamily;
-       OSType iconType;
-       Handle h;
-#ifndef GetIconFamilyData
-       PyMac_PRECHECK(GetIconFamilyData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &iconFamily,
-                             PyMac_GetOSType, &iconType,
-                             ResObj_Convert, &h))
-               return NULL;
-       _err = GetIconFamilyData(iconFamily,
-                                iconType,
-                                h);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_GetIconRefOwners(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef theIconRef;
-       UInt16 owners;
-#ifndef GetIconRefOwners
-       PyMac_PRECHECK(GetIconRefOwners);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _err = GetIconRefOwners(theIconRef,
-                               &owners);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            owners);
-       return _res;
-}
-
-static PyObject *Icn_AcquireIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef theIconRef;
-#ifndef AcquireIconRef
-       PyMac_PRECHECK(AcquireIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _err = AcquireIconRef(theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_ReleaseIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef theIconRef;
-#ifndef ReleaseIconRef
-       PyMac_PRECHECK(ReleaseIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _err = ReleaseIconRef(theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_GetIconRefFromFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec theFile;
-       IconRef theIconRef;
-       SInt16 theLabel;
-#ifndef GetIconRefFromFile
-       PyMac_PRECHECK(GetIconRefFromFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSSpec, &theFile))
-               return NULL;
-       _err = GetIconRefFromFile(&theFile,
-                                 &theIconRef,
-                                 &theLabel);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&h",
-                            ResObj_New, theIconRef,
-                            theLabel);
-       return _res;
-}
-
-static PyObject *Icn_GetIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 vRefNum;
-       OSType creator;
-       OSType iconType;
-       IconRef theIconRef;
-#ifndef GetIconRef
-       PyMac_PRECHECK(GetIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&O&",
-                             &vRefNum,
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &iconType))
-               return NULL;
-       _err = GetIconRef(vRefNum,
-                         creator,
-                         iconType,
-                         &theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theIconRef);
-       return _res;
-}
-
-static PyObject *Icn_GetIconRefFromFolder(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 vRefNum;
-       SInt32 parentFolderID;
-       SInt32 folderID;
-       SInt8 attributes;
-       SInt8 accessPrivileges;
-       IconRef theIconRef;
-#ifndef GetIconRefFromFolder
-       PyMac_PRECHECK(GetIconRefFromFolder);
-#endif
-       if (!PyArg_ParseTuple(_args, "hllbb",
-                             &vRefNum,
-                             &parentFolderID,
-                             &folderID,
-                             &attributes,
-                             &accessPrivileges))
-               return NULL;
-       _err = GetIconRefFromFolder(vRefNum,
-                                   parentFolderID,
-                                   folderID,
-                                   attributes,
-                                   accessPrivileges,
-                                   &theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theIconRef);
-       return _res;
-}
-
-static PyObject *Icn_RegisterIconRefFromIconFamily(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType creator;
-       OSType iconType;
-       IconFamilyHandle iconFamily;
-       IconRef theIconRef;
-#ifndef RegisterIconRefFromIconFamily
-       PyMac_PRECHECK(RegisterIconRefFromIconFamily);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &iconType,
-                             ResObj_Convert, &iconFamily))
-               return NULL;
-       _err = RegisterIconRefFromIconFamily(creator,
-                                            iconType,
-                                            iconFamily,
-                                            &theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theIconRef);
-       return _res;
-}
-
-static PyObject *Icn_RegisterIconRefFromResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType creator;
-       OSType iconType;
-       FSSpec resourceFile;
-       SInt16 resourceID;
-       IconRef theIconRef;
-#ifndef RegisterIconRefFromResource
-       PyMac_PRECHECK(RegisterIconRefFromResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&h",
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &iconType,
-                             PyMac_GetFSSpec, &resourceFile,
-                             &resourceID))
-               return NULL;
-       _err = RegisterIconRefFromResource(creator,
-                                          iconType,
-                                          &resourceFile,
-                                          resourceID,
-                                          &theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theIconRef);
-       return _res;
-}
-
-static PyObject *Icn_RegisterIconRefFromFSRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType creator;
-       OSType iconType;
-       FSRef iconFile;
-       IconRef theIconRef;
-#ifndef RegisterIconRefFromFSRef
-       PyMac_PRECHECK(RegisterIconRefFromFSRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &iconType,
-                             PyMac_GetFSRef, &iconFile))
-               return NULL;
-       _err = RegisterIconRefFromFSRef(creator,
-                                       iconType,
-                                       &iconFile,
-                                       &theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theIconRef);
-       return _res;
-}
-
-static PyObject *Icn_UnregisterIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType creator;
-       OSType iconType;
-#ifndef UnregisterIconRef
-       PyMac_PRECHECK(UnregisterIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &iconType))
-               return NULL;
-       _err = UnregisterIconRef(creator,
-                                iconType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_UpdateIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef theIconRef;
-#ifndef UpdateIconRef
-       PyMac_PRECHECK(UpdateIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _err = UpdateIconRef(theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_OverrideIconRefFromResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef theIconRef;
-       FSSpec resourceFile;
-       SInt16 resourceID;
-#ifndef OverrideIconRefFromResource
-       PyMac_PRECHECK(OverrideIconRefFromResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             ResObj_Convert, &theIconRef,
-                             PyMac_GetFSSpec, &resourceFile,
-                             &resourceID))
-               return NULL;
-       _err = OverrideIconRefFromResource(theIconRef,
-                                          &resourceFile,
-                                          resourceID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_OverrideIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef oldIconRef;
-       IconRef newIconRef;
-#ifndef OverrideIconRef
-       PyMac_PRECHECK(OverrideIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &oldIconRef,
-                             ResObj_Convert, &newIconRef))
-               return NULL;
-       _err = OverrideIconRef(oldIconRef,
-                              newIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_RemoveIconRefOverride(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef theIconRef;
-#ifndef RemoveIconRefOverride
-       PyMac_PRECHECK(RemoveIconRefOverride);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _err = RemoveIconRefOverride(theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_CompositeIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef backgroundIconRef;
-       IconRef foregroundIconRef;
-       IconRef compositeIconRef;
-#ifndef CompositeIconRef
-       PyMac_PRECHECK(CompositeIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &backgroundIconRef,
-                             ResObj_Convert, &foregroundIconRef))
-               return NULL;
-       _err = CompositeIconRef(backgroundIconRef,
-                               foregroundIconRef,
-                               &compositeIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, compositeIconRef);
-       return _res;
-}
-
-static PyObject *Icn_IsIconRefComposite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconRef compositeIconRef;
-       IconRef backgroundIconRef;
-       IconRef foregroundIconRef;
-#ifndef IsIconRefComposite
-       PyMac_PRECHECK(IsIconRefComposite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &compositeIconRef))
-               return NULL;
-       _err = IsIconRefComposite(compositeIconRef,
-                                 &backgroundIconRef,
-                                 &foregroundIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            ResObj_New, backgroundIconRef,
-                            ResObj_New, foregroundIconRef);
-       return _res;
-}
-
-static PyObject *Icn_IsValidIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       IconRef theIconRef;
-#ifndef IsValidIconRef
-       PyMac_PRECHECK(IsValidIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _rv = IsValidIconRef(theIconRef);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Icn_PlotIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Rect theRect;
-       IconAlignmentType align;
-       IconTransformType transform;
-       IconServicesUsageFlags theIconServicesUsageFlags;
-       IconRef theIconRef;
-#ifndef PlotIconRef
-       PyMac_PRECHECK(PlotIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhlO&",
-                             PyMac_GetRect, &theRect,
-                             &align,
-                             &transform,
-                             &theIconServicesUsageFlags,
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _err = PlotIconRef(&theRect,
-                          align,
-                          transform,
-                          theIconServicesUsageFlags,
-                          theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_PtInIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point testPt;
-       Rect iconRect;
-       IconAlignmentType align;
-       IconServicesUsageFlags theIconServicesUsageFlags;
-       IconRef theIconRef;
-#ifndef PtInIconRef
-       PyMac_PRECHECK(PtInIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hlO&",
-                             PyMac_GetPoint, &testPt,
-                             PyMac_GetRect, &iconRect,
-                             &align,
-                             &theIconServicesUsageFlags,
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _rv = PtInIconRef(&testPt,
-                         &iconRect,
-                         align,
-                         theIconServicesUsageFlags,
-                         theIconRef);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Icn_RectInIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Rect testRect;
-       Rect iconRect;
-       IconAlignmentType align;
-       IconServicesUsageFlags iconServicesUsageFlags;
-       IconRef theIconRef;
-#ifndef RectInIconRef
-       PyMac_PRECHECK(RectInIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hlO&",
-                             PyMac_GetRect, &testRect,
-                             PyMac_GetRect, &iconRect,
-                             &align,
-                             &iconServicesUsageFlags,
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _rv = RectInIconRef(&testRect,
-                           &iconRect,
-                           align,
-                           iconServicesUsageFlags,
-                           theIconRef);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Icn_IconRefToRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       RgnHandle theRgn;
-       Rect iconRect;
-       IconAlignmentType align;
-       IconServicesUsageFlags iconServicesUsageFlags;
-       IconRef theIconRef;
-#ifndef IconRefToRgn
-       PyMac_PRECHECK(IconRefToRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hlO&",
-                             ResObj_Convert, &theRgn,
-                             PyMac_GetRect, &iconRect,
-                             &align,
-                             &iconServicesUsageFlags,
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _err = IconRefToRgn(theRgn,
-                           &iconRect,
-                           align,
-                           iconServicesUsageFlags,
-                           theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_GetIconSizesFromIconRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconSelectorValue iconSelectorInput;
-       IconSelectorValue iconSelectorOutputPtr;
-       IconServicesUsageFlags iconServicesUsageFlags;
-       IconRef theIconRef;
-#ifndef GetIconSizesFromIconRef
-       PyMac_PRECHECK(GetIconSizesFromIconRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "llO&",
-                             &iconSelectorInput,
-                             &iconServicesUsageFlags,
-                             ResObj_Convert, &theIconRef))
-               return NULL;
-       _err = GetIconSizesFromIconRef(iconSelectorInput,
-                                      &iconSelectorOutputPtr,
-                                      iconServicesUsageFlags,
-                                      theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            iconSelectorOutputPtr);
-       return _res;
-}
-
-static PyObject *Icn_FlushIconRefs(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType creator;
-       OSType iconType;
-#ifndef FlushIconRefs
-       PyMac_PRECHECK(FlushIconRefs);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &iconType))
-               return NULL;
-       _err = FlushIconRefs(creator,
-                            iconType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_FlushIconRefsByVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 vRefNum;
-#ifndef FlushIconRefsByVolume
-       PyMac_PRECHECK(FlushIconRefsByVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &vRefNum))
-               return NULL;
-       _err = FlushIconRefsByVolume(vRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_SetCustomIconsEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 vRefNum;
-       Boolean enableCustomIcons;
-#ifndef SetCustomIconsEnabled
-       PyMac_PRECHECK(SetCustomIconsEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &vRefNum,
-                             &enableCustomIcons))
-               return NULL;
-       _err = SetCustomIconsEnabled(vRefNum,
-                                    enableCustomIcons);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Icn_GetCustomIconsEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 vRefNum;
-       Boolean customIconsEnabled;
-#ifndef GetCustomIconsEnabled
-       PyMac_PRECHECK(GetCustomIconsEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &vRefNum))
-               return NULL;
-       _err = GetCustomIconsEnabled(vRefNum,
-                                    &customIconsEnabled);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            customIconsEnabled);
-       return _res;
-}
-
-static PyObject *Icn_IsIconRefMaskEmpty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       IconRef iconRef;
-#ifndef IsIconRefMaskEmpty
-       PyMac_PRECHECK(IsIconRefMaskEmpty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &iconRef))
-               return NULL;
-       _rv = IsIconRefMaskEmpty(iconRef);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Icn_GetIconRefVariant(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       IconRef _rv;
-       IconRef inIconRef;
-       OSType inVariant;
-       IconTransformType outTransform;
-#ifndef GetIconRefVariant
-       PyMac_PRECHECK(GetIconRefVariant);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &inIconRef,
-                             PyMac_GetOSType, &inVariant))
-               return NULL;
-       _rv = GetIconRefVariant(inIconRef,
-                               inVariant,
-                               &outTransform);
-       _res = Py_BuildValue("O&h",
-                            ResObj_New, _rv,
-                            outTransform);
-       return _res;
-}
-
-static PyObject *Icn_RegisterIconRefFromIconFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType creator;
-       OSType iconType;
-       FSSpec iconFile;
-       IconRef theIconRef;
-#ifndef RegisterIconRefFromIconFile
-       PyMac_PRECHECK(RegisterIconRefFromIconFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &iconType,
-                             PyMac_GetFSSpec, &iconFile))
-               return NULL;
-       _err = RegisterIconRefFromIconFile(creator,
-                                          iconType,
-                                          &iconFile,
-                                          &theIconRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, theIconRef);
-       return _res;
-}
-
-static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec iconFile;
-       IconFamilyHandle iconFamily;
-#ifndef ReadIconFile
-       PyMac_PRECHECK(ReadIconFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSSpec, &iconFile))
-               return NULL;
-       _err = ReadIconFile(&iconFile,
-                           &iconFamily);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, iconFamily);
-       return _res;
-}
-
-static PyObject *Icn_ReadIconFromFSRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSRef ref;
-       IconFamilyHandle iconFamily;
-#ifndef ReadIconFromFSRef
-       PyMac_PRECHECK(ReadIconFromFSRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSRef, &ref))
-               return NULL;
-       _err = ReadIconFromFSRef(&ref,
-                                &iconFamily);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, iconFamily);
-       return _res;
-}
-
-static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       IconFamilyHandle iconFamily;
-       FSSpec iconFile;
-#ifndef WriteIconFile
-       PyMac_PRECHECK(WriteIconFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &iconFamily,
-                             PyMac_GetFSSpec, &iconFile))
-               return NULL;
-       _err = WriteIconFile(iconFamily,
-                            &iconFile);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef Icn_methods[] = {
-       {"GetCIcon", (PyCFunction)Icn_GetCIcon, 1,
-        PyDoc_STR("(SInt16 iconID) -> (CIconHandle _rv)")},
-       {"PlotCIcon", (PyCFunction)Icn_PlotCIcon, 1,
-        PyDoc_STR("(Rect theRect, CIconHandle theIcon) -> None")},
-       {"DisposeCIcon", (PyCFunction)Icn_DisposeCIcon, 1,
-        PyDoc_STR("(CIconHandle theIcon) -> None")},
-       {"GetIcon", (PyCFunction)Icn_GetIcon, 1,
-        PyDoc_STR("(SInt16 iconID) -> (Handle _rv)")},
-       {"PlotIcon", (PyCFunction)Icn_PlotIcon, 1,
-        PyDoc_STR("(Rect theRect, Handle theIcon) -> None")},
-       {"PlotIconID", (PyCFunction)Icn_PlotIconID, 1,
-        PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, SInt16 theResID) -> None")},
-       {"NewIconSuite", (PyCFunction)Icn_NewIconSuite, 1,
-        PyDoc_STR("() -> (IconSuiteRef theIconSuite)")},
-       {"AddIconToSuite", (PyCFunction)Icn_AddIconToSuite, 1,
-        PyDoc_STR("(Handle theIconData, IconSuiteRef theSuite, ResType theType) -> None")},
-       {"GetIconFromSuite", (PyCFunction)Icn_GetIconFromSuite, 1,
-        PyDoc_STR("(IconSuiteRef theSuite, ResType theType) -> (Handle theIconData)")},
-       {"GetIconSuite", (PyCFunction)Icn_GetIconSuite, 1,
-        PyDoc_STR("(SInt16 theResID, IconSelectorValue selector) -> (IconSuiteRef theIconSuite)")},
-       {"DisposeIconSuite", (PyCFunction)Icn_DisposeIconSuite, 1,
-        PyDoc_STR("(IconSuiteRef theIconSuite, Boolean disposeData) -> None")},
-       {"PlotIconSuite", (PyCFunction)Icn_PlotIconSuite, 1,
-        PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, IconSuiteRef theIconSuite) -> None")},
-       {"LoadIconCache", (PyCFunction)Icn_LoadIconCache, 1,
-        PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, IconCacheRef theIconCache) -> None")},
-       {"GetLabel", (PyCFunction)Icn_GetLabel, 1,
-        PyDoc_STR("(SInt16 labelNumber, Str255 labelString) -> (RGBColor labelColor)")},
-       {"PtInIconID", (PyCFunction)Icn_PtInIconID, 1,
-        PyDoc_STR("(Point testPt, Rect iconRect, IconAlignmentType align, SInt16 iconID) -> (Boolean _rv)")},
-       {"PtInIconSuite", (PyCFunction)Icn_PtInIconSuite, 1,
-        PyDoc_STR("(Point testPt, Rect iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) -> (Boolean _rv)")},
-       {"RectInIconID", (PyCFunction)Icn_RectInIconID, 1,
-        PyDoc_STR("(Rect testRect, Rect iconRect, IconAlignmentType align, SInt16 iconID) -> (Boolean _rv)")},
-       {"RectInIconSuite", (PyCFunction)Icn_RectInIconSuite, 1,
-        PyDoc_STR("(Rect testRect, Rect iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) -> (Boolean _rv)")},
-       {"IconIDToRgn", (PyCFunction)Icn_IconIDToRgn, 1,
-        PyDoc_STR("(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, SInt16 iconID) -> None")},
-       {"IconSuiteToRgn", (PyCFunction)Icn_IconSuiteToRgn, 1,
-        PyDoc_STR("(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) -> None")},
-       {"SetSuiteLabel", (PyCFunction)Icn_SetSuiteLabel, 1,
-        PyDoc_STR("(IconSuiteRef theSuite, SInt16 theLabel) -> None")},
-       {"GetSuiteLabel", (PyCFunction)Icn_GetSuiteLabel, 1,
-        PyDoc_STR("(IconSuiteRef theSuite) -> (SInt16 _rv)")},
-       {"PlotIconHandle", (PyCFunction)Icn_PlotIconHandle, 1,
-        PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, Handle theIcon) -> None")},
-       {"PlotSICNHandle", (PyCFunction)Icn_PlotSICNHandle, 1,
-        PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, Handle theSICN) -> None")},
-       {"PlotCIconHandle", (PyCFunction)Icn_PlotCIconHandle, 1,
-        PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) -> None")},
-       {"IconRefToIconFamily", (PyCFunction)Icn_IconRefToIconFamily, 1,
-        PyDoc_STR("(IconRef theIconRef, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)")},
-       {"IconFamilyToIconSuite", (PyCFunction)Icn_IconFamilyToIconSuite, 1,
-        PyDoc_STR("(IconFamilyHandle iconFamily, IconSelectorValue whichIcons) -> (IconSuiteRef iconSuite)")},
-       {"IconSuiteToIconFamily", (PyCFunction)Icn_IconSuiteToIconFamily, 1,
-        PyDoc_STR("(IconSuiteRef iconSuite, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)")},
-       {"SetIconFamilyData", (PyCFunction)Icn_SetIconFamilyData, 1,
-        PyDoc_STR("(IconFamilyHandle iconFamily, OSType iconType, Handle h) -> None")},
-       {"GetIconFamilyData", (PyCFunction)Icn_GetIconFamilyData, 1,
-        PyDoc_STR("(IconFamilyHandle iconFamily, OSType iconType, Handle h) -> None")},
-       {"GetIconRefOwners", (PyCFunction)Icn_GetIconRefOwners, 1,
-        PyDoc_STR("(IconRef theIconRef) -> (UInt16 owners)")},
-       {"AcquireIconRef", (PyCFunction)Icn_AcquireIconRef, 1,
-        PyDoc_STR("(IconRef theIconRef) -> None")},
-       {"ReleaseIconRef", (PyCFunction)Icn_ReleaseIconRef, 1,
-        PyDoc_STR("(IconRef theIconRef) -> None")},
-       {"GetIconRefFromFile", (PyCFunction)Icn_GetIconRefFromFile, 1,
-        PyDoc_STR("(FSSpec theFile) -> (IconRef theIconRef, SInt16 theLabel)")},
-       {"GetIconRef", (PyCFunction)Icn_GetIconRef, 1,
-        PyDoc_STR("(SInt16 vRefNum, OSType creator, OSType iconType) -> (IconRef theIconRef)")},
-       {"GetIconRefFromFolder", (PyCFunction)Icn_GetIconRefFromFolder, 1,
-        PyDoc_STR("(SInt16 vRefNum, SInt32 parentFolderID, SInt32 folderID, SInt8 attributes, SInt8 accessPrivileges) -> (IconRef theIconRef)")},
-       {"RegisterIconRefFromIconFamily", (PyCFunction)Icn_RegisterIconRefFromIconFamily, 1,
-        PyDoc_STR("(OSType creator, OSType iconType, IconFamilyHandle iconFamily) -> (IconRef theIconRef)")},
-       {"RegisterIconRefFromResource", (PyCFunction)Icn_RegisterIconRefFromResource, 1,
-        PyDoc_STR("(OSType creator, OSType iconType, FSSpec resourceFile, SInt16 resourceID) -> (IconRef theIconRef)")},
-       {"RegisterIconRefFromFSRef", (PyCFunction)Icn_RegisterIconRefFromFSRef, 1,
-        PyDoc_STR("(OSType creator, OSType iconType, FSRef iconFile) -> (IconRef theIconRef)")},
-       {"UnregisterIconRef", (PyCFunction)Icn_UnregisterIconRef, 1,
-        PyDoc_STR("(OSType creator, OSType iconType) -> None")},
-       {"UpdateIconRef", (PyCFunction)Icn_UpdateIconRef, 1,
-        PyDoc_STR("(IconRef theIconRef) -> None")},
-       {"OverrideIconRefFromResource", (PyCFunction)Icn_OverrideIconRefFromResource, 1,
-        PyDoc_STR("(IconRef theIconRef, FSSpec resourceFile, SInt16 resourceID) -> None")},
-       {"OverrideIconRef", (PyCFunction)Icn_OverrideIconRef, 1,
-        PyDoc_STR("(IconRef oldIconRef, IconRef newIconRef) -> None")},
-       {"RemoveIconRefOverride", (PyCFunction)Icn_RemoveIconRefOverride, 1,
-        PyDoc_STR("(IconRef theIconRef) -> None")},
-       {"CompositeIconRef", (PyCFunction)Icn_CompositeIconRef, 1,
-        PyDoc_STR("(IconRef backgroundIconRef, IconRef foregroundIconRef) -> (IconRef compositeIconRef)")},
-       {"IsIconRefComposite", (PyCFunction)Icn_IsIconRefComposite, 1,
-        PyDoc_STR("(IconRef compositeIconRef) -> (IconRef backgroundIconRef, IconRef foregroundIconRef)")},
-       {"IsValidIconRef", (PyCFunction)Icn_IsValidIconRef, 1,
-        PyDoc_STR("(IconRef theIconRef) -> (Boolean _rv)")},
-       {"PlotIconRef", (PyCFunction)Icn_PlotIconRef, 1,
-        PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) -> None")},
-       {"PtInIconRef", (PyCFunction)Icn_PtInIconRef, 1,
-        PyDoc_STR("(Point testPt, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) -> (Boolean _rv)")},
-       {"RectInIconRef", (PyCFunction)Icn_RectInIconRef, 1,
-        PyDoc_STR("(Rect testRect, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> (Boolean _rv)")},
-       {"IconRefToRgn", (PyCFunction)Icn_IconRefToRgn, 1,
-        PyDoc_STR("(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> None")},
-       {"GetIconSizesFromIconRef", (PyCFunction)Icn_GetIconSizesFromIconRef, 1,
-        PyDoc_STR("(IconSelectorValue iconSelectorInput, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> (IconSelectorValue iconSelectorOutputPtr)")},
-       {"FlushIconRefs", (PyCFunction)Icn_FlushIconRefs, 1,
-        PyDoc_STR("(OSType creator, OSType iconType) -> None")},
-       {"FlushIconRefsByVolume", (PyCFunction)Icn_FlushIconRefsByVolume, 1,
-        PyDoc_STR("(SInt16 vRefNum) -> None")},
-       {"SetCustomIconsEnabled", (PyCFunction)Icn_SetCustomIconsEnabled, 1,
-        PyDoc_STR("(SInt16 vRefNum, Boolean enableCustomIcons) -> None")},
-       {"GetCustomIconsEnabled", (PyCFunction)Icn_GetCustomIconsEnabled, 1,
-        PyDoc_STR("(SInt16 vRefNum) -> (Boolean customIconsEnabled)")},
-       {"IsIconRefMaskEmpty", (PyCFunction)Icn_IsIconRefMaskEmpty, 1,
-        PyDoc_STR("(IconRef iconRef) -> (Boolean _rv)")},
-       {"GetIconRefVariant", (PyCFunction)Icn_GetIconRefVariant, 1,
-        PyDoc_STR("(IconRef inIconRef, OSType inVariant) -> (IconRef _rv, IconTransformType outTransform)")},
-       {"RegisterIconRefFromIconFile", (PyCFunction)Icn_RegisterIconRefFromIconFile, 1,
-        PyDoc_STR("(OSType creator, OSType iconType, FSSpec iconFile) -> (IconRef theIconRef)")},
-       {"ReadIconFile", (PyCFunction)Icn_ReadIconFile, 1,
-        PyDoc_STR("(FSSpec iconFile) -> (IconFamilyHandle iconFamily)")},
-       {"ReadIconFromFSRef", (PyCFunction)Icn_ReadIconFromFSRef, 1,
-        PyDoc_STR("(FSRef ref) -> (IconFamilyHandle iconFamily)")},
-       {"WriteIconFile", (PyCFunction)Icn_WriteIconFile, 1,
-        PyDoc_STR("(IconFamilyHandle iconFamily, FSSpec iconFile) -> None")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Icn(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_Icn", Icn_methods);
-       d = PyModule_GetDict(m);
-       Icn_Error = PyMac_GetOSErrException();
-       if (Icn_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Icn_Error) != 0)
-               return;
-}
-
-/* ======================== End module _Icn ========================= */
-
diff --git a/Mac/Modules/icn/icnscan.py b/Mac/Modules/icn/icnscan.py
deleted file mode 100644 (file)
index 217fb03..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "Icons"
-SHORT = "icn"
-OBJECT = "NOTUSED"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            # This is non-functional today
-            if t == OBJECT and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "GetIconCacheData",
-                "SetIconCacheData",
-                # Constants with funny definitions
-                "kSelectorAllHugeData",
-                "kSelectorAllAvailableData",
-                "svAllAvailableData",
-                # Something in a comment accidentally seen as a const definition
-                "err",
-                # OS8 only
-                'IconServicesTerminate',
-                # Lazy, right now.
-                "GetIconRefFromFileInfo"
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "IconActionUPP",
-                "IconGetterUPP",
-                "CFragInitBlockPtr",
-                "CGRect_ptr",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ]
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("from Carbon.Files import *\n")
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/icn/icnsupport.py b/Mac/Modules/icn/icnsupport.py
deleted file mode 100644 (file)
index e9a8b78..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Icons.h'               # The Apple header file
-MODNAME = '_Icn'                                # The name of the module
-OBJECTNAME = 'Icon'                     # The basic name of the objects used here
-KIND = 'Handle'                         # Usually 'Ptr' or 'Handle'
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Icn'                       # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + KIND          # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-CIconHandle = OpaqueByValueType("CIconHandle", "ResObj")
-IconSuiteRef = OpaqueByValueType("IconSuiteRef", "ResObj")
-IconCacheRef = OpaqueByValueType("IconCacheRef", "ResObj")
-IconRef = OpaqueByValueType("IconRef", "ResObj")
-IconFamilyHandle = OpaqueByValueType("IconFamilyHandle", "ResObj")
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-IconAlignmentType = Type("IconAlignmentType", "h")
-IconTransformType = Type("IconTransformType", "h")
-IconSelectorValue = Type("IconSelectorValue", "l")
-IconServicesUsageFlags = Type("IconServicesUsageFlags", "l")
-RGBColor = OpaqueType("RGBColor", "QdRGB")
-CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
-
-#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
-
-# RgnHandle = FakeType("(RgnHandle)0")
-# XXXX Should be next, but this will break a lot of code...
-# RgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
-
-# KeyMap = ArrayOutputBufferType("KeyMap")
-#MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
-#MacOSEventMask = Type("MacOSEventMask", "h") # Old-style
-#EventMask = Type("EventMask", "H")
-#EventKind = Type("EventKind", "H")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-"""
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-    def outputCheckConvertArg(self):
-        OutLbrace("if (DlgObj_Check(v))")
-        Output("*p_itself = ((WindowObject *)v)->ob_itself;")
-        Output("return 1;")
-        OutRbrace()
-        Out("""
-        if (v == Py_None) { *p_itself = NULL; return 1; }
-        if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }
-        """)
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-##object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-##module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-##Method = OSErrMethodGenerator
-
-# Create and populate the lists
-functions = []
-##methods = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-##for f in methods: object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/launch/_Launchmodule.c b/Mac/Modules/launch/_Launchmodule.c
deleted file mode 100644 (file)
index fac55ee..0000000
+++ /dev/null
@@ -1,473 +0,0 @@
-
-/* ========================= Module _Launch ========================= */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#if PY_VERSION_HEX < 0x02040000
-PyObject *PyMac_GetOSErrException(void);
-#endif
-
-#include <ApplicationServices/ApplicationServices.h>
-
-/*
-** Optional CFStringRef. None will pass NULL
-*/
-static int
-OptCFStringRefObj_Convert(PyObject *v, CFStringRef *spec)
-{
-        if (v == Py_None) {
-                *spec = NULL;
-                return 1;
-        }
-        return CFStringRefObj_Convert(v, spec);
-}
-
-PyObject *
-OptCFStringRefObj_New(CFStringRef it)
-{
-        if (it == NULL) {
-                Py_INCREF(Py_None);
-                return Py_None;
-        }
-        return CFStringRefObj_New(it);
-}
-
-/*
-** Convert LSItemInfoRecord to Python.
-*/
-PyObject *
-LSItemInfoRecord_New(LSItemInfoRecord *it)
-{
-        return Py_BuildValue("{s:is:O&s:O&s:O&s:O&s:i}",
-                "flags", it->flags,
-                "filetype", PyMac_BuildOSType, it->filetype,
-                "creator", PyMac_BuildOSType, it->creator,
-                "extension", OptCFStringRefObj_New, it->extension,
-                "iconFileName", OptCFStringRefObj_New, it->iconFileName,
-                "kindID", it->kindID);
-}
-
-static PyObject *Launch_Error;
-
-static PyObject *Launch_LSCopyItemInfoForRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSRef inItemRef;
-       LSRequestedInfo inWhichInfo;
-       LSItemInfoRecord outItemInfo;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetFSRef, &inItemRef,
-                             &inWhichInfo))
-               return NULL;
-       _err = LSCopyItemInfoForRef(&inItemRef,
-                                   inWhichInfo,
-                                   &outItemInfo);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            LSItemInfoRecord_New, &outItemInfo);
-       return _res;
-}
-
-static PyObject *Launch_LSCopyItemInfoForURL(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFURLRef inURL;
-       LSRequestedInfo inWhichInfo;
-       LSItemInfoRecord outItemInfo;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CFURLRefObj_Convert, &inURL,
-                             &inWhichInfo))
-               return NULL;
-       _err = LSCopyItemInfoForURL(inURL,
-                                   inWhichInfo,
-                                   &outItemInfo);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            LSItemInfoRecord_New, &outItemInfo);
-       return _res;
-}
-
-static PyObject *Launch_LSGetExtensionInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UniChar *inNameLen__in__;
-       UniCharCount inNameLen__len__;
-       int inNameLen__in_len__;
-       UniCharCount outExtStartIndex;
-       if (!PyArg_ParseTuple(_args, "u#",
-                             &inNameLen__in__, &inNameLen__in_len__))
-               return NULL;
-       inNameLen__len__ = inNameLen__in_len__;
-       _err = LSGetExtensionInfo(inNameLen__len__, inNameLen__in__,
-                                 &outExtStartIndex);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outExtStartIndex);
-       return _res;
-}
-
-static PyObject *Launch_LSCopyDisplayNameForRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSRef inRef;
-       CFStringRef outDisplayName;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSRef, &inRef))
-               return NULL;
-       _err = LSCopyDisplayNameForRef(&inRef,
-                                      &outDisplayName);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, outDisplayName);
-       return _res;
-}
-
-static PyObject *Launch_LSCopyDisplayNameForURL(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFURLRef inURL;
-       CFStringRef outDisplayName;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFURLRefObj_Convert, &inURL))
-               return NULL;
-       _err = LSCopyDisplayNameForURL(inURL,
-                                      &outDisplayName);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, outDisplayName);
-       return _res;
-}
-
-static PyObject *Launch_LSSetExtensionHiddenForRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSRef inRef;
-       Boolean inHide;
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetFSRef, &inRef,
-                             &inHide))
-               return NULL;
-       _err = LSSetExtensionHiddenForRef(&inRef,
-                                         inHide);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Launch_LSSetExtensionHiddenForURL(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFURLRef inURL;
-       Boolean inHide;
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CFURLRefObj_Convert, &inURL,
-                             &inHide))
-               return NULL;
-       _err = LSSetExtensionHiddenForURL(inURL,
-                                         inHide);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Launch_LSCopyKindStringForRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSRef inFSRef;
-       CFStringRef outKindString;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSRef, &inFSRef))
-               return NULL;
-       _err = LSCopyKindStringForRef(&inFSRef,
-                                     &outKindString);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, outKindString);
-       return _res;
-}
-
-static PyObject *Launch_LSCopyKindStringForURL(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFURLRef inURL;
-       CFStringRef outKindString;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFURLRefObj_Convert, &inURL))
-               return NULL;
-       _err = LSCopyKindStringForURL(inURL,
-                                     &outKindString);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, outKindString);
-       return _res;
-}
-
-static PyObject *Launch_LSGetApplicationForItem(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSRef inItemRef;
-       LSRolesMask inRoleMask;
-       FSRef outAppRef;
-       CFURLRef outAppURL;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetFSRef, &inItemRef,
-                             &inRoleMask))
-               return NULL;
-       _err = LSGetApplicationForItem(&inItemRef,
-                                      inRoleMask,
-                                      &outAppRef,
-                                      &outAppURL);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildFSRef, &outAppRef,
-                            CFURLRefObj_New, outAppURL);
-       return _res;
-}
-
-static PyObject *Launch_LSGetApplicationForInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType inType;
-       OSType inCreator;
-       CFStringRef inExtension;
-       LSRolesMask inRoleMask;
-       FSRef outAppRef;
-       CFURLRef outAppURL;
-       if (!PyArg_ParseTuple(_args, "O&O&O&l",
-                             PyMac_GetOSType, &inType,
-                             PyMac_GetOSType, &inCreator,
-                             OptCFStringRefObj_Convert, &inExtension,
-                             &inRoleMask))
-               return NULL;
-       _err = LSGetApplicationForInfo(inType,
-                                      inCreator,
-                                      inExtension,
-                                      inRoleMask,
-                                      &outAppRef,
-                                      &outAppURL);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildFSRef, &outAppRef,
-                            CFURLRefObj_New, outAppURL);
-       return _res;
-}
-
-static PyObject *Launch_LSGetApplicationForURL(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFURLRef inURL;
-       LSRolesMask inRoleMask;
-       FSRef outAppRef;
-       CFURLRef outAppURL;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CFURLRefObj_Convert, &inURL,
-                             &inRoleMask))
-               return NULL;
-       _err = LSGetApplicationForURL(inURL,
-                                     inRoleMask,
-                                     &outAppRef,
-                                     &outAppURL);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildFSRef, &outAppRef,
-                            CFURLRefObj_New, outAppURL);
-       return _res;
-}
-
-static PyObject *Launch_LSFindApplicationForInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType inCreator;
-       CFStringRef inBundleID;
-       CFStringRef inName;
-       FSRef outAppRef;
-       CFURLRef outAppURL;
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetOSType, &inCreator,
-                             OptCFStringRefObj_Convert, &inBundleID,
-                             OptCFStringRefObj_Convert, &inName))
-               return NULL;
-       _err = LSFindApplicationForInfo(inCreator,
-                                       inBundleID,
-                                       inName,
-                                       &outAppRef,
-                                       &outAppURL);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildFSRef, &outAppRef,
-                            CFURLRefObj_New, outAppURL);
-       return _res;
-}
-
-static PyObject *Launch_LSCanRefAcceptItem(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSRef inItemFSRef;
-       FSRef inTargetRef;
-       LSRolesMask inRoleMask;
-       LSAcceptanceFlags inFlags;
-       Boolean outAcceptsItem;
-       if (!PyArg_ParseTuple(_args, "O&O&ll",
-                             PyMac_GetFSRef, &inItemFSRef,
-                             PyMac_GetFSRef, &inTargetRef,
-                             &inRoleMask,
-                             &inFlags))
-               return NULL;
-       _err = LSCanRefAcceptItem(&inItemFSRef,
-                                 &inTargetRef,
-                                 inRoleMask,
-                                 inFlags,
-                                 &outAcceptsItem);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            outAcceptsItem);
-       return _res;
-}
-
-static PyObject *Launch_LSCanURLAcceptURL(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFURLRef inItemURL;
-       CFURLRef inTargetURL;
-       LSRolesMask inRoleMask;
-       LSAcceptanceFlags inFlags;
-       Boolean outAcceptsItem;
-       if (!PyArg_ParseTuple(_args, "O&O&ll",
-                             CFURLRefObj_Convert, &inItemURL,
-                             CFURLRefObj_Convert, &inTargetURL,
-                             &inRoleMask,
-                             &inFlags))
-               return NULL;
-       _err = LSCanURLAcceptURL(inItemURL,
-                                inTargetURL,
-                                inRoleMask,
-                                inFlags,
-                                &outAcceptsItem);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            outAcceptsItem);
-       return _res;
-}
-
-static PyObject *Launch_LSOpenFSRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSRef inRef;
-       FSRef outLaunchedRef;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSRef, &inRef))
-               return NULL;
-       _err = LSOpenFSRef(&inRef,
-                          &outLaunchedRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFSRef, &outLaunchedRef);
-       return _res;
-}
-
-static PyObject *Launch_LSOpenCFURLRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFURLRef inURL;
-       CFURLRef outLaunchedURL;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFURLRefObj_Convert, &inURL))
-               return NULL;
-       _err = LSOpenCFURLRef(inURL,
-                             &outLaunchedURL);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFURLRefObj_New, outLaunchedURL);
-       return _res;
-}
-
-static PyMethodDef Launch_methods[] = {
-       {"LSCopyItemInfoForRef", (PyCFunction)Launch_LSCopyItemInfoForRef, 1,
-        PyDoc_STR("(FSRef inItemRef, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
-       {"LSCopyItemInfoForURL", (PyCFunction)Launch_LSCopyItemInfoForURL, 1,
-        PyDoc_STR("(CFURLRef inURL, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
-       {"LSGetExtensionInfo", (PyCFunction)Launch_LSGetExtensionInfo, 1,
-        PyDoc_STR("(Buffer inNameLen) -> (UniCharCount outExtStartIndex)")},
-       {"LSCopyDisplayNameForRef", (PyCFunction)Launch_LSCopyDisplayNameForRef, 1,
-        PyDoc_STR("(FSRef inRef) -> (CFStringRef outDisplayName)")},
-       {"LSCopyDisplayNameForURL", (PyCFunction)Launch_LSCopyDisplayNameForURL, 1,
-        PyDoc_STR("(CFURLRef inURL) -> (CFStringRef outDisplayName)")},
-       {"LSSetExtensionHiddenForRef", (PyCFunction)Launch_LSSetExtensionHiddenForRef, 1,
-        PyDoc_STR("(FSRef inRef, Boolean inHide) -> None")},
-       {"LSSetExtensionHiddenForURL", (PyCFunction)Launch_LSSetExtensionHiddenForURL, 1,
-        PyDoc_STR("(CFURLRef inURL, Boolean inHide) -> None")},
-       {"LSCopyKindStringForRef", (PyCFunction)Launch_LSCopyKindStringForRef, 1,
-        PyDoc_STR("(FSRef inFSRef) -> (CFStringRef outKindString)")},
-       {"LSCopyKindStringForURL", (PyCFunction)Launch_LSCopyKindStringForURL, 1,
-        PyDoc_STR("(CFURLRef inURL) -> (CFStringRef outKindString)")},
-       {"LSGetApplicationForItem", (PyCFunction)Launch_LSGetApplicationForItem, 1,
-        PyDoc_STR("(FSRef inItemRef, LSRolesMask inRoleMask) -> (FSRef outAppRef, CFURLRef outAppURL)")},
-       {"LSGetApplicationForInfo", (PyCFunction)Launch_LSGetApplicationForInfo, 1,
-        PyDoc_STR("(OSType inType, OSType inCreator, CFStringRef inExtension, LSRolesMask inRoleMask) -> (FSRef outAppRef, CFURLRef outAppURL)")},
-       {"LSGetApplicationForURL", (PyCFunction)Launch_LSGetApplicationForURL, 1,
-        PyDoc_STR("(CFURLRef inURL, LSRolesMask inRoleMask) -> (FSRef outAppRef, CFURLRef outAppURL)")},
-       {"LSFindApplicationForInfo", (PyCFunction)Launch_LSFindApplicationForInfo, 1,
-        PyDoc_STR("(OSType inCreator, CFStringRef inBundleID, CFStringRef inName) -> (FSRef outAppRef, CFURLRef outAppURL)")},
-       {"LSCanRefAcceptItem", (PyCFunction)Launch_LSCanRefAcceptItem, 1,
-        PyDoc_STR("(FSRef inItemFSRef, FSRef inTargetRef, LSRolesMask inRoleMask, LSAcceptanceFlags inFlags) -> (Boolean outAcceptsItem)")},
-       {"LSCanURLAcceptURL", (PyCFunction)Launch_LSCanURLAcceptURL, 1,
-        PyDoc_STR("(CFURLRef inItemURL, CFURLRef inTargetURL, LSRolesMask inRoleMask, LSAcceptanceFlags inFlags) -> (Boolean outAcceptsItem)")},
-       {"LSOpenFSRef", (PyCFunction)Launch_LSOpenFSRef, 1,
-        PyDoc_STR("(FSRef inRef) -> (FSRef outLaunchedRef)")},
-       {"LSOpenCFURLRef", (PyCFunction)Launch_LSOpenCFURLRef, 1,
-        PyDoc_STR("(CFURLRef inURL) -> (CFURLRef outLaunchedURL)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Launch(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_Launch", Launch_methods);
-       d = PyModule_GetDict(m);
-       Launch_Error = PyMac_GetOSErrException();
-       if (Launch_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Launch_Error) != 0)
-               return;
-}
-
-/* ======================= End module _Launch ======================= */
-
diff --git a/Mac/Modules/launch/launchscan.py b/Mac/Modules/launch/launchscan.py
deleted file mode 100644 (file)
index 29adc12..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "LaunchServices"
-SHORT = "launch"
-OBJECT = "NOTUSED"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    scanner.gentypetest(SHORT+"typetest.py")
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            # This is non-functional today
-            if t == OBJECT and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("from Carbon.Files import *\n")
-        self.defsfile.write("kLSRequestAllInfo = -1\n")
-        self.defsfile.write("kLSRolesAll = -1\n")
-        self.defsfile.write("kLSUnknownType = FOUR_CHAR_CODE('\\0\\0\\0\\0')\n")
-        self.defsfile.write("kLSUnknownCreator = FOUR_CHAR_CODE('\\0\\0\\0\\0')\n")
-        self.defsfile.write("kLSInvalidExtensionIndex = -1\n")
-
-    def makeblacklistnames(self):
-        return [
-                "LSInit",
-                "LSTerm",
-                "kLSRequestAllInfo",
-                "kLSRolesAll",
-                "kLSInvalidExtensionIndex",
-                "kLSUnknownType",
-                "kLSUnknownCreator"
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "LSLaunchFSRefSpec_ptr",
-                "LSLaunchURLSpec_ptr",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                # LSGetApplicationForInfo
-                ([('CFStringRef', 'inExtension', 'InMode')],
-         [('OptCFStringRef', 'inExtension', 'InMode')]),
-
-                # LSFindApplicationForInfo
-                ([('CFStringRef', 'inBundleID', 'InMode')],
-         [('OptCFStringRef', 'inBundleID', 'InMode')]),
-                ([('CFStringRef', 'inName', 'InMode')],
-         [('OptCFStringRef', 'inName', 'InMode')]),
-
-                # Unicode filenames passed as length, buffer. LSGetExtensionInfo
-                ([('UniCharCount', '*', 'InMode'),
-                  ('UniChar_ptr', '*', 'InMode')],
-                 [('UnicodeReverseInBuffer', '*', 'InMode')]
-                ),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/launch/launchsupport.py b/Mac/Modules/launch/launchsupport.py
deleted file mode 100644 (file)
index 5faf4b3..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MODNAME = '_Launch'                             # The name of the module
-OBJECTNAME = 'UNUSED'                   # The basic name of the objects used here
-KIND = 'Record'                         # Usually 'Ptr' or 'Handle'
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Launch'                    # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + KIND          # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-LSAcceptanceFlags = Type("LSAcceptanceFlags", "l")
-LSInitializeFlags = Type("LSInitializeFlags", "l")
-LSRequestedInfo = Type("LSRequestedInfo", "l")
-LSRolesMask = Type("LSRolesMask", "l")
-UniCharCount = Type("UniCharCount", "l")
-OptCFStringRef = OpaqueByValueType("CFStringRef", "OptCFStringRefObj")
-LSItemInfoRecord = OpaqueType("LSItemInfoRecord", "LSItemInfoRecord")
-
-includestuff = includestuff + """
-#if PY_VERSION_HEX < 0x02040000
-PyObject *PyMac_GetOSErrException(void);
-#endif
-
-#include <ApplicationServices/ApplicationServices.h>
-
-/*
-** Optional CFStringRef. None will pass NULL
-*/
-static int
-OptCFStringRefObj_Convert(PyObject *v, CFStringRef *spec)
-{
-        if (v == Py_None) {
-                *spec = NULL;
-                return 1;
-        }
-        return CFStringRefObj_Convert(v, spec);
-}
-
-PyObject *
-OptCFStringRefObj_New(CFStringRef it)
-{
-        if (it == NULL) {
-                Py_INCREF(Py_None);
-                return Py_None;
-        }
-        return CFStringRefObj_New(it);
-}
-
-/*
-** Convert LSItemInfoRecord to Python.
-*/
-PyObject *
-LSItemInfoRecord_New(LSItemInfoRecord *it)
-{
-        return Py_BuildValue("{s:is:O&s:O&s:O&s:O&s:i}",
-                "flags", it->flags,
-                "filetype", PyMac_BuildOSType, it->filetype,
-                "creator", PyMac_BuildOSType, it->creator,
-                "extension", OptCFStringRefObj_New, it->extension,
-                "iconFileName", OptCFStringRefObj_New, it->iconFileName,
-                "kindID", it->kindID);
-}
-"""
-
-# From here on it's basically all boiler plate...
-exec(open(string.lower(MODPREFIX) + 'typetest.py').read())
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-##object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-##module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-##Method = OSErrMethodGenerator
-
-# Create and populate the lists
-functions = []
-##methods = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-##for f in methods: object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/launch/setup.py b/Mac/Modules/launch/setup.py
deleted file mode 100644 (file)
index 2054195..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# This is a temporary setup script to allow distribution of
-# MacPython 2.4 modules for MacPython 2.3.
-
-from distutils.core import Extension, setup
-
-setup(name="LaunchServices", version="0.2",
-        ext_modules=[
-                Extension('_Launch', ['_Launchmodule.c'],
-                extra_link_args=['-framework', 'ApplicationServices'])
-        ],
-        py_modules=['LaunchServices.Launch', 'LaunchServices.LaunchServices'],
-        package_dir={'LaunchServices':'../../../Lib/plat-mac/Carbon'}
-        )
diff --git a/Mac/Modules/list/_Listmodule.c b/Mac/Modules/list/_Listmodule.c
deleted file mode 100644 (file)
index 504ceff..0000000
+++ /dev/null
@@ -1,1129 +0,0 @@
-
-/* ========================== Module _List ========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_ListObj_New(ListHandle);
-extern int _ListObj_Convert(PyObject *, ListHandle *);
-
-#define ListObj_New _ListObj_New
-#define ListObj_Convert _ListObj_Convert
-#endif
-
-#define as_List(x) ((ListHandle)x)
-#define as_Resource(lh) ((Handle)lh)
-
-static ListDefUPP myListDefFunctionUPP;
-
-
-static PyObject *List_Error;
-
-/* ------------------------ Object type List ------------------------ */
-
-PyTypeObject List_Type;
-
-#define ListObj_Check(x) (Py_TYPE(x) == &List_Type || PyObject_TypeCheck((x), &List_Type))
-
-typedef struct ListObject {
-       PyObject_HEAD
-       ListHandle ob_itself;
-       PyObject *ob_ldef_func;
-       int ob_must_be_disposed;
-} ListObject;
-
-PyObject *ListObj_New(ListHandle itself)
-{
-       ListObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(List_Error,"Cannot create null List");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(ListObject, &List_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       it->ob_ldef_func = NULL;
-       it->ob_must_be_disposed = 1;
-       SetListRefCon(itself, (long)it);
-       return (PyObject *)it;
-}
-
-int ListObj_Convert(PyObject *v, ListHandle *p_itself)
-{
-       if (!ListObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "List required");
-               return 0;
-       }
-       *p_itself = ((ListObject *)v)->ob_itself;
-       return 1;
-}
-
-static void ListObj_dealloc(ListObject *self)
-{
-       Py_XDECREF(self->ob_ldef_func);
-       self->ob_ldef_func = NULL;
-       SetListRefCon(self->ob_itself, (long)0);
-       if (self->ob_must_be_disposed && self->ob_itself) LDispose(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *ListObj_LAddColumn(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       short count;
-       short colNum;
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &count,
-                             &colNum))
-               return NULL;
-       _rv = LAddColumn(count,
-                        colNum,
-                        _self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ListObj_LAddRow(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       short count;
-       short rowNum;
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &count,
-                             &rowNum))
-               return NULL;
-       _rv = LAddRow(count,
-                     rowNum,
-                     _self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ListObj_LDelColumn(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short count;
-       short colNum;
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &count,
-                             &colNum))
-               return NULL;
-       LDelColumn(count,
-                  colNum,
-                  _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LDelRow(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short count;
-       short rowNum;
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &count,
-                             &rowNum))
-               return NULL;
-       LDelRow(count,
-               rowNum,
-               _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LGetSelect(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Boolean next;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "bO&",
-                             &next,
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       _rv = LGetSelect(next,
-                        &theCell,
-                        _self->ob_itself);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildPoint, theCell);
-       return _res;
-}
-
-static PyObject *ListObj_LLastClick(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LLastClick(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, _rv);
-       return _res;
-}
-
-static PyObject *ListObj_LNextCell(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Boolean hNext;
-       Boolean vNext;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "bbO&",
-                             &hNext,
-                             &vNext,
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       _rv = LNextCell(hNext,
-                       vNext,
-                       &theCell,
-                       _self->ob_itself);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildPoint, theCell);
-       return _res;
-}
-
-static PyObject *ListObj_LSize(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short listWidth;
-       short listHeight;
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &listWidth,
-                             &listHeight))
-               return NULL;
-       LSize(listWidth,
-             listHeight,
-             _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LSetDrawingMode(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean drawIt;
-       if (!PyArg_ParseTuple(_args, "b",
-                             &drawIt))
-               return NULL;
-       LSetDrawingMode(drawIt,
-                       _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LScroll(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short dCols;
-       short dRows;
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &dCols,
-                             &dRows))
-               return NULL;
-       LScroll(dCols,
-               dRows,
-               _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LAutoScroll(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       LAutoScroll(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LUpdate(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle theRgn;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theRgn))
-               return NULL;
-       LUpdate(theRgn,
-               _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LActivate(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean act;
-       if (!PyArg_ParseTuple(_args, "b",
-                             &act))
-               return NULL;
-       LActivate(act,
-                 _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LCellSize(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point cSize;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &cSize))
-               return NULL;
-       LCellSize(cSize,
-                 _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LClick(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point pt;
-       EventModifiers modifiers;
-       if (!PyArg_ParseTuple(_args, "O&H",
-                             PyMac_GetPoint, &pt,
-                             &modifiers))
-               return NULL;
-       _rv = LClick(pt,
-                    modifiers,
-                    _self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ListObj_LAddToCell(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *dataPtr__in__;
-       short dataPtr__len__;
-       int dataPtr__in_len__;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "s#O&",
-                             &dataPtr__in__, &dataPtr__in_len__,
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       LAddToCell(dataPtr__in__, dataPtr__len__,
-                  theCell,
-                  _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LClrCell(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       LClrCell(theCell,
-                _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LGetCell(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *dataPtr__out__;
-       short dataPtr__len__;
-       int dataPtr__in_len__;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "iO&",
-                             &dataPtr__in_len__,
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
-       {
-               PyErr_NoMemory();
-               goto dataPtr__error__;
-       }
-       dataPtr__len__ = dataPtr__in_len__;
-       LGetCell(dataPtr__out__, &dataPtr__len__,
-                theCell,
-                _self->ob_itself);
-       _res = Py_BuildValue("s#",
-                            dataPtr__out__, (int)dataPtr__len__);
-       free(dataPtr__out__);
- dataPtr__error__: ;
-       return _res;
-}
-
-static PyObject *ListObj_LRect(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect cellRect;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       LRect(&cellRect,
-             theCell,
-             _self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &cellRect);
-       return _res;
-}
-
-static PyObject *ListObj_LSetCell(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *dataPtr__in__;
-       short dataPtr__len__;
-       int dataPtr__in_len__;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "s#O&",
-                             &dataPtr__in__, &dataPtr__in_len__,
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       dataPtr__len__ = dataPtr__in_len__;
-       LSetCell(dataPtr__in__, dataPtr__len__,
-                theCell,
-                _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LSetSelect(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean setIt;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "bO&",
-                             &setIt,
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       LSetSelect(setIt,
-                  theCell,
-                  _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LDraw(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       LDraw(theCell,
-             _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ListObj_LGetCellDataLocation(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short offset;
-       short len;
-       Point theCell;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &theCell))
-               return NULL;
-       LGetCellDataLocation(&offset,
-                            &len,
-                            theCell,
-                            _self->ob_itself);
-       _res = Py_BuildValue("hh",
-                            offset,
-                            len);
-       return _res;
-}
-
-static PyObject *ListObj_GetListPort(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListPort(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListVerticalScrollBar(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlHandle _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListVerticalScrollBar(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListHorizontalScrollBar(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ControlHandle _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListHorizontalScrollBar(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CtlObj_New, _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListActive(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListActive(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListClickTime(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListClickTime(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListRefCon(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListRefCon(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListDefinition(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListDefinition(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListUserHandle(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListUserHandle(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListDataHandle(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DataHandle _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListDataHandle(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListFlags(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OptionBits _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListFlags(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ListObj_GetListSelectionFlags(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OptionBits _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetListSelectionFlags(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ListObj_as_Resource(ListObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = as_Resource(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyMethodDef ListObj_methods[] = {
-       {"LAddColumn", (PyCFunction)ListObj_LAddColumn, 1,
-        PyDoc_STR("(short count, short colNum) -> (short _rv)")},
-       {"LAddRow", (PyCFunction)ListObj_LAddRow, 1,
-        PyDoc_STR("(short count, short rowNum) -> (short _rv)")},
-       {"LDelColumn", (PyCFunction)ListObj_LDelColumn, 1,
-        PyDoc_STR("(short count, short colNum) -> None")},
-       {"LDelRow", (PyCFunction)ListObj_LDelRow, 1,
-        PyDoc_STR("(short count, short rowNum) -> None")},
-       {"LGetSelect", (PyCFunction)ListObj_LGetSelect, 1,
-        PyDoc_STR("(Boolean next, Point theCell) -> (Boolean _rv, Point theCell)")},
-       {"LLastClick", (PyCFunction)ListObj_LLastClick, 1,
-        PyDoc_STR("() -> (Point _rv)")},
-       {"LNextCell", (PyCFunction)ListObj_LNextCell, 1,
-        PyDoc_STR("(Boolean hNext, Boolean vNext, Point theCell) -> (Boolean _rv, Point theCell)")},
-       {"LSize", (PyCFunction)ListObj_LSize, 1,
-        PyDoc_STR("(short listWidth, short listHeight) -> None")},
-       {"LSetDrawingMode", (PyCFunction)ListObj_LSetDrawingMode, 1,
-        PyDoc_STR("(Boolean drawIt) -> None")},
-       {"LScroll", (PyCFunction)ListObj_LScroll, 1,
-        PyDoc_STR("(short dCols, short dRows) -> None")},
-       {"LAutoScroll", (PyCFunction)ListObj_LAutoScroll, 1,
-        PyDoc_STR("() -> None")},
-       {"LUpdate", (PyCFunction)ListObj_LUpdate, 1,
-        PyDoc_STR("(RgnHandle theRgn) -> None")},
-       {"LActivate", (PyCFunction)ListObj_LActivate, 1,
-        PyDoc_STR("(Boolean act) -> None")},
-       {"LCellSize", (PyCFunction)ListObj_LCellSize, 1,
-        PyDoc_STR("(Point cSize) -> None")},
-       {"LClick", (PyCFunction)ListObj_LClick, 1,
-        PyDoc_STR("(Point pt, EventModifiers modifiers) -> (Boolean _rv)")},
-       {"LAddToCell", (PyCFunction)ListObj_LAddToCell, 1,
-        PyDoc_STR("(Buffer dataPtr, Point theCell) -> None")},
-       {"LClrCell", (PyCFunction)ListObj_LClrCell, 1,
-        PyDoc_STR("(Point theCell) -> None")},
-       {"LGetCell", (PyCFunction)ListObj_LGetCell, 1,
-        PyDoc_STR("(Buffer dataPtr, Point theCell) -> (Buffer dataPtr)")},
-       {"LRect", (PyCFunction)ListObj_LRect, 1,
-        PyDoc_STR("(Point theCell) -> (Rect cellRect)")},
-       {"LSetCell", (PyCFunction)ListObj_LSetCell, 1,
-        PyDoc_STR("(Buffer dataPtr, Point theCell) -> None")},
-       {"LSetSelect", (PyCFunction)ListObj_LSetSelect, 1,
-        PyDoc_STR("(Boolean setIt, Point theCell) -> None")},
-       {"LDraw", (PyCFunction)ListObj_LDraw, 1,
-        PyDoc_STR("(Point theCell) -> None")},
-       {"LGetCellDataLocation", (PyCFunction)ListObj_LGetCellDataLocation, 1,
-        PyDoc_STR("(Point theCell) -> (short offset, short len)")},
-       {"GetListPort", (PyCFunction)ListObj_GetListPort, 1,
-        PyDoc_STR("() -> (CGrafPtr _rv)")},
-       {"GetListVerticalScrollBar", (PyCFunction)ListObj_GetListVerticalScrollBar, 1,
-        PyDoc_STR("() -> (ControlHandle _rv)")},
-       {"GetListHorizontalScrollBar", (PyCFunction)ListObj_GetListHorizontalScrollBar, 1,
-        PyDoc_STR("() -> (ControlHandle _rv)")},
-       {"GetListActive", (PyCFunction)ListObj_GetListActive, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"GetListClickTime", (PyCFunction)ListObj_GetListClickTime, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"GetListRefCon", (PyCFunction)ListObj_GetListRefCon, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"GetListDefinition", (PyCFunction)ListObj_GetListDefinition, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"GetListUserHandle", (PyCFunction)ListObj_GetListUserHandle, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"GetListDataHandle", (PyCFunction)ListObj_GetListDataHandle, 1,
-        PyDoc_STR("() -> (DataHandle _rv)")},
-       {"GetListFlags", (PyCFunction)ListObj_GetListFlags, 1,
-        PyDoc_STR("() -> (OptionBits _rv)")},
-       {"GetListSelectionFlags", (PyCFunction)ListObj_GetListSelectionFlags, 1,
-        PyDoc_STR("() -> (OptionBits _rv)")},
-       {"as_Resource", (PyCFunction)ListObj_as_Resource, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {NULL, NULL, 0}
-};
-
-static PyObject *ListObj_get_listFlags(ListObject *self, void *closure)
-{
-       return Py_BuildValue("l", (long)GetListFlags(self->ob_itself) & 0xff);
-}
-
-static int ListObj_set_listFlags(ListObject *self, PyObject *v, void *closure)
-{
-       if (!PyArg_Parse(v, "B", &(*self->ob_itself)->listFlags)) return -1;
-       return 0;
-}
-
-static PyObject *ListObj_get_selFlags(ListObject *self, void *closure)
-{
-       return Py_BuildValue("l", (long)GetListSelectionFlags(self->ob_itself) & 0xff);
-}
-
-static int ListObj_set_selFlags(ListObject *self, PyObject *v, void *closure)
-{
-       if (!PyArg_Parse(v, "B", &(*self->ob_itself)->selFlags)) return -1;
-       return 0;
-}
-
-static PyObject *ListObj_get_cellSize(ListObject *self, void *closure)
-{
-       return Py_BuildValue("O&", PyMac_BuildPoint, (*self->ob_itself)->cellSize);
-}
-
-static int ListObj_set_cellSize(ListObject *self, PyObject *v, void *closure)
-{
-       if (!PyArg_Parse(v, "O&", PyMac_GetPoint, &(*self->ob_itself)->cellSize)) return -1;
-       return 0;
-}
-
-static PyGetSetDef ListObj_getsetlist[] = {
-       {"listFlags", (getter)ListObj_get_listFlags, (setter)ListObj_set_listFlags, NULL},
-       {"selFlags", (getter)ListObj_get_selFlags, (setter)ListObj_set_selFlags, NULL},
-       {"cellSize", (getter)ListObj_get_cellSize, (setter)ListObj_set_cellSize, NULL},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define ListObj_compare NULL
-
-#define ListObj_repr NULL
-
-#define ListObj_hash NULL
-#define ListObj_tp_init 0
-
-#define ListObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *ListObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       ListHandle itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, ListObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((ListObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define ListObj_tp_free PyObject_Del
-
-
-PyTypeObject List_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_List.List", /*tp_name*/
-       sizeof(ListObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) ListObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) ListObj_compare, /*tp_compare*/
-       (reprfunc) ListObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) ListObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       ListObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       ListObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       ListObj_tp_init, /* tp_init */
-       ListObj_tp_alloc, /* tp_alloc */
-       ListObj_tp_new, /* tp_new */
-       ListObj_tp_free, /* tp_free */
-};
-
-/* ---------------------- End object type List ---------------------- */
-
-
-static PyObject *List_CreateCustomList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect rView;
-       Rect dataBounds;
-       Point cellSize;
-
-       PyObject *listDefFunc;
-       ListDefSpec theSpec;
-       WindowPtr theWindow;
-       Boolean drawIt;
-       Boolean hasGrow;
-       Boolean scrollHoriz;
-       Boolean scrollVert;
-       ListHandle outList;
-
-       if (!PyArg_ParseTuple(_args, "O&O&O&(iO)O&bbbb",
-                             PyMac_GetRect, &rView,
-                             PyMac_GetRect, &dataBounds,
-                             PyMac_GetPoint, &cellSize,
-                             &theSpec.defType, &listDefFunc,
-                             WinObj_Convert, &theWindow,
-                             &drawIt,
-                             &hasGrow,
-                             &scrollHoriz,
-                             &scrollVert))
-               return NULL;
-
-
-       /* Carbon applications use the CreateCustomList API */
-       theSpec.u.userProc = myListDefFunctionUPP;
-       CreateCustomList(&rView,
-                        &dataBounds,
-                        cellSize,
-                        &theSpec,
-                        theWindow,
-                        drawIt,
-                        hasGrow,
-                        scrollHoriz,
-                        scrollVert,
-                        &outList);
-
-
-       _res = ListObj_New(outList);
-       if (_res == NULL)
-               return NULL;
-       Py_INCREF(listDefFunc);
-       ((ListObject*)_res)->ob_ldef_func = listDefFunc;
-       return _res;
-}
-
-static PyObject *List_LNew(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ListHandle _rv;
-       Rect rView;
-       Rect dataBounds;
-       Point cSize;
-       short theProc;
-       WindowPtr theWindow;
-       Boolean drawIt;
-       Boolean hasGrow;
-       Boolean scrollHoriz;
-       Boolean scrollVert;
-       if (!PyArg_ParseTuple(_args, "O&O&O&hO&bbbb",
-                             PyMac_GetRect, &rView,
-                             PyMac_GetRect, &dataBounds,
-                             PyMac_GetPoint, &cSize,
-                             &theProc,
-                             WinObj_Convert, &theWindow,
-                             &drawIt,
-                             &hasGrow,
-                             &scrollHoriz,
-                             &scrollVert))
-               return NULL;
-       _rv = LNew(&rView,
-                  &dataBounds,
-                  cSize,
-                  theProc,
-                  theWindow,
-                  drawIt,
-                  hasGrow,
-                  scrollHoriz,
-                  scrollVert);
-       _res = Py_BuildValue("O&",
-                            ListObj_New, _rv);
-       return _res;
-}
-
-static PyObject *List_SetListViewBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ListHandle list;
-       Rect view;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ListObj_Convert, &list,
-                             PyMac_GetRect, &view))
-               return NULL;
-       SetListViewBounds(list,
-                         &view);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *List_SetListPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ListHandle list;
-       CGrafPtr port;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ListObj_Convert, &list,
-                             GrafObj_Convert, &port))
-               return NULL;
-       SetListPort(list,
-                   port);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *List_SetListCellIndent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ListHandle list;
-       Point indent;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ListObj_Convert, &list,
-                             PyMac_GetPoint, &indent))
-               return NULL;
-       SetListCellIndent(list,
-                         &indent);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *List_SetListClickTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ListHandle list;
-       SInt32 time;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ListObj_Convert, &list,
-                             &time))
-               return NULL;
-       SetListClickTime(list,
-                        time);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *List_SetListRefCon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ListHandle list;
-       SInt32 refCon;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ListObj_Convert, &list,
-                             &refCon))
-               return NULL;
-       SetListRefCon(list,
-                     refCon);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *List_SetListUserHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ListHandle list;
-       Handle userHandle;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ListObj_Convert, &list,
-                             ResObj_Convert, &userHandle))
-               return NULL;
-       SetListUserHandle(list,
-                         userHandle);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *List_SetListFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ListHandle list;
-       OptionBits listFlags;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ListObj_Convert, &list,
-                             &listFlags))
-               return NULL;
-       SetListFlags(list,
-                    listFlags);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *List_SetListSelectionFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ListHandle list;
-       OptionBits selectionFlags;
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ListObj_Convert, &list,
-                             &selectionFlags))
-               return NULL;
-       SetListSelectionFlags(list,
-                             selectionFlags);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *List_as_List(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       Handle h;
-       ListObject *l;
-       if (!PyArg_ParseTuple(_args, "O&", ResObj_Convert, &h))
-               return NULL;
-       l = (ListObject *)ListObj_New(as_List(h));
-       l->ob_must_be_disposed = 0;
-       _res = Py_BuildValue("O", l);
-       return _res;
-
-}
-
-static PyMethodDef List_methods[] = {
-       {"CreateCustomList", (PyCFunction)List_CreateCustomList, 1,
-        PyDoc_STR("(Rect rView, Rect dataBounds, Point cellSize, ListDefSpec theSpec, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle outList)")},
-       {"LNew", (PyCFunction)List_LNew, 1,
-        PyDoc_STR("(Rect rView, Rect dataBounds, Point cSize, short theProc, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle _rv)")},
-       {"SetListViewBounds", (PyCFunction)List_SetListViewBounds, 1,
-        PyDoc_STR("(ListHandle list, Rect view) -> None")},
-       {"SetListPort", (PyCFunction)List_SetListPort, 1,
-        PyDoc_STR("(ListHandle list, CGrafPtr port) -> None")},
-       {"SetListCellIndent", (PyCFunction)List_SetListCellIndent, 1,
-        PyDoc_STR("(ListHandle list, Point indent) -> None")},
-       {"SetListClickTime", (PyCFunction)List_SetListClickTime, 1,
-        PyDoc_STR("(ListHandle list, SInt32 time) -> None")},
-       {"SetListRefCon", (PyCFunction)List_SetListRefCon, 1,
-        PyDoc_STR("(ListHandle list, SInt32 refCon) -> None")},
-       {"SetListUserHandle", (PyCFunction)List_SetListUserHandle, 1,
-        PyDoc_STR("(ListHandle list, Handle userHandle) -> None")},
-       {"SetListFlags", (PyCFunction)List_SetListFlags, 1,
-        PyDoc_STR("(ListHandle list, OptionBits listFlags) -> None")},
-       {"SetListSelectionFlags", (PyCFunction)List_SetListSelectionFlags, 1,
-        PyDoc_STR("(ListHandle list, OptionBits selectionFlags) -> None")},
-       {"as_List", (PyCFunction)List_as_List, 1,
-        PyDoc_STR("(Resource)->List.\nReturns List object (which is not auto-freed!)")},
-       {NULL, NULL, 0}
-};
-
-
-
-static void myListDefFunction(SInt16 message,
-                       Boolean selected,
-                       Rect *cellRect,
-                       Cell theCell,
-                       SInt16 dataOffset,
-                       SInt16 dataLen,
-                       ListHandle theList)
-{
-        PyObject *listDefFunc, *args, *rv=NULL;
-        ListObject *self;
-
-        self = (ListObject*)GetListRefCon(theList);
-        if (self == NULL || self->ob_itself != theList)
-                return;  /* nothing we can do */
-        listDefFunc = self->ob_ldef_func;
-        if (listDefFunc == NULL)
-                return;  /* nothing we can do */
-        args = Py_BuildValue("hbO&O&hhO", message,
-                                          selected,
-                                          PyMac_BuildRect, cellRect,
-                                          PyMac_BuildPoint, theCell,
-                                          dataOffset,
-                                          dataLen,
-                                          self);
-        if (args != NULL) {
-                rv = PyEval_CallObject(listDefFunc, args);
-                Py_DECREF(args);
-        }
-        if (rv == NULL) {
-                PySys_WriteStderr("error in list definition callback:\n");
-                PyErr_Print();
-        } else {
-                Py_DECREF(rv);
-        }
-}
-
-
-void init_List(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-       myListDefFunctionUPP = NewListDefUPP((ListDefProcPtr)myListDefFunction);
-
-       PyMac_INIT_TOOLBOX_OBJECT_NEW(ListHandle, ListObj_New);
-       PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListHandle, ListObj_Convert);
-
-
-       m = Py_InitModule("_List", List_methods);
-       d = PyModule_GetDict(m);
-       List_Error = PyMac_GetOSErrException();
-       if (List_Error == NULL ||
-           PyDict_SetItemString(d, "Error", List_Error) != 0)
-               return;
-       Py_TYPE(&List_Type) = &PyType_Type;
-       if (PyType_Ready(&List_Type) < 0) return;
-       Py_INCREF(&List_Type);
-       PyModule_AddObject(m, "List", (PyObject *)&List_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&List_Type);
-       PyModule_AddObject(m, "ListType", (PyObject *)&List_Type);
-}
-
-/* ======================== End module _List ======================== */
-
diff --git a/Mac/Modules/list/listscan.py b/Mac/Modules/list/listscan.py
deleted file mode 100644 (file)
index cc821af..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "Lists"
-SHORT = "list"
-OBJECT = "ListHandle"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[-1]
-            # This is non-functional today
-            if t in ('ListHandle', 'ListRef') and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "LDispose",             # Done by removing the object
-                "LSearch",              # We don't want to handle procs just yet
-                "CreateCustomList",  # done manually
-                "SetListDefinitionProc",
-
-                # These have funny argument/return values
-                "GetListViewBounds",
-                "GetListCellIndent",
-                "GetListCellSize",
-                "GetListVisibleCells",
-                "GetListClickLocation",
-                "GetListMouseLocation",
-                "GetListDataBounds",
-                "SetListLastClick",
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "ListClickLoopUPP",  # Too difficult for now
-                "ListDefSpecPtr", # later
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([('ListBounds_ptr', '*', 'InMode')],
-                 [('Rect_ptr', '*', 'InMode')]),
-
-                ([("Cell", "theCell", "OutMode")],
-                 [("Cell", "theCell", "InOutMode")]),
-
-                ([("void_ptr", "*", "InMode"), ("short", "*", "InMode")],
-                 [("InBufferShortsize", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("short", "*", "OutMode")],
-                 [("VarOutBufferShortsize", "*", "InOutMode")]),
-
-                # SetListCellIndent doesn't have const
-                ([("Point", "indent", "OutMode")],
-                 [("Point_ptr", "indent", "InMode")]),
-
-                ]
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/list/listsupport.py b/Mac/Modules/list/listsupport.py
deleted file mode 100644 (file)
index 1c12206..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Lists.h'               # The Apple header file
-MODNAME = '_List'                               # The name of the module
-OBJECTNAME = 'List'                     # The basic name of the objects used here
-KIND = 'Handle'                         # Usually 'Ptr' or 'Handle'
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'List'                      # The prefix for module-wide routines
-OBJECTTYPE = "ListHandle"               # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-ListHandle = OpaqueByValueType("ListHandle", "ListObj")
-ListRef = ListHandle # Obsolete, but used in Lists.h
-Cell = Point
-ListBounds = Rect
-ListBounds_ptr = Rect_ptr
-
-ListDefSpec = ListDefSpec_ptr = OpaqueType("ListDefSpec", "PyMac_BuildListDefSpec", "PyMac_GetListDefSpec")
-
-VarOutBufferShortsize = VarHeapOutputBufferType('char', 'short', 's')   # (buf, &len)
-InBufferShortsize = VarInputBufferType('char', 'short', 's')            # (buf, len)
-
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-DataHandle = OpaqueByValueType("DataHandle", "ResObj")
-Handle = OpaqueByValueType("Handle", "ResObj")
-CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
-EventModifiers = Type("EventModifiers", "H")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_ListObj_New(ListHandle);
-extern int _ListObj_Convert(PyObject *, ListHandle *);
-
-#define ListObj_New _ListObj_New
-#define ListObj_Convert _ListObj_Convert
-#endif
-
-#define as_List(x) ((ListHandle)x)
-#define as_Resource(lh) ((Handle)lh)
-
-static ListDefUPP myListDefFunctionUPP;
-
-"""
-
-initstuff = initstuff + """
-myListDefFunctionUPP = NewListDefUPP((ListDefProcPtr)myListDefFunction);
-
-PyMac_INIT_TOOLBOX_OBJECT_NEW(ListHandle, ListObj_New);
-PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListHandle, ListObj_Convert);
-"""
-
-class ListMethodGenerator(MethodGenerator):
-    """Similar to MethodGenerator, but has self as last argument"""
-
-    def parseArgumentList(self, args):
-        args, a0 = args[:-1], args[-1]
-        t0, n0, m0 = a0
-        if m0 != InMode:
-            raise ValueError("method's 'self' must be 'InMode'")
-        self.itself = Variable(t0, "_self->ob_itself", SelfMode)
-        FunctionGenerator.parseArgumentList(self, args)
-        self.argumentList.append(self.itself)
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    # XXXX Should inherit from Resource
-    getsetlist = [(
-            'listFlags',
-            'return Py_BuildValue("l", (long)GetListFlags(self->ob_itself) & 0xff);',
-            'if (!PyArg_Parse(v, "B", &(*self->ob_itself)->listFlags)) return -1;',
-            None,
-            ), (
-            'selFlags',
-            'return Py_BuildValue("l", (long)GetListSelectionFlags(self->ob_itself) & 0xff);',
-            'if (!PyArg_Parse(v, "B", &(*self->ob_itself)->selFlags)) return -1;',
-            None,
-            ), (
-            'cellSize',
-            'return Py_BuildValue("O&", PyMac_BuildPoint, (*self->ob_itself)->cellSize);',
-            'if (!PyArg_Parse(v, "O&", PyMac_GetPoint, &(*self->ob_itself)->cellSize)) return -1;',
-            None
-            )]
-
-    def outputStructMembers(self):
-        ObjectDefinition.outputStructMembers(self)
-        Output("PyObject *ob_ldef_func;")
-        Output("int ob_must_be_disposed;")
-
-    def outputCheckNewArg(self):
-        Output("""if (itself == NULL) {
-                                PyErr_SetString(List_Error,"Cannot create null List");
-                                return NULL;
-                        }""")
-
-    def outputInitStructMembers(self):
-        ObjectDefinition.outputInitStructMembers(self)
-        Output("it->ob_ldef_func = NULL;")
-        Output("it->ob_must_be_disposed = 1;")
-        Output("SetListRefCon(itself, (long)it);")
-
-    def outputFreeIt(self, itselfname):
-        Output("Py_XDECREF(self->ob_ldef_func);")
-        Output("self->ob_ldef_func = NULL;")
-        Output("SetListRefCon(self->ob_itself, (long)0);")
-        Output("if (self->ob_must_be_disposed && %s) LDispose(%s);", itselfname, itselfname)
-
-# From here on it's basically all boiler plate...
-
-finalstuff = finalstuff + """
-static void myListDefFunction(SInt16 message,
-                       Boolean selected,
-                       Rect *cellRect,
-                       Cell theCell,
-                       SInt16 dataOffset,
-                       SInt16 dataLen,
-                       ListHandle theList)
-{
-        PyObject *listDefFunc, *args, *rv=NULL;
-        ListObject *self;
-
-        self = (ListObject*)GetListRefCon(theList);
-        if (self == NULL || self->ob_itself != theList)
-                return;  /* nothing we can do */
-        listDefFunc = self->ob_ldef_func;
-        if (listDefFunc == NULL)
-                return;  /* nothing we can do */
-        args = Py_BuildValue("hbO&O&hhO", message,
-                                          selected,
-                                          PyMac_BuildRect, cellRect,
-                                          PyMac_BuildPoint, theCell,
-                                          dataOffset,
-                                          dataLen,
-                                          self);
-        if (args != NULL) {
-                rv = PyEval_CallObject(listDefFunc, args);
-                Py_DECREF(args);
-        }
-        if (rv == NULL) {
-                PySys_WriteStderr("error in list definition callback:\\n");
-                PyErr_Print();
-        } else {
-                Py_DECREF(rv);
-        }
-}
-"""
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = FunctionGenerator
-Method = ListMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-
-# Function to convert any handle to a list and vv.
-##f = Function(ListHandle, 'as_List', (Handle, 'h', InMode))
-as_List_body = """
-Handle h;
-ListObject *l;
-if (!PyArg_ParseTuple(_args, "O&", ResObj_Convert, &h))
-        return NULL;
-l = (ListObject *)ListObj_New(as_List(h));
-l->ob_must_be_disposed = 0;
-_res = Py_BuildValue("O", l);
-return _res;
-"""
-f = ManualGenerator("as_List", as_List_body)
-f.docstring = lambda: "(Resource)->List.\nReturns List object (which is not auto-freed!)"
-functions.append(f)
-
-f = Method(Handle, 'as_Resource', (ListHandle, 'lh', InMode))
-methods.append(f)
-
-# Manual generator for CreateCustomList, due to callback ideosyncracies
-CreateCustomList_body = """\
-Rect rView;
-Rect dataBounds;
-Point cellSize;
-
-PyObject *listDefFunc;
-ListDefSpec theSpec;
-WindowPtr theWindow;
-Boolean drawIt;
-Boolean hasGrow;
-Boolean scrollHoriz;
-Boolean scrollVert;
-ListHandle outList;
-
-if (!PyArg_ParseTuple(_args, "O&O&O&(iO)O&bbbb",
-                      PyMac_GetRect, &rView,
-                      PyMac_GetRect, &dataBounds,
-                      PyMac_GetPoint, &cellSize,
-                      &theSpec.defType, &listDefFunc,
-                      WinObj_Convert, &theWindow,
-                      &drawIt,
-                      &hasGrow,
-                      &scrollHoriz,
-                      &scrollVert))
-        return NULL;
-
-
-/* Carbon applications use the CreateCustomList API */
-theSpec.u.userProc = myListDefFunctionUPP;
-CreateCustomList(&rView,
-                 &dataBounds,
-                 cellSize,
-                 &theSpec,
-                 theWindow,
-                 drawIt,
-                 hasGrow,
-                 scrollHoriz,
-                 scrollVert,
-                 &outList);
-
-
-_res = ListObj_New(outList);
-if (_res == NULL)
-        return NULL;
-Py_INCREF(listDefFunc);
-((ListObject*)_res)->ob_ldef_func = listDefFunc;
-return _res;\
-"""
-
-f = ManualGenerator("CreateCustomList", CreateCustomList_body);
-f.docstring = lambda: "(Rect rView, Rect dataBounds, Point cellSize, ListDefSpec theSpec, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle outList)"
-module.add(f)
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/menu/_Menumodule.c b/Mac/Modules/menu/_Menumodule.c
deleted file mode 100644 (file)
index 85dde5a..0000000
+++ /dev/null
@@ -1,3468 +0,0 @@
-
-/* ========================== Module _Menu ========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-
-extern PyObject *_MenuObj_New(MenuHandle);
-extern int _MenuObj_Convert(PyObject *, MenuHandle *);
-
-#define MenuObj_New _MenuObj_New
-#define MenuObj_Convert _MenuObj_Convert
-#endif
-
-#define as_Menu(h) ((MenuHandle)h)
-#define as_Resource(h) ((Handle)h)
-
-
-/* Alternative version of MenuObj_New, which returns None for NULL argument */
-PyObject *OptMenuObj_New(MenuRef itself)
-{
-        if (itself == NULL) {
-                Py_INCREF(Py_None);
-                return Py_None;
-        }
-        return MenuObj_New(itself);
-}
-
-/* Alternative version of MenuObj_Convert, which returns NULL for a None argument */
-int OptMenuObj_Convert(PyObject *v, MenuRef *p_itself)
-{
-        if ( v == Py_None ) {
-                *p_itself = NULL;
-                return 1;
-        }
-        return MenuObj_Convert(v, p_itself);
-}
-
-static PyObject *Menu_Error;
-
-/* ------------------------ Object type Menu ------------------------ */
-
-PyTypeObject Menu_Type;
-
-#define MenuObj_Check(x) (Py_TYPE(x) == &Menu_Type || PyObject_TypeCheck((x), &Menu_Type))
-
-typedef struct MenuObject {
-       PyObject_HEAD
-       MenuHandle ob_itself;
-} MenuObject;
-
-PyObject *MenuObj_New(MenuHandle itself)
-{
-       MenuObject *it;
-       it = PyObject_NEW(MenuObject, &Menu_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int MenuObj_Convert(PyObject *v, MenuHandle *p_itself)
-{
-       if (!MenuObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Menu required");
-               return 0;
-       }
-       *p_itself = ((MenuObject *)v)->ob_itself;
-       return 1;
-}
-
-static void MenuObj_dealloc(MenuObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *MenuObj_DisposeMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DisposeMenu
-       PyMac_PRECHECK(DisposeMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DisposeMenu(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_CalcMenuSize(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef CalcMenuSize
-       PyMac_PRECHECK(CalcMenuSize);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CalcMenuSize(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_CountMenuItems(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt16 _rv;
-#ifndef CountMenuItems
-       PyMac_PRECHECK(CountMenuItems);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CountMenuItems(_self->ob_itself);
-       _res = Py_BuildValue("H",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuFont(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt16 outFontID;
-       UInt16 outFontSize;
-#ifndef GetMenuFont
-       PyMac_PRECHECK(GetMenuFont);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMenuFont(_self->ob_itself,
-                          &outFontID,
-                          &outFontSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hH",
-                            outFontID,
-                            outFontSize);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuFont(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt16 inFontID;
-       UInt16 inFontSize;
-#ifndef SetMenuFont
-       PyMac_PRECHECK(SetMenuFont);
-#endif
-       if (!PyArg_ParseTuple(_args, "hH",
-                             &inFontID,
-                             &inFontSize))
-               return NULL;
-       _err = SetMenuFont(_self->ob_itself,
-                          inFontID,
-                          inFontSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuExcludesMarkColumn(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef GetMenuExcludesMarkColumn
-       PyMac_PRECHECK(GetMenuExcludesMarkColumn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMenuExcludesMarkColumn(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuExcludesMarkColumn(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean excludesMark;
-#ifndef SetMenuExcludesMarkColumn
-       PyMac_PRECHECK(SetMenuExcludesMarkColumn);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &excludesMark))
-               return NULL;
-       _err = SetMenuExcludesMarkColumn(_self->ob_itself,
-                                        excludesMark);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_IsValidMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsValidMenu
-       PyMac_PRECHECK(IsValidMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsValidMenu(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuRetainCount(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ItemCount _rv;
-#ifndef GetMenuRetainCount
-       PyMac_PRECHECK(GetMenuRetainCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMenuRetainCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_RetainMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef RetainMenu
-       PyMac_PRECHECK(RetainMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = RetainMenu(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_ReleaseMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef ReleaseMenu
-       PyMac_PRECHECK(ReleaseMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = ReleaseMenu(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_DuplicateMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuHandle outMenu;
-#ifndef DuplicateMenu
-       PyMac_PRECHECK(DuplicateMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = DuplicateMenu(_self->ob_itself,
-                            &outMenu);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, outMenu);
-       return _res;
-}
-
-static PyObject *MenuObj_CopyMenuTitleAsCFString(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef outString;
-#ifndef CopyMenuTitleAsCFString
-       PyMac_PRECHECK(CopyMenuTitleAsCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CopyMenuTitleAsCFString(_self->ob_itself,
-                                      &outString);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, outString);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuTitleWithCFString(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inString;
-#ifndef SetMenuTitleWithCFString
-       PyMac_PRECHECK(SetMenuTitleWithCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &inString))
-               return NULL;
-       _err = SetMenuTitleWithCFString(_self->ob_itself,
-                                       inString);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_InvalidateMenuSize(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef InvalidateMenuSize
-       PyMac_PRECHECK(InvalidateMenuSize);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = InvalidateMenuSize(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_IsMenuSizeInvalid(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsMenuSizeInvalid
-       PyMac_PRECHECK(IsMenuSizeInvalid);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsMenuSizeInvalid(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_MacAppendMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 data;
-#ifndef MacAppendMenu
-       PyMac_PRECHECK(MacAppendMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, data))
-               return NULL;
-       MacAppendMenu(_self->ob_itself,
-                     data);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_InsertResMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ResType theType;
-       short afterItem;
-#ifndef InsertResMenu
-       PyMac_PRECHECK(InsertResMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetOSType, &theType,
-                             &afterItem))
-               return NULL;
-       InsertResMenu(_self->ob_itself,
-                     theType,
-                     afterItem);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_AppendResMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ResType theType;
-#ifndef AppendResMenu
-       PyMac_PRECHECK(AppendResMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &theType))
-               return NULL;
-       AppendResMenu(_self->ob_itself,
-                     theType);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_MacInsertMenuItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 itemString;
-       short afterItem;
-#ifndef MacInsertMenuItem
-       PyMac_PRECHECK(MacInsertMenuItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetStr255, itemString,
-                             &afterItem))
-               return NULL;
-       MacInsertMenuItem(_self->ob_itself,
-                         itemString,
-                         afterItem);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_DeleteMenuItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-#ifndef DeleteMenuItem
-       PyMac_PRECHECK(DeleteMenuItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       DeleteMenuItem(_self->ob_itself,
-                      item);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_InsertFontResMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short afterItem;
-       short scriptFilter;
-#ifndef InsertFontResMenu
-       PyMac_PRECHECK(InsertFontResMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &afterItem,
-                             &scriptFilter))
-               return NULL;
-       InsertFontResMenu(_self->ob_itself,
-                         afterItem,
-                         scriptFilter);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_InsertIntlResMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ResType theType;
-       short afterItem;
-       short scriptFilter;
-#ifndef InsertIntlResMenu
-       PyMac_PRECHECK(InsertIntlResMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetOSType, &theType,
-                             &afterItem,
-                             &scriptFilter))
-               return NULL;
-       InsertIntlResMenu(_self->ob_itself,
-                         theType,
-                         afterItem,
-                         scriptFilter);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_AppendMenuItemText(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Str255 inString;
-#ifndef AppendMenuItemText
-       PyMac_PRECHECK(AppendMenuItemText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, inString))
-               return NULL;
-       _err = AppendMenuItemText(_self->ob_itself,
-                                 inString);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_InsertMenuItemText(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Str255 inString;
-       MenuItemIndex afterItem;
-#ifndef InsertMenuItemText
-       PyMac_PRECHECK(InsertMenuItemText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetStr255, inString,
-                             &afterItem))
-               return NULL;
-       _err = InsertMenuItemText(_self->ob_itself,
-                                 inString,
-                                 afterItem);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_CopyMenuItems(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inFirstItem;
-       ItemCount inNumItems;
-       MenuHandle inDestMenu;
-       MenuItemIndex inInsertAfter;
-#ifndef CopyMenuItems
-       PyMac_PRECHECK(CopyMenuItems);
-#endif
-       if (!PyArg_ParseTuple(_args, "hlO&h",
-                             &inFirstItem,
-                             &inNumItems,
-                             MenuObj_Convert, &inDestMenu,
-                             &inInsertAfter))
-               return NULL;
-       _err = CopyMenuItems(_self->ob_itself,
-                            inFirstItem,
-                            inNumItems,
-                            inDestMenu,
-                            inInsertAfter);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_DeleteMenuItems(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inFirstItem;
-       ItemCount inNumItems;
-#ifndef DeleteMenuItems
-       PyMac_PRECHECK(DeleteMenuItems);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &inFirstItem,
-                             &inNumItems))
-               return NULL;
-       _err = DeleteMenuItems(_self->ob_itself,
-                              inFirstItem,
-                              inNumItems);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_AppendMenuItemTextWithCFString(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inString;
-       MenuItemAttributes inAttributes;
-       MenuCommand inCommandID;
-       MenuItemIndex outNewItem;
-#ifndef AppendMenuItemTextWithCFString
-       PyMac_PRECHECK(AppendMenuItemTextWithCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CFStringRefObj_Convert, &inString,
-                             &inAttributes,
-                             &inCommandID))
-               return NULL;
-       _err = AppendMenuItemTextWithCFString(_self->ob_itself,
-                                             inString,
-                                             inAttributes,
-                                             inCommandID,
-                                             &outNewItem);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outNewItem);
-       return _res;
-}
-
-static PyObject *MenuObj_InsertMenuItemTextWithCFString(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inString;
-       MenuItemIndex inAfterItem;
-       MenuItemAttributes inAttributes;
-       MenuCommand inCommandID;
-#ifndef InsertMenuItemTextWithCFString
-       PyMac_PRECHECK(InsertMenuItemTextWithCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hll",
-                             CFStringRefObj_Convert, &inString,
-                             &inAfterItem,
-                             &inAttributes,
-                             &inCommandID))
-               return NULL;
-       _err = InsertMenuItemTextWithCFString(_self->ob_itself,
-                                             inString,
-                                             inAfterItem,
-                                             inAttributes,
-                                             inCommandID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_PopUpMenuSelect(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       short top;
-       short left;
-       short popUpItem;
-#ifndef PopUpMenuSelect
-       PyMac_PRECHECK(PopUpMenuSelect);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhh",
-                             &top,
-                             &left,
-                             &popUpItem))
-               return NULL;
-       _rv = PopUpMenuSelect(_self->ob_itself,
-                             top,
-                             left,
-                             popUpItem);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_InvalidateMenuEnabling(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef InvalidateMenuEnabling
-       PyMac_PRECHECK(InvalidateMenuEnabling);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = InvalidateMenuEnabling(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_IsMenuBarInvalid(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsMenuBarInvalid
-       PyMac_PRECHECK(IsMenuBarInvalid);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsMenuBarInvalid(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_MacInsertMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuID beforeID;
-#ifndef MacInsertMenu
-       PyMac_PRECHECK(MacInsertMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &beforeID))
-               return NULL;
-       MacInsertMenu(_self->ob_itself,
-                     beforeID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_SetRootMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef SetRootMenu
-       PyMac_PRECHECK(SetRootMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = SetRootMenu(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_MacCheckMenuItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       Boolean checked;
-#ifndef MacCheckMenuItem
-       PyMac_PRECHECK(MacCheckMenuItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &item,
-                             &checked))
-               return NULL;
-       MacCheckMenuItem(_self->ob_itself,
-                        item,
-                        checked);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemText(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       Str255 itemString;
-#ifndef SetMenuItemText
-       PyMac_PRECHECK(SetMenuItemText);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &item,
-                             PyMac_GetStr255, itemString))
-               return NULL;
-       SetMenuItemText(_self->ob_itself,
-                       item,
-                       itemString);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemText(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       Str255 itemString;
-#ifndef GetMenuItemText
-       PyMac_PRECHECK(GetMenuItemText);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       GetMenuItemText(_self->ob_itself,
-                       item,
-                       itemString);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildStr255, itemString);
-       return _res;
-}
-
-static PyObject *MenuObj_SetItemMark(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       CharParameter markChar;
-#ifndef SetItemMark
-       PyMac_PRECHECK(SetItemMark);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &item,
-                             &markChar))
-               return NULL;
-       SetItemMark(_self->ob_itself,
-                   item,
-                   markChar);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetItemMark(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       CharParameter markChar;
-#ifndef GetItemMark
-       PyMac_PRECHECK(GetItemMark);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       GetItemMark(_self->ob_itself,
-                   item,
-                   &markChar);
-       _res = Py_BuildValue("h",
-                            markChar);
-       return _res;
-}
-
-static PyObject *MenuObj_SetItemCmd(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       CharParameter cmdChar;
-#ifndef SetItemCmd
-       PyMac_PRECHECK(SetItemCmd);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &item,
-                             &cmdChar))
-               return NULL;
-       SetItemCmd(_self->ob_itself,
-                  item,
-                  cmdChar);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetItemCmd(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       CharParameter cmdChar;
-#ifndef GetItemCmd
-       PyMac_PRECHECK(GetItemCmd);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       GetItemCmd(_self->ob_itself,
-                  item,
-                  &cmdChar);
-       _res = Py_BuildValue("h",
-                            cmdChar);
-       return _res;
-}
-
-static PyObject *MenuObj_SetItemIcon(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       short iconIndex;
-#ifndef SetItemIcon
-       PyMac_PRECHECK(SetItemIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &item,
-                             &iconIndex))
-               return NULL;
-       SetItemIcon(_self->ob_itself,
-                   item,
-                   iconIndex);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetItemIcon(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       short iconIndex;
-#ifndef GetItemIcon
-       PyMac_PRECHECK(GetItemIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       GetItemIcon(_self->ob_itself,
-                   item,
-                   &iconIndex);
-       _res = Py_BuildValue("h",
-                            iconIndex);
-       return _res;
-}
-
-static PyObject *MenuObj_SetItemStyle(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       StyleParameter chStyle;
-#ifndef SetItemStyle
-       PyMac_PRECHECK(SetItemStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &item,
-                             &chStyle))
-               return NULL;
-       SetItemStyle(_self->ob_itself,
-                    item,
-                    chStyle);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetItemStyle(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       Style chStyle;
-#ifndef GetItemStyle
-       PyMac_PRECHECK(GetItemStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       GetItemStyle(_self->ob_itself,
-                    item,
-                    &chStyle);
-       _res = Py_BuildValue("b",
-                            chStyle);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemCommandID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       MenuCommand inCommandID;
-#ifndef SetMenuItemCommandID
-       PyMac_PRECHECK(SetMenuItemCommandID);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &inItem,
-                             &inCommandID))
-               return NULL;
-       _err = SetMenuItemCommandID(_self->ob_itself,
-                                   inItem,
-                                   inCommandID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemCommandID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       MenuCommand outCommandID;
-#ifndef GetMenuItemCommandID
-       PyMac_PRECHECK(GetMenuItemCommandID);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemCommandID(_self->ob_itself,
-                                   inItem,
-                                   &outCommandID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outCommandID);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemModifiers(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       UInt8 inModifiers;
-#ifndef SetMenuItemModifiers
-       PyMac_PRECHECK(SetMenuItemModifiers);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &inItem,
-                             &inModifiers))
-               return NULL;
-       _err = SetMenuItemModifiers(_self->ob_itself,
-                                   inItem,
-                                   inModifiers);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemModifiers(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       UInt8 outModifiers;
-#ifndef GetMenuItemModifiers
-       PyMac_PRECHECK(GetMenuItemModifiers);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemModifiers(_self->ob_itself,
-                                   inItem,
-                                   &outModifiers);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            outModifiers);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemIconHandle(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       UInt8 inIconType;
-       Handle inIconHandle;
-#ifndef SetMenuItemIconHandle
-       PyMac_PRECHECK(SetMenuItemIconHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "hbO&",
-                             &inItem,
-                             &inIconType,
-                             ResObj_Convert, &inIconHandle))
-               return NULL;
-       _err = SetMenuItemIconHandle(_self->ob_itself,
-                                    inItem,
-                                    inIconType,
-                                    inIconHandle);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemIconHandle(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       UInt8 outIconType;
-       Handle outIconHandle;
-#ifndef GetMenuItemIconHandle
-       PyMac_PRECHECK(GetMenuItemIconHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemIconHandle(_self->ob_itself,
-                                    inItem,
-                                    &outIconType,
-                                    &outIconHandle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("bO&",
-                            outIconType,
-                            ResObj_New, outIconHandle);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemTextEncoding(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       TextEncoding inScriptID;
-#ifndef SetMenuItemTextEncoding
-       PyMac_PRECHECK(SetMenuItemTextEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &inItem,
-                             &inScriptID))
-               return NULL;
-       _err = SetMenuItemTextEncoding(_self->ob_itself,
-                                      inItem,
-                                      inScriptID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemTextEncoding(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       TextEncoding outScriptID;
-#ifndef GetMenuItemTextEncoding
-       PyMac_PRECHECK(GetMenuItemTextEncoding);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemTextEncoding(_self->ob_itself,
-                                      inItem,
-                                      &outScriptID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outScriptID);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemHierarchicalID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       MenuID inHierID;
-#ifndef SetMenuItemHierarchicalID
-       PyMac_PRECHECK(SetMenuItemHierarchicalID);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &inItem,
-                             &inHierID))
-               return NULL;
-       _err = SetMenuItemHierarchicalID(_self->ob_itself,
-                                        inItem,
-                                        inHierID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemHierarchicalID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       MenuID outHierID;
-#ifndef GetMenuItemHierarchicalID
-       PyMac_PRECHECK(GetMenuItemHierarchicalID);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemHierarchicalID(_self->ob_itself,
-                                        inItem,
-                                        &outHierID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outHierID);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemFontID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       SInt16 inFontID;
-#ifndef SetMenuItemFontID
-       PyMac_PRECHECK(SetMenuItemFontID);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &inItem,
-                             &inFontID))
-               return NULL;
-       _err = SetMenuItemFontID(_self->ob_itself,
-                                inItem,
-                                inFontID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemFontID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       SInt16 outFontID;
-#ifndef GetMenuItemFontID
-       PyMac_PRECHECK(GetMenuItemFontID);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemFontID(_self->ob_itself,
-                                inItem,
-                                &outFontID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outFontID);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemRefCon(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       UInt32 inRefCon;
-#ifndef SetMenuItemRefCon
-       PyMac_PRECHECK(SetMenuItemRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &inItem,
-                             &inRefCon))
-               return NULL;
-       _err = SetMenuItemRefCon(_self->ob_itself,
-                                inItem,
-                                inRefCon);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemRefCon(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       UInt32 outRefCon;
-#ifndef GetMenuItemRefCon
-       PyMac_PRECHECK(GetMenuItemRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemRefCon(_self->ob_itself,
-                                inItem,
-                                &outRefCon);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outRefCon);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemKeyGlyph(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       SInt16 inGlyph;
-#ifndef SetMenuItemKeyGlyph
-       PyMac_PRECHECK(SetMenuItemKeyGlyph);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &inItem,
-                             &inGlyph))
-               return NULL;
-       _err = SetMenuItemKeyGlyph(_self->ob_itself,
-                                  inItem,
-                                  inGlyph);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemKeyGlyph(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       SInt16 outGlyph;
-#ifndef GetMenuItemKeyGlyph
-       PyMac_PRECHECK(GetMenuItemKeyGlyph);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemKeyGlyph(_self->ob_itself,
-                                  inItem,
-                                  &outGlyph);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outGlyph);
-       return _res;
-}
-
-static PyObject *MenuObj_MacEnableMenuItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuItemIndex item;
-#ifndef MacEnableMenuItem
-       PyMac_PRECHECK(MacEnableMenuItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       MacEnableMenuItem(_self->ob_itself,
-                         item);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_DisableMenuItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuItemIndex item;
-#ifndef DisableMenuItem
-       PyMac_PRECHECK(DisableMenuItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       DisableMenuItem(_self->ob_itself,
-                       item);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_IsMenuItemEnabled(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       MenuItemIndex item;
-#ifndef IsMenuItemEnabled
-       PyMac_PRECHECK(IsMenuItemEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       _rv = IsMenuItemEnabled(_self->ob_itself,
-                               item);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_EnableMenuItemIcon(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuItemIndex item;
-#ifndef EnableMenuItemIcon
-       PyMac_PRECHECK(EnableMenuItemIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       EnableMenuItemIcon(_self->ob_itself,
-                          item);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_DisableMenuItemIcon(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuItemIndex item;
-#ifndef DisableMenuItemIcon
-       PyMac_PRECHECK(DisableMenuItemIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       DisableMenuItemIcon(_self->ob_itself,
-                           item);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_IsMenuItemIconEnabled(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       MenuItemIndex item;
-#ifndef IsMenuItemIconEnabled
-       PyMac_PRECHECK(IsMenuItemIconEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       _rv = IsMenuItemIconEnabled(_self->ob_itself,
-                                   item);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemHierarchicalMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inItem;
-       MenuHandle inHierMenu;
-#ifndef SetMenuItemHierarchicalMenu
-       PyMac_PRECHECK(SetMenuItemHierarchicalMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &inItem,
-                             MenuObj_Convert, &inHierMenu))
-               return NULL;
-       _err = SetMenuItemHierarchicalMenu(_self->ob_itself,
-                                          inItem,
-                                          inHierMenu);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemHierarchicalMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inItem;
-       MenuHandle outHierMenu;
-#ifndef GetMenuItemHierarchicalMenu
-       PyMac_PRECHECK(GetMenuItemHierarchicalMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemHierarchicalMenu(_self->ob_itself,
-                                          inItem,
-                                          &outHierMenu);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            OptMenuObj_New, outHierMenu);
-       return _res;
-}
-
-static PyObject *MenuObj_CopyMenuItemTextAsCFString(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inItem;
-       CFStringRef outString;
-#ifndef CopyMenuItemTextAsCFString
-       PyMac_PRECHECK(CopyMenuItemTextAsCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = CopyMenuItemTextAsCFString(_self->ob_itself,
-                                         inItem,
-                                         &outString);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, outString);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemTextWithCFString(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inItem;
-       CFStringRef inString;
-#ifndef SetMenuItemTextWithCFString
-       PyMac_PRECHECK(SetMenuItemTextWithCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &inItem,
-                             CFStringRefObj_Convert, &inString))
-               return NULL;
-       _err = SetMenuItemTextWithCFString(_self->ob_itself,
-                                          inItem,
-                                          inString);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemIndent(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inItem;
-       UInt32 outIndent;
-#ifndef GetMenuItemIndent
-       PyMac_PRECHECK(GetMenuItemIndent);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemIndent(_self->ob_itself,
-                                inItem,
-                                &outIndent);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outIndent);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemIndent(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inItem;
-       UInt32 inIndent;
-#ifndef SetMenuItemIndent
-       PyMac_PRECHECK(SetMenuItemIndent);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &inItem,
-                             &inIndent))
-               return NULL;
-       _err = SetMenuItemIndent(_self->ob_itself,
-                                inItem,
-                                inIndent);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemCommandKey(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inItem;
-       Boolean inGetVirtualKey;
-       UInt16 outKey;
-#ifndef GetMenuItemCommandKey
-       PyMac_PRECHECK(GetMenuItemCommandKey);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &inItem,
-                             &inGetVirtualKey))
-               return NULL;
-       _err = GetMenuItemCommandKey(_self->ob_itself,
-                                    inItem,
-                                    inGetVirtualKey,
-                                    &outKey);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            outKey);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuItemCommandKey(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inItem;
-       Boolean inSetVirtualKey;
-       UInt16 inKey;
-#ifndef SetMenuItemCommandKey
-       PyMac_PRECHECK(SetMenuItemCommandKey);
-#endif
-       if (!PyArg_ParseTuple(_args, "hbH",
-                             &inItem,
-                             &inSetVirtualKey,
-                             &inKey))
-               return NULL;
-       _err = SetMenuItemCommandKey(_self->ob_itself,
-                                    inItem,
-                                    inSetVirtualKey,
-                                    inKey);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex item;
-       OSType propertyCreator;
-       OSType propertyTag;
-       UInt32 attributes;
-#ifndef GetMenuItemPropertyAttributes
-       PyMac_PRECHECK(GetMenuItemPropertyAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&O&",
-                             &item,
-                             PyMac_GetOSType, &propertyCreator,
-                             PyMac_GetOSType, &propertyTag))
-               return NULL;
-       _err = GetMenuItemPropertyAttributes(_self->ob_itself,
-                                            item,
-                                            propertyCreator,
-                                            propertyTag,
-                                            &attributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            attributes);
-       return _res;
-}
-
-static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex item;
-       OSType propertyCreator;
-       OSType propertyTag;
-       UInt32 attributesToSet;
-       UInt32 attributesToClear;
-#ifndef ChangeMenuItemPropertyAttributes
-       PyMac_PRECHECK(ChangeMenuItemPropertyAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&O&ll",
-                             &item,
-                             PyMac_GetOSType, &propertyCreator,
-                             PyMac_GetOSType, &propertyTag,
-                             &attributesToSet,
-                             &attributesToClear))
-               return NULL;
-       _err = ChangeMenuItemPropertyAttributes(_self->ob_itself,
-                                               item,
-                                               propertyCreator,
-                                               propertyTag,
-                                               attributesToSet,
-                                               attributesToClear);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuAttributes(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuAttributes outAttributes;
-#ifndef GetMenuAttributes
-       PyMac_PRECHECK(GetMenuAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMenuAttributes(_self->ob_itself,
-                                &outAttributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outAttributes);
-       return _res;
-}
-
-static PyObject *MenuObj_ChangeMenuAttributes(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuAttributes setTheseAttributes;
-       MenuAttributes clearTheseAttributes;
-#ifndef ChangeMenuAttributes
-       PyMac_PRECHECK(ChangeMenuAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &setTheseAttributes,
-                             &clearTheseAttributes))
-               return NULL;
-       _err = ChangeMenuAttributes(_self->ob_itself,
-                                   setTheseAttributes,
-                                   clearTheseAttributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuItemAttributes(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex item;
-       MenuItemAttributes outAttributes;
-#ifndef GetMenuItemAttributes
-       PyMac_PRECHECK(GetMenuItemAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       _err = GetMenuItemAttributes(_self->ob_itself,
-                                    item,
-                                    &outAttributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outAttributes);
-       return _res;
-}
-
-static PyObject *MenuObj_ChangeMenuItemAttributes(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex item;
-       MenuItemAttributes setTheseAttributes;
-       MenuItemAttributes clearTheseAttributes;
-#ifndef ChangeMenuItemAttributes
-       PyMac_PRECHECK(ChangeMenuItemAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "hll",
-                             &item,
-                             &setTheseAttributes,
-                             &clearTheseAttributes))
-               return NULL;
-       _err = ChangeMenuItemAttributes(_self->ob_itself,
-                                       item,
-                                       setTheseAttributes,
-                                       clearTheseAttributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_DisableAllMenuItems(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DisableAllMenuItems
-       PyMac_PRECHECK(DisableAllMenuItems);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DisableAllMenuItems(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_EnableAllMenuItems(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef EnableAllMenuItems
-       PyMac_PRECHECK(EnableAllMenuItems);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       EnableAllMenuItems(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_MenuHasEnabledItems(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef MenuHasEnabledItems
-       PyMac_PRECHECK(MenuHasEnabledItems);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MenuHasEnabledItems(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuType(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt16 outType;
-#ifndef GetMenuType
-       PyMac_PRECHECK(GetMenuType);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMenuType(_self->ob_itself,
-                          &outType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("H",
-                            outType);
-       return _res;
-}
-
-static PyObject *MenuObj_CountMenuItemsWithCommandID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ItemCount _rv;
-       MenuCommand inCommandID;
-#ifndef CountMenuItemsWithCommandID
-       PyMac_PRECHECK(CountMenuItemsWithCommandID);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inCommandID))
-               return NULL;
-       _rv = CountMenuItemsWithCommandID(_self->ob_itself,
-                                         inCommandID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_GetIndMenuItemWithCommandID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuCommand inCommandID;
-       UInt32 inItemIndex;
-       MenuHandle outMenu;
-       MenuItemIndex outIndex;
-#ifndef GetIndMenuItemWithCommandID
-       PyMac_PRECHECK(GetIndMenuItemWithCommandID);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &inCommandID,
-                             &inItemIndex))
-               return NULL;
-       _err = GetIndMenuItemWithCommandID(_self->ob_itself,
-                                          inCommandID,
-                                          inItemIndex,
-                                          &outMenu,
-                                          &outIndex);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&h",
-                            MenuObj_New, outMenu,
-                            outIndex);
-       return _res;
-}
-
-static PyObject *MenuObj_EnableMenuCommand(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuCommand inCommandID;
-#ifndef EnableMenuCommand
-       PyMac_PRECHECK(EnableMenuCommand);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inCommandID))
-               return NULL;
-       EnableMenuCommand(_self->ob_itself,
-                         inCommandID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_DisableMenuCommand(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuCommand inCommandID;
-#ifndef DisableMenuCommand
-       PyMac_PRECHECK(DisableMenuCommand);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inCommandID))
-               return NULL;
-       DisableMenuCommand(_self->ob_itself,
-                          inCommandID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_IsMenuCommandEnabled(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       MenuCommand inCommandID;
-#ifndef IsMenuCommandEnabled
-       PyMac_PRECHECK(IsMenuCommandEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inCommandID))
-               return NULL;
-       _rv = IsMenuCommandEnabled(_self->ob_itself,
-                                  inCommandID);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuCommandMark(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuCommand inCommandID;
-       UniChar inMark;
-#ifndef SetMenuCommandMark
-       PyMac_PRECHECK(SetMenuCommandMark);
-#endif
-       if (!PyArg_ParseTuple(_args, "lh",
-                             &inCommandID,
-                             &inMark))
-               return NULL;
-       _err = SetMenuCommandMark(_self->ob_itself,
-                                 inCommandID,
-                                 inMark);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuCommandMark(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuCommand inCommandID;
-       UniChar outMark;
-#ifndef GetMenuCommandMark
-       PyMac_PRECHECK(GetMenuCommandMark);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inCommandID))
-               return NULL;
-       _err = GetMenuCommandMark(_self->ob_itself,
-                                 inCommandID,
-                                 &outMark);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outMark);
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuCommandPropertySize(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuCommand inCommandID;
-       OSType inPropertyCreator;
-       OSType inPropertyTag;
-       ByteCount outSize;
-#ifndef GetMenuCommandPropertySize
-       PyMac_PRECHECK(GetMenuCommandPropertySize);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&O&",
-                             &inCommandID,
-                             PyMac_GetOSType, &inPropertyCreator,
-                             PyMac_GetOSType, &inPropertyTag))
-               return NULL;
-       _err = GetMenuCommandPropertySize(_self->ob_itself,
-                                         inCommandID,
-                                         inPropertyCreator,
-                                         inPropertyTag,
-                                         &outSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outSize);
-       return _res;
-}
-
-static PyObject *MenuObj_RemoveMenuCommandProperty(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuCommand inCommandID;
-       OSType inPropertyCreator;
-       OSType inPropertyTag;
-#ifndef RemoveMenuCommandProperty
-       PyMac_PRECHECK(RemoveMenuCommandProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&O&",
-                             &inCommandID,
-                             PyMac_GetOSType, &inPropertyCreator,
-                             PyMac_GetOSType, &inPropertyTag))
-               return NULL;
-       _err = RemoveMenuCommandProperty(_self->ob_itself,
-                                        inCommandID,
-                                        inPropertyCreator,
-                                        inPropertyTag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_IsMenuItemInvalid(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       MenuItemIndex inItem;
-#ifndef IsMenuItemInvalid
-       PyMac_PRECHECK(IsMenuItemInvalid);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _rv = IsMenuItemInvalid(_self->ob_itself,
-                               inItem);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_InvalidateMenuItems(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex inFirstItem;
-       ItemCount inNumItems;
-#ifndef InvalidateMenuItems
-       PyMac_PRECHECK(InvalidateMenuItems);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &inFirstItem,
-                             &inNumItems))
-               return NULL;
-       _err = InvalidateMenuItems(_self->ob_itself,
-                                  inFirstItem,
-                                  inNumItems);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_UpdateInvalidMenuItems(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef UpdateInvalidMenuItems
-       PyMac_PRECHECK(UpdateInvalidMenuItems);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = UpdateInvalidMenuItems(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_CreateStandardFontMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex afterItem;
-       MenuID firstHierMenuID;
-       OptionBits options;
-       ItemCount outHierMenuCount;
-#ifndef CreateStandardFontMenu
-       PyMac_PRECHECK(CreateStandardFontMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhl",
-                             &afterItem,
-                             &firstHierMenuID,
-                             &options))
-               return NULL;
-       _err = CreateStandardFontMenu(_self->ob_itself,
-                                     afterItem,
-                                     firstHierMenuID,
-                                     options,
-                                     &outHierMenuCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outHierMenuCount);
-       return _res;
-}
-
-static PyObject *MenuObj_UpdateStandardFontMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ItemCount outHierMenuCount;
-#ifndef UpdateStandardFontMenu
-       PyMac_PRECHECK(UpdateStandardFontMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = UpdateStandardFontMenu(_self->ob_itself,
-                                     &outHierMenuCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outHierMenuCount);
-       return _res;
-}
-
-static PyObject *MenuObj_GetFontFamilyFromMenuSelection(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuItemIndex item;
-       FMFontFamily outFontFamily;
-       FMFontStyle outStyle;
-#ifndef GetFontFamilyFromMenuSelection
-       PyMac_PRECHECK(GetFontFamilyFromMenuSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       _err = GetFontFamilyFromMenuSelection(_self->ob_itself,
-                                             item,
-                                             &outFontFamily,
-                                             &outStyle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hh",
-                            outFontFamily,
-                            outStyle);
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuID _rv;
-#ifndef GetMenuID
-       PyMac_PRECHECK(GetMenuID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMenuID(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuWidth(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef GetMenuWidth
-       PyMac_PRECHECK(GetMenuWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMenuWidth(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_GetMenuHeight(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef GetMenuHeight
-       PyMac_PRECHECK(GetMenuHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMenuHeight(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuID(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuID menuID;
-#ifndef SetMenuID
-       PyMac_PRECHECK(SetMenuID);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &menuID))
-               return NULL;
-       SetMenuID(_self->ob_itself,
-                 menuID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuWidth(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 width;
-#ifndef SetMenuWidth
-       PyMac_PRECHECK(SetMenuWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &width))
-               return NULL;
-       SetMenuWidth(_self->ob_itself,
-                    width);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_SetMenuHeight(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 height;
-#ifndef SetMenuHeight
-       PyMac_PRECHECK(SetMenuHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &height))
-               return NULL;
-       SetMenuHeight(_self->ob_itself,
-                     height);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_as_Resource(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef as_Resource
-       PyMac_PRECHECK(as_Resource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = as_Resource(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MenuObj_AppendMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 data;
-#ifndef AppendMenu
-       PyMac_PRECHECK(AppendMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, data))
-               return NULL;
-       AppendMenu(_self->ob_itself,
-                  data);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_InsertMenu(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short beforeID;
-#ifndef InsertMenu
-       PyMac_PRECHECK(InsertMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &beforeID))
-               return NULL;
-       InsertMenu(_self->ob_itself,
-                  beforeID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_InsertMenuItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 itemString;
-       short afterItem;
-#ifndef InsertMenuItem
-       PyMac_PRECHECK(InsertMenuItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetStr255, itemString,
-                             &afterItem))
-               return NULL;
-       InsertMenuItem(_self->ob_itself,
-                      itemString,
-                      afterItem);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_EnableMenuItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt16 item;
-#ifndef EnableMenuItem
-       PyMac_PRECHECK(EnableMenuItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &item))
-               return NULL;
-       EnableMenuItem(_self->ob_itself,
-                      item);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MenuObj_CheckMenuItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       Boolean checked;
-#ifndef CheckMenuItem
-       PyMac_PRECHECK(CheckMenuItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &item,
-                             &checked))
-               return NULL;
-       CheckMenuItem(_self->ob_itself,
-                     item,
-                     checked);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef MenuObj_methods[] = {
-       {"DisposeMenu", (PyCFunction)MenuObj_DisposeMenu, 1,
-        PyDoc_STR("() -> None")},
-       {"CalcMenuSize", (PyCFunction)MenuObj_CalcMenuSize, 1,
-        PyDoc_STR("() -> None")},
-       {"CountMenuItems", (PyCFunction)MenuObj_CountMenuItems, 1,
-        PyDoc_STR("() -> (UInt16 _rv)")},
-       {"GetMenuFont", (PyCFunction)MenuObj_GetMenuFont, 1,
-        PyDoc_STR("() -> (SInt16 outFontID, UInt16 outFontSize)")},
-       {"SetMenuFont", (PyCFunction)MenuObj_SetMenuFont, 1,
-        PyDoc_STR("(SInt16 inFontID, UInt16 inFontSize) -> None")},
-       {"GetMenuExcludesMarkColumn", (PyCFunction)MenuObj_GetMenuExcludesMarkColumn, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"SetMenuExcludesMarkColumn", (PyCFunction)MenuObj_SetMenuExcludesMarkColumn, 1,
-        PyDoc_STR("(Boolean excludesMark) -> None")},
-       {"IsValidMenu", (PyCFunction)MenuObj_IsValidMenu, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"GetMenuRetainCount", (PyCFunction)MenuObj_GetMenuRetainCount, 1,
-        PyDoc_STR("() -> (ItemCount _rv)")},
-       {"RetainMenu", (PyCFunction)MenuObj_RetainMenu, 1,
-        PyDoc_STR("() -> None")},
-       {"ReleaseMenu", (PyCFunction)MenuObj_ReleaseMenu, 1,
-        PyDoc_STR("() -> None")},
-       {"DuplicateMenu", (PyCFunction)MenuObj_DuplicateMenu, 1,
-        PyDoc_STR("() -> (MenuHandle outMenu)")},
-       {"CopyMenuTitleAsCFString", (PyCFunction)MenuObj_CopyMenuTitleAsCFString, 1,
-        PyDoc_STR("() -> (CFStringRef outString)")},
-       {"SetMenuTitleWithCFString", (PyCFunction)MenuObj_SetMenuTitleWithCFString, 1,
-        PyDoc_STR("(CFStringRef inString) -> None")},
-       {"InvalidateMenuSize", (PyCFunction)MenuObj_InvalidateMenuSize, 1,
-        PyDoc_STR("() -> None")},
-       {"IsMenuSizeInvalid", (PyCFunction)MenuObj_IsMenuSizeInvalid, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"MacAppendMenu", (PyCFunction)MenuObj_MacAppendMenu, 1,
-        PyDoc_STR("(Str255 data) -> None")},
-       {"InsertResMenu", (PyCFunction)MenuObj_InsertResMenu, 1,
-        PyDoc_STR("(ResType theType, short afterItem) -> None")},
-       {"AppendResMenu", (PyCFunction)MenuObj_AppendResMenu, 1,
-        PyDoc_STR("(ResType theType) -> None")},
-       {"MacInsertMenuItem", (PyCFunction)MenuObj_MacInsertMenuItem, 1,
-        PyDoc_STR("(Str255 itemString, short afterItem) -> None")},
-       {"DeleteMenuItem", (PyCFunction)MenuObj_DeleteMenuItem, 1,
-        PyDoc_STR("(short item) -> None")},
-       {"InsertFontResMenu", (PyCFunction)MenuObj_InsertFontResMenu, 1,
-        PyDoc_STR("(short afterItem, short scriptFilter) -> None")},
-       {"InsertIntlResMenu", (PyCFunction)MenuObj_InsertIntlResMenu, 1,
-        PyDoc_STR("(ResType theType, short afterItem, short scriptFilter) -> None")},
-       {"AppendMenuItemText", (PyCFunction)MenuObj_AppendMenuItemText, 1,
-        PyDoc_STR("(Str255 inString) -> None")},
-       {"InsertMenuItemText", (PyCFunction)MenuObj_InsertMenuItemText, 1,
-        PyDoc_STR("(Str255 inString, MenuItemIndex afterItem) -> None")},
-       {"CopyMenuItems", (PyCFunction)MenuObj_CopyMenuItems, 1,
-        PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems, MenuHandle inDestMenu, MenuItemIndex inInsertAfter) -> None")},
-       {"DeleteMenuItems", (PyCFunction)MenuObj_DeleteMenuItems, 1,
-        PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems) -> None")},
-       {"AppendMenuItemTextWithCFString", (PyCFunction)MenuObj_AppendMenuItemTextWithCFString, 1,
-        PyDoc_STR("(CFStringRef inString, MenuItemAttributes inAttributes, MenuCommand inCommandID) -> (MenuItemIndex outNewItem)")},
-       {"InsertMenuItemTextWithCFString", (PyCFunction)MenuObj_InsertMenuItemTextWithCFString, 1,
-        PyDoc_STR("(CFStringRef inString, MenuItemIndex inAfterItem, MenuItemAttributes inAttributes, MenuCommand inCommandID) -> None")},
-       {"PopUpMenuSelect", (PyCFunction)MenuObj_PopUpMenuSelect, 1,
-        PyDoc_STR("(short top, short left, short popUpItem) -> (long _rv)")},
-       {"InvalidateMenuEnabling", (PyCFunction)MenuObj_InvalidateMenuEnabling, 1,
-        PyDoc_STR("() -> None")},
-       {"IsMenuBarInvalid", (PyCFunction)MenuObj_IsMenuBarInvalid, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
-        PyDoc_STR("(MenuID beforeID) -> None")},
-       {"SetRootMenu", (PyCFunction)MenuObj_SetRootMenu, 1,
-        PyDoc_STR("() -> None")},
-       {"MacCheckMenuItem", (PyCFunction)MenuObj_MacCheckMenuItem, 1,
-        PyDoc_STR("(short item, Boolean checked) -> None")},
-       {"SetMenuItemText", (PyCFunction)MenuObj_SetMenuItemText, 1,
-        PyDoc_STR("(short item, Str255 itemString) -> None")},
-       {"GetMenuItemText", (PyCFunction)MenuObj_GetMenuItemText, 1,
-        PyDoc_STR("(short item) -> (Str255 itemString)")},
-       {"SetItemMark", (PyCFunction)MenuObj_SetItemMark, 1,
-        PyDoc_STR("(short item, CharParameter markChar) -> None")},
-       {"GetItemMark", (PyCFunction)MenuObj_GetItemMark, 1,
-        PyDoc_STR("(short item) -> (CharParameter markChar)")},
-       {"SetItemCmd", (PyCFunction)MenuObj_SetItemCmd, 1,
-        PyDoc_STR("(short item, CharParameter cmdChar) -> None")},
-       {"GetItemCmd", (PyCFunction)MenuObj_GetItemCmd, 1,
-        PyDoc_STR("(short item) -> (CharParameter cmdChar)")},
-       {"SetItemIcon", (PyCFunction)MenuObj_SetItemIcon, 1,
-        PyDoc_STR("(short item, short iconIndex) -> None")},
-       {"GetItemIcon", (PyCFunction)MenuObj_GetItemIcon, 1,
-        PyDoc_STR("(short item) -> (short iconIndex)")},
-       {"SetItemStyle", (PyCFunction)MenuObj_SetItemStyle, 1,
-        PyDoc_STR("(short item, StyleParameter chStyle) -> None")},
-       {"GetItemStyle", (PyCFunction)MenuObj_GetItemStyle, 1,
-        PyDoc_STR("(short item) -> (Style chStyle)")},
-       {"SetMenuItemCommandID", (PyCFunction)MenuObj_SetMenuItemCommandID, 1,
-        PyDoc_STR("(SInt16 inItem, MenuCommand inCommandID) -> None")},
-       {"GetMenuItemCommandID", (PyCFunction)MenuObj_GetMenuItemCommandID, 1,
-        PyDoc_STR("(SInt16 inItem) -> (MenuCommand outCommandID)")},
-       {"SetMenuItemModifiers", (PyCFunction)MenuObj_SetMenuItemModifiers, 1,
-        PyDoc_STR("(SInt16 inItem, UInt8 inModifiers) -> None")},
-       {"GetMenuItemModifiers", (PyCFunction)MenuObj_GetMenuItemModifiers, 1,
-        PyDoc_STR("(SInt16 inItem) -> (UInt8 outModifiers)")},
-       {"SetMenuItemIconHandle", (PyCFunction)MenuObj_SetMenuItemIconHandle, 1,
-        PyDoc_STR("(SInt16 inItem, UInt8 inIconType, Handle inIconHandle) -> None")},
-       {"GetMenuItemIconHandle", (PyCFunction)MenuObj_GetMenuItemIconHandle, 1,
-        PyDoc_STR("(SInt16 inItem) -> (UInt8 outIconType, Handle outIconHandle)")},
-       {"SetMenuItemTextEncoding", (PyCFunction)MenuObj_SetMenuItemTextEncoding, 1,
-        PyDoc_STR("(SInt16 inItem, TextEncoding inScriptID) -> None")},
-       {"GetMenuItemTextEncoding", (PyCFunction)MenuObj_GetMenuItemTextEncoding, 1,
-        PyDoc_STR("(SInt16 inItem) -> (TextEncoding outScriptID)")},
-       {"SetMenuItemHierarchicalID", (PyCFunction)MenuObj_SetMenuItemHierarchicalID, 1,
-        PyDoc_STR("(SInt16 inItem, MenuID inHierID) -> None")},
-       {"GetMenuItemHierarchicalID", (PyCFunction)MenuObj_GetMenuItemHierarchicalID, 1,
-        PyDoc_STR("(SInt16 inItem) -> (MenuID outHierID)")},
-       {"SetMenuItemFontID", (PyCFunction)MenuObj_SetMenuItemFontID, 1,
-        PyDoc_STR("(SInt16 inItem, SInt16 inFontID) -> None")},
-       {"GetMenuItemFontID", (PyCFunction)MenuObj_GetMenuItemFontID, 1,
-        PyDoc_STR("(SInt16 inItem) -> (SInt16 outFontID)")},
-       {"SetMenuItemRefCon", (PyCFunction)MenuObj_SetMenuItemRefCon, 1,
-        PyDoc_STR("(SInt16 inItem, UInt32 inRefCon) -> None")},
-       {"GetMenuItemRefCon", (PyCFunction)MenuObj_GetMenuItemRefCon, 1,
-        PyDoc_STR("(SInt16 inItem) -> (UInt32 outRefCon)")},
-       {"SetMenuItemKeyGlyph", (PyCFunction)MenuObj_SetMenuItemKeyGlyph, 1,
-        PyDoc_STR("(SInt16 inItem, SInt16 inGlyph) -> None")},
-       {"GetMenuItemKeyGlyph", (PyCFunction)MenuObj_GetMenuItemKeyGlyph, 1,
-        PyDoc_STR("(SInt16 inItem) -> (SInt16 outGlyph)")},
-       {"MacEnableMenuItem", (PyCFunction)MenuObj_MacEnableMenuItem, 1,
-        PyDoc_STR("(MenuItemIndex item) -> None")},
-       {"DisableMenuItem", (PyCFunction)MenuObj_DisableMenuItem, 1,
-        PyDoc_STR("(MenuItemIndex item) -> None")},
-       {"IsMenuItemEnabled", (PyCFunction)MenuObj_IsMenuItemEnabled, 1,
-        PyDoc_STR("(MenuItemIndex item) -> (Boolean _rv)")},
-       {"EnableMenuItemIcon", (PyCFunction)MenuObj_EnableMenuItemIcon, 1,
-        PyDoc_STR("(MenuItemIndex item) -> None")},
-       {"DisableMenuItemIcon", (PyCFunction)MenuObj_DisableMenuItemIcon, 1,
-        PyDoc_STR("(MenuItemIndex item) -> None")},
-       {"IsMenuItemIconEnabled", (PyCFunction)MenuObj_IsMenuItemIconEnabled, 1,
-        PyDoc_STR("(MenuItemIndex item) -> (Boolean _rv)")},
-       {"SetMenuItemHierarchicalMenu", (PyCFunction)MenuObj_SetMenuItemHierarchicalMenu, 1,
-        PyDoc_STR("(MenuItemIndex inItem, MenuHandle inHierMenu) -> None")},
-       {"GetMenuItemHierarchicalMenu", (PyCFunction)MenuObj_GetMenuItemHierarchicalMenu, 1,
-        PyDoc_STR("(MenuItemIndex inItem) -> (MenuHandle outHierMenu)")},
-       {"CopyMenuItemTextAsCFString", (PyCFunction)MenuObj_CopyMenuItemTextAsCFString, 1,
-        PyDoc_STR("(MenuItemIndex inItem) -> (CFStringRef outString)")},
-       {"SetMenuItemTextWithCFString", (PyCFunction)MenuObj_SetMenuItemTextWithCFString, 1,
-        PyDoc_STR("(MenuItemIndex inItem, CFStringRef inString) -> None")},
-       {"GetMenuItemIndent", (PyCFunction)MenuObj_GetMenuItemIndent, 1,
-        PyDoc_STR("(MenuItemIndex inItem) -> (UInt32 outIndent)")},
-       {"SetMenuItemIndent", (PyCFunction)MenuObj_SetMenuItemIndent, 1,
-        PyDoc_STR("(MenuItemIndex inItem, UInt32 inIndent) -> None")},
-       {"GetMenuItemCommandKey", (PyCFunction)MenuObj_GetMenuItemCommandKey, 1,
-        PyDoc_STR("(MenuItemIndex inItem, Boolean inGetVirtualKey) -> (UInt16 outKey)")},
-       {"SetMenuItemCommandKey", (PyCFunction)MenuObj_SetMenuItemCommandKey, 1,
-        PyDoc_STR("(MenuItemIndex inItem, Boolean inSetVirtualKey, UInt16 inKey) -> None")},
-       {"GetMenuItemPropertyAttributes", (PyCFunction)MenuObj_GetMenuItemPropertyAttributes, 1,
-        PyDoc_STR("(MenuItemIndex item, OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
-       {"ChangeMenuItemPropertyAttributes", (PyCFunction)MenuObj_ChangeMenuItemPropertyAttributes, 1,
-        PyDoc_STR("(MenuItemIndex item, OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
-       {"GetMenuAttributes", (PyCFunction)MenuObj_GetMenuAttributes, 1,
-        PyDoc_STR("() -> (MenuAttributes outAttributes)")},
-       {"ChangeMenuAttributes", (PyCFunction)MenuObj_ChangeMenuAttributes, 1,
-        PyDoc_STR("(MenuAttributes setTheseAttributes, MenuAttributes clearTheseAttributes) -> None")},
-       {"GetMenuItemAttributes", (PyCFunction)MenuObj_GetMenuItemAttributes, 1,
-        PyDoc_STR("(MenuItemIndex item) -> (MenuItemAttributes outAttributes)")},
-       {"ChangeMenuItemAttributes", (PyCFunction)MenuObj_ChangeMenuItemAttributes, 1,
-        PyDoc_STR("(MenuItemIndex item, MenuItemAttributes setTheseAttributes, MenuItemAttributes clearTheseAttributes) -> None")},
-       {"DisableAllMenuItems", (PyCFunction)MenuObj_DisableAllMenuItems, 1,
-        PyDoc_STR("() -> None")},
-       {"EnableAllMenuItems", (PyCFunction)MenuObj_EnableAllMenuItems, 1,
-        PyDoc_STR("() -> None")},
-       {"MenuHasEnabledItems", (PyCFunction)MenuObj_MenuHasEnabledItems, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"GetMenuType", (PyCFunction)MenuObj_GetMenuType, 1,
-        PyDoc_STR("() -> (UInt16 outType)")},
-       {"CountMenuItemsWithCommandID", (PyCFunction)MenuObj_CountMenuItemsWithCommandID, 1,
-        PyDoc_STR("(MenuCommand inCommandID) -> (ItemCount _rv)")},
-       {"GetIndMenuItemWithCommandID", (PyCFunction)MenuObj_GetIndMenuItemWithCommandID, 1,
-        PyDoc_STR("(MenuCommand inCommandID, UInt32 inItemIndex) -> (MenuHandle outMenu, MenuItemIndex outIndex)")},
-       {"EnableMenuCommand", (PyCFunction)MenuObj_EnableMenuCommand, 1,
-        PyDoc_STR("(MenuCommand inCommandID) -> None")},
-       {"DisableMenuCommand", (PyCFunction)MenuObj_DisableMenuCommand, 1,
-        PyDoc_STR("(MenuCommand inCommandID) -> None")},
-       {"IsMenuCommandEnabled", (PyCFunction)MenuObj_IsMenuCommandEnabled, 1,
-        PyDoc_STR("(MenuCommand inCommandID) -> (Boolean _rv)")},
-       {"SetMenuCommandMark", (PyCFunction)MenuObj_SetMenuCommandMark, 1,
-        PyDoc_STR("(MenuCommand inCommandID, UniChar inMark) -> None")},
-       {"GetMenuCommandMark", (PyCFunction)MenuObj_GetMenuCommandMark, 1,
-        PyDoc_STR("(MenuCommand inCommandID) -> (UniChar outMark)")},
-       {"GetMenuCommandPropertySize", (PyCFunction)MenuObj_GetMenuCommandPropertySize, 1,
-        PyDoc_STR("(MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> (ByteCount outSize)")},
-       {"RemoveMenuCommandProperty", (PyCFunction)MenuObj_RemoveMenuCommandProperty, 1,
-        PyDoc_STR("(MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> None")},
-       {"IsMenuItemInvalid", (PyCFunction)MenuObj_IsMenuItemInvalid, 1,
-        PyDoc_STR("(MenuItemIndex inItem) -> (Boolean _rv)")},
-       {"InvalidateMenuItems", (PyCFunction)MenuObj_InvalidateMenuItems, 1,
-        PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems) -> None")},
-       {"UpdateInvalidMenuItems", (PyCFunction)MenuObj_UpdateInvalidMenuItems, 1,
-        PyDoc_STR("() -> None")},
-       {"CreateStandardFontMenu", (PyCFunction)MenuObj_CreateStandardFontMenu, 1,
-        PyDoc_STR("(MenuItemIndex afterItem, MenuID firstHierMenuID, OptionBits options) -> (ItemCount outHierMenuCount)")},
-       {"UpdateStandardFontMenu", (PyCFunction)MenuObj_UpdateStandardFontMenu, 1,
-        PyDoc_STR("() -> (ItemCount outHierMenuCount)")},
-       {"GetFontFamilyFromMenuSelection", (PyCFunction)MenuObj_GetFontFamilyFromMenuSelection, 1,
-        PyDoc_STR("(MenuItemIndex item) -> (FMFontFamily outFontFamily, FMFontStyle outStyle)")},
-       {"GetMenuID", (PyCFunction)MenuObj_GetMenuID, 1,
-        PyDoc_STR("() -> (MenuID _rv)")},
-       {"GetMenuWidth", (PyCFunction)MenuObj_GetMenuWidth, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"GetMenuHeight", (PyCFunction)MenuObj_GetMenuHeight, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"SetMenuID", (PyCFunction)MenuObj_SetMenuID, 1,
-        PyDoc_STR("(MenuID menuID) -> None")},
-       {"SetMenuWidth", (PyCFunction)MenuObj_SetMenuWidth, 1,
-        PyDoc_STR("(SInt16 width) -> None")},
-       {"SetMenuHeight", (PyCFunction)MenuObj_SetMenuHeight, 1,
-        PyDoc_STR("(SInt16 height) -> None")},
-       {"as_Resource", (PyCFunction)MenuObj_as_Resource, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"AppendMenu", (PyCFunction)MenuObj_AppendMenu, 1,
-        PyDoc_STR("(Str255 data) -> None")},
-       {"InsertMenu", (PyCFunction)MenuObj_InsertMenu, 1,
-        PyDoc_STR("(short beforeID) -> None")},
-       {"InsertMenuItem", (PyCFunction)MenuObj_InsertMenuItem, 1,
-        PyDoc_STR("(Str255 itemString, short afterItem) -> None")},
-       {"EnableMenuItem", (PyCFunction)MenuObj_EnableMenuItem, 1,
-        PyDoc_STR("(UInt16 item) -> None")},
-       {"CheckMenuItem", (PyCFunction)MenuObj_CheckMenuItem, 1,
-        PyDoc_STR("(short item, Boolean checked) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define MenuObj_getsetlist NULL
-
-
-#define MenuObj_compare NULL
-
-#define MenuObj_repr NULL
-
-#define MenuObj_hash NULL
-#define MenuObj_tp_init 0
-
-#define MenuObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *MenuObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       MenuHandle itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MenuObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((MenuObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define MenuObj_tp_free PyObject_Del
-
-
-PyTypeObject Menu_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Menu.Menu", /*tp_name*/
-       sizeof(MenuObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) MenuObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) MenuObj_compare, /*tp_compare*/
-       (reprfunc) MenuObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) MenuObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       MenuObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       MenuObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       MenuObj_tp_init, /* tp_init */
-       MenuObj_tp_alloc, /* tp_alloc */
-       MenuObj_tp_new, /* tp_new */
-       MenuObj_tp_free, /* tp_free */
-};
-
-/* ---------------------- End object type Menu ---------------------- */
-
-
-static PyObject *Menu_NewMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle _rv;
-       MenuID menuID;
-       Str255 menuTitle;
-#ifndef NewMenu
-       PyMac_PRECHECK(NewMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &menuID,
-                             PyMac_GetStr255, menuTitle))
-               return NULL;
-       _rv = NewMenu(menuID,
-                     menuTitle);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Menu_MacGetMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle _rv;
-       short resourceID;
-#ifndef MacGetMenu
-       PyMac_PRECHECK(MacGetMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &resourceID))
-               return NULL;
-       _rv = MacGetMenu(resourceID);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Menu_CreateNewMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuID inMenuID;
-       MenuAttributes inMenuAttributes;
-       MenuHandle outMenuRef;
-#ifndef CreateNewMenu
-       PyMac_PRECHECK(CreateNewMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &inMenuID,
-                             &inMenuAttributes))
-               return NULL;
-       _err = CreateNewMenu(inMenuID,
-                            inMenuAttributes,
-                            &outMenuRef);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, outMenuRef);
-       return _res;
-}
-
-static PyObject *Menu_MenuKey(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       CharParameter ch;
-#ifndef MenuKey
-       PyMac_PRECHECK(MenuKey);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &ch))
-               return NULL;
-       _rv = MenuKey(ch);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_MenuSelect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       Point startPt;
-#ifndef MenuSelect
-       PyMac_PRECHECK(MenuSelect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &startPt))
-               return NULL;
-       _rv = MenuSelect(startPt);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_MenuChoice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef MenuChoice
-       PyMac_PRECHECK(MenuChoice);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MenuChoice();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_MenuEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-       EventRecord inEvent;
-#ifndef MenuEvent
-       PyMac_PRECHECK(MenuEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &inEvent))
-               return NULL;
-       _rv = MenuEvent(&inEvent);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_GetMBarHeight(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetMBarHeight
-       PyMac_PRECHECK(GetMBarHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMBarHeight();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_MacDrawMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef MacDrawMenuBar
-       PyMac_PRECHECK(MacDrawMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       MacDrawMenuBar();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_InvalMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef InvalMenuBar
-       PyMac_PRECHECK(InvalMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       InvalMenuBar();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_HiliteMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuID menuID;
-#ifndef HiliteMenu
-       PyMac_PRECHECK(HiliteMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &menuID))
-               return NULL;
-       HiliteMenu(menuID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_GetNewMBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuBarHandle _rv;
-       short menuBarID;
-#ifndef GetNewMBar
-       PyMac_PRECHECK(GetNewMBar);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &menuBarID))
-               return NULL;
-       _rv = GetNewMBar(menuBarID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Menu_GetMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuBarHandle _rv;
-#ifndef GetMenuBar
-       PyMac_PRECHECK(GetMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMenuBar();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Menu_SetMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuBarHandle mbar;
-#ifndef SetMenuBar
-       PyMac_PRECHECK(SetMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &mbar))
-               return NULL;
-       SetMenuBar(mbar);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_DuplicateMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuBarHandle inMbar;
-       MenuBarHandle outMbar;
-#ifndef DuplicateMenuBar
-       PyMac_PRECHECK(DuplicateMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &inMbar))
-               return NULL;
-       _err = DuplicateMenuBar(inMbar,
-                               &outMbar);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, outMbar);
-       return _res;
-}
-
-static PyObject *Menu_DisposeMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuBarHandle inMbar;
-#ifndef DisposeMenuBar
-       PyMac_PRECHECK(DisposeMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &inMbar))
-               return NULL;
-       _err = DisposeMenuBar(inMbar);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_GetMenuHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle _rv;
-       MenuID menuID;
-#ifndef GetMenuHandle
-       PyMac_PRECHECK(GetMenuHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &menuID))
-               return NULL;
-       _rv = GetMenuHandle(menuID);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Menu_MacDeleteMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuID menuID;
-#ifndef MacDeleteMenu
-       PyMac_PRECHECK(MacDeleteMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &menuID))
-               return NULL;
-       MacDeleteMenu(menuID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_ClearMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ClearMenuBar
-       PyMac_PRECHECK(ClearMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ClearMenuBar();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_SetMenuFlashCount(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short count;
-#ifndef SetMenuFlashCount
-       PyMac_PRECHECK(SetMenuFlashCount);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &count))
-               return NULL;
-       SetMenuFlashCount(count);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_FlashMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuID menuID;
-#ifndef FlashMenuBar
-       PyMac_PRECHECK(FlashMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &menuID))
-               return NULL;
-       FlashMenuBar(menuID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_IsMenuBarVisible(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsMenuBarVisible
-       PyMac_PRECHECK(IsMenuBarVisible);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsMenuBarVisible();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_ShowMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ShowMenuBar
-       PyMac_PRECHECK(ShowMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ShowMenuBar();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_HideMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef HideMenuBar
-       PyMac_PRECHECK(HideMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       HideMenuBar();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_AcquireRootMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle _rv;
-#ifndef AcquireRootMenu
-       PyMac_PRECHECK(AcquireRootMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = AcquireRootMenu();
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Menu_DeleteMCEntries(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuID menuID;
-       short menuItem;
-#ifndef DeleteMCEntries
-       PyMac_PRECHECK(DeleteMCEntries);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &menuID,
-                             &menuItem))
-               return NULL;
-       DeleteMCEntries(menuID,
-                       menuItem);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_InitContextualMenus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef InitContextualMenus
-       PyMac_PRECHECK(InitContextualMenus);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = InitContextualMenus();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_IsShowContextualMenuClick(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord inEvent;
-#ifndef IsShowContextualMenuClick
-       PyMac_PRECHECK(IsShowContextualMenuClick);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &inEvent))
-               return NULL;
-       _rv = IsShowContextualMenuClick(&inEvent);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_LMGetTheMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef LMGetTheMenu
-       PyMac_PRECHECK(LMGetTheMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetTheMenu();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_as_Menu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle _rv;
-       Handle h;
-#ifndef as_Menu
-       PyMac_PRECHECK(as_Menu);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &h))
-               return NULL;
-       _rv = as_Menu(h);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Menu_GetMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle _rv;
-       short resourceID;
-#ifndef GetMenu
-       PyMac_PRECHECK(GetMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &resourceID))
-               return NULL;
-       _rv = GetMenu(resourceID);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Menu_DeleteMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short menuID;
-#ifndef DeleteMenu
-       PyMac_PRECHECK(DeleteMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &menuID))
-               return NULL;
-       DeleteMenu(menuID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_DrawMenuBar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DrawMenuBar
-       PyMac_PRECHECK(DrawMenuBar);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DrawMenuBar();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_CountMenuItemsWithCommandID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ItemCount _rv;
-       MenuHandle inMenu;
-       MenuCommand inCommandID;
-#ifndef CountMenuItemsWithCommandID
-       PyMac_PRECHECK(CountMenuItemsWithCommandID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             OptMenuObj_Convert, &inMenu,
-                             &inCommandID))
-               return NULL;
-       _rv = CountMenuItemsWithCommandID(inMenu,
-                                         inCommandID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_GetIndMenuItemWithCommandID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuHandle inMenu;
-       MenuCommand inCommandID;
-       UInt32 inItemIndex;
-       MenuHandle outMenu;
-       MenuItemIndex outIndex;
-#ifndef GetIndMenuItemWithCommandID
-       PyMac_PRECHECK(GetIndMenuItemWithCommandID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             OptMenuObj_Convert, &inMenu,
-                             &inCommandID,
-                             &inItemIndex))
-               return NULL;
-       _err = GetIndMenuItemWithCommandID(inMenu,
-                                          inCommandID,
-                                          inItemIndex,
-                                          &outMenu,
-                                          &outIndex);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&h",
-                            MenuObj_New, outMenu,
-                            outIndex);
-       return _res;
-}
-
-static PyObject *Menu_EnableMenuCommand(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle inMenu;
-       MenuCommand inCommandID;
-#ifndef EnableMenuCommand
-       PyMac_PRECHECK(EnableMenuCommand);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             OptMenuObj_Convert, &inMenu,
-                             &inCommandID))
-               return NULL;
-       EnableMenuCommand(inMenu,
-                         inCommandID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_DisableMenuCommand(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MenuHandle inMenu;
-       MenuCommand inCommandID;
-#ifndef DisableMenuCommand
-       PyMac_PRECHECK(DisableMenuCommand);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             OptMenuObj_Convert, &inMenu,
-                             &inCommandID))
-               return NULL;
-       DisableMenuCommand(inMenu,
-                          inCommandID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_IsMenuCommandEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       MenuHandle inMenu;
-       MenuCommand inCommandID;
-#ifndef IsMenuCommandEnabled
-       PyMac_PRECHECK(IsMenuCommandEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             OptMenuObj_Convert, &inMenu,
-                             &inCommandID))
-               return NULL;
-       _rv = IsMenuCommandEnabled(inMenu,
-                                  inCommandID);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Menu_SetMenuCommandMark(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuHandle inMenu;
-       MenuCommand inCommandID;
-       UniChar inMark;
-#ifndef SetMenuCommandMark
-       PyMac_PRECHECK(SetMenuCommandMark);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lh",
-                             OptMenuObj_Convert, &inMenu,
-                             &inCommandID,
-                             &inMark))
-               return NULL;
-       _err = SetMenuCommandMark(inMenu,
-                                 inCommandID,
-                                 inMark);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Menu_GetMenuCommandMark(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuHandle inMenu;
-       MenuCommand inCommandID;
-       UniChar outMark;
-#ifndef GetMenuCommandMark
-       PyMac_PRECHECK(GetMenuCommandMark);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             OptMenuObj_Convert, &inMenu,
-                             &inCommandID))
-               return NULL;
-       _err = GetMenuCommandMark(inMenu,
-                                 inCommandID,
-                                 &outMark);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outMark);
-       return _res;
-}
-
-static PyObject *Menu_GetMenuCommandPropertySize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuHandle inMenu;
-       MenuCommand inCommandID;
-       OSType inPropertyCreator;
-       OSType inPropertyTag;
-       ByteCount outSize;
-#ifndef GetMenuCommandPropertySize
-       PyMac_PRECHECK(GetMenuCommandPropertySize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&O&",
-                             OptMenuObj_Convert, &inMenu,
-                             &inCommandID,
-                             PyMac_GetOSType, &inPropertyCreator,
-                             PyMac_GetOSType, &inPropertyTag))
-               return NULL;
-       _err = GetMenuCommandPropertySize(inMenu,
-                                         inCommandID,
-                                         inPropertyCreator,
-                                         inPropertyTag,
-                                         &outSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outSize);
-       return _res;
-}
-
-static PyObject *Menu_RemoveMenuCommandProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuHandle inMenu;
-       MenuCommand inCommandID;
-       OSType inPropertyCreator;
-       OSType inPropertyTag;
-#ifndef RemoveMenuCommandProperty
-       PyMac_PRECHECK(RemoveMenuCommandProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&O&",
-                             OptMenuObj_Convert, &inMenu,
-                             &inCommandID,
-                             PyMac_GetOSType, &inPropertyCreator,
-                             PyMac_GetOSType, &inPropertyTag))
-               return NULL;
-       _err = RemoveMenuCommandProperty(inMenu,
-                                        inCommandID,
-                                        inPropertyCreator,
-                                        inPropertyTag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef Menu_methods[] = {
-       {"NewMenu", (PyCFunction)Menu_NewMenu, 1,
-        PyDoc_STR("(MenuID menuID, Str255 menuTitle) -> (MenuHandle _rv)")},
-       {"MacGetMenu", (PyCFunction)Menu_MacGetMenu, 1,
-        PyDoc_STR("(short resourceID) -> (MenuHandle _rv)")},
-       {"CreateNewMenu", (PyCFunction)Menu_CreateNewMenu, 1,
-        PyDoc_STR("(MenuID inMenuID, MenuAttributes inMenuAttributes) -> (MenuHandle outMenuRef)")},
-       {"MenuKey", (PyCFunction)Menu_MenuKey, 1,
-        PyDoc_STR("(CharParameter ch) -> (long _rv)")},
-       {"MenuSelect", (PyCFunction)Menu_MenuSelect, 1,
-        PyDoc_STR("(Point startPt) -> (long _rv)")},
-       {"MenuChoice", (PyCFunction)Menu_MenuChoice, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"MenuEvent", (PyCFunction)Menu_MenuEvent, 1,
-        PyDoc_STR("(EventRecord inEvent) -> (UInt32 _rv)")},
-       {"GetMBarHeight", (PyCFunction)Menu_GetMBarHeight, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"MacDrawMenuBar", (PyCFunction)Menu_MacDrawMenuBar, 1,
-        PyDoc_STR("() -> None")},
-       {"InvalMenuBar", (PyCFunction)Menu_InvalMenuBar, 1,
-        PyDoc_STR("() -> None")},
-       {"HiliteMenu", (PyCFunction)Menu_HiliteMenu, 1,
-        PyDoc_STR("(MenuID menuID) -> None")},
-       {"GetNewMBar", (PyCFunction)Menu_GetNewMBar, 1,
-        PyDoc_STR("(short menuBarID) -> (MenuBarHandle _rv)")},
-       {"GetMenuBar", (PyCFunction)Menu_GetMenuBar, 1,
-        PyDoc_STR("() -> (MenuBarHandle _rv)")},
-       {"SetMenuBar", (PyCFunction)Menu_SetMenuBar, 1,
-        PyDoc_STR("(MenuBarHandle mbar) -> None")},
-       {"DuplicateMenuBar", (PyCFunction)Menu_DuplicateMenuBar, 1,
-        PyDoc_STR("(MenuBarHandle inMbar) -> (MenuBarHandle outMbar)")},
-       {"DisposeMenuBar", (PyCFunction)Menu_DisposeMenuBar, 1,
-        PyDoc_STR("(MenuBarHandle inMbar) -> None")},
-       {"GetMenuHandle", (PyCFunction)Menu_GetMenuHandle, 1,
-        PyDoc_STR("(MenuID menuID) -> (MenuHandle _rv)")},
-       {"MacDeleteMenu", (PyCFunction)Menu_MacDeleteMenu, 1,
-        PyDoc_STR("(MenuID menuID) -> None")},
-       {"ClearMenuBar", (PyCFunction)Menu_ClearMenuBar, 1,
-        PyDoc_STR("() -> None")},
-       {"SetMenuFlashCount", (PyCFunction)Menu_SetMenuFlashCount, 1,
-        PyDoc_STR("(short count) -> None")},
-       {"FlashMenuBar", (PyCFunction)Menu_FlashMenuBar, 1,
-        PyDoc_STR("(MenuID menuID) -> None")},
-       {"IsMenuBarVisible", (PyCFunction)Menu_IsMenuBarVisible, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"ShowMenuBar", (PyCFunction)Menu_ShowMenuBar, 1,
-        PyDoc_STR("() -> None")},
-       {"HideMenuBar", (PyCFunction)Menu_HideMenuBar, 1,
-        PyDoc_STR("() -> None")},
-       {"AcquireRootMenu", (PyCFunction)Menu_AcquireRootMenu, 1,
-        PyDoc_STR("() -> (MenuHandle _rv)")},
-       {"DeleteMCEntries", (PyCFunction)Menu_DeleteMCEntries, 1,
-        PyDoc_STR("(MenuID menuID, short menuItem) -> None")},
-       {"InitContextualMenus", (PyCFunction)Menu_InitContextualMenus, 1,
-        PyDoc_STR("() -> None")},
-       {"IsShowContextualMenuClick", (PyCFunction)Menu_IsShowContextualMenuClick, 1,
-        PyDoc_STR("(EventRecord inEvent) -> (Boolean _rv)")},
-       {"LMGetTheMenu", (PyCFunction)Menu_LMGetTheMenu, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"as_Menu", (PyCFunction)Menu_as_Menu, 1,
-        PyDoc_STR("(Handle h) -> (MenuHandle _rv)")},
-       {"GetMenu", (PyCFunction)Menu_GetMenu, 1,
-        PyDoc_STR("(short resourceID) -> (MenuHandle _rv)")},
-       {"DeleteMenu", (PyCFunction)Menu_DeleteMenu, 1,
-        PyDoc_STR("(short menuID) -> None")},
-       {"DrawMenuBar", (PyCFunction)Menu_DrawMenuBar, 1,
-        PyDoc_STR("() -> None")},
-       {"CountMenuItemsWithCommandID", (PyCFunction)Menu_CountMenuItemsWithCommandID, 1,
-        PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (ItemCount _rv)")},
-       {"GetIndMenuItemWithCommandID", (PyCFunction)Menu_GetIndMenuItemWithCommandID, 1,
-        PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, UInt32 inItemIndex) -> (MenuHandle outMenu, MenuItemIndex outIndex)")},
-       {"EnableMenuCommand", (PyCFunction)Menu_EnableMenuCommand, 1,
-        PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> None")},
-       {"DisableMenuCommand", (PyCFunction)Menu_DisableMenuCommand, 1,
-        PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> None")},
-       {"IsMenuCommandEnabled", (PyCFunction)Menu_IsMenuCommandEnabled, 1,
-        PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (Boolean _rv)")},
-       {"SetMenuCommandMark", (PyCFunction)Menu_SetMenuCommandMark, 1,
-        PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, UniChar inMark) -> None")},
-       {"GetMenuCommandMark", (PyCFunction)Menu_GetMenuCommandMark, 1,
-        PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (UniChar outMark)")},
-       {"GetMenuCommandPropertySize", (PyCFunction)Menu_GetMenuCommandPropertySize, 1,
-        PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> (ByteCount outSize)")},
-       {"RemoveMenuCommandProperty", (PyCFunction)Menu_RemoveMenuCommandProperty, 1,
-        PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> None")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Menu(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuHandle, MenuObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert);
-
-
-       m = Py_InitModule("_Menu", Menu_methods);
-       d = PyModule_GetDict(m);
-       Menu_Error = PyMac_GetOSErrException();
-       if (Menu_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Menu_Error) != 0)
-               return;
-       Py_TYPE(&Menu_Type) = &PyType_Type;
-       if (PyType_Ready(&Menu_Type) < 0) return;
-       Py_INCREF(&Menu_Type);
-       PyModule_AddObject(m, "Menu", (PyObject *)&Menu_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Menu_Type);
-       PyModule_AddObject(m, "MenuType", (PyObject *)&Menu_Type);
-}
-
-/* ======================== End module _Menu ======================== */
-
diff --git a/Mac/Modules/menu/menuedit.py b/Mac/Modules/menu/menuedit.py
deleted file mode 100644 (file)
index b74301d..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-f = Function(MenuHandle, 'as_Menu', (Handle, 'h', InMode))
-functions.append(f)
-
-f = Method(Handle, 'as_Resource', (MenuHandle, 'h', InMode))
-methods.append(f)
-
-# The following have "Mac" prepended to their names in the include file
-# since UH 3.1, sigh...
-f = Function(MenuHandle, 'GetMenu',
-    (short, 'resourceID', InMode),
-)
-functions.append(f)
-
-f = Method(void, 'AppendMenu',
-    (MenuHandle, 'menu', InMode),
-    (ConstStr255Param, 'data', InMode),
-)
-methods.append(f)
-
-f = Method(void, 'InsertMenu',
-    (MenuHandle, 'theMenu', InMode),
-    (short, 'beforeID', InMode),
-)
-methods.append(f)
-
-f = Function(void, 'DeleteMenu',
-    (short, 'menuID', InMode),
-)
-functions.append(f)
-
-f = Method(void, 'InsertMenuItem',
-    (MenuHandle, 'theMenu', InMode),
-    (ConstStr255Param, 'itemString', InMode),
-    (short, 'afterItem', InMode),
-)
-methods.append(f)
-
-f = Method(void, 'EnableMenuItem',
-    (MenuHandle, 'theMenu', InMode),
-    (UInt16, 'item', InMode),
-)
-methods.append(f)
-
-f = Method(void, 'CheckMenuItem',
-    (MenuRef, 'theMenu', InMode),
-    (short, 'item', InMode),
-    (Boolean, 'checked', InMode),
-)
-methods.append(f)
-
-
-f = Function(void, 'DrawMenuBar',
-)
-functions.append(f)
-
-
-#
-# The following functions take an *optional* MenuRef as their first argument
-#
-
-f = Function(ItemCount, 'CountMenuItemsWithCommandID',
-    (OptMenuRef, 'inMenu', InMode),
-    (MenuCommand, 'inCommandID', InMode),
-)
-functions.append(f)
-
-f = Function(OSStatus, 'GetIndMenuItemWithCommandID',
-    (OptMenuRef, 'inMenu', InMode),
-    (MenuCommand, 'inCommandID', InMode),
-    (UInt32, 'inItemIndex', InMode),
-    (MenuRef, 'outMenu', OutMode),
-    (MenuItemIndex, 'outIndex', OutMode),
-)
-functions.append(f)
-
-f = Function(void, 'EnableMenuCommand',
-    (OptMenuRef, 'inMenu', InMode),
-    (MenuCommand, 'inCommandID', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'DisableMenuCommand',
-    (OptMenuRef, 'inMenu', InMode),
-    (MenuCommand, 'inCommandID', InMode),
-)
-functions.append(f)
-
-f = Function(Boolean, 'IsMenuCommandEnabled',
-    (OptMenuRef, 'inMenu', InMode),
-    (MenuCommand, 'inCommandID', InMode),
-)
-functions.append(f)
-
-f = Function(OSStatus, 'SetMenuCommandMark',
-    (OptMenuRef, 'inMenu', InMode),
-    (MenuCommand, 'inCommandID', InMode),
-    (UniChar, 'inMark', InMode),
-)
-functions.append(f)
-
-f = Function(OSStatus, 'GetMenuCommandMark',
-    (OptMenuRef, 'inMenu', InMode),
-    (MenuCommand, 'inCommandID', InMode),
-    (UniChar, 'outMark', OutMode),
-)
-functions.append(f)
-
-f = Function(OSStatus, 'GetMenuCommandPropertySize',
-    (OptMenuRef, 'inMenu', InMode),
-    (MenuCommand, 'inCommandID', InMode),
-    (OSType, 'inPropertyCreator', InMode),
-    (OSType, 'inPropertyTag', InMode),
-    (ByteCount, 'outSize', OutMode),
-)
-functions.append(f)
-
-f = Function(OSStatus, 'RemoveMenuCommandProperty',
-    (OptMenuRef, 'inMenu', InMode),
-    (MenuCommand, 'inCommandID', InMode),
-    (OSType, 'inPropertyCreator', InMode),
-    (OSType, 'inPropertyTag', InMode),
-)
-functions.append(f)
diff --git a/Mac/Modules/menu/menuscan.py b/Mac/Modules/menu/menuscan.py
deleted file mode 100644 (file)
index e20775d..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-# Scan <Menus.h>, generating menugen.py.
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-def main():
-    input = "Menus.h"
-    output = "menugen.py"
-    defsoutput = TOOLBOXDIR + "Menus.py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now doing 'import menusupport' ===")
-    import menusupport
-    print("=== Done.  It's up to you to compile Menumodule.c ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in ("MenuHandle", "MenuRef") and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-##                      "IsShowContextualMenuClick", # Can't find it in the library
-##                      "InitContextualMenus", # ditto
-                "GetMenuItemProperty",  # difficult for the moment
-                "GetMenuItemPropertySize",
-                "SetMenuItemProperty",
-                "RemoveMenuItemProperty",
-                "SetMenuCommandProperty",
-                "GetMenuCommandProperty",
-                "GetMenuTitle", # Funny arg/returnvalue
-                "SetMenuTitle",
-                "SetMenuTitleIcon", # void*
-                # OS8 calls:
-                'GetMenuItemRefCon2',
-                'SetMenuItemRefCon2',
-                'EnableItem',
-                'DisableItem',
-                'CheckItem',
-                'CountMItems',
-                'OpenDeskAcc',
-                'SystemEdit',
-                'SystemMenu',
-                'SetMenuFlash',
-                'InitMenus',
-                'InitProcMenu',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                'MCTableHandle',
-                'MCEntryPtr',
-                'MCTablePtr',
-                'AEDesc_ptr', # For now: doable, but not easy
-                'ProcessSerialNumber', # ditto
-                "MenuDefSpecPtr", # Too difficult for now
-                "MenuDefSpec_ptr", # ditto
-                "MenuTrackingData",
-                "void_ptr",     # Don't know yet.
-                "EventRef",     # For now, not exported yet.
-                "MenuItemDataPtr", # Not yet.
-                "MenuItemDataRec_ptr",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("Str255", "itemString", "InMode")],
-                 [("*", "*", "OutMode")]),
-
-                ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
-                 [("InBuffer", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("long", "*", "InMode"),
-                                            ("long", "*", "OutMode")],
-                 [("VarVarOutBuffer", "*", "InOutMode")]),
-                ([("MenuRef", 'outHierMenu', "OutMode")],
-                 [("OptMenuRef", 'outHierMenu', "OutMode")]),
-                ]
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/menu/menusupport.py b/Mac/Modules/menu/menusupport.py
deleted file mode 100644 (file)
index 93d489b..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Menus.h'               # The Apple header file
-MODNAME = '_Menu'                       # The name of the module
-OBJECTNAME = 'Menu'                     # The basic name of the objects used here
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Menu'                      # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + 'Handle'      # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-EXTRAFILE = string.lower(MODPREFIX) + 'edit.py' # A similar file but hand-made
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-MenuHandle = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
-MenuRef = MenuHandle
-OptMenuRef = OpaqueByValueType(OBJECTTYPE, "Opt" + OBJECTPREFIX)
-Handle = OpaqueByValueType("Handle", "ResObj")
-MenuBarHandle = OpaqueByValueType("MenuBarHandle", "ResObj")
-MenuID = Type("MenuID", "h")
-MenuItemIndex = Type("MenuItemIndex", "h")
-MenuItemID = Type("MenuItemID", "l")
-MenuCommand = Type("MenuCommand", "l")
-MenuAttributes = Type("MenuAttributes", "l")
-MenuItemAttributes = Type("MenuItemAttributes", "l")
-unsigned_char = Type('unsigned char', 'b')
-FMFontFamily = Type("FMFontFamily", "h")
-FMFontStyle = Type("FMFontStyle", "h")
-UniChar = Type("UniChar", "h")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-
-extern PyObject *_MenuObj_New(MenuHandle);
-extern int _MenuObj_Convert(PyObject *, MenuHandle *);
-
-#define MenuObj_New _MenuObj_New
-#define MenuObj_Convert _MenuObj_Convert
-#endif
-
-#define as_Menu(h) ((MenuHandle)h)
-#define as_Resource(h) ((Handle)h)
-
-
-/* Alternative version of MenuObj_New, which returns None for NULL argument */
-PyObject *OptMenuObj_New(MenuRef itself)
-{
-        if (itself == NULL) {
-                Py_INCREF(Py_None);
-                return Py_None;
-        }
-        return MenuObj_New(itself);
-}
-
-/* Alternative version of MenuObj_Convert, which returns NULL for a None argument */
-int OptMenuObj_Convert(PyObject *v, MenuRef *p_itself)
-{
-        if ( v == Py_None ) {
-                *p_itself = NULL;
-                return 1;
-        }
-        return MenuObj_Convert(v, p_itself);
-}
-"""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuHandle, MenuObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert);
-"""
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    pass
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-exec(open(EXTRAFILE).read())
-
-# add the populated lists to the generator groups
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c
deleted file mode 100644 (file)
index 7a5ea38..0000000
+++ /dev/null
@@ -1,1679 +0,0 @@
-
-/* ========================== Module _Mlte ========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-/* For now we declare them forward here. They'll go to mactoolbox later */
-static PyObject *TXNObj_New(TXNObject);
-static int TXNObj_Convert(PyObject *, TXNObject *);
-static PyObject *TXNFontMenuObj_New(TXNFontMenuObject);
-static int TXNFontMenuObj_Convert(PyObject *, TXNFontMenuObject *);
-
-// ADD declarations
-#ifdef NOTYET_USE_TOOLBOX_OBJECT_GLUE
-//extern PyObject *_CFTypeRefObj_New(CFTypeRef);
-//extern int _CFTypeRefObj_Convert(PyObject *, CFTypeRef *);
-
-//#define CFTypeRefObj_New _CFTypeRefObj_New
-//#define CFTypeRefObj_Convert _CFTypeRefObj_Convert
-#endif
-
-/*
-** Parse an optional fsspec
-*/
-static int
-OptFSSpecPtr_Convert(PyObject *v, FSSpec **p_itself)
-{
-        static FSSpec fss;
-        if (v == Py_None)
-        {
-                *p_itself = NULL;
-                return 1;
-        }
-        *p_itself = &fss;
-        return PyMac_GetFSSpec(v, *p_itself);
-}
-
-/*
-** Parse an optional GWorld
-*/
-static int
-OptGWorldObj_Convert(PyObject *v, GWorldPtr *p_itself)
-{
-        if (v == Py_None)
-        {
-                *p_itself = NULL;
-                return 1;
-        }
-        return GWorldObj_Convert(v, p_itself);
-}
-
-
-static PyObject *Mlte_Error;
-
-/* --------------------- Object type TXNObject ---------------------- */
-
-PyTypeObject TXNObject_Type;
-
-#define TXNObj_Check(x) (Py_TYPE(x) == &TXNObject_Type || PyObject_TypeCheck((x), &TXNObject_Type))
-
-typedef struct TXNObjectObject {
-       PyObject_HEAD
-       TXNObject ob_itself;
-} TXNObjectObject;
-
-PyObject *TXNObj_New(TXNObject itself)
-{
-       TXNObjectObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(TXNObjectObject, &TXNObject_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int TXNObj_Convert(PyObject *v, TXNObject *p_itself)
-{
-       if (!TXNObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "TXNObject required");
-               return 0;
-       }
-       *p_itself = ((TXNObjectObject *)v)->ob_itself;
-       return 1;
-}
-
-static void TXNObj_dealloc(TXNObjectObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *TXNObj_TXNDeleteObject(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TXNDeleteObject
-       PyMac_PRECHECK(TXNDeleteObject);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNDeleteObject(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNResizeFrame(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 iWidth;
-       UInt32 iHeight;
-       TXNFrameID iTXNFrameID;
-#ifndef TXNResizeFrame
-       PyMac_PRECHECK(TXNResizeFrame);
-#endif
-       if (!PyArg_ParseTuple(_args, "lll",
-                             &iWidth,
-                             &iHeight,
-                             &iTXNFrameID))
-               return NULL;
-       TXNResizeFrame(_self->ob_itself,
-                      iWidth,
-                      iHeight,
-                      iTXNFrameID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNSetFrameBounds(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 iTop;
-       SInt32 iLeft;
-       SInt32 iBottom;
-       SInt32 iRight;
-       TXNFrameID iTXNFrameID;
-#ifndef TXNSetFrameBounds
-       PyMac_PRECHECK(TXNSetFrameBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "lllll",
-                             &iTop,
-                             &iLeft,
-                             &iBottom,
-                             &iRight,
-                             &iTXNFrameID))
-               return NULL;
-       TXNSetFrameBounds(_self->ob_itself,
-                         iTop,
-                         iLeft,
-                         iBottom,
-                         iRight,
-                         iTXNFrameID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNKeyDown(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventRecord iEvent;
-#ifndef TXNKeyDown
-       PyMac_PRECHECK(TXNKeyDown);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &iEvent))
-               return NULL;
-       TXNKeyDown(_self->ob_itself,
-                  &iEvent);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNAdjustCursor(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle ioCursorRgn;
-#ifndef TXNAdjustCursor
-       PyMac_PRECHECK(TXNAdjustCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             OptResObj_Convert, &ioCursorRgn))
-               return NULL;
-       TXNAdjustCursor(_self->ob_itself,
-                       ioCursorRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNClick(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventRecord iEvent;
-#ifndef TXNClick
-       PyMac_PRECHECK(TXNClick);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &iEvent))
-               return NULL;
-       TXNClick(_self->ob_itself,
-                &iEvent);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNSelectAll(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TXNSelectAll
-       PyMac_PRECHECK(TXNSelectAll);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNSelectAll(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNFocus(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean iBecomingFocused;
-#ifndef TXNFocus
-       PyMac_PRECHECK(TXNFocus);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &iBecomingFocused))
-               return NULL;
-       TXNFocus(_self->ob_itself,
-                iBecomingFocused);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNUpdate(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TXNUpdate
-       PyMac_PRECHECK(TXNUpdate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNUpdate(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNDraw(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GWorldPtr iDrawPort;
-#ifndef TXNDraw
-       PyMac_PRECHECK(TXNDraw);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             OptGWorldObj_Convert, &iDrawPort))
-               return NULL;
-       TXNDraw(_self->ob_itself,
-               iDrawPort);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNForceUpdate(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TXNForceUpdate
-       PyMac_PRECHECK(TXNForceUpdate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNForceUpdate(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNGetSleepTicks(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt32 _rv;
-#ifndef TXNGetSleepTicks
-       PyMac_PRECHECK(TXNGetSleepTicks);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNGetSleepTicks(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNIdle(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TXNIdle
-       PyMac_PRECHECK(TXNIdle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNIdle(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNGrowWindow(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventRecord iEvent;
-#ifndef TXNGrowWindow
-       PyMac_PRECHECK(TXNGrowWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &iEvent))
-               return NULL;
-       TXNGrowWindow(_self->ob_itself,
-                     &iEvent);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNZoomWindow(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 iPart;
-#ifndef TXNZoomWindow
-       PyMac_PRECHECK(TXNZoomWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &iPart))
-               return NULL;
-       TXNZoomWindow(_self->ob_itself,
-                     iPart);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNCanUndo(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       TXNActionKey oTXNActionKey;
-#ifndef TXNCanUndo
-       PyMac_PRECHECK(TXNCanUndo);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNCanUndo(_self->ob_itself,
-                        &oTXNActionKey);
-       _res = Py_BuildValue("bl",
-                            _rv,
-                            oTXNActionKey);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNUndo(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TXNUndo
-       PyMac_PRECHECK(TXNUndo);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNUndo(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNCanRedo(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       TXNActionKey oTXNActionKey;
-#ifndef TXNCanRedo
-       PyMac_PRECHECK(TXNCanRedo);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNCanRedo(_self->ob_itself,
-                        &oTXNActionKey);
-       _res = Py_BuildValue("bl",
-                            _rv,
-                            oTXNActionKey);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNRedo(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TXNRedo
-       PyMac_PRECHECK(TXNRedo);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNRedo(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNCut(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNCut
-       PyMac_PRECHECK(TXNCut);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNCut(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNCopy(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNCopy
-       PyMac_PRECHECK(TXNCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNCopy(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNPaste(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNPaste
-       PyMac_PRECHECK(TXNPaste);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNPaste(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNClear(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNClear
-       PyMac_PRECHECK(TXNClear);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNClear(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNGetSelection(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TXNOffset oStartOffset;
-       TXNOffset oEndOffset;
-#ifndef TXNGetSelection
-       PyMac_PRECHECK(TXNGetSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNGetSelection(_self->ob_itself,
-                       &oStartOffset,
-                       &oEndOffset);
-       _res = Py_BuildValue("ll",
-                            oStartOffset,
-                            oEndOffset);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNShowSelection(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean iShowEnd;
-#ifndef TXNShowSelection
-       PyMac_PRECHECK(TXNShowSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &iShowEnd))
-               return NULL;
-       TXNShowSelection(_self->ob_itself,
-                        iShowEnd);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNIsSelectionEmpty(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef TXNIsSelectionEmpty
-       PyMac_PRECHECK(TXNIsSelectionEmpty);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNIsSelectionEmpty(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNSetSelection(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       TXNOffset iStartOffset;
-       TXNOffset iEndOffset;
-#ifndef TXNSetSelection
-       PyMac_PRECHECK(TXNSetSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &iStartOffset,
-                             &iEndOffset))
-               return NULL;
-       _err = TXNSetSelection(_self->ob_itself,
-                              iStartOffset,
-                              iEndOffset);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNCountRunsInRange(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       TXNOffset iStartOffset;
-       TXNOffset iEndOffset;
-       ItemCount oRunCount;
-#ifndef TXNCountRunsInRange
-       PyMac_PRECHECK(TXNCountRunsInRange);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &iStartOffset,
-                             &iEndOffset))
-               return NULL;
-       _err = TXNCountRunsInRange(_self->ob_itself,
-                                  iStartOffset,
-                                  iEndOffset,
-                                  &oRunCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            oRunCount);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNDataSize(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ByteCount _rv;
-#ifndef TXNDataSize
-       PyMac_PRECHECK(TXNDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNDataSize(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNGetData(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       TXNOffset iStartOffset;
-       TXNOffset iEndOffset;
-       Handle oDataHandle;
-#ifndef TXNGetData
-       PyMac_PRECHECK(TXNGetData);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &iStartOffset,
-                             &iEndOffset))
-               return NULL;
-       _err = TXNGetData(_self->ob_itself,
-                         iStartOffset,
-                         iEndOffset,
-                         &oDataHandle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, oDataHandle);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNGetDataEncoded(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       TXNOffset iStartOffset;
-       TXNOffset iEndOffset;
-       Handle oDataHandle;
-       TXNDataType iEncoding;
-#ifndef TXNGetDataEncoded
-       PyMac_PRECHECK(TXNGetDataEncoded);
-#endif
-       if (!PyArg_ParseTuple(_args, "llO&",
-                             &iStartOffset,
-                             &iEndOffset,
-                             PyMac_GetOSType, &iEncoding))
-               return NULL;
-       _err = TXNGetDataEncoded(_self->ob_itself,
-                                iStartOffset,
-                                iEndOffset,
-                                &oDataHandle,
-                                iEncoding);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, oDataHandle);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNSetDataFromFile(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt16 iFileRefNum;
-       OSType iFileType;
-       ByteCount iFileLength;
-       TXNOffset iStartOffset;
-       TXNOffset iEndOffset;
-#ifndef TXNSetDataFromFile
-       PyMac_PRECHECK(TXNSetDataFromFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&lll",
-                             &iFileRefNum,
-                             PyMac_GetOSType, &iFileType,
-                             &iFileLength,
-                             &iStartOffset,
-                             &iEndOffset))
-               return NULL;
-       _err = TXNSetDataFromFile(_self->ob_itself,
-                                 iFileRefNum,
-                                 iFileType,
-                                 iFileLength,
-                                 iStartOffset,
-                                 iEndOffset);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNGetChangeCount(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ItemCount _rv;
-#ifndef TXNGetChangeCount
-       PyMac_PRECHECK(TXNGetChangeCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNGetChangeCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNSave(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       TXNFileType iType;
-       OSType iResType;
-       TXNPermanentTextEncodingType iPermanentEncoding;
-       FSSpec iFileSpecification;
-       SInt16 iDataReference;
-       SInt16 iResourceReference;
-#ifndef TXNSave
-       PyMac_PRECHECK(TXNSave);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lO&hh",
-                             PyMac_GetOSType, &iType,
-                             PyMac_GetOSType, &iResType,
-                             &iPermanentEncoding,
-                             PyMac_GetFSSpec, &iFileSpecification,
-                             &iDataReference,
-                             &iResourceReference))
-               return NULL;
-       _err = TXNSave(_self->ob_itself,
-                      iType,
-                      iResType,
-                      iPermanentEncoding,
-                      &iFileSpecification,
-                      iDataReference,
-                      iResourceReference);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNRevert(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNRevert
-       PyMac_PRECHECK(TXNRevert);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNRevert(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNPageSetup(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNPageSetup
-       PyMac_PRECHECK(TXNPageSetup);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNPageSetup(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNPrint(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNPrint
-       PyMac_PRECHECK(TXNPrint);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNPrint(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNGetViewRect(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect oViewRect;
-#ifndef TXNGetViewRect
-       PyMac_PRECHECK(TXNGetViewRect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNGetViewRect(_self->ob_itself,
-                      &oViewRect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &oViewRect);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNSetViewRect(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect iViewRect;
-#ifndef TXNSetViewRect
-       PyMac_PRECHECK(TXNSetViewRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &iViewRect))
-               return NULL;
-       TXNSetViewRect(_self->ob_itself,
-                      &iViewRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNAttachObjectToWindow(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       GWorldPtr iWindow;
-       Boolean iIsActualWindow;
-#ifndef TXNAttachObjectToWindow
-       PyMac_PRECHECK(TXNAttachObjectToWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             GWorldObj_Convert, &iWindow,
-                             &iIsActualWindow))
-               return NULL;
-       _err = TXNAttachObjectToWindow(_self->ob_itself,
-                                      iWindow,
-                                      iIsActualWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNIsObjectAttachedToWindow(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef TXNIsObjectAttachedToWindow
-       PyMac_PRECHECK(TXNIsObjectAttachedToWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNIsObjectAttachedToWindow(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNDragTracker(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TXNFrameID iTXNFrameID;
-       DragTrackingMessage iMessage;
-       WindowPtr iWindow;
-       DragReference iDragReference;
-       Boolean iDifferentObjectSameWindow;
-#ifndef TXNDragTracker
-       PyMac_PRECHECK(TXNDragTracker);
-#endif
-       if (!PyArg_ParseTuple(_args, "lhO&O&b",
-                             &iTXNFrameID,
-                             &iMessage,
-                             WinObj_Convert, &iWindow,
-                             DragObj_Convert, &iDragReference,
-                             &iDifferentObjectSameWindow))
-               return NULL;
-       _err = TXNDragTracker(_self->ob_itself,
-                             iTXNFrameID,
-                             iMessage,
-                             iWindow,
-                             iDragReference,
-                             iDifferentObjectSameWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNDragReceiver(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TXNFrameID iTXNFrameID;
-       WindowPtr iWindow;
-       DragReference iDragReference;
-       Boolean iDifferentObjectSameWindow;
-#ifndef TXNDragReceiver
-       PyMac_PRECHECK(TXNDragReceiver);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&O&b",
-                             &iTXNFrameID,
-                             WinObj_Convert, &iWindow,
-                             DragObj_Convert, &iDragReference,
-                             &iDifferentObjectSameWindow))
-               return NULL;
-       _err = TXNDragReceiver(_self->ob_itself,
-                              iTXNFrameID,
-                              iWindow,
-                              iDragReference,
-                              iDifferentObjectSameWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNActivate(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       TXNFrameID iTXNFrameID;
-       TXNScrollBarState iActiveState;
-#ifndef TXNActivate
-       PyMac_PRECHECK(TXNActivate);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &iTXNFrameID,
-                             &iActiveState))
-               return NULL;
-       _err = TXNActivate(_self->ob_itself,
-                          iTXNFrameID,
-                          iActiveState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNEchoMode(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UniChar iEchoCharacter;
-       TextEncoding iEncoding;
-       Boolean iOn;
-#ifndef TXNEchoMode
-       PyMac_PRECHECK(TXNEchoMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "hlb",
-                             &iEchoCharacter,
-                             &iEncoding,
-                             &iOn))
-               return NULL;
-       _err = TXNEchoMode(_self->ob_itself,
-                          iEchoCharacter,
-                          iEncoding,
-                          iOn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNDoFontMenuSelection(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       TXNFontMenuObject iTXNFontMenuObject;
-       SInt16 iMenuID;
-       SInt16 iMenuItem;
-#ifndef TXNDoFontMenuSelection
-       PyMac_PRECHECK(TXNDoFontMenuSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             TXNFontMenuObj_Convert, &iTXNFontMenuObject,
-                             &iMenuID,
-                             &iMenuItem))
-               return NULL;
-       _err = TXNDoFontMenuSelection(_self->ob_itself,
-                                     iTXNFontMenuObject,
-                                     iMenuID,
-                                     iMenuItem);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNPrepareFontMenu(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       TXNFontMenuObject iTXNFontMenuObject;
-#ifndef TXNPrepareFontMenu
-       PyMac_PRECHECK(TXNPrepareFontMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             TXNFontMenuObj_Convert, &iTXNFontMenuObject))
-               return NULL;
-       _err = TXNPrepareFontMenu(_self->ob_itself,
-                                 iTXNFontMenuObject);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TXNObj_TXNPointToOffset(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point iPoint;
-       TXNOffset oOffset;
-#ifndef TXNPointToOffset
-       PyMac_PRECHECK(TXNPointToOffset);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &iPoint))
-               return NULL;
-       _err = TXNPointToOffset(_self->ob_itself,
-                               iPoint,
-                               &oOffset);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            oOffset);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNOffsetToPoint(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       TXNOffset iOffset;
-       Point oPoint;
-#ifndef TXNOffsetToPoint
-       PyMac_PRECHECK(TXNOffsetToPoint);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &iOffset))
-               return NULL;
-       _err = TXNOffsetToPoint(_self->ob_itself,
-                               iOffset,
-                               &oPoint);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, oPoint);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNGetLineCount(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ItemCount oLineTotal;
-#ifndef TXNGetLineCount
-       PyMac_PRECHECK(TXNGetLineCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNGetLineCount(_self->ob_itself,
-                              &oLineTotal);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            oLineTotal);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNGetLineMetrics(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 iLineNumber;
-       Fixed oLineWidth;
-       Fixed oLineHeight;
-#ifndef TXNGetLineMetrics
-       PyMac_PRECHECK(TXNGetLineMetrics);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &iLineNumber))
-               return NULL;
-       _err = TXNGetLineMetrics(_self->ob_itself,
-                                iLineNumber,
-                                &oLineWidth,
-                                &oLineHeight);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildFixed, oLineWidth,
-                            PyMac_BuildFixed, oLineHeight);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNIsObjectAttachedToSpecificWindow(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr iWindow;
-       Boolean oAttached;
-#ifndef TXNIsObjectAttachedToSpecificWindow
-       PyMac_PRECHECK(TXNIsObjectAttachedToSpecificWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &iWindow))
-               return NULL;
-       _err = TXNIsObjectAttachedToSpecificWindow(_self->ob_itself,
-                                                  iWindow,
-                                                  &oAttached);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            oAttached);
-       return _res;
-}
-
-static PyObject *TXNObj_TXNRecalcTextLayout(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TXNRecalcTextLayout
-       PyMac_PRECHECK(TXNRecalcTextLayout);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNRecalcTextLayout(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef TXNObj_methods[] = {
-       {"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNResizeFrame", (PyCFunction)TXNObj_TXNResizeFrame, 1,
-        PyDoc_STR("(UInt32 iWidth, UInt32 iHeight, TXNFrameID iTXNFrameID) -> None")},
-       {"TXNSetFrameBounds", (PyCFunction)TXNObj_TXNSetFrameBounds, 1,
-        PyDoc_STR("(SInt32 iTop, SInt32 iLeft, SInt32 iBottom, SInt32 iRight, TXNFrameID iTXNFrameID) -> None")},
-       {"TXNKeyDown", (PyCFunction)TXNObj_TXNKeyDown, 1,
-        PyDoc_STR("(EventRecord iEvent) -> None")},
-       {"TXNAdjustCursor", (PyCFunction)TXNObj_TXNAdjustCursor, 1,
-        PyDoc_STR("(RgnHandle ioCursorRgn) -> None")},
-       {"TXNClick", (PyCFunction)TXNObj_TXNClick, 1,
-        PyDoc_STR("(EventRecord iEvent) -> None")},
-       {"TXNSelectAll", (PyCFunction)TXNObj_TXNSelectAll, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNFocus", (PyCFunction)TXNObj_TXNFocus, 1,
-        PyDoc_STR("(Boolean iBecomingFocused) -> None")},
-       {"TXNUpdate", (PyCFunction)TXNObj_TXNUpdate, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNDraw", (PyCFunction)TXNObj_TXNDraw, 1,
-        PyDoc_STR("(GWorldPtr iDrawPort) -> None")},
-       {"TXNForceUpdate", (PyCFunction)TXNObj_TXNForceUpdate, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNGetSleepTicks", (PyCFunction)TXNObj_TXNGetSleepTicks, 1,
-        PyDoc_STR("() -> (UInt32 _rv)")},
-       {"TXNIdle", (PyCFunction)TXNObj_TXNIdle, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNGrowWindow", (PyCFunction)TXNObj_TXNGrowWindow, 1,
-        PyDoc_STR("(EventRecord iEvent) -> None")},
-       {"TXNZoomWindow", (PyCFunction)TXNObj_TXNZoomWindow, 1,
-        PyDoc_STR("(SInt16 iPart) -> None")},
-       {"TXNCanUndo", (PyCFunction)TXNObj_TXNCanUndo, 1,
-        PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")},
-       {"TXNUndo", (PyCFunction)TXNObj_TXNUndo, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNCanRedo", (PyCFunction)TXNObj_TXNCanRedo, 1,
-        PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")},
-       {"TXNRedo", (PyCFunction)TXNObj_TXNRedo, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNCut", (PyCFunction)TXNObj_TXNCut, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNCopy", (PyCFunction)TXNObj_TXNCopy, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNPaste", (PyCFunction)TXNObj_TXNPaste, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNClear", (PyCFunction)TXNObj_TXNClear, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNGetSelection", (PyCFunction)TXNObj_TXNGetSelection, 1,
-        PyDoc_STR("() -> (TXNOffset oStartOffset, TXNOffset oEndOffset)")},
-       {"TXNShowSelection", (PyCFunction)TXNObj_TXNShowSelection, 1,
-        PyDoc_STR("(Boolean iShowEnd) -> None")},
-       {"TXNIsSelectionEmpty", (PyCFunction)TXNObj_TXNIsSelectionEmpty, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"TXNSetSelection", (PyCFunction)TXNObj_TXNSetSelection, 1,
-        PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")},
-       {"TXNCountRunsInRange", (PyCFunction)TXNObj_TXNCountRunsInRange, 1,
-        PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset) -> (ItemCount oRunCount)")},
-       {"TXNDataSize", (PyCFunction)TXNObj_TXNDataSize, 1,
-        PyDoc_STR("() -> (ByteCount _rv)")},
-       {"TXNGetData", (PyCFunction)TXNObj_TXNGetData, 1,
-        PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset) -> (Handle oDataHandle)")},
-       {"TXNGetDataEncoded", (PyCFunction)TXNObj_TXNGetDataEncoded, 1,
-        PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset, TXNDataType iEncoding) -> (Handle oDataHandle)")},
-       {"TXNSetDataFromFile", (PyCFunction)TXNObj_TXNSetDataFromFile, 1,
-        PyDoc_STR("(SInt16 iFileRefNum, OSType iFileType, ByteCount iFileLength, TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")},
-       {"TXNGetChangeCount", (PyCFunction)TXNObj_TXNGetChangeCount, 1,
-        PyDoc_STR("() -> (ItemCount _rv)")},
-       {"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
-        PyDoc_STR("(TXNFileType iType, OSType iResType, TXNPermanentTextEncodingType iPermanentEncoding, FSSpec iFileSpecification, SInt16 iDataReference, SInt16 iResourceReference) -> None")},
-       {"TXNRevert", (PyCFunction)TXNObj_TXNRevert, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNPageSetup", (PyCFunction)TXNObj_TXNPageSetup, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNPrint", (PyCFunction)TXNObj_TXNPrint, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNGetViewRect", (PyCFunction)TXNObj_TXNGetViewRect, 1,
-        PyDoc_STR("() -> (Rect oViewRect)")},
-       {"TXNSetViewRect", (PyCFunction)TXNObj_TXNSetViewRect, 1,
-        PyDoc_STR("(Rect iViewRect) -> None")},
-       {"TXNAttachObjectToWindow", (PyCFunction)TXNObj_TXNAttachObjectToWindow, 1,
-        PyDoc_STR("(GWorldPtr iWindow, Boolean iIsActualWindow) -> None")},
-       {"TXNIsObjectAttachedToWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToWindow, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"TXNDragTracker", (PyCFunction)TXNObj_TXNDragTracker, 1,
-        PyDoc_STR("(TXNFrameID iTXNFrameID, DragTrackingMessage iMessage, WindowPtr iWindow, DragReference iDragReference, Boolean iDifferentObjectSameWindow) -> None")},
-       {"TXNDragReceiver", (PyCFunction)TXNObj_TXNDragReceiver, 1,
-        PyDoc_STR("(TXNFrameID iTXNFrameID, WindowPtr iWindow, DragReference iDragReference, Boolean iDifferentObjectSameWindow) -> None")},
-       {"TXNActivate", (PyCFunction)TXNObj_TXNActivate, 1,
-        PyDoc_STR("(TXNFrameID iTXNFrameID, TXNScrollBarState iActiveState) -> None")},
-       {"TXNEchoMode", (PyCFunction)TXNObj_TXNEchoMode, 1,
-        PyDoc_STR("(UniChar iEchoCharacter, TextEncoding iEncoding, Boolean iOn) -> None")},
-       {"TXNDoFontMenuSelection", (PyCFunction)TXNObj_TXNDoFontMenuSelection, 1,
-        PyDoc_STR("(TXNFontMenuObject iTXNFontMenuObject, SInt16 iMenuID, SInt16 iMenuItem) -> None")},
-       {"TXNPrepareFontMenu", (PyCFunction)TXNObj_TXNPrepareFontMenu, 1,
-        PyDoc_STR("(TXNFontMenuObject iTXNFontMenuObject) -> None")},
-       {"TXNPointToOffset", (PyCFunction)TXNObj_TXNPointToOffset, 1,
-        PyDoc_STR("(Point iPoint) -> (TXNOffset oOffset)")},
-       {"TXNOffsetToPoint", (PyCFunction)TXNObj_TXNOffsetToPoint, 1,
-        PyDoc_STR("(TXNOffset iOffset) -> (Point oPoint)")},
-       {"TXNGetLineCount", (PyCFunction)TXNObj_TXNGetLineCount, 1,
-        PyDoc_STR("() -> (ItemCount oLineTotal)")},
-       {"TXNGetLineMetrics", (PyCFunction)TXNObj_TXNGetLineMetrics, 1,
-        PyDoc_STR("(UInt32 iLineNumber) -> (Fixed oLineWidth, Fixed oLineHeight)")},
-       {"TXNIsObjectAttachedToSpecificWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToSpecificWindow, 1,
-        PyDoc_STR("(WindowPtr iWindow) -> (Boolean oAttached)")},
-       {"TXNRecalcTextLayout", (PyCFunction)TXNObj_TXNRecalcTextLayout, 1,
-        PyDoc_STR("() -> None")},
-       {NULL, NULL, 0}
-};
-
-#define TXNObj_getsetlist NULL
-
-
-#define TXNObj_compare NULL
-
-#define TXNObj_repr NULL
-
-#define TXNObj_hash NULL
-#define TXNObj_tp_init 0
-
-#define TXNObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *TXNObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       TXNObject itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TXNObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((TXNObjectObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define TXNObj_tp_free PyObject_Del
-
-
-PyTypeObject TXNObject_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Mlte.TXNObject", /*tp_name*/
-       sizeof(TXNObjectObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) TXNObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) TXNObj_compare, /*tp_compare*/
-       (reprfunc) TXNObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) TXNObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       TXNObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       TXNObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       TXNObj_tp_init, /* tp_init */
-       TXNObj_tp_alloc, /* tp_alloc */
-       TXNObj_tp_new, /* tp_new */
-       TXNObj_tp_free, /* tp_free */
-};
-
-/* ------------------- End object type TXNObject -------------------- */
-
-
-/* ----------------- Object type TXNFontMenuObject ------------------ */
-
-PyTypeObject TXNFontMenuObject_Type;
-
-#define TXNFontMenuObj_Check(x) (Py_TYPE(x) == &TXNFontMenuObject_Type || PyObject_TypeCheck((x), &TXNFontMenuObject_Type))
-
-typedef struct TXNFontMenuObjectObject {
-       PyObject_HEAD
-       TXNFontMenuObject ob_itself;
-} TXNFontMenuObjectObject;
-
-PyObject *TXNFontMenuObj_New(TXNFontMenuObject itself)
-{
-       TXNFontMenuObjectObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(TXNFontMenuObjectObject, &TXNFontMenuObject_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int TXNFontMenuObj_Convert(PyObject *v, TXNFontMenuObject *p_itself)
-{
-       if (!TXNFontMenuObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "TXNFontMenuObject required");
-               return 0;
-       }
-       *p_itself = ((TXNFontMenuObjectObject *)v)->ob_itself;
-       return 1;
-}
-
-static void TXNFontMenuObj_dealloc(TXNFontMenuObjectObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *TXNFontMenuObj_TXNGetFontMenuHandle(TXNFontMenuObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuHandle oFontMenuHandle;
-#ifndef TXNGetFontMenuHandle
-       PyMac_PRECHECK(TXNGetFontMenuHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNGetFontMenuHandle(_self->ob_itself,
-                                   &oFontMenuHandle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, oFontMenuHandle);
-       return _res;
-}
-
-static PyObject *TXNFontMenuObj_TXNDisposeFontMenuObject(TXNFontMenuObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNDisposeFontMenuObject
-       PyMac_PRECHECK(TXNDisposeFontMenuObject);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNDisposeFontMenuObject(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef TXNFontMenuObj_methods[] = {
-       {"TXNGetFontMenuHandle", (PyCFunction)TXNFontMenuObj_TXNGetFontMenuHandle, 1,
-        PyDoc_STR("() -> (MenuHandle oFontMenuHandle)")},
-       {"TXNDisposeFontMenuObject", (PyCFunction)TXNFontMenuObj_TXNDisposeFontMenuObject, 1,
-        PyDoc_STR("() -> None")},
-       {NULL, NULL, 0}
-};
-
-#define TXNFontMenuObj_getsetlist NULL
-
-
-#define TXNFontMenuObj_compare NULL
-
-#define TXNFontMenuObj_repr NULL
-
-#define TXNFontMenuObj_hash NULL
-#define TXNFontMenuObj_tp_init 0
-
-#define TXNFontMenuObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *TXNFontMenuObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       TXNFontMenuObject itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TXNFontMenuObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((TXNFontMenuObjectObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define TXNFontMenuObj_tp_free PyObject_Del
-
-
-PyTypeObject TXNFontMenuObject_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Mlte.TXNFontMenuObject", /*tp_name*/
-       sizeof(TXNFontMenuObjectObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) TXNFontMenuObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) TXNFontMenuObj_compare, /*tp_compare*/
-       (reprfunc) TXNFontMenuObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) TXNFontMenuObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       TXNFontMenuObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       TXNFontMenuObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       TXNFontMenuObj_tp_init, /* tp_init */
-       TXNFontMenuObj_tp_alloc, /* tp_alloc */
-       TXNFontMenuObj_tp_new, /* tp_new */
-       TXNFontMenuObj_tp_free, /* tp_free */
-};
-
-/* --------------- End object type TXNFontMenuObject ---------------- */
-
-
-static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSSpec * iFileSpec;
-       WindowPtr iWindow;
-       Rect iFrame;
-       TXNFrameOptions iFrameOptions;
-       TXNFrameType iFrameType;
-       TXNFileType iFileType;
-       TXNPermanentTextEncodingType iPermanentEncoding;
-       TXNObject oTXNObject;
-       TXNFrameID oTXNFrameID;
-#ifndef TXNNewObject
-       PyMac_PRECHECK(TXNNewObject);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&llO&l",
-                             OptFSSpecPtr_Convert, &iFileSpec,
-                             WinObj_Convert, &iWindow,
-                             PyMac_GetRect, &iFrame,
-                             &iFrameOptions,
-                             &iFrameType,
-                             PyMac_GetOSType, &iFileType,
-                             &iPermanentEncoding))
-               return NULL;
-       _err = TXNNewObject(iFileSpec,
-                           iWindow,
-                           &iFrame,
-                           iFrameOptions,
-                           iFrameType,
-                           iFileType,
-                           iPermanentEncoding,
-                           &oTXNObject,
-                           &oTXNFrameID,
-                           (TXNObjectRefcon)0);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&l",
-                            TXNObj_New, oTXNObject,
-                            oTXNFrameID);
-       return _res;
-}
-
-static PyObject *Mlte_TXNTerminateTextension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TXNTerminateTextension
-       PyMac_PRECHECK(TXNTerminateTextension);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TXNTerminateTextension();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Mlte_TXNIsScrapPastable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef TXNIsScrapPastable
-       PyMac_PRECHECK(TXNIsScrapPastable);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNIsScrapPastable();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Mlte_TXNConvertToPublicScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNConvertToPublicScrap
-       PyMac_PRECHECK(TXNConvertToPublicScrap);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNConvertToPublicScrap();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Mlte_TXNConvertFromPublicScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef TXNConvertFromPublicScrap
-       PyMac_PRECHECK(TXNConvertFromPublicScrap);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TXNConvertFromPublicScrap();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Mlte_TXNNewFontMenuObject(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuHandle iFontMenuHandle;
-       SInt16 iMenuID;
-       SInt16 iStartHierMenuID;
-       TXNFontMenuObject oTXNFontMenuObject;
-#ifndef TXNNewFontMenuObject
-       PyMac_PRECHECK(TXNNewFontMenuObject);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             MenuObj_Convert, &iFontMenuHandle,
-                             &iMenuID,
-                             &iStartHierMenuID))
-               return NULL;
-       _err = TXNNewFontMenuObject(iFontMenuHandle,
-                                   iMenuID,
-                                   iStartHierMenuID,
-                                   &oTXNFontMenuObject);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            TXNFontMenuObj_New, oTXNFontMenuObject);
-       return _res;
-}
-
-static PyObject *Mlte_TXNVersionInformation(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TXNVersionValue _rv;
-       TXNFeatureBits oFeatureFlags;
-#ifndef TXNVersionInformation
-       PyMac_PRECHECK(TXNVersionInformation);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNVersionInformation(&oFeatureFlags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            oFeatureFlags);
-       return _res;
-}
-
-static PyObject *Mlte_TXNInitTextension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       OSStatus _err;
-       TXNMacOSPreferredFontDescription * iDefaultFonts = NULL;
-       ItemCount iCountDefaultFonts = 0;
-       TXNInitOptions iUsageFlags;
-       PyMac_PRECHECK(TXNInitTextension);
-       if (!PyArg_ParseTuple(_args, "l", &iUsageFlags))
-               return NULL;
-       _err = TXNInitTextension(iDefaultFonts,
-                                iCountDefaultFonts,
-                                iUsageFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-
-}
-
-static PyMethodDef Mlte_methods[] = {
-       {"TXNNewObject", (PyCFunction)Mlte_TXNNewObject, 1,
-        PyDoc_STR("(FSSpec * iFileSpec, WindowPtr iWindow, Rect iFrame, TXNFrameOptions iFrameOptions, TXNFrameType iFrameType, TXNFileType iFileType, TXNPermanentTextEncodingType iPermanentEncoding) -> (TXNObject oTXNObject, TXNFrameID oTXNFrameID)")},
-       {"TXNTerminateTextension", (PyCFunction)Mlte_TXNTerminateTextension, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNIsScrapPastable", (PyCFunction)Mlte_TXNIsScrapPastable, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"TXNConvertToPublicScrap", (PyCFunction)Mlte_TXNConvertToPublicScrap, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNConvertFromPublicScrap", (PyCFunction)Mlte_TXNConvertFromPublicScrap, 1,
-        PyDoc_STR("() -> None")},
-       {"TXNNewFontMenuObject", (PyCFunction)Mlte_TXNNewFontMenuObject, 1,
-        PyDoc_STR("(MenuHandle iFontMenuHandle, SInt16 iMenuID, SInt16 iStartHierMenuID) -> (TXNFontMenuObject oTXNFontMenuObject)")},
-       {"TXNVersionInformation", (PyCFunction)Mlte_TXNVersionInformation, 1,
-        PyDoc_STR("() -> (TXNVersionValue _rv, TXNFeatureBits oFeatureFlags)")},
-       {"TXNInitTextension", (PyCFunction)Mlte_TXNInitTextension, 1,
-        PyDoc_STR("(TXNInitOptions) -> None")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Mlte(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-       //      PyMac_INIT_TOOLBOX_OBJECT_NEW(xxxx);
-
-
-       m = Py_InitModule("_Mlte", Mlte_methods);
-       d = PyModule_GetDict(m);
-       Mlte_Error = PyMac_GetOSErrException();
-       if (Mlte_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Mlte_Error) != 0)
-               return;
-       Py_TYPE(&TXNObject_Type) = &PyType_Type;
-       if (PyType_Ready(&TXNObject_Type) < 0) return;
-       Py_INCREF(&TXNObject_Type);
-       PyModule_AddObject(m, "TXNObject", (PyObject *)&TXNObject_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&TXNObject_Type);
-       PyModule_AddObject(m, "TXNObjectType", (PyObject *)&TXNObject_Type);
-       Py_TYPE(&TXNFontMenuObject_Type) = &PyType_Type;
-       if (PyType_Ready(&TXNFontMenuObject_Type) < 0) return;
-       Py_INCREF(&TXNFontMenuObject_Type);
-       PyModule_AddObject(m, "TXNFontMenuObject", (PyObject *)&TXNFontMenuObject_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&TXNFontMenuObject_Type);
-       PyModule_AddObject(m, "TXNFontMenuObjectType", (PyObject *)&TXNFontMenuObject_Type);
-}
-
-/* ======================== End module _Mlte ======================== */
-
diff --git a/Mac/Modules/mlte/mltescan.py b/Mac/Modules/mlte/mltescan.py
deleted file mode 100644 (file)
index cb5665a..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner_OSX
-
-LONG = "MacTextEditor"
-SHORT = "mlte"
-OBJECTS = ("TXNObject", "TXNFontMenuObject")
-# ADD object typenames here
-
-def main():
-    input = "MacTextEditor.h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.gentypetest(SHORT+"typetest.py")
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner_OSX):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in OBJECTS and m == "InMode":
-                classname = "Method"
-                listname = t + "_methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("""
-def FOUR_CHAR_CODE(x): return x
-false = 0
-true = 1
-kTXNClearThisControl = 0xFFFFFFFF
-kTXNClearTheseFontFeatures = 0x80000000
-kTXNDontCareTypeSize = 0xFFFFFFFF
-kTXNDecrementTypeSize = 0x80000000
-kTXNUseCurrentSelection = 0xFFFFFFFF
-kTXNStartOffset = 0
-kTXNEndOffset = 0x7FFFFFFF
-MovieFileType = FOUR_CHAR_CODE('moov')
-kTXNUseEncodingWordRulesMask = 0x80000000
-kTXNFontSizeAttributeSize = 4
-normal = 0
-""")
-
-    def makeblacklistnames(self):
-        return [
-                "TXNGetFontDefaults", # Arg is too difficult
-                "TXNSetFontDefaults", # Arg is too difficult
-                "TXNInitTextension", # done manually
-
-                # Constants with funny definitions
-                "kTXNClearThisControl",
-                "kTXNClearTheseFontFeatures",
-                "kTXNDontCareTypeSize",
-                "kTXNDecrementTypeSize",
-                "kTXNUseCurrentSelection",
-                "kTXNStartOffset",
-                "kTXNEndOffset",
-                "kTXNQDFontNameAttributeSize",
-                "kTXNQDFontFamilyIDAttributeSize",
-                "kTXNQDFontSizeAttributeSize",
-                "kTXNQDFontStyleAttributeSize",
-                "kTXNQDFontColorAttributeSize",
-                "kTXNTextEncodingAttributeSize",
-                "kTXNUseEncodingWordRulesMask",
-                "kTXNFontSizeAttributeSize",
-                "status",
-                "justification",
-                'TXNTSMCheck', # OS8
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "TXNTab", # TBD
-                "TXNMargins", # TBD
-                "TXNControlData", #TBD
-                "TXNATSUIFeatures", #TBD
-                "TXNATSUIVariations", #TBD
-                "TXNAttributeData", #TBD
-                "TXNTypeAttributes", #TBD
-                "TXNMatchTextRecord", #TBD
-                "TXNBackground", #TBD
-                "TXNFindUPP",
-                "ATSUStyle", #TBD
-                "TXNBackground_ptr", #TBD
-                "TXNControlData_ptr", #TBD
-                "TXNControlTag_ptr", #TBD
-                "TXNLongRect", #TBD
-                "TXNLongRect_ptr", #TBD
-                "TXNTypeAttributes_ptr", #TBD
-
-                "TXNActionKeyMapperProcPtr",
-                "TXNActionKeyMapperUPP",
-                "TXNTextBoxOptionsData",
-                "TXNCountOptions",
-                "void_ptr",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                # TXNNewObject has a lot of optional parameters
-                ([("FSSpec_ptr", "iFileSpec", "InMode")],
-                 [("OptFSSpecPtr", "*", "*")]),
-                ([("Rect", "iFrame", "OutMode")],
-                 [("OptRectPtr", "*", "InMode")]),
-
-                # In UH 332 some of the "const" are missing for input parameters passed
-                # by reference. We fix that up here.
-                ([("EventRecord", "iEvent", "OutMode")],
-                 [("EventRecord_ptr", "*", "InMode")]),
-                ([("FSSpec", "iFileSpecification", "OutMode")],
-                 [("FSSpec_ptr", "*", "InMode")]),
-                ([("TXNMacOSPreferredFontDescription", "iFontDefaults", "OutMode")],
-                 [("TXNMacOSPreferredFontDescription_ptr", "*", "InMode")]),
-
-                # In buffers are passed as void *
-                ([("void", "*", "OutMode"), ("ByteCount", "*", "InMode")],
-                 [("MlteInBuffer", "*", "InMode")]),
-
-                # The AdjustCursor region handle is optional
-                ([("RgnHandle", "ioCursorRgn", "InMode")],
-                 [("OptRgnHandle", "*", "*")]),
-
-                # The GWorld for TXNDraw is optional
-                ([('GWorldPtr', 'iDrawPort', 'InMode')],
-                 [('OptGWorldPtr', '*', '*')]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/mlte/mltesupport.py b/Mac/Modules/mlte/mltesupport.py
deleted file mode 100644 (file)
index 4adde0d..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-#error missing SetActionFilter
-
-import string
-
-# Declarations that change for each manager
-MODNAME = '_Mlte'                               # The name of the module
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Mlte'                      # The prefix for module-wide routines
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-/* For now we declare them forward here. They'll go to mactoolbox later */
-static PyObject *TXNObj_New(TXNObject);
-static int TXNObj_Convert(PyObject *, TXNObject *);
-static PyObject *TXNFontMenuObj_New(TXNFontMenuObject);
-static int TXNFontMenuObj_Convert(PyObject *, TXNFontMenuObject *);
-
-// ADD declarations
-#ifdef NOTYET_USE_TOOLBOX_OBJECT_GLUE
-//extern PyObject *_CFTypeRefObj_New(CFTypeRef);
-//extern int _CFTypeRefObj_Convert(PyObject *, CFTypeRef *);
-
-//#define CFTypeRefObj_New _CFTypeRefObj_New
-//#define CFTypeRefObj_Convert _CFTypeRefObj_Convert
-#endif
-
-/*
-** Parse an optional fsspec
-*/
-static int
-OptFSSpecPtr_Convert(PyObject *v, FSSpec **p_itself)
-{
-        static FSSpec fss;
-        if (v == Py_None)
-        {
-                *p_itself = NULL;
-                return 1;
-        }
-        *p_itself = &fss;
-        return PyMac_GetFSSpec(v, *p_itself);
-}
-
-/*
-** Parse an optional rect
-*/
-static int
-OptRectPtr_Convert(PyObject *v, Rect **p_itself)
-{
-        static Rect r;
-
-        if (v == Py_None)
-        {
-                *p_itself = NULL;
-                return 1;
-        }
-        *p_itself = &r;
-        return PyMac_GetRect(v, *p_itself);
-}
-
-/*
-** Parse an optional GWorld
-*/
-static int
-OptGWorldObj_Convert(PyObject *v, GWorldPtr *p_itself)
-{
-        if (v == Py_None)
-        {
-                *p_itself = NULL;
-                return 1;
-        }
-        return GWorldObj_Convert(v, p_itself);
-}
-
-"""
-
-initstuff = initstuff + """
-//      PyMac_INIT_TOOLBOX_OBJECT_NEW(xxxx);
-"""
-TXNObject = OpaqueByValueType("TXNObject", "TXNObj")
-TXNFontMenuObject = OpaqueByValueType("TXNFontMenuObject", "TXNFontMenuObj")
-
-TXNFrameID = Type("TXNFrameID", "l")
-TXNVersionValue = Type("TXNVersionValue", "l")
-TXNFeatureBits = Type("TXNFeatureBits", "l")
-TXNInitOptions = Type("TXNInitOptions", "l")
-TXNFrameOptions = Type("TXNFrameOptions", "l")
-TXNContinuousFlags = Type("TXNContinuousFlags", "l")
-TXNMatchOptions = Type("TXNMatchOptions", "l")
-TXNFileType = OSTypeType("TXNFileType")
-TXNFrameType = Type("TXNFrameType", "l")
-TXNDataType = OSTypeType("TXNDataType")
-TXNControlTag = OSTypeType("TXNControlTag")
-TXNActionKey = Type("TXNActionKey", "l")
-TXNTabType = Type("TXNTabType", "b")
-TXNScrollBarState = Type("TXNScrollBarState", "l")
-TXNOffset = Type("TXNOffset", "l")
-TXNObjectRefcon = FakeType("(TXNObjectRefcon)0") # XXXX For now...
-TXNErrors = OSErrType("TXNErrors", "l")
-TXNTypeRunAttributes = OSTypeType("TXNTypeRunAttributes")
-TXNTypeRunAttributeSizes = Type("TXNTypeRunAttributeSizes", "l")
-TXNPermanentTextEncodingType = Type("TXNPermanentTextEncodingType", "l")
-TXTNTag = OSTypeType("TXTNTag")
-TXNBackgroundType = Type("TXNBackgroundType", "l")
-DragReference = OpaqueByValueType("DragReference", "DragObj")
-DragTrackingMessage = Type("DragTrackingMessage", "h")
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-OptRgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
-GWorldPtr = OpaqueByValueType("GWorldPtr", "GWorldObj")
-OptGWorldPtr = OpaqueByValueType("GWorldPtr", "OptGWorldObj")
-MlteInBuffer = VarInputBufferType('void *', 'ByteCount', 'l')
-
-OptFSSpecPtr = OpaqueByValueType("FSSpec *", "OptFSSpecPtr")
-OptRectPtr = OpaqueByValueType("Rect *", "OptRectPtr")
-
-UniChar = Type("UniChar", "h") # XXXX For now...
-# ADD object type here
-
-exec(open("mltetypetest.py").read())
-
-# Our (opaque) objects
-
-class TXNObjDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-
-class TXNFontMenuObjDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-
-
-# ADD object class here
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-TXNObject_object = TXNObjDefinition("TXNObject", "TXNObj", "TXNObject")
-TXNFontMenuObject_object = TXNFontMenuObjDefinition("TXNFontMenuObject", "TXNFontMenuObj", "TXNFontMenuObject")
-
-# ADD object here
-
-module.addobject(TXNObject_object)
-module.addobject(TXNFontMenuObject_object)
-# ADD addobject call here
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-TXNObject_methods = []
-TXNFontMenuObject_methods = []
-
-# ADD _methods initializer here
-exec(open(INPUTFILE).read())
-
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in TXNObject_methods: TXNObject_object.add(f)
-for f in TXNFontMenuObject_methods: TXNFontMenuObject_object.add(f)
-
-# ADD Manual generators here
-inittextension_body = """
-OSStatus _err;
-TXNMacOSPreferredFontDescription * iDefaultFonts = NULL;
-ItemCount iCountDefaultFonts = 0;
-TXNInitOptions iUsageFlags;
-PyMac_PRECHECK(TXNInitTextension);
-if (!PyArg_ParseTuple(_args, "l", &iUsageFlags))
-        return NULL;
-_err = TXNInitTextension(iDefaultFonts,
-                         iCountDefaultFonts,
-                         iUsageFlags);
-if (_err != noErr) return PyMac_Error(_err);
-Py_INCREF(Py_None);
-_res = Py_None;
-return _res;
-"""
-
-f = ManualGenerator("TXNInitTextension", inittextension_body);
-f.docstring = lambda: "(TXNInitOptions) -> None"
-module.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/osa/_OSAmodule.c b/Mac/Modules/osa/_OSAmodule.c
deleted file mode 100644 (file)
index 2c29ff2..0000000
+++ /dev/null
@@ -1,898 +0,0 @@
-
-/* ========================== Module _OSA =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#if PY_VERSION_HEX < 0x02040000
-PyObject *PyMac_GetOSErrException(void);
-#endif
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_OSAObj_New(ComponentInstance);
-extern int _OSAObj_Convert(PyObject *, ComponentInstance *);
-
-#define OSAObj_New _OSAObj_New
-#define OSAObj_Convert _OSAObj_Convert
-#endif
-
-static PyObject *OSA_Error;
-
-/* ---------------- Object type OSAComponentInstance ---------------- */
-
-PyTypeObject OSAComponentInstance_Type;
-
-#define OSAObj_Check(x) (Py_TYPE(x) == &OSAComponentInstance_Type || PyObject_TypeCheck((x), &OSAComponentInstance_Type))
-
-typedef struct OSAComponentInstanceObject {
-       PyObject_HEAD
-       ComponentInstance ob_itself;
-} OSAComponentInstanceObject;
-
-PyObject *OSAObj_New(ComponentInstance itself)
-{
-       OSAComponentInstanceObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(OSA_Error,"NULL ComponentInstance");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(OSAComponentInstanceObject, &OSAComponentInstance_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int OSAObj_Convert(PyObject *v, ComponentInstance *p_itself)
-{
-
-                       if (CmpInstObj_Convert(v, p_itself))
-                               return 1;
-                       PyErr_Clear();
-                       
-       if (!OSAObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "OSAComponentInstance required");
-               return 0;
-       }
-       *p_itself = ((OSAComponentInstanceObject *)v)->ob_itself;
-       return 1;
-}
-
-static void OSAObj_dealloc(OSAComponentInstanceObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *OSAObj_OSALoad(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc scriptData;
-       long modeFlags;
-       OSAID resultingScriptID;
-#ifndef OSALoad
-       PyMac_PRECHECK(OSALoad);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             AEDesc_Convert, &scriptData,
-                             &modeFlags))
-               return NULL;
-       _err = OSALoad(_self->ob_itself,
-                      &scriptData,
-                      modeFlags,
-                      &resultingScriptID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            resultingScriptID);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAStore(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID scriptID;
-       DescType desiredType;
-       long modeFlags;
-       AEDesc resultingScriptData;
-#ifndef OSAStore
-       PyMac_PRECHECK(OSAStore);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&l",
-                             &scriptID,
-                             PyMac_GetOSType, &desiredType,
-                             &modeFlags))
-               return NULL;
-       _err = OSAStore(_self->ob_itself,
-                       scriptID,
-                       desiredType,
-                       modeFlags,
-                       &resultingScriptData);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultingScriptData);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAExecute(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID compiledScriptID;
-       OSAID contextID;
-       long modeFlags;
-       OSAID resultingScriptValueID;
-#ifndef OSAExecute
-       PyMac_PRECHECK(OSAExecute);
-#endif
-       if (!PyArg_ParseTuple(_args, "lll",
-                             &compiledScriptID,
-                             &contextID,
-                             &modeFlags))
-               return NULL;
-       _err = OSAExecute(_self->ob_itself,
-                         compiledScriptID,
-                         contextID,
-                         modeFlags,
-                         &resultingScriptValueID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            resultingScriptValueID);
-       return _res;
-}
-
-static PyObject *OSAObj_OSADisplay(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID scriptValueID;
-       DescType desiredType;
-       long modeFlags;
-       AEDesc resultingText;
-#ifndef OSADisplay
-       PyMac_PRECHECK(OSADisplay);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&l",
-                             &scriptValueID,
-                             PyMac_GetOSType, &desiredType,
-                             &modeFlags))
-               return NULL;
-       _err = OSADisplay(_self->ob_itself,
-                         scriptValueID,
-                         desiredType,
-                         modeFlags,
-                         &resultingText);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultingText);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAScriptError(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSType selector;
-       DescType desiredType;
-       AEDesc resultingErrorDescription;
-#ifndef OSAScriptError
-       PyMac_PRECHECK(OSAScriptError);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &selector,
-                             PyMac_GetOSType, &desiredType))
-               return NULL;
-       _err = OSAScriptError(_self->ob_itself,
-                             selector,
-                             desiredType,
-                             &resultingErrorDescription);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultingErrorDescription);
-       return _res;
-}
-
-static PyObject *OSAObj_OSADispose(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID scriptID;
-#ifndef OSADispose
-       PyMac_PRECHECK(OSADispose);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &scriptID))
-               return NULL;
-       _err = OSADispose(_self->ob_itself,
-                         scriptID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *OSAObj_OSASetScriptInfo(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID scriptID;
-       OSType selector;
-       long value;
-#ifndef OSASetScriptInfo
-       PyMac_PRECHECK(OSASetScriptInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&l",
-                             &scriptID,
-                             PyMac_GetOSType, &selector,
-                             &value))
-               return NULL;
-       _err = OSASetScriptInfo(_self->ob_itself,
-                               scriptID,
-                               selector,
-                               value);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *OSAObj_OSAGetScriptInfo(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID scriptID;
-       OSType selector;
-       long result;
-#ifndef OSAGetScriptInfo
-       PyMac_PRECHECK(OSAGetScriptInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &scriptID,
-                             PyMac_GetOSType, &selector))
-               return NULL;
-       _err = OSAGetScriptInfo(_self->ob_itself,
-                               scriptID,
-                               selector,
-                               &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            result);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAScriptingComponentName(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc resultingScriptingComponentName;
-#ifndef OSAScriptingComponentName
-       PyMac_PRECHECK(OSAScriptingComponentName);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = OSAScriptingComponentName(_self->ob_itself,
-                                        &resultingScriptingComponentName);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultingScriptingComponentName);
-       return _res;
-}
-
-static PyObject *OSAObj_OSACompile(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc sourceData;
-       long modeFlags;
-       OSAID previousAndResultingScriptID;
-#ifndef OSACompile
-       PyMac_PRECHECK(OSACompile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             AEDesc_Convert, &sourceData,
-                             &modeFlags))
-               return NULL;
-       _err = OSACompile(_self->ob_itself,
-                         &sourceData,
-                         modeFlags,
-                         &previousAndResultingScriptID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            previousAndResultingScriptID);
-       return _res;
-}
-
-static PyObject *OSAObj_OSACopyID(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID fromID;
-       OSAID toID;
-#ifndef OSACopyID
-       PyMac_PRECHECK(OSACopyID);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &fromID))
-               return NULL;
-       _err = OSACopyID(_self->ob_itself,
-                        fromID,
-                        &toID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            toID);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAGetSource(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID scriptID;
-       DescType desiredType;
-       AEDesc resultingSourceData;
-#ifndef OSAGetSource
-       PyMac_PRECHECK(OSAGetSource);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &scriptID,
-                             PyMac_GetOSType, &desiredType))
-               return NULL;
-       _err = OSAGetSource(_self->ob_itself,
-                           scriptID,
-                           desiredType,
-                           &resultingSourceData);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultingSourceData);
-       return _res;
-}
-
-static PyObject *OSAObj_OSACoerceFromDesc(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc scriptData;
-       long modeFlags;
-       OSAID resultingScriptID;
-#ifndef OSACoerceFromDesc
-       PyMac_PRECHECK(OSACoerceFromDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             AEDesc_Convert, &scriptData,
-                             &modeFlags))
-               return NULL;
-       _err = OSACoerceFromDesc(_self->ob_itself,
-                                &scriptData,
-                                modeFlags,
-                                &resultingScriptID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            resultingScriptID);
-       return _res;
-}
-
-static PyObject *OSAObj_OSACoerceToDesc(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID scriptID;
-       DescType desiredType;
-       long modeFlags;
-       AEDesc result;
-#ifndef OSACoerceToDesc
-       PyMac_PRECHECK(OSACoerceToDesc);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&l",
-                             &scriptID,
-                             PyMac_GetOSType, &desiredType,
-                             &modeFlags))
-               return NULL;
-       _err = OSACoerceToDesc(_self->ob_itself,
-                              scriptID,
-                              desiredType,
-                              modeFlags,
-                              &result);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &result);
-       return _res;
-}
-
-static PyObject *OSAObj_OSASetDefaultTarget(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEAddressDesc target;
-#ifndef OSASetDefaultTarget
-       PyMac_PRECHECK(OSASetDefaultTarget);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             AEDesc_Convert, &target))
-               return NULL;
-       _err = OSASetDefaultTarget(_self->ob_itself,
-                                  &target);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *OSAObj_OSAStartRecording(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID compiledScriptToModifyID;
-#ifndef OSAStartRecording
-       PyMac_PRECHECK(OSAStartRecording);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = OSAStartRecording(_self->ob_itself,
-                                &compiledScriptToModifyID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            compiledScriptToModifyID);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAStopRecording(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       OSAID compiledScriptID;
-#ifndef OSAStopRecording
-       PyMac_PRECHECK(OSAStopRecording);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &compiledScriptID))
-               return NULL;
-       _err = OSAStopRecording(_self->ob_itself,
-                               compiledScriptID);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *OSAObj_OSALoadExecute(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc scriptData;
-       OSAID contextID;
-       long modeFlags;
-       OSAID resultingScriptValueID;
-#ifndef OSALoadExecute
-       PyMac_PRECHECK(OSALoadExecute);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             AEDesc_Convert, &scriptData,
-                             &contextID,
-                             &modeFlags))
-               return NULL;
-       _err = OSALoadExecute(_self->ob_itself,
-                             &scriptData,
-                             contextID,
-                             modeFlags,
-                             &resultingScriptValueID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            resultingScriptValueID);
-       return _res;
-}
-
-static PyObject *OSAObj_OSACompileExecute(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc sourceData;
-       OSAID contextID;
-       long modeFlags;
-       OSAID resultingScriptValueID;
-#ifndef OSACompileExecute
-       PyMac_PRECHECK(OSACompileExecute);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             AEDesc_Convert, &sourceData,
-                             &contextID,
-                             &modeFlags))
-               return NULL;
-       _err = OSACompileExecute(_self->ob_itself,
-                                &sourceData,
-                                contextID,
-                                modeFlags,
-                                &resultingScriptValueID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            resultingScriptValueID);
-       return _res;
-}
-
-static PyObject *OSAObj_OSADoScript(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc sourceData;
-       OSAID contextID;
-       DescType desiredType;
-       long modeFlags;
-       AEDesc resultingText;
-#ifndef OSADoScript
-       PyMac_PRECHECK(OSADoScript);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&l",
-                             AEDesc_Convert, &sourceData,
-                             &contextID,
-                             PyMac_GetOSType, &desiredType,
-                             &modeFlags))
-               return NULL;
-       _err = OSADoScript(_self->ob_itself,
-                          &sourceData,
-                          contextID,
-                          desiredType,
-                          modeFlags,
-                          &resultingText);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultingText);
-       return _res;
-}
-
-static PyObject *OSAObj_OSASetCurrentDialect(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       short dialectCode;
-#ifndef OSASetCurrentDialect
-       PyMac_PRECHECK(OSASetCurrentDialect);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &dialectCode))
-               return NULL;
-       _err = OSASetCurrentDialect(_self->ob_itself,
-                                   dialectCode);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *OSAObj_OSAGetCurrentDialect(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       short resultingDialectCode;
-#ifndef OSAGetCurrentDialect
-       PyMac_PRECHECK(OSAGetCurrentDialect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = OSAGetCurrentDialect(_self->ob_itself,
-                                   &resultingDialectCode);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            resultingDialectCode);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAAvailableDialects(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc resultingDialectInfoList;
-#ifndef OSAAvailableDialects
-       PyMac_PRECHECK(OSAAvailableDialects);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = OSAAvailableDialects(_self->ob_itself,
-                                   &resultingDialectInfoList);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultingDialectInfoList);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAGetDialectInfo(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       short dialectCode;
-       OSType selector;
-       AEDesc resultingDialectInfo;
-#ifndef OSAGetDialectInfo
-       PyMac_PRECHECK(OSAGetDialectInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &dialectCode,
-                             PyMac_GetOSType, &selector))
-               return NULL;
-       _err = OSAGetDialectInfo(_self->ob_itself,
-                                dialectCode,
-                                selector,
-                                &resultingDialectInfo);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultingDialectInfo);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAAvailableDialectCodeList(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc resultingDialectCodeList;
-#ifndef OSAAvailableDialectCodeList
-       PyMac_PRECHECK(OSAAvailableDialectCodeList);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = OSAAvailableDialectCodeList(_self->ob_itself,
-                                          &resultingDialectCodeList);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &resultingDialectCodeList);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAExecuteEvent(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AppleEvent theAppleEvent;
-       OSAID contextID;
-       long modeFlags;
-       OSAID resultingScriptValueID;
-#ifndef OSAExecuteEvent
-       PyMac_PRECHECK(OSAExecuteEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             AEDesc_Convert, &theAppleEvent,
-                             &contextID,
-                             &modeFlags))
-               return NULL;
-       _err = OSAExecuteEvent(_self->ob_itself,
-                              &theAppleEvent,
-                              contextID,
-                              modeFlags,
-                              &resultingScriptValueID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            resultingScriptValueID);
-       return _res;
-}
-
-static PyObject *OSAObj_OSADoEvent(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AppleEvent theAppleEvent;
-       OSAID contextID;
-       long modeFlags;
-       AppleEvent reply;
-#ifndef OSADoEvent
-       PyMac_PRECHECK(OSADoEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             AEDesc_Convert, &theAppleEvent,
-                             &contextID,
-                             &modeFlags))
-               return NULL;
-       _err = OSADoEvent(_self->ob_itself,
-                         &theAppleEvent,
-                         contextID,
-                         modeFlags,
-                         &reply);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            AEDesc_New, &reply);
-       return _res;
-}
-
-static PyObject *OSAObj_OSAMakeContext(OSAComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSAError _err;
-       AEDesc contextName;
-       OSAID parentContext;
-       OSAID resultingContextID;
-#ifndef OSAMakeContext
-       PyMac_PRECHECK(OSAMakeContext);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             AEDesc_Convert, &contextName,
-                             &parentContext))
-               return NULL;
-       _err = OSAMakeContext(_self->ob_itself,
-                             &contextName,
-                             parentContext,
-                             &resultingContextID);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            resultingContextID);
-       return _res;
-}
-
-static PyMethodDef OSAObj_methods[] = {
-       {"OSALoad", (PyCFunction)OSAObj_OSALoad, 1,
-        PyDoc_STR("(AEDesc scriptData, long modeFlags) -> (OSAID resultingScriptID)")},
-       {"OSAStore", (PyCFunction)OSAObj_OSAStore, 1,
-        PyDoc_STR("(OSAID scriptID, DescType desiredType, long modeFlags) -> (AEDesc resultingScriptData)")},
-       {"OSAExecute", (PyCFunction)OSAObj_OSAExecute, 1,
-        PyDoc_STR("(OSAID compiledScriptID, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
-       {"OSADisplay", (PyCFunction)OSAObj_OSADisplay, 1,
-        PyDoc_STR("(OSAID scriptValueID, DescType desiredType, long modeFlags) -> (AEDesc resultingText)")},
-       {"OSAScriptError", (PyCFunction)OSAObj_OSAScriptError, 1,
-        PyDoc_STR("(OSType selector, DescType desiredType) -> (AEDesc resultingErrorDescription)")},
-       {"OSADispose", (PyCFunction)OSAObj_OSADispose, 1,
-        PyDoc_STR("(OSAID scriptID) -> None")},
-       {"OSASetScriptInfo", (PyCFunction)OSAObj_OSASetScriptInfo, 1,
-        PyDoc_STR("(OSAID scriptID, OSType selector, long value) -> None")},
-       {"OSAGetScriptInfo", (PyCFunction)OSAObj_OSAGetScriptInfo, 1,
-        PyDoc_STR("(OSAID scriptID, OSType selector) -> (long result)")},
-       {"OSAScriptingComponentName", (PyCFunction)OSAObj_OSAScriptingComponentName, 1,
-        PyDoc_STR("() -> (AEDesc resultingScriptingComponentName)")},
-       {"OSACompile", (PyCFunction)OSAObj_OSACompile, 1,
-        PyDoc_STR("(AEDesc sourceData, long modeFlags) -> (OSAID previousAndResultingScriptID)")},
-       {"OSACopyID", (PyCFunction)OSAObj_OSACopyID, 1,
-        PyDoc_STR("(OSAID fromID) -> (OSAID toID)")},
-       {"OSAGetSource", (PyCFunction)OSAObj_OSAGetSource, 1,
-        PyDoc_STR("(OSAID scriptID, DescType desiredType) -> (AEDesc resultingSourceData)")},
-       {"OSACoerceFromDesc", (PyCFunction)OSAObj_OSACoerceFromDesc, 1,
-        PyDoc_STR("(AEDesc scriptData, long modeFlags) -> (OSAID resultingScriptID)")},
-       {"OSACoerceToDesc", (PyCFunction)OSAObj_OSACoerceToDesc, 1,
-        PyDoc_STR("(OSAID scriptID, DescType desiredType, long modeFlags) -> (AEDesc result)")},
-       {"OSASetDefaultTarget", (PyCFunction)OSAObj_OSASetDefaultTarget, 1,
-        PyDoc_STR("(AEAddressDesc target) -> None")},
-       {"OSAStartRecording", (PyCFunction)OSAObj_OSAStartRecording, 1,
-        PyDoc_STR("() -> (OSAID compiledScriptToModifyID)")},
-       {"OSAStopRecording", (PyCFunction)OSAObj_OSAStopRecording, 1,
-        PyDoc_STR("(OSAID compiledScriptID) -> None")},
-       {"OSALoadExecute", (PyCFunction)OSAObj_OSALoadExecute, 1,
-        PyDoc_STR("(AEDesc scriptData, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
-       {"OSACompileExecute", (PyCFunction)OSAObj_OSACompileExecute, 1,
-        PyDoc_STR("(AEDesc sourceData, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
-       {"OSADoScript", (PyCFunction)OSAObj_OSADoScript, 1,
-        PyDoc_STR("(AEDesc sourceData, OSAID contextID, DescType desiredType, long modeFlags) -> (AEDesc resultingText)")},
-       {"OSASetCurrentDialect", (PyCFunction)OSAObj_OSASetCurrentDialect, 1,
-        PyDoc_STR("(short dialectCode) -> None")},
-       {"OSAGetCurrentDialect", (PyCFunction)OSAObj_OSAGetCurrentDialect, 1,
-        PyDoc_STR("() -> (short resultingDialectCode)")},
-       {"OSAAvailableDialects", (PyCFunction)OSAObj_OSAAvailableDialects, 1,
-        PyDoc_STR("() -> (AEDesc resultingDialectInfoList)")},
-       {"OSAGetDialectInfo", (PyCFunction)OSAObj_OSAGetDialectInfo, 1,
-        PyDoc_STR("(short dialectCode, OSType selector) -> (AEDesc resultingDialectInfo)")},
-       {"OSAAvailableDialectCodeList", (PyCFunction)OSAObj_OSAAvailableDialectCodeList, 1,
-        PyDoc_STR("() -> (AEDesc resultingDialectCodeList)")},
-       {"OSAExecuteEvent", (PyCFunction)OSAObj_OSAExecuteEvent, 1,
-        PyDoc_STR("(AppleEvent theAppleEvent, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
-       {"OSADoEvent", (PyCFunction)OSAObj_OSADoEvent, 1,
-        PyDoc_STR("(AppleEvent theAppleEvent, OSAID contextID, long modeFlags) -> (AppleEvent reply)")},
-       {"OSAMakeContext", (PyCFunction)OSAObj_OSAMakeContext, 1,
-        PyDoc_STR("(AEDesc contextName, OSAID parentContext) -> (OSAID resultingContextID)")},
-       {NULL, NULL, 0}
-};
-
-#define OSAObj_getsetlist NULL
-
-
-#define OSAObj_compare NULL
-
-#define OSAObj_repr NULL
-
-#define OSAObj_hash NULL
-#define OSAObj_tp_init 0
-
-#define OSAObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *OSAObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       ComponentInstance itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, OSAObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((OSAComponentInstanceObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define OSAObj_tp_free PyObject_Del
-
-
-PyTypeObject OSAComponentInstance_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_OSA.OSAComponentInstance", /*tp_name*/
-       sizeof(OSAComponentInstanceObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) OSAObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) OSAObj_compare, /*tp_compare*/
-       (reprfunc) OSAObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) OSAObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       OSAObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       OSAObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       OSAObj_tp_init, /* tp_init */
-       OSAObj_tp_alloc, /* tp_alloc */
-       OSAObj_tp_new, /* tp_new */
-       OSAObj_tp_free, /* tp_free */
-};
-
-/* -------------- End object type OSAComponentInstance -------------- */
-
-
-static PyMethodDef OSA_methods[] = {
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_OSA(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-       /*
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, OSAObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, OSAObj_Convert);
-       */
-
-
-       m = Py_InitModule("_OSA", OSA_methods);
-       d = PyModule_GetDict(m);
-       OSA_Error = PyMac_GetOSErrException();
-       if (OSA_Error == NULL ||
-           PyDict_SetItemString(d, "Error", OSA_Error) != 0)
-               return;
-       Py_TYPE(&OSAComponentInstance_Type) = &PyType_Type;
-       if (PyType_Ready(&OSAComponentInstance_Type) < 0) return;
-       Py_INCREF(&OSAComponentInstance_Type);
-       PyModule_AddObject(m, "OSAComponentInstance", (PyObject *)&OSAComponentInstance_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&OSAComponentInstance_Type);
-       PyModule_AddObject(m, "OSAComponentInstanceType", (PyObject *)&OSAComponentInstance_Type);
-}
-
-/* ======================== End module _OSA ========================= */
-
diff --git a/Mac/Modules/osa/osascan.py b/Mac/Modules/osa/osascan.py
deleted file mode 100644 (file)
index 1bad43b..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "OSAconst"
-SHORT = "osa"
-
-def main():
-    input = "OSA.h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    scanner.gentypetest(SHORT+"typetest.py")
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t == "ComponentInstance" and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("from Carbon.AppleEvents import *\n")
-        self.defsfile.write("kAEUseStandardDispatch = -1\n")
-
-    def makeblacklistnames(self):
-        return [
-                "OSACopyScript",
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "OSALocalOrGlobal",
-                "OSACreateAppleEventUPP",
-                "OSAActiveUPP",
-                "AEEventHandlerUPP",
-                "OSASendUPP",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/osa/osasupport.py b/Mac/Modules/osa/osasupport.py
deleted file mode 100644 (file)
index 3afdf4e..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'OSA.h'         # The Apple header file
-MODNAME = '_OSA'                                # The name of the module
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'OSA'                       # The prefix for module-wide routines
-OBJECTPREFIX = 'OSAObj' # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-includestuff = includestuff + """
-#if PY_VERSION_HEX < 0x02040000
-PyObject *PyMac_GetOSErrException(void);
-#endif
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_OSAObj_New(ComponentInstance);
-extern int _OSAObj_Convert(PyObject *, ComponentInstance *);
-
-#define OSAObj_New _OSAObj_New
-#define OSAObj_Convert _OSAObj_Convert
-#endif
-"""
-
-initstuff = initstuff + """
-/*
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, OSAObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, OSAObj_Convert);
-*/
-"""
-
-ComponentInstance = OpaqueByValueType('ComponentInstance', OBJECTPREFIX)
-OSAError = OSErrType("OSAError", "l")
-# OSALocalOrGlobal = Type("OSALocalOrGlobal", "l")
-OSAID = Type("OSAID", "l")
-OSADebugCallFrameRef = Type("OSADebugCallFrameRef", "l")
-OSADebugSessionRef = Type("OSADebugSessionRef", "l")
-OSADebugStepKind = Type("OSADebugStepKind", "l")
-DescType = OSTypeType("DescType")
-AEDesc = OpaqueType('AEDesc')
-AEDesc_ptr = OpaqueType('AEDesc')
-AEAddressDesc = OpaqueType('AEAddressDesc', 'AEDesc')
-AEAddressDesc_ptr = OpaqueType('AEAddressDesc', 'AEDesc')
-AEDescList = OpaqueType('AEDescList', 'AEDesc')
-AEDescList_ptr = OpaqueType('AEDescList', 'AEDesc')
-AERecord = OpaqueType('AERecord', 'AEDesc')
-AERecord_ptr = OpaqueType('AERecord', 'AEDesc')
-AppleEvent = OpaqueType('AppleEvent', 'AEDesc')
-AppleEvent_ptr = OpaqueType('AppleEvent', 'AEDesc')
-
-# NOTE: at the moment OSA.ComponentInstance is not a subclass
-# of Cm.ComponentInstance. If this is a problem it can be fixed.
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output("""if (itself == NULL) {
-                                PyErr_SetString(OSA_Error,"NULL ComponentInstance");
-                                return NULL;
-                        }""")
-
-    def outputCheckConvertArg(self):
-        Output("""
-                if (CmpInstObj_Convert(v, p_itself))
-                        return 1;
-                PyErr_Clear();
-                """)
-
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-object = MyObjectDefinition('OSAComponentInstance', OBJECTPREFIX,
-                'ComponentInstance')
-module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Test which types we are still missing.
-exec(open(string.lower(MODPREFIX) + 'typetest.py').read())
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/osa/setup.py b/Mac/Modules/osa/setup.py
deleted file mode 100644 (file)
index 635114e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# This is a temporary setup script to allow distribution of
-# MacPython 2.4 modules for MacPython 2.3.
-
-from distutils.core import Extension, setup
-
-setup(name="OSA", version="0.1",
-        ext_modules=[
-                Extension('_OSA', ['_OSAmodule.c'],
-                extra_link_args=['-framework', 'Carbon'])
-        ],
-        py_modules=['OSA.OSA', 'OSA.OSAconst'],
-        package_dir={'OSA':'../../../Lib/plat-mac/Carbon'}
-        )
diff --git a/Mac/Modules/qd/_Qdmodule.c b/Mac/Modules/qd/_Qdmodule.c
deleted file mode 100644 (file)
index ea7fa66..0000000
+++ /dev/null
@@ -1,7142 +0,0 @@
-
-/* =========================== Module _Qd =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_GrafObj_New(GrafPtr);
-extern int _GrafObj_Convert(PyObject *, GrafPtr *);
-extern PyObject *_BMObj_New(BitMapPtr);
-extern int _BMObj_Convert(PyObject *, BitMapPtr *);
-extern PyObject *_QdRGB_New(RGBColorPtr);
-extern int _QdRGB_Convert(PyObject *, RGBColorPtr);
-
-#define GrafObj_New _GrafObj_New
-#define GrafObj_Convert _GrafObj_Convert
-#define BMObj_New _BMObj_New
-#define BMObj_Convert _BMObj_Convert
-#define QdRGB_New _QdRGB_New
-#define QdRGB_Convert _QdRGB_Convert
-#endif
-
-static PyObject *BMObj_NewCopied(BitMapPtr);
-
-/*
-** Parse/generate RGB records
-*/
-PyObject *QdRGB_New(RGBColorPtr itself)
-{
-
-        return Py_BuildValue("lll", (long)itself->red, (long)itself->green, (long)itself->blue);
-}
-
-int QdRGB_Convert(PyObject *v, RGBColorPtr p_itself)
-{
-        long red, green, blue;
-
-        if( !PyArg_ParseTuple(v, "lll", &red, &green, &blue) )
-                return 0;
-        p_itself->red = (unsigned short)red;
-        p_itself->green = (unsigned short)green;
-        p_itself->blue = (unsigned short)blue;
-        return 1;
-}
-
-/*
-** Generate FontInfo records
-*/
-static
-PyObject *QdFI_New(FontInfo *itself)
-{
-
-        return Py_BuildValue("hhhh", itself->ascent, itself->descent,
-                        itself->widMax, itself->leading);
-}
-
-static PyObject *Qd_Error;
-
-/* ---------------------- Object type GrafPort ---------------------- */
-
-PyTypeObject GrafPort_Type;
-
-#define GrafObj_Check(x) (Py_TYPE(x) == &GrafPort_Type || PyObject_TypeCheck((x), &GrafPort_Type))
-
-typedef struct GrafPortObject {
-       PyObject_HEAD
-       GrafPtr ob_itself;
-} GrafPortObject;
-
-PyObject *GrafObj_New(GrafPtr itself)
-{
-       GrafPortObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(GrafPortObject, &GrafPort_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int GrafObj_Convert(PyObject *v, GrafPtr *p_itself)
-{
-#if 1
-       {
-               WindowRef win;
-               if (WinObj_Convert(v, &win) && v) {
-                       *p_itself = (GrafPtr)GetWindowPort(win);
-                       return 1;
-               }
-               PyErr_Clear();
-       }
-#else
-       if (DlgObj_Check(v)) {
-               DialogRef dlg = (DialogRef)((GrafPortObject *)v)->ob_itself;
-               *p_itself = (GrafPtr)GetWindowPort(GetDialogWindow(dlg));
-               return 1;
-       }
-       if (WinObj_Check(v)) {
-               WindowRef win = (WindowRef)((GrafPortObject *)v)->ob_itself;
-               *p_itself = (GrafPtr)GetWindowPort(win);
-               return 1;
-       }
-#endif
-       if (!GrafObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "GrafPort required");
-               return 0;
-       }
-       *p_itself = ((GrafPortObject *)v)->ob_itself;
-       return 1;
-}
-
-static void GrafObj_dealloc(GrafPortObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *GrafObj_MacSetPort(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef MacSetPort
-       PyMac_PRECHECK(MacSetPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       MacSetPort(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_QDSwapPort(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       CGrafPtr outOldPort;
-#ifndef QDSwapPort
-       PyMac_PRECHECK(QDSwapPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = QDSwapPort(_self->ob_itself,
-                        &outOldPort);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            GrafObj_New, outOldPort);
-       return _res;
-}
-
-static PyObject *GrafObj_IsValidPort(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsValidPort
-       PyMac_PRECHECK(IsValidPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsValidPort(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortPixMap(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle _rv;
-#ifndef GetPortPixMap
-       PyMac_PRECHECK(GetPortPixMap);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortPixMap(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortBitMapForCopyBits(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       const BitMap * _rv;
-#ifndef GetPortBitMapForCopyBits
-       PyMac_PRECHECK(GetPortBitMapForCopyBits);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortBitMapForCopyBits(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            BMObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortBounds(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect rect;
-#ifndef GetPortBounds
-       PyMac_PRECHECK(GetPortBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetPortBounds(_self->ob_itself,
-                     &rect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &rect);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortForeColor(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor foreColor;
-#ifndef GetPortForeColor
-       PyMac_PRECHECK(GetPortForeColor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetPortForeColor(_self->ob_itself,
-                        &foreColor);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &foreColor);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortBackColor(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor backColor;
-#ifndef GetPortBackColor
-       PyMac_PRECHECK(GetPortBackColor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetPortBackColor(_self->ob_itself,
-                        &backColor);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &backColor);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortOpColor(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor opColor;
-#ifndef GetPortOpColor
-       PyMac_PRECHECK(GetPortOpColor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetPortOpColor(_self->ob_itself,
-                      &opColor);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &opColor);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortHiliteColor(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor hiliteColor;
-#ifndef GetPortHiliteColor
-       PyMac_PRECHECK(GetPortHiliteColor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetPortHiliteColor(_self->ob_itself,
-                          &hiliteColor);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &hiliteColor);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortTextFont(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetPortTextFont
-       PyMac_PRECHECK(GetPortTextFont);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortTextFont(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortTextFace(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Style _rv;
-#ifndef GetPortTextFace
-       PyMac_PRECHECK(GetPortTextFace);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortTextFace(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortTextMode(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetPortTextMode
-       PyMac_PRECHECK(GetPortTextMode);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortTextMode(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortTextSize(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetPortTextSize
-       PyMac_PRECHECK(GetPortTextSize);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortTextSize(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortChExtra(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetPortChExtra
-       PyMac_PRECHECK(GetPortChExtra);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortChExtra(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortFracHPenLocation(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetPortFracHPenLocation
-       PyMac_PRECHECK(GetPortFracHPenLocation);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortFracHPenLocation(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortSpExtra(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-#ifndef GetPortSpExtra
-       PyMac_PRECHECK(GetPortSpExtra);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortSpExtra(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortPenVisibility(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetPortPenVisibility
-       PyMac_PRECHECK(GetPortPenVisibility);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortPenVisibility(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortVisibleRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-       RgnHandle visRgn;
-#ifndef GetPortVisibleRegion
-       PyMac_PRECHECK(GetPortVisibleRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &visRgn))
-               return NULL;
-       _rv = GetPortVisibleRegion(_self->ob_itself,
-                                  visRgn);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortClipRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-       RgnHandle clipRgn;
-#ifndef GetPortClipRegion
-       PyMac_PRECHECK(GetPortClipRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &clipRgn))
-               return NULL;
-       _rv = GetPortClipRegion(_self->ob_itself,
-                               clipRgn);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortBackPixPat(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle _rv;
-       PixPatHandle backPattern;
-#ifndef GetPortBackPixPat
-       PyMac_PRECHECK(GetPortBackPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &backPattern))
-               return NULL;
-       _rv = GetPortBackPixPat(_self->ob_itself,
-                               backPattern);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortPenPixPat(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle _rv;
-       PixPatHandle penPattern;
-#ifndef GetPortPenPixPat
-       PyMac_PRECHECK(GetPortPenPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &penPattern))
-               return NULL;
-       _rv = GetPortPenPixPat(_self->ob_itself,
-                              penPattern);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortFillPixPat(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle _rv;
-       PixPatHandle fillPattern;
-#ifndef GetPortFillPixPat
-       PyMac_PRECHECK(GetPortFillPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &fillPattern))
-               return NULL;
-       _rv = GetPortFillPixPat(_self->ob_itself,
-                               fillPattern);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortPenSize(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point penSize;
-#ifndef GetPortPenSize
-       PyMac_PRECHECK(GetPortPenSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &penSize))
-               return NULL;
-       GetPortPenSize(_self->ob_itself,
-                      &penSize);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, penSize);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortPenMode(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-#ifndef GetPortPenMode
-       PyMac_PRECHECK(GetPortPenMode);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetPortPenMode(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_GetPortPenLocation(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point penLocation;
-#ifndef GetPortPenLocation
-       PyMac_PRECHECK(GetPortPenLocation);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &penLocation))
-               return NULL;
-       GetPortPenLocation(_self->ob_itself,
-                          &penLocation);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, penLocation);
-       return _res;
-}
-
-static PyObject *GrafObj_IsPortRegionBeingDefined(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsPortRegionBeingDefined
-       PyMac_PRECHECK(IsPortRegionBeingDefined);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsPortRegionBeingDefined(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_IsPortPictureBeingDefined(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsPortPictureBeingDefined
-       PyMac_PRECHECK(IsPortPictureBeingDefined);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsPortPictureBeingDefined(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_IsPortPolyBeingDefined(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsPortPolyBeingDefined
-       PyMac_PRECHECK(IsPortPolyBeingDefined);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsPortPolyBeingDefined(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_IsPortOffscreen(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsPortOffscreen
-       PyMac_PRECHECK(IsPortOffscreen);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsPortOffscreen(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_IsPortColor(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsPortColor
-       PyMac_PRECHECK(IsPortColor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsPortColor(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_IsPortVisibleRegionEmpty(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsPortVisibleRegionEmpty
-       PyMac_PRECHECK(IsPortVisibleRegionEmpty);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsPortVisibleRegionEmpty(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_IsPortClipRegionEmpty(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsPortClipRegionEmpty
-       PyMac_PRECHECK(IsPortClipRegionEmpty);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsPortClipRegionEmpty(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_SectRegionWithPortClipRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle ioRegion;
-#ifndef SectRegionWithPortClipRegion
-       PyMac_PRECHECK(SectRegionWithPortClipRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &ioRegion))
-               return NULL;
-       SectRegionWithPortClipRegion(_self->ob_itself,
-                                    ioRegion);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SectRegionWithPortVisibleRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle ioRegion;
-#ifndef SectRegionWithPortVisibleRegion
-       PyMac_PRECHECK(SectRegionWithPortVisibleRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &ioRegion))
-               return NULL;
-       SectRegionWithPortVisibleRegion(_self->ob_itself,
-                                       ioRegion);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SwapPortPicSaveHandle(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       Handle inPicSaveHdl;
-#ifndef SwapPortPicSaveHandle
-       PyMac_PRECHECK(SwapPortPicSaveHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &inPicSaveHdl))
-               return NULL;
-       _rv = SwapPortPicSaveHandle(_self->ob_itself,
-                                   inPicSaveHdl);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_SwapPortPolySaveHandle(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       Handle inPolySaveHdl;
-#ifndef SwapPortPolySaveHandle
-       PyMac_PRECHECK(SwapPortPolySaveHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &inPolySaveHdl))
-               return NULL;
-       _rv = SwapPortPolySaveHandle(_self->ob_itself,
-                                    inPolySaveHdl);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_SwapPortRegionSaveHandle(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       Handle inRegionSaveHdl;
-#ifndef SwapPortRegionSaveHandle
-       PyMac_PRECHECK(SwapPortRegionSaveHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &inRegionSaveHdl))
-               return NULL;
-       _rv = SwapPortRegionSaveHandle(_self->ob_itself,
-                                      inRegionSaveHdl);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortBounds(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect rect;
-#ifndef SetPortBounds
-       PyMac_PRECHECK(SetPortBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &rect))
-               return NULL;
-       SetPortBounds(_self->ob_itself,
-                     &rect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortOpColor(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor opColor;
-#ifndef SetPortOpColor
-       PyMac_PRECHECK(SetPortOpColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QdRGB_Convert, &opColor))
-               return NULL;
-       SetPortOpColor(_self->ob_itself,
-                      &opColor);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortTextFont(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short txFont;
-#ifndef SetPortTextFont
-       PyMac_PRECHECK(SetPortTextFont);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &txFont))
-               return NULL;
-       SetPortTextFont(_self->ob_itself,
-                       txFont);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortTextSize(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short txSize;
-#ifndef SetPortTextSize
-       PyMac_PRECHECK(SetPortTextSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &txSize))
-               return NULL;
-       SetPortTextSize(_self->ob_itself,
-                       txSize);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortTextFace(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       StyleParameter face;
-#ifndef SetPortTextFace
-       PyMac_PRECHECK(SetPortTextFace);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &face))
-               return NULL;
-       SetPortTextFace(_self->ob_itself,
-                       face);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortTextMode(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short mode;
-#ifndef SetPortTextMode
-       PyMac_PRECHECK(SetPortTextMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &mode))
-               return NULL;
-       SetPortTextMode(_self->ob_itself,
-                       mode);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortVisibleRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle visRgn;
-#ifndef SetPortVisibleRegion
-       PyMac_PRECHECK(SetPortVisibleRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &visRgn))
-               return NULL;
-       SetPortVisibleRegion(_self->ob_itself,
-                            visRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortClipRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle clipRgn;
-#ifndef SetPortClipRegion
-       PyMac_PRECHECK(SetPortClipRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &clipRgn))
-               return NULL;
-       SetPortClipRegion(_self->ob_itself,
-                         clipRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortPenPixPat(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle penPattern;
-#ifndef SetPortPenPixPat
-       PyMac_PRECHECK(SetPortPenPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &penPattern))
-               return NULL;
-       SetPortPenPixPat(_self->ob_itself,
-                        penPattern);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortFillPixPat(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle penPattern;
-#ifndef SetPortFillPixPat
-       PyMac_PRECHECK(SetPortFillPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &penPattern))
-               return NULL;
-       SetPortFillPixPat(_self->ob_itself,
-                         penPattern);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortBackPixPat(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle backPattern;
-#ifndef SetPortBackPixPat
-       PyMac_PRECHECK(SetPortBackPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &backPattern))
-               return NULL;
-       SetPortBackPixPat(_self->ob_itself,
-                         backPattern);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortPenSize(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point penSize;
-#ifndef SetPortPenSize
-       PyMac_PRECHECK(SetPortPenSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &penSize))
-               return NULL;
-       SetPortPenSize(_self->ob_itself,
-                      penSize);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortPenMode(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 penMode;
-#ifndef SetPortPenMode
-       PyMac_PRECHECK(SetPortPenMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &penMode))
-               return NULL;
-       SetPortPenMode(_self->ob_itself,
-                      penMode);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_SetPortFracHPenLocation(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short pnLocHFrac;
-#ifndef SetPortFracHPenLocation
-       PyMac_PRECHECK(SetPortFracHPenLocation);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &pnLocHFrac))
-               return NULL;
-       SetPortFracHPenLocation(_self->ob_itself,
-                               pnLocHFrac);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_DisposePort(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DisposePort
-       PyMac_PRECHECK(DisposePort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DisposePort(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_QDLocalToGlobalPoint(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point point;
-#ifndef QDLocalToGlobalPoint
-       PyMac_PRECHECK(QDLocalToGlobalPoint);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &point))
-               return NULL;
-       QDLocalToGlobalPoint(_self->ob_itself,
-                            &point);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, point);
-       return _res;
-}
-
-static PyObject *GrafObj_QDGlobalToLocalPoint(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point point;
-#ifndef QDGlobalToLocalPoint
-       PyMac_PRECHECK(QDGlobalToLocalPoint);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &point))
-               return NULL;
-       QDGlobalToLocalPoint(_self->ob_itself,
-                            &point);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, point);
-       return _res;
-}
-
-static PyObject *GrafObj_QDLocalToGlobalRect(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect bounds;
-#ifndef QDLocalToGlobalRect
-       PyMac_PRECHECK(QDLocalToGlobalRect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       QDLocalToGlobalRect(_self->ob_itself,
-                           &bounds);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *GrafObj_QDGlobalToLocalRect(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect bounds;
-#ifndef QDGlobalToLocalRect
-       PyMac_PRECHECK(QDGlobalToLocalRect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       QDGlobalToLocalRect(_self->ob_itself,
-                           &bounds);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *GrafObj_QDLocalToGlobalRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-       RgnHandle region;
-#ifndef QDLocalToGlobalRegion
-       PyMac_PRECHECK(QDLocalToGlobalRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &region))
-               return NULL;
-       _rv = QDLocalToGlobalRegion(_self->ob_itself,
-                                   region);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_QDGlobalToLocalRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-       RgnHandle region;
-#ifndef QDGlobalToLocalRegion
-       PyMac_PRECHECK(QDGlobalToLocalRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &region))
-               return NULL;
-       _rv = QDGlobalToLocalRegion(_self->ob_itself,
-                                   region);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_QDIsPortBuffered(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef QDIsPortBuffered
-       PyMac_PRECHECK(QDIsPortBuffered);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = QDIsPortBuffered(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_QDIsPortBufferDirty(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef QDIsPortBufferDirty
-       PyMac_PRECHECK(QDIsPortBufferDirty);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = QDIsPortBufferDirty(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *GrafObj_QDFlushPortBuffer(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle region;
-#ifndef QDFlushPortBuffer
-       PyMac_PRECHECK(QDFlushPortBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             OptResObj_Convert, &region))
-               return NULL;
-       QDFlushPortBuffer(_self->ob_itself,
-                         region);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_QDGetDirtyRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       RgnHandle rgn;
-#ifndef QDGetDirtyRegion
-       PyMac_PRECHECK(QDGetDirtyRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       _err = QDGetDirtyRegion(_self->ob_itself,
-                               rgn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *GrafObj_QDSetDirtyRegion(GrafPortObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       RgnHandle rgn;
-#ifndef QDSetDirtyRegion
-       PyMac_PRECHECK(QDSetDirtyRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       _err = QDSetDirtyRegion(_self->ob_itself,
-                               rgn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef GrafObj_methods[] = {
-       {"MacSetPort", (PyCFunction)GrafObj_MacSetPort, 1,
-        PyDoc_STR("() -> None")},
-       {"QDSwapPort", (PyCFunction)GrafObj_QDSwapPort, 1,
-        PyDoc_STR("() -> (Boolean _rv, CGrafPtr outOldPort)")},
-       {"IsValidPort", (PyCFunction)GrafObj_IsValidPort, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"GetPortPixMap", (PyCFunction)GrafObj_GetPortPixMap, 1,
-        PyDoc_STR("() -> (PixMapHandle _rv)")},
-       {"GetPortBitMapForCopyBits", (PyCFunction)GrafObj_GetPortBitMapForCopyBits, 1,
-        PyDoc_STR("() -> (const BitMap * _rv)")},
-       {"GetPortBounds", (PyCFunction)GrafObj_GetPortBounds, 1,
-        PyDoc_STR("() -> (Rect rect)")},
-       {"GetPortForeColor", (PyCFunction)GrafObj_GetPortForeColor, 1,
-        PyDoc_STR("() -> (RGBColor foreColor)")},
-       {"GetPortBackColor", (PyCFunction)GrafObj_GetPortBackColor, 1,
-        PyDoc_STR("() -> (RGBColor backColor)")},
-       {"GetPortOpColor", (PyCFunction)GrafObj_GetPortOpColor, 1,
-        PyDoc_STR("() -> (RGBColor opColor)")},
-       {"GetPortHiliteColor", (PyCFunction)GrafObj_GetPortHiliteColor, 1,
-        PyDoc_STR("() -> (RGBColor hiliteColor)")},
-       {"GetPortTextFont", (PyCFunction)GrafObj_GetPortTextFont, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetPortTextFace", (PyCFunction)GrafObj_GetPortTextFace, 1,
-        PyDoc_STR("() -> (Style _rv)")},
-       {"GetPortTextMode", (PyCFunction)GrafObj_GetPortTextMode, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetPortTextSize", (PyCFunction)GrafObj_GetPortTextSize, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetPortChExtra", (PyCFunction)GrafObj_GetPortChExtra, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetPortFracHPenLocation", (PyCFunction)GrafObj_GetPortFracHPenLocation, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetPortSpExtra", (PyCFunction)GrafObj_GetPortSpExtra, 1,
-        PyDoc_STR("() -> (Fixed _rv)")},
-       {"GetPortPenVisibility", (PyCFunction)GrafObj_GetPortPenVisibility, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetPortVisibleRegion", (PyCFunction)GrafObj_GetPortVisibleRegion, 1,
-        PyDoc_STR("(RgnHandle visRgn) -> (RgnHandle _rv)")},
-       {"GetPortClipRegion", (PyCFunction)GrafObj_GetPortClipRegion, 1,
-        PyDoc_STR("(RgnHandle clipRgn) -> (RgnHandle _rv)")},
-       {"GetPortBackPixPat", (PyCFunction)GrafObj_GetPortBackPixPat, 1,
-        PyDoc_STR("(PixPatHandle backPattern) -> (PixPatHandle _rv)")},
-       {"GetPortPenPixPat", (PyCFunction)GrafObj_GetPortPenPixPat, 1,
-        PyDoc_STR("(PixPatHandle penPattern) -> (PixPatHandle _rv)")},
-       {"GetPortFillPixPat", (PyCFunction)GrafObj_GetPortFillPixPat, 1,
-        PyDoc_STR("(PixPatHandle fillPattern) -> (PixPatHandle _rv)")},
-       {"GetPortPenSize", (PyCFunction)GrafObj_GetPortPenSize, 1,
-        PyDoc_STR("(Point penSize) -> (Point penSize)")},
-       {"GetPortPenMode", (PyCFunction)GrafObj_GetPortPenMode, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"GetPortPenLocation", (PyCFunction)GrafObj_GetPortPenLocation, 1,
-        PyDoc_STR("(Point penLocation) -> (Point penLocation)")},
-       {"IsPortRegionBeingDefined", (PyCFunction)GrafObj_IsPortRegionBeingDefined, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"IsPortPictureBeingDefined", (PyCFunction)GrafObj_IsPortPictureBeingDefined, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"IsPortPolyBeingDefined", (PyCFunction)GrafObj_IsPortPolyBeingDefined, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"IsPortOffscreen", (PyCFunction)GrafObj_IsPortOffscreen, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"IsPortColor", (PyCFunction)GrafObj_IsPortColor, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"IsPortVisibleRegionEmpty", (PyCFunction)GrafObj_IsPortVisibleRegionEmpty, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"IsPortClipRegionEmpty", (PyCFunction)GrafObj_IsPortClipRegionEmpty, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"SectRegionWithPortClipRegion", (PyCFunction)GrafObj_SectRegionWithPortClipRegion, 1,
-        PyDoc_STR("(RgnHandle ioRegion) -> None")},
-       {"SectRegionWithPortVisibleRegion", (PyCFunction)GrafObj_SectRegionWithPortVisibleRegion, 1,
-        PyDoc_STR("(RgnHandle ioRegion) -> None")},
-       {"SwapPortPicSaveHandle", (PyCFunction)GrafObj_SwapPortPicSaveHandle, 1,
-        PyDoc_STR("(Handle inPicSaveHdl) -> (Handle _rv)")},
-       {"SwapPortPolySaveHandle", (PyCFunction)GrafObj_SwapPortPolySaveHandle, 1,
-        PyDoc_STR("(Handle inPolySaveHdl) -> (Handle _rv)")},
-       {"SwapPortRegionSaveHandle", (PyCFunction)GrafObj_SwapPortRegionSaveHandle, 1,
-        PyDoc_STR("(Handle inRegionSaveHdl) -> (Handle _rv)")},
-       {"SetPortBounds", (PyCFunction)GrafObj_SetPortBounds, 1,
-        PyDoc_STR("(Rect rect) -> None")},
-       {"SetPortOpColor", (PyCFunction)GrafObj_SetPortOpColor, 1,
-        PyDoc_STR("(RGBColor opColor) -> None")},
-       {"SetPortTextFont", (PyCFunction)GrafObj_SetPortTextFont, 1,
-        PyDoc_STR("(short txFont) -> None")},
-       {"SetPortTextSize", (PyCFunction)GrafObj_SetPortTextSize, 1,
-        PyDoc_STR("(short txSize) -> None")},
-       {"SetPortTextFace", (PyCFunction)GrafObj_SetPortTextFace, 1,
-        PyDoc_STR("(StyleParameter face) -> None")},
-       {"SetPortTextMode", (PyCFunction)GrafObj_SetPortTextMode, 1,
-        PyDoc_STR("(short mode) -> None")},
-       {"SetPortVisibleRegion", (PyCFunction)GrafObj_SetPortVisibleRegion, 1,
-        PyDoc_STR("(RgnHandle visRgn) -> None")},
-       {"SetPortClipRegion", (PyCFunction)GrafObj_SetPortClipRegion, 1,
-        PyDoc_STR("(RgnHandle clipRgn) -> None")},
-       {"SetPortPenPixPat", (PyCFunction)GrafObj_SetPortPenPixPat, 1,
-        PyDoc_STR("(PixPatHandle penPattern) -> None")},
-       {"SetPortFillPixPat", (PyCFunction)GrafObj_SetPortFillPixPat, 1,
-        PyDoc_STR("(PixPatHandle penPattern) -> None")},
-       {"SetPortBackPixPat", (PyCFunction)GrafObj_SetPortBackPixPat, 1,
-        PyDoc_STR("(PixPatHandle backPattern) -> None")},
-       {"SetPortPenSize", (PyCFunction)GrafObj_SetPortPenSize, 1,
-        PyDoc_STR("(Point penSize) -> None")},
-       {"SetPortPenMode", (PyCFunction)GrafObj_SetPortPenMode, 1,
-        PyDoc_STR("(SInt32 penMode) -> None")},
-       {"SetPortFracHPenLocation", (PyCFunction)GrafObj_SetPortFracHPenLocation, 1,
-        PyDoc_STR("(short pnLocHFrac) -> None")},
-       {"DisposePort", (PyCFunction)GrafObj_DisposePort, 1,
-        PyDoc_STR("() -> None")},
-       {"QDLocalToGlobalPoint", (PyCFunction)GrafObj_QDLocalToGlobalPoint, 1,
-        PyDoc_STR("(Point point) -> (Point point)")},
-       {"QDGlobalToLocalPoint", (PyCFunction)GrafObj_QDGlobalToLocalPoint, 1,
-        PyDoc_STR("(Point point) -> (Point point)")},
-       {"QDLocalToGlobalRect", (PyCFunction)GrafObj_QDLocalToGlobalRect, 1,
-        PyDoc_STR("() -> (Rect bounds)")},
-       {"QDGlobalToLocalRect", (PyCFunction)GrafObj_QDGlobalToLocalRect, 1,
-        PyDoc_STR("() -> (Rect bounds)")},
-       {"QDLocalToGlobalRegion", (PyCFunction)GrafObj_QDLocalToGlobalRegion, 1,
-        PyDoc_STR("(RgnHandle region) -> (RgnHandle _rv)")},
-       {"QDGlobalToLocalRegion", (PyCFunction)GrafObj_QDGlobalToLocalRegion, 1,
-        PyDoc_STR("(RgnHandle region) -> (RgnHandle _rv)")},
-       {"QDIsPortBuffered", (PyCFunction)GrafObj_QDIsPortBuffered, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"QDIsPortBufferDirty", (PyCFunction)GrafObj_QDIsPortBufferDirty, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"QDFlushPortBuffer", (PyCFunction)GrafObj_QDFlushPortBuffer, 1,
-        PyDoc_STR("(RgnHandle region) -> None")},
-       {"QDGetDirtyRegion", (PyCFunction)GrafObj_QDGetDirtyRegion, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"QDSetDirtyRegion", (PyCFunction)GrafObj_QDSetDirtyRegion, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {NULL, NULL, 0}
-};
-
-static PyObject *GrafObj_get_visRgn(GrafPortObject *self, void *closure)
-{
-       RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
-                   return Py_BuildValue("O&", ResObj_New, (Handle)GetPortVisibleRegion(self->ob_itself, h));
-                   
-}
-
-#define GrafObj_set_visRgn NULL
-
-static PyObject *GrafObj_get_clipRgn(GrafPortObject *self, void *closure)
-{
-       RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
-                   return Py_BuildValue("O&", ResObj_New, (Handle)GetPortClipRegion(self->ob_itself, h));
-                   
-}
-
-#define GrafObj_set_clipRgn NULL
-
-static PyGetSetDef GrafObj_getsetlist[] = {
-       {"visRgn", (getter)GrafObj_get_visRgn, (setter)GrafObj_set_visRgn, "Convenience attribute: return a copy of the visible region"},
-       {"clipRgn", (getter)GrafObj_get_clipRgn, (setter)GrafObj_set_clipRgn, "Convenience attribute: return a copy of the clipping region"},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define GrafObj_compare NULL
-
-#define GrafObj_repr NULL
-
-#define GrafObj_hash NULL
-#define GrafObj_tp_init 0
-
-#define GrafObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *GrafObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       GrafPtr itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, GrafObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((GrafPortObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define GrafObj_tp_free PyObject_Del
-
-
-PyTypeObject GrafPort_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qd.GrafPort", /*tp_name*/
-       sizeof(GrafPortObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) GrafObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) GrafObj_compare, /*tp_compare*/
-       (reprfunc) GrafObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) GrafObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       GrafObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       GrafObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       GrafObj_tp_init, /* tp_init */
-       GrafObj_tp_alloc, /* tp_alloc */
-       GrafObj_tp_new, /* tp_new */
-       GrafObj_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type GrafPort -------------------- */
-
-
-/* ----------------------- Object type BitMap ----------------------- */
-
-PyTypeObject BitMap_Type;
-
-#define BMObj_Check(x) (Py_TYPE(x) == &BitMap_Type || PyObject_TypeCheck((x), &BitMap_Type))
-
-typedef struct BitMapObject {
-       PyObject_HEAD
-       BitMapPtr ob_itself;
-       PyObject *referred_object;
-       BitMap *referred_bitmap;
-} BitMapObject;
-
-PyObject *BMObj_New(BitMapPtr itself)
-{
-       BitMapObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(BitMapObject, &BitMap_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       it->referred_object = NULL;
-       it->referred_bitmap = NULL;
-       return (PyObject *)it;
-}
-
-int BMObj_Convert(PyObject *v, BitMapPtr *p_itself)
-{
-       if (!BMObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "BitMap required");
-               return 0;
-       }
-       *p_itself = ((BitMapObject *)v)->ob_itself;
-       return 1;
-}
-
-static void BMObj_dealloc(BitMapObject *self)
-{
-       Py_XDECREF(self->referred_object);
-       if (self->referred_bitmap) free(self->referred_bitmap);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *BMObj_getdata(BitMapObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       int from, length;
-       char *cp;
-
-       if ( !PyArg_ParseTuple(_args, "ii", &from, &length) )
-               return NULL;
-       cp = _self->ob_itself->baseAddr+from;
-       _res = PyString_FromStringAndSize(cp, length);
-       return _res;
-
-}
-
-static PyObject *BMObj_putdata(BitMapObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       int from, length;
-       char *cp, *icp;
-
-       if ( !PyArg_ParseTuple(_args, "is#", &from, &icp, &length) )
-               return NULL;
-       cp = _self->ob_itself->baseAddr+from;
-       memcpy(cp, icp, length);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-
-}
-
-static PyMethodDef BMObj_methods[] = {
-       {"getdata", (PyCFunction)BMObj_getdata, 1,
-        PyDoc_STR("(int start, int size) -> string. Return bytes from the bitmap")},
-       {"putdata", (PyCFunction)BMObj_putdata, 1,
-        PyDoc_STR("(int start, string data). Store bytes into the bitmap")},
-       {NULL, NULL, 0}
-};
-
-static PyObject *BMObj_get_baseAddr(BitMapObject *self, void *closure)
-{
-       return PyLong_FromLong((long)self->ob_itself->baseAddr);
-}
-
-#define BMObj_set_baseAddr NULL
-
-static PyObject *BMObj_get_rowBytes(BitMapObject *self, void *closure)
-{
-       return PyLong_FromLong((long)self->ob_itself->rowBytes);
-}
-
-#define BMObj_set_rowBytes NULL
-
-static PyObject *BMObj_get_bounds(BitMapObject *self, void *closure)
-{
-       return Py_BuildValue("O&", PyMac_BuildRect, &self->ob_itself->bounds);
-}
-
-#define BMObj_set_bounds NULL
-
-static PyObject *BMObj_get_bitmap_data(BitMapObject *self, void *closure)
-{
-       return PyString_FromStringAndSize((char *)self->ob_itself, sizeof(BitMap));
-}
-
-#define BMObj_set_bitmap_data NULL
-
-static PyObject *BMObj_get_pixmap_data(BitMapObject *self, void *closure)
-{
-       return PyString_FromStringAndSize((char *)self->ob_itself, sizeof(PixMap));
-}
-
-#define BMObj_set_pixmap_data NULL
-
-static PyGetSetDef BMObj_getsetlist[] = {
-       {"baseAddr", (getter)BMObj_get_baseAddr, (setter)BMObj_set_baseAddr, NULL},
-       {"rowBytes", (getter)BMObj_get_rowBytes, (setter)BMObj_set_rowBytes, NULL},
-       {"bounds", (getter)BMObj_get_bounds, (setter)BMObj_set_bounds, NULL},
-       {"bitmap_data", (getter)BMObj_get_bitmap_data, (setter)BMObj_set_bitmap_data, NULL},
-       {"pixmap_data", (getter)BMObj_get_pixmap_data, (setter)BMObj_set_pixmap_data, NULL},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define BMObj_compare NULL
-
-#define BMObj_repr NULL
-
-#define BMObj_hash NULL
-#define BMObj_tp_init 0
-
-#define BMObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *BMObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       BitMapPtr itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, BMObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((BitMapObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define BMObj_tp_free PyObject_Del
-
-
-PyTypeObject BitMap_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qd.BitMap", /*tp_name*/
-       sizeof(BitMapObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) BMObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) BMObj_compare, /*tp_compare*/
-       (reprfunc) BMObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) BMObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       BMObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       BMObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       BMObj_tp_init, /* tp_init */
-       BMObj_tp_alloc, /* tp_alloc */
-       BMObj_tp_new, /* tp_new */
-       BMObj_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type BitMap --------------------- */
-
-
-static PyObject *Qd_GetPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GrafPtr port;
-#ifndef GetPort
-       PyMac_PRECHECK(GetPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetPort(&port);
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, port);
-       return _res;
-}
-
-static PyObject *Qd_GrafDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short device;
-#ifndef GrafDevice
-       PyMac_PRECHECK(GrafDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &device))
-               return NULL;
-       GrafDevice(device);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetPortBits(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       BitMapPtr bm;
-#ifndef SetPortBits
-       PyMac_PRECHECK(SetPortBits);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             BMObj_Convert, &bm))
-               return NULL;
-       SetPortBits(bm);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PortSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short width;
-       short height;
-#ifndef PortSize
-       PyMac_PRECHECK(PortSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &width,
-                             &height))
-               return NULL;
-       PortSize(width,
-                height);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MovePortTo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short leftGlobal;
-       short topGlobal;
-#ifndef MovePortTo
-       PyMac_PRECHECK(MovePortTo);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &leftGlobal,
-                             &topGlobal))
-               return NULL;
-       MovePortTo(leftGlobal,
-                  topGlobal);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetOrigin(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short h;
-       short v;
-#ifndef SetOrigin
-       PyMac_PRECHECK(SetOrigin);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &h,
-                             &v))
-               return NULL;
-       SetOrigin(h,
-                 v);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetClip(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef SetClip
-       PyMac_PRECHECK(SetClip);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       SetClip(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_GetClip(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef GetClip
-       PyMac_PRECHECK(GetClip);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       GetClip(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ClipRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef ClipRect
-       PyMac_PRECHECK(ClipRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       ClipRect(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_BackPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef BackPat
-       PyMac_PRECHECK(BackPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       BackPat(pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_InitCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef InitCursor
-       PyMac_PRECHECK(InitCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       InitCursor();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacSetCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Cursor *crsr__in__;
-       int crsr__in_len__;
-#ifndef MacSetCursor
-       PyMac_PRECHECK(MacSetCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             (char **)&crsr__in__, &crsr__in_len__))
-               return NULL;
-       if (crsr__in_len__ != sizeof(Cursor))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
-               goto crsr__error__;
-       }
-       MacSetCursor(crsr__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- crsr__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_HideCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef HideCursor
-       PyMac_PRECHECK(HideCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       HideCursor();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacShowCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef MacShowCursor
-       PyMac_PRECHECK(MacShowCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       MacShowCursor();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ObscureCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ObscureCursor
-       PyMac_PRECHECK(ObscureCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ObscureCursor();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_HidePen(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef HidePen
-       PyMac_PRECHECK(HidePen);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       HidePen();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ShowPen(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ShowPen
-       PyMac_PRECHECK(ShowPen);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ShowPen();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_GetPen(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point pt;
-#ifndef GetPen
-       PyMac_PRECHECK(GetPen);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetPen(&pt);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, pt);
-       return _res;
-}
-
-static PyObject *Qd_GetPenState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PenState pnState__out__;
-#ifndef GetPenState
-       PyMac_PRECHECK(GetPenState);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetPenState(&pnState__out__);
-       _res = Py_BuildValue("s#",
-                            (char *)&pnState__out__, (int)sizeof(PenState));
-       return _res;
-}
-
-static PyObject *Qd_SetPenState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PenState *pnState__in__;
-       int pnState__in_len__;
-#ifndef SetPenState
-       PyMac_PRECHECK(SetPenState);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             (char **)&pnState__in__, &pnState__in_len__))
-               return NULL;
-       if (pnState__in_len__ != sizeof(PenState))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(PenState)");
-               goto pnState__error__;
-       }
-       SetPenState(pnState__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pnState__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_PenSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short width;
-       short height;
-#ifndef PenSize
-       PyMac_PRECHECK(PenSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &width,
-                             &height))
-               return NULL;
-       PenSize(width,
-               height);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PenMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short mode;
-#ifndef PenMode
-       PyMac_PRECHECK(PenMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &mode))
-               return NULL;
-       PenMode(mode);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PenPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef PenPat
-       PyMac_PRECHECK(PenPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       PenPat(pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_PenNormal(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef PenNormal
-       PyMac_PRECHECK(PenNormal);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       PenNormal();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MoveTo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short h;
-       short v;
-#ifndef MoveTo
-       PyMac_PRECHECK(MoveTo);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &h,
-                             &v))
-               return NULL;
-       MoveTo(h,
-              v);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_Move(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short dh;
-       short dv;
-#ifndef Move
-       PyMac_PRECHECK(Move);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &dh,
-                             &dv))
-               return NULL;
-       Move(dh,
-            dv);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacLineTo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short h;
-       short v;
-#ifndef MacLineTo
-       PyMac_PRECHECK(MacLineTo);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &h,
-                             &v))
-               return NULL;
-       MacLineTo(h,
-                 v);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_Line(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short dh;
-       short dv;
-#ifndef Line
-       PyMac_PRECHECK(Line);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &dh,
-                             &dv))
-               return NULL;
-       Line(dh,
-            dv);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ForeColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long color;
-#ifndef ForeColor
-       PyMac_PRECHECK(ForeColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &color))
-               return NULL;
-       ForeColor(color);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_BackColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long color;
-#ifndef BackColor
-       PyMac_PRECHECK(BackColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &color))
-               return NULL;
-       BackColor(color);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ColorBit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short whichBit;
-#ifndef ColorBit
-       PyMac_PRECHECK(ColorBit);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &whichBit))
-               return NULL;
-       ColorBit(whichBit);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacSetRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short left;
-       short top;
-       short right;
-       short bottom;
-#ifndef MacSetRect
-       PyMac_PRECHECK(MacSetRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhhh",
-                             &left,
-                             &top,
-                             &right,
-                             &bottom))
-               return NULL;
-       MacSetRect(&r,
-                  left,
-                  top,
-                  right,
-                  bottom);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qd_MacOffsetRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short dh;
-       short dv;
-#ifndef MacOffsetRect
-       PyMac_PRECHECK(MacOffsetRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &dh,
-                             &dv))
-               return NULL;
-       MacOffsetRect(&r,
-                     dh,
-                     dv);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qd_MacInsetRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short dh;
-       short dv;
-#ifndef MacInsetRect
-       PyMac_PRECHECK(MacInsetRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &dh,
-                             &dv))
-               return NULL;
-       MacInsetRect(&r,
-                    dh,
-                    dv);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qd_SectRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Rect src1;
-       Rect src2;
-       Rect dstRect;
-#ifndef SectRect
-       PyMac_PRECHECK(SectRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &src1,
-                             PyMac_GetRect, &src2))
-               return NULL;
-       _rv = SectRect(&src1,
-                      &src2,
-                      &dstRect);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildRect, &dstRect);
-       return _res;
-}
-
-static PyObject *Qd_MacUnionRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect src1;
-       Rect src2;
-       Rect dstRect;
-#ifndef MacUnionRect
-       PyMac_PRECHECK(MacUnionRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &src1,
-                             PyMac_GetRect, &src2))
-               return NULL;
-       MacUnionRect(&src1,
-                    &src2,
-                    &dstRect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &dstRect);
-       return _res;
-}
-
-static PyObject *Qd_MacEqualRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Rect rect1;
-       Rect rect2;
-#ifndef MacEqualRect
-       PyMac_PRECHECK(MacEqualRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &rect1,
-                             PyMac_GetRect, &rect2))
-               return NULL;
-       _rv = MacEqualRect(&rect1,
-                          &rect2);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_EmptyRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Rect r;
-#ifndef EmptyRect
-       PyMac_PRECHECK(EmptyRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       _rv = EmptyRect(&r);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_MacFrameRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef MacFrameRect
-       PyMac_PRECHECK(MacFrameRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       MacFrameRect(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PaintRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef PaintRect
-       PyMac_PRECHECK(PaintRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       PaintRect(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_EraseRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef EraseRect
-       PyMac_PRECHECK(EraseRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       EraseRect(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacInvertRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef MacInvertRect
-       PyMac_PRECHECK(MacInvertRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       MacInvertRect(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacFillRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef MacFillRect
-       PyMac_PRECHECK(MacFillRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#",
-                             PyMac_GetRect, &r,
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       MacFillRect(&r,
-                   pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_FrameOval(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef FrameOval
-       PyMac_PRECHECK(FrameOval);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       FrameOval(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PaintOval(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef PaintOval
-       PyMac_PRECHECK(PaintOval);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       PaintOval(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_EraseOval(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef EraseOval
-       PyMac_PRECHECK(EraseOval);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       EraseOval(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_InvertOval(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef InvertOval
-       PyMac_PRECHECK(InvertOval);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       InvertOval(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillOval(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef FillOval
-       PyMac_PRECHECK(FillOval);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#",
-                             PyMac_GetRect, &r,
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       FillOval(&r,
-                pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_FrameRoundRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short ovalWidth;
-       short ovalHeight;
-#ifndef FrameRoundRect
-       PyMac_PRECHECK(FrameRoundRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &ovalWidth,
-                             &ovalHeight))
-               return NULL;
-       FrameRoundRect(&r,
-                      ovalWidth,
-                      ovalHeight);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PaintRoundRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short ovalWidth;
-       short ovalHeight;
-#ifndef PaintRoundRect
-       PyMac_PRECHECK(PaintRoundRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &ovalWidth,
-                             &ovalHeight))
-               return NULL;
-       PaintRoundRect(&r,
-                      ovalWidth,
-                      ovalHeight);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_EraseRoundRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short ovalWidth;
-       short ovalHeight;
-#ifndef EraseRoundRect
-       PyMac_PRECHECK(EraseRoundRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &ovalWidth,
-                             &ovalHeight))
-               return NULL;
-       EraseRoundRect(&r,
-                      ovalWidth,
-                      ovalHeight);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_InvertRoundRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short ovalWidth;
-       short ovalHeight;
-#ifndef InvertRoundRect
-       PyMac_PRECHECK(InvertRoundRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &ovalWidth,
-                             &ovalHeight))
-               return NULL;
-       InvertRoundRect(&r,
-                       ovalWidth,
-                       ovalHeight);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillRoundRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short ovalWidth;
-       short ovalHeight;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef FillRoundRect
-       PyMac_PRECHECK(FillRoundRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhs#",
-                             PyMac_GetRect, &r,
-                             &ovalWidth,
-                             &ovalHeight,
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       FillRoundRect(&r,
-                     ovalWidth,
-                     ovalHeight,
-                     pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_FrameArc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short startAngle;
-       short arcAngle;
-#ifndef FrameArc
-       PyMac_PRECHECK(FrameArc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &startAngle,
-                             &arcAngle))
-               return NULL;
-       FrameArc(&r,
-                startAngle,
-                arcAngle);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PaintArc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short startAngle;
-       short arcAngle;
-#ifndef PaintArc
-       PyMac_PRECHECK(PaintArc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &startAngle,
-                             &arcAngle))
-               return NULL;
-       PaintArc(&r,
-                startAngle,
-                arcAngle);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_EraseArc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short startAngle;
-       short arcAngle;
-#ifndef EraseArc
-       PyMac_PRECHECK(EraseArc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &startAngle,
-                             &arcAngle))
-               return NULL;
-       EraseArc(&r,
-                startAngle,
-                arcAngle);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_InvertArc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short startAngle;
-       short arcAngle;
-#ifndef InvertArc
-       PyMac_PRECHECK(InvertArc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &startAngle,
-                             &arcAngle))
-               return NULL;
-       InvertArc(&r,
-                 startAngle,
-                 arcAngle);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillArc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short startAngle;
-       short arcAngle;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef FillArc
-       PyMac_PRECHECK(FillArc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhs#",
-                             PyMac_GetRect, &r,
-                             &startAngle,
-                             &arcAngle,
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       FillArc(&r,
-               startAngle,
-               arcAngle,
-               pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_NewRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef NewRgn
-       PyMac_PRECHECK(NewRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = NewRgn();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_OpenRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef OpenRgn
-       PyMac_PRECHECK(OpenRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       OpenRgn();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_CloseRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle dstRgn;
-#ifndef CloseRgn
-       PyMac_PRECHECK(CloseRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &dstRgn))
-               return NULL;
-       CloseRgn(dstRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_BitMapToRegion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       RgnHandle region;
-       BitMapPtr bMap;
-#ifndef BitMapToRegion
-       PyMac_PRECHECK(BitMapToRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &region,
-                             BMObj_Convert, &bMap))
-               return NULL;
-       _err = BitMapToRegion(region,
-                             bMap);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_RgnToHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle region;
-       Handle flattenedRgnDataHdl;
-#ifndef RgnToHandle
-       PyMac_PRECHECK(RgnToHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &region,
-                             ResObj_Convert, &flattenedRgnDataHdl))
-               return NULL;
-       RgnToHandle(region,
-                   flattenedRgnDataHdl);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_DisposeRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef DisposeRgn
-       PyMac_PRECHECK(DisposeRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       DisposeRgn(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacCopyRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle srcRgn;
-       RgnHandle dstRgn;
-#ifndef MacCopyRgn
-       PyMac_PRECHECK(MacCopyRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &srcRgn,
-                             ResObj_Convert, &dstRgn))
-               return NULL;
-       MacCopyRgn(srcRgn,
-                  dstRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetEmptyRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef SetEmptyRgn
-       PyMac_PRECHECK(SetEmptyRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       SetEmptyRgn(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacSetRectRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       short left;
-       short top;
-       short right;
-       short bottom;
-#ifndef MacSetRectRgn
-       PyMac_PRECHECK(MacSetRectRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhhh",
-                             ResObj_Convert, &rgn,
-                             &left,
-                             &top,
-                             &right,
-                             &bottom))
-               return NULL;
-       MacSetRectRgn(rgn,
-                     left,
-                     top,
-                     right,
-                     bottom);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_RectRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       Rect r;
-#ifndef RectRgn
-       PyMac_PRECHECK(RectRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &rgn,
-                             PyMac_GetRect, &r))
-               return NULL;
-       RectRgn(rgn,
-               &r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacOffsetRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       short dh;
-       short dv;
-#ifndef MacOffsetRgn
-       PyMac_PRECHECK(MacOffsetRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             ResObj_Convert, &rgn,
-                             &dh,
-                             &dv))
-               return NULL;
-       MacOffsetRgn(rgn,
-                    dh,
-                    dv);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_InsetRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       short dh;
-       short dv;
-#ifndef InsetRgn
-       PyMac_PRECHECK(InsetRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             ResObj_Convert, &rgn,
-                             &dh,
-                             &dv))
-               return NULL;
-       InsetRgn(rgn,
-                dh,
-                dv);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SectRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle srcRgnA;
-       RgnHandle srcRgnB;
-       RgnHandle dstRgn;
-#ifndef SectRgn
-       PyMac_PRECHECK(SectRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &srcRgnA,
-                             ResObj_Convert, &srcRgnB,
-                             ResObj_Convert, &dstRgn))
-               return NULL;
-       SectRgn(srcRgnA,
-               srcRgnB,
-               dstRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacUnionRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle srcRgnA;
-       RgnHandle srcRgnB;
-       RgnHandle dstRgn;
-#ifndef MacUnionRgn
-       PyMac_PRECHECK(MacUnionRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &srcRgnA,
-                             ResObj_Convert, &srcRgnB,
-                             ResObj_Convert, &dstRgn))
-               return NULL;
-       MacUnionRgn(srcRgnA,
-                   srcRgnB,
-                   dstRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_DiffRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle srcRgnA;
-       RgnHandle srcRgnB;
-       RgnHandle dstRgn;
-#ifndef DiffRgn
-       PyMac_PRECHECK(DiffRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &srcRgnA,
-                             ResObj_Convert, &srcRgnB,
-                             ResObj_Convert, &dstRgn))
-               return NULL;
-       DiffRgn(srcRgnA,
-               srcRgnB,
-               dstRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacXorRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle srcRgnA;
-       RgnHandle srcRgnB;
-       RgnHandle dstRgn;
-#ifndef MacXorRgn
-       PyMac_PRECHECK(MacXorRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &srcRgnA,
-                             ResObj_Convert, &srcRgnB,
-                             ResObj_Convert, &dstRgn))
-               return NULL;
-       MacXorRgn(srcRgnA,
-                 srcRgnB,
-                 dstRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_RectInRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Rect r;
-       RgnHandle rgn;
-#ifndef RectInRgn
-       PyMac_PRECHECK(RectInRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &r,
-                             ResObj_Convert, &rgn))
-               return NULL;
-       _rv = RectInRgn(&r,
-                       rgn);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_MacEqualRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       RgnHandle rgnA;
-       RgnHandle rgnB;
-#ifndef MacEqualRgn
-       PyMac_PRECHECK(MacEqualRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &rgnA,
-                             ResObj_Convert, &rgnB))
-               return NULL;
-       _rv = MacEqualRgn(rgnA,
-                         rgnB);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_EmptyRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       RgnHandle rgn;
-#ifndef EmptyRgn
-       PyMac_PRECHECK(EmptyRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       _rv = EmptyRgn(rgn);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_MacFrameRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef MacFrameRgn
-       PyMac_PRECHECK(MacFrameRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       MacFrameRgn(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacPaintRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef MacPaintRgn
-       PyMac_PRECHECK(MacPaintRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       MacPaintRgn(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_EraseRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef EraseRgn
-       PyMac_PRECHECK(EraseRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       EraseRgn(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacInvertRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef MacInvertRgn
-       PyMac_PRECHECK(MacInvertRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       MacInvertRgn(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacFillRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef MacFillRgn
-       PyMac_PRECHECK(MacFillRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#",
-                             ResObj_Convert, &rgn,
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       MacFillRgn(rgn,
-                  pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_ScrollRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short dh;
-       short dv;
-       RgnHandle updateRgn;
-#ifndef ScrollRect
-       PyMac_PRECHECK(ScrollRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhO&",
-                             PyMac_GetRect, &r,
-                             &dh,
-                             &dv,
-                             ResObj_Convert, &updateRgn))
-               return NULL;
-       ScrollRect(&r,
-                  dh,
-                  dv,
-                  updateRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_CopyBits(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       BitMapPtr srcBits;
-       BitMapPtr dstBits;
-       Rect srcRect;
-       Rect dstRect;
-       short mode;
-       RgnHandle maskRgn;
-#ifndef CopyBits
-       PyMac_PRECHECK(CopyBits);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&hO&",
-                             BMObj_Convert, &srcBits,
-                             BMObj_Convert, &dstBits,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &dstRect,
-                             &mode,
-                             OptResObj_Convert, &maskRgn))
-               return NULL;
-       CopyBits(srcBits,
-                dstBits,
-                &srcRect,
-                &dstRect,
-                mode,
-                maskRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_CopyMask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       BitMapPtr srcBits;
-       BitMapPtr maskBits;
-       BitMapPtr dstBits;
-       Rect srcRect;
-       Rect maskRect;
-       Rect dstRect;
-#ifndef CopyMask
-       PyMac_PRECHECK(CopyMask);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&O&O&",
-                             BMObj_Convert, &srcBits,
-                             BMObj_Convert, &maskBits,
-                             BMObj_Convert, &dstBits,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &maskRect,
-                             PyMac_GetRect, &dstRect))
-               return NULL;
-       CopyMask(srcBits,
-                maskBits,
-                dstBits,
-                &srcRect,
-                &maskRect,
-                &dstRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_OpenPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PicHandle _rv;
-       Rect picFrame;
-#ifndef OpenPicture
-       PyMac_PRECHECK(OpenPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &picFrame))
-               return NULL;
-       _rv = OpenPicture(&picFrame);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_PicComment(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short kind;
-       short dataSize;
-       Handle dataHandle;
-#ifndef PicComment
-       PyMac_PRECHECK(PicComment);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhO&",
-                             &kind,
-                             &dataSize,
-                             ResObj_Convert, &dataHandle))
-               return NULL;
-       PicComment(kind,
-                  dataSize,
-                  dataHandle);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ClosePicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ClosePicture
-       PyMac_PRECHECK(ClosePicture);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ClosePicture();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_DrawPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PicHandle myPicture;
-       Rect dstRect;
-#ifndef DrawPicture
-       PyMac_PRECHECK(DrawPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &myPicture,
-                             PyMac_GetRect, &dstRect))
-               return NULL;
-       DrawPicture(myPicture,
-                   &dstRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_KillPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PicHandle myPicture;
-#ifndef KillPicture
-       PyMac_PRECHECK(KillPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &myPicture))
-               return NULL;
-       KillPicture(myPicture);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_OpenPoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle _rv;
-#ifndef OpenPoly
-       PyMac_PRECHECK(OpenPoly);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = OpenPoly();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_ClosePoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ClosePoly
-       PyMac_PRECHECK(ClosePoly);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ClosePoly();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_KillPoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle poly;
-#ifndef KillPoly
-       PyMac_PRECHECK(KillPoly);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &poly))
-               return NULL;
-       KillPoly(poly);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_OffsetPoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle poly;
-       short dh;
-       short dv;
-#ifndef OffsetPoly
-       PyMac_PRECHECK(OffsetPoly);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             ResObj_Convert, &poly,
-                             &dh,
-                             &dv))
-               return NULL;
-       OffsetPoly(poly,
-                  dh,
-                  dv);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FramePoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle poly;
-#ifndef FramePoly
-       PyMac_PRECHECK(FramePoly);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &poly))
-               return NULL;
-       FramePoly(poly);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PaintPoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle poly;
-#ifndef PaintPoly
-       PyMac_PRECHECK(PaintPoly);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &poly))
-               return NULL;
-       PaintPoly(poly);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ErasePoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle poly;
-#ifndef ErasePoly
-       PyMac_PRECHECK(ErasePoly);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &poly))
-               return NULL;
-       ErasePoly(poly);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_InvertPoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle poly;
-#ifndef InvertPoly
-       PyMac_PRECHECK(InvertPoly);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &poly))
-               return NULL;
-       InvertPoly(poly);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillPoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle poly;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef FillPoly
-       PyMac_PRECHECK(FillPoly);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#",
-                             ResObj_Convert, &poly,
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       FillPoly(poly,
-                pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_SetPt(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point pt;
-       short h;
-       short v;
-#ifndef SetPt
-       PyMac_PRECHECK(SetPt);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &h,
-                             &v))
-               return NULL;
-       SetPt(&pt,
-             h,
-             v);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, pt);
-       return _res;
-}
-
-static PyObject *Qd_LocalToGlobal(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point pt;
-#ifndef LocalToGlobal
-       PyMac_PRECHECK(LocalToGlobal);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &pt))
-               return NULL;
-       LocalToGlobal(&pt);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, pt);
-       return _res;
-}
-
-static PyObject *Qd_GlobalToLocal(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point pt;
-#ifndef GlobalToLocal
-       PyMac_PRECHECK(GlobalToLocal);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &pt))
-               return NULL;
-       GlobalToLocal(&pt);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, pt);
-       return _res;
-}
-
-static PyObject *Qd_Random(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef Random
-       PyMac_PRECHECK(Random);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = Random();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_MacGetPixel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       short h;
-       short v;
-#ifndef MacGetPixel
-       PyMac_PRECHECK(MacGetPixel);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &h,
-                             &v))
-               return NULL;
-       _rv = MacGetPixel(h,
-                         v);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_ScalePt(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point pt;
-       Rect srcRect;
-       Rect dstRect;
-#ifndef ScalePt
-       PyMac_PRECHECK(ScalePt);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetPoint, &pt,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &dstRect))
-               return NULL;
-       ScalePt(&pt,
-               &srcRect,
-               &dstRect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, pt);
-       return _res;
-}
-
-static PyObject *Qd_MapPt(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point pt;
-       Rect srcRect;
-       Rect dstRect;
-#ifndef MapPt
-       PyMac_PRECHECK(MapPt);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetPoint, &pt,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &dstRect))
-               return NULL;
-       MapPt(&pt,
-             &srcRect,
-             &dstRect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, pt);
-       return _res;
-}
-
-static PyObject *Qd_MapRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       Rect srcRect;
-       Rect dstRect;
-#ifndef MapRect
-       PyMac_PRECHECK(MapRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetRect, &r,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &dstRect))
-               return NULL;
-       MapRect(&r,
-               &srcRect,
-               &dstRect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qd_MapRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       Rect srcRect;
-       Rect dstRect;
-#ifndef MapRgn
-       PyMac_PRECHECK(MapRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &rgn,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &dstRect))
-               return NULL;
-       MapRgn(rgn,
-              &srcRect,
-              &dstRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MapPoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle poly;
-       Rect srcRect;
-       Rect dstRect;
-#ifndef MapPoly
-       PyMac_PRECHECK(MapPoly);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &poly,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &dstRect))
-               return NULL;
-       MapPoly(poly,
-               &srcRect,
-               &dstRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_StdBits(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       BitMapPtr srcBits;
-       Rect srcRect;
-       Rect dstRect;
-       short mode;
-       RgnHandle maskRgn;
-#ifndef StdBits
-       PyMac_PRECHECK(StdBits);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&hO&",
-                             BMObj_Convert, &srcBits,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &dstRect,
-                             &mode,
-                             OptResObj_Convert, &maskRgn))
-               return NULL;
-       StdBits(srcBits,
-               &srcRect,
-               &dstRect,
-               mode,
-               maskRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_AddPt(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point src;
-       Point dst;
-#ifndef AddPt
-       PyMac_PRECHECK(AddPt);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &src,
-                             PyMac_GetPoint, &dst))
-               return NULL;
-       AddPt(src,
-             &dst);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, dst);
-       return _res;
-}
-
-static PyObject *Qd_EqualPt(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point pt1;
-       Point pt2;
-#ifndef EqualPt
-       PyMac_PRECHECK(EqualPt);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &pt1,
-                             PyMac_GetPoint, &pt2))
-               return NULL;
-       _rv = EqualPt(pt1,
-                     pt2);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_MacPtInRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point pt;
-       Rect r;
-#ifndef MacPtInRect
-       PyMac_PRECHECK(MacPtInRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &pt,
-                             PyMac_GetRect, &r))
-               return NULL;
-       _rv = MacPtInRect(pt,
-                         &r);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_Pt2Rect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point pt1;
-       Point pt2;
-       Rect dstRect;
-#ifndef Pt2Rect
-       PyMac_PRECHECK(Pt2Rect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &pt1,
-                             PyMac_GetPoint, &pt2))
-               return NULL;
-       Pt2Rect(pt1,
-               pt2,
-               &dstRect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &dstRect);
-       return _res;
-}
-
-static PyObject *Qd_PtToAngle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       Point pt;
-       short angle;
-#ifndef PtToAngle
-       PyMac_PRECHECK(PtToAngle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &r,
-                             PyMac_GetPoint, &pt))
-               return NULL;
-       PtToAngle(&r,
-                 pt,
-                 &angle);
-       _res = Py_BuildValue("h",
-                            angle);
-       return _res;
-}
-
-static PyObject *Qd_SubPt(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point src;
-       Point dst;
-#ifndef SubPt
-       PyMac_PRECHECK(SubPt);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &src,
-                             PyMac_GetPoint, &dst))
-               return NULL;
-       SubPt(src,
-             &dst);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, dst);
-       return _res;
-}
-
-static PyObject *Qd_PtInRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point pt;
-       RgnHandle rgn;
-#ifndef PtInRgn
-       PyMac_PRECHECK(PtInRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &pt,
-                             ResObj_Convert, &rgn))
-               return NULL;
-       _rv = PtInRgn(pt,
-                     rgn);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_NewPixMap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle _rv;
-#ifndef NewPixMap
-       PyMac_PRECHECK(NewPixMap);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = NewPixMap();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_DisposePixMap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle pm;
-#ifndef DisposePixMap
-       PyMac_PRECHECK(DisposePixMap);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       DisposePixMap(pm);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_CopyPixMap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle srcPM;
-       PixMapHandle dstPM;
-#ifndef CopyPixMap
-       PyMac_PRECHECK(CopyPixMap);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &srcPM,
-                             ResObj_Convert, &dstPM))
-               return NULL;
-       CopyPixMap(srcPM,
-                  dstPM);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_NewPixPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle _rv;
-#ifndef NewPixPat
-       PyMac_PRECHECK(NewPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = NewPixPat();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_DisposePixPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle pp;
-#ifndef DisposePixPat
-       PyMac_PRECHECK(DisposePixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pp))
-               return NULL;
-       DisposePixPat(pp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_CopyPixPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle srcPP;
-       PixPatHandle dstPP;
-#ifndef CopyPixPat
-       PyMac_PRECHECK(CopyPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &srcPP,
-                             ResObj_Convert, &dstPP))
-               return NULL;
-       CopyPixPat(srcPP,
-                  dstPP);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PenPixPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle pp;
-#ifndef PenPixPat
-       PyMac_PRECHECK(PenPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pp))
-               return NULL;
-       PenPixPat(pp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_BackPixPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle pp;
-#ifndef BackPixPat
-       PyMac_PRECHECK(BackPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pp))
-               return NULL;
-       BackPixPat(pp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_GetPixPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle _rv;
-       short patID;
-#ifndef GetPixPat
-       PyMac_PRECHECK(GetPixPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &patID))
-               return NULL;
-       _rv = GetPixPat(patID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_MakeRGBPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle pp;
-       RGBColor myColor;
-#ifndef MakeRGBPat
-       PyMac_PRECHECK(MakeRGBPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &pp,
-                             QdRGB_Convert, &myColor))
-               return NULL;
-       MakeRGBPat(pp,
-                  &myColor);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillCRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       PixPatHandle pp;
-#ifndef FillCRect
-       PyMac_PRECHECK(FillCRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &r,
-                             ResObj_Convert, &pp))
-               return NULL;
-       FillCRect(&r,
-                 pp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillCOval(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       PixPatHandle pp;
-#ifndef FillCOval
-       PyMac_PRECHECK(FillCOval);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &r,
-                             ResObj_Convert, &pp))
-               return NULL;
-       FillCOval(&r,
-                 pp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillCRoundRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short ovalWidth;
-       short ovalHeight;
-       PixPatHandle pp;
-#ifndef FillCRoundRect
-       PyMac_PRECHECK(FillCRoundRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhO&",
-                             PyMac_GetRect, &r,
-                             &ovalWidth,
-                             &ovalHeight,
-                             ResObj_Convert, &pp))
-               return NULL;
-       FillCRoundRect(&r,
-                      ovalWidth,
-                      ovalHeight,
-                      pp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillCArc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short startAngle;
-       short arcAngle;
-       PixPatHandle pp;
-#ifndef FillCArc
-       PyMac_PRECHECK(FillCArc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhO&",
-                             PyMac_GetRect, &r,
-                             &startAngle,
-                             &arcAngle,
-                             ResObj_Convert, &pp))
-               return NULL;
-       FillCArc(&r,
-                startAngle,
-                arcAngle,
-                pp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillCRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       PixPatHandle pp;
-#ifndef FillCRgn
-       PyMac_PRECHECK(FillCRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &rgn,
-                             ResObj_Convert, &pp))
-               return NULL;
-       FillCRgn(rgn,
-                pp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillCPoly(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PolyHandle poly;
-       PixPatHandle pp;
-#ifndef FillCPoly
-       PyMac_PRECHECK(FillCPoly);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &poly,
-                             ResObj_Convert, &pp))
-               return NULL;
-       FillCPoly(poly,
-                 pp);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_RGBForeColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor color;
-#ifndef RGBForeColor
-       PyMac_PRECHECK(RGBForeColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QdRGB_Convert, &color))
-               return NULL;
-       RGBForeColor(&color);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_RGBBackColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor color;
-#ifndef RGBBackColor
-       PyMac_PRECHECK(RGBBackColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QdRGB_Convert, &color))
-               return NULL;
-       RGBBackColor(&color);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetCPixel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short h;
-       short v;
-       RGBColor cPix;
-#ifndef SetCPixel
-       PyMac_PRECHECK(SetCPixel);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhO&",
-                             &h,
-                             &v,
-                             QdRGB_Convert, &cPix))
-               return NULL;
-       SetCPixel(h,
-                 v,
-                 &cPix);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetPortPix(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle pm;
-#ifndef SetPortPix
-       PyMac_PRECHECK(SetPortPix);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       SetPortPix(pm);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_GetCPixel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short h;
-       short v;
-       RGBColor cPix;
-#ifndef GetCPixel
-       PyMac_PRECHECK(GetCPixel);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &h,
-                             &v))
-               return NULL;
-       GetCPixel(h,
-                 v,
-                 &cPix);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &cPix);
-       return _res;
-}
-
-static PyObject *Qd_GetForeColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor color;
-#ifndef GetForeColor
-       PyMac_PRECHECK(GetForeColor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetForeColor(&color);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &color);
-       return _res;
-}
-
-static PyObject *Qd_GetBackColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor color;
-#ifndef GetBackColor
-       PyMac_PRECHECK(GetBackColor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetBackColor(&color);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &color);
-       return _res;
-}
-
-static PyObject *Qd_OpColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor color;
-#ifndef OpColor
-       PyMac_PRECHECK(OpColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QdRGB_Convert, &color))
-               return NULL;
-       OpColor(&color);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_HiliteColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor color;
-#ifndef HiliteColor
-       PyMac_PRECHECK(HiliteColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QdRGB_Convert, &color))
-               return NULL;
-       HiliteColor(&color);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_DisposeCTable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CTabHandle cTable;
-#ifndef DisposeCTable
-       PyMac_PRECHECK(DisposeCTable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &cTable))
-               return NULL;
-       DisposeCTable(cTable);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_GetCTable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CTabHandle _rv;
-       short ctID;
-#ifndef GetCTable
-       PyMac_PRECHECK(GetCTable);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &ctID))
-               return NULL;
-       _rv = GetCTable(ctID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetCCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CCrsrHandle _rv;
-       short crsrID;
-#ifndef GetCCursor
-       PyMac_PRECHECK(GetCCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &crsrID))
-               return NULL;
-       _rv = GetCCursor(crsrID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_SetCCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CCrsrHandle cCrsr;
-#ifndef SetCCursor
-       PyMac_PRECHECK(SetCCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &cCrsr))
-               return NULL;
-       SetCCursor(cCrsr);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_AllocCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef AllocCursor
-       PyMac_PRECHECK(AllocCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       AllocCursor();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_DisposeCCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CCrsrHandle cCrsr;
-#ifndef DisposeCCursor
-       PyMac_PRECHECK(DisposeCCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &cCrsr))
-               return NULL;
-       DisposeCCursor(cCrsr);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_GetMaxDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-       Rect globalRect;
-#ifndef GetMaxDevice
-       PyMac_PRECHECK(GetMaxDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &globalRect))
-               return NULL;
-       _rv = GetMaxDevice(&globalRect);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetCTSeed(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetCTSeed
-       PyMac_PRECHECK(GetCTSeed);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetCTSeed();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetDeviceList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-#ifndef GetDeviceList
-       PyMac_PRECHECK(GetDeviceList);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetDeviceList();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetMainDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-#ifndef GetMainDevice
-       PyMac_PRECHECK(GetMainDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMainDevice();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetNextDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-       GDHandle curDevice;
-#ifndef GetNextDevice
-       PyMac_PRECHECK(GetNextDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &curDevice))
-               return NULL;
-       _rv = GetNextDevice(curDevice);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_TestDeviceAttribute(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       GDHandle gdh;
-       short attribute;
-#ifndef TestDeviceAttribute
-       PyMac_PRECHECK(TestDeviceAttribute);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             ResObj_Convert, &gdh,
-                             &attribute))
-               return NULL;
-       _rv = TestDeviceAttribute(gdh,
-                                 attribute);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_SetDeviceAttribute(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle gdh;
-       short attribute;
-       Boolean value;
-#ifndef SetDeviceAttribute
-       PyMac_PRECHECK(SetDeviceAttribute);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hb",
-                             ResObj_Convert, &gdh,
-                             &attribute,
-                             &value))
-               return NULL;
-       SetDeviceAttribute(gdh,
-                          attribute,
-                          value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_InitGDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short qdRefNum;
-       long mode;
-       GDHandle gdh;
-#ifndef InitGDevice
-       PyMac_PRECHECK(InitGDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &qdRefNum,
-                             &mode,
-                             ResObj_Convert, &gdh))
-               return NULL;
-       InitGDevice(qdRefNum,
-                   mode,
-                   gdh);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_NewGDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-       short refNum;
-       long mode;
-#ifndef NewGDevice
-       PyMac_PRECHECK(NewGDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &refNum,
-                             &mode))
-               return NULL;
-       _rv = NewGDevice(refNum,
-                        mode);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_DisposeGDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle gdh;
-#ifndef DisposeGDevice
-       PyMac_PRECHECK(DisposeGDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &gdh))
-               return NULL;
-       DisposeGDevice(gdh);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetGDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle gd;
-#ifndef SetGDevice
-       PyMac_PRECHECK(SetGDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &gd))
-               return NULL;
-       SetGDevice(gd);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_GetGDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-#ifndef GetGDevice
-       PyMac_PRECHECK(GetGDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetGDevice();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_Color2Index(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       RGBColor myColor;
-#ifndef Color2Index
-       PyMac_PRECHECK(Color2Index);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QdRGB_Convert, &myColor))
-               return NULL;
-       _rv = Color2Index(&myColor);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_Index2Color(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long index;
-       RGBColor aColor;
-#ifndef Index2Color
-       PyMac_PRECHECK(Index2Color);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &index))
-               return NULL;
-       Index2Color(index,
-                   &aColor);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &aColor);
-       return _res;
-}
-
-static PyObject *Qd_InvertColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor myColor;
-#ifndef InvertColor
-       PyMac_PRECHECK(InvertColor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       InvertColor(&myColor);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &myColor);
-       return _res;
-}
-
-static PyObject *Qd_RealColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       RGBColor color;
-#ifndef RealColor
-       PyMac_PRECHECK(RealColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QdRGB_Convert, &color))
-               return NULL;
-       _rv = RealColor(&color);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetSubTable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CTabHandle myColors;
-       short iTabRes;
-       CTabHandle targetTbl;
-#ifndef GetSubTable
-       PyMac_PRECHECK(GetSubTable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hO&",
-                             ResObj_Convert, &myColors,
-                             &iTabRes,
-                             ResObj_Convert, &targetTbl))
-               return NULL;
-       GetSubTable(myColors,
-                   iTabRes,
-                   targetTbl);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MakeITable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CTabHandle cTabH;
-       ITabHandle iTabH;
-       short res;
-#ifndef MakeITable
-       PyMac_PRECHECK(MakeITable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             ResObj_Convert, &cTabH,
-                             ResObj_Convert, &iTabH,
-                             &res))
-               return NULL;
-       MakeITable(cTabH,
-                  iTabH,
-                  res);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetClientID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short id;
-#ifndef SetClientID
-       PyMac_PRECHECK(SetClientID);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &id))
-               return NULL;
-       SetClientID(id);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ProtectEntry(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short index;
-       Boolean protect;
-#ifndef ProtectEntry
-       PyMac_PRECHECK(ProtectEntry);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &index,
-                             &protect))
-               return NULL;
-       ProtectEntry(index,
-                    protect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ReserveEntry(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short index;
-       Boolean reserve;
-#ifndef ReserveEntry
-       PyMac_PRECHECK(ReserveEntry);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &index,
-                             &reserve))
-               return NULL;
-       ReserveEntry(index,
-                    reserve);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_QDError(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef QDError
-       PyMac_PRECHECK(QDError);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = QDError();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_CopyDeepMask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       BitMapPtr srcBits;
-       BitMapPtr maskBits;
-       BitMapPtr dstBits;
-       Rect srcRect;
-       Rect maskRect;
-       Rect dstRect;
-       short mode;
-       RgnHandle maskRgn;
-#ifndef CopyDeepMask
-       PyMac_PRECHECK(CopyDeepMask);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&O&O&hO&",
-                             BMObj_Convert, &srcBits,
-                             BMObj_Convert, &maskBits,
-                             BMObj_Convert, &dstBits,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &maskRect,
-                             PyMac_GetRect, &dstRect,
-                             &mode,
-                             OptResObj_Convert, &maskRgn))
-               return NULL;
-       CopyDeepMask(srcBits,
-                    maskBits,
-                    dstBits,
-                    &srcRect,
-                    &maskRect,
-                    &dstRect,
-                    mode,
-                    maskRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_GetPattern(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PatHandle _rv;
-       short patternID;
-#ifndef GetPattern
-       PyMac_PRECHECK(GetPattern);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &patternID))
-               return NULL;
-       _rv = GetPattern(patternID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_MacGetCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CursHandle _rv;
-       short cursorID;
-#ifndef MacGetCursor
-       PyMac_PRECHECK(MacGetCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &cursorID))
-               return NULL;
-       _rv = MacGetCursor(cursorID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PicHandle _rv;
-       short pictureID;
-#ifndef GetPicture
-       PyMac_PRECHECK(GetPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &pictureID))
-               return NULL;
-       _rv = GetPicture(pictureID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_DeltaPoint(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       Point ptA;
-       Point ptB;
-#ifndef DeltaPoint
-       PyMac_PRECHECK(DeltaPoint);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &ptA,
-                             PyMac_GetPoint, &ptB))
-               return NULL;
-       _rv = DeltaPoint(ptA,
-                        ptB);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_ShieldCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect shieldRect;
-       Point offsetPt;
-#ifndef ShieldCursor
-       PyMac_PRECHECK(ShieldCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &shieldRect,
-                             PyMac_GetPoint, &offsetPt))
-               return NULL;
-       ShieldCursor(&shieldRect,
-                    offsetPt);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_ScreenRes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short scrnHRes;
-       short scrnVRes;
-#ifndef ScreenRes
-       PyMac_PRECHECK(ScreenRes);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ScreenRes(&scrnHRes,
-                 &scrnVRes);
-       _res = Py_BuildValue("hh",
-                            scrnHRes,
-                            scrnVRes);
-       return _res;
-}
-
-static PyObject *Qd_GetIndPattern(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Pattern thePat__out__;
-       short patternListID;
-       short index;
-#ifndef GetIndPattern
-       PyMac_PRECHECK(GetIndPattern);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &patternListID,
-                             &index))
-               return NULL;
-       GetIndPattern(&thePat__out__,
-                     patternListID,
-                     index);
-       _res = Py_BuildValue("s#",
-                            (char *)&thePat__out__, (int)sizeof(Pattern));
-       return _res;
-}
-
-static PyObject *Qd_SlopeFromAngle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       short angle;
-#ifndef SlopeFromAngle
-       PyMac_PRECHECK(SlopeFromAngle);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &angle))
-               return NULL;
-       _rv = SlopeFromAngle(angle);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *Qd_AngleFromSlope(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       Fixed slope;
-#ifndef AngleFromSlope
-       PyMac_PRECHECK(AngleFromSlope);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFixed, &slope))
-               return NULL;
-       _rv = AngleFromSlope(slope);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetPixBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle pixMap;
-       Rect bounds;
-#ifndef GetPixBounds
-       PyMac_PRECHECK(GetPixBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pixMap))
-               return NULL;
-       GetPixBounds(pixMap,
-                    &bounds);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *Qd_GetPixDepth(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       PixMapHandle pixMap;
-#ifndef GetPixDepth
-       PyMac_PRECHECK(GetPixDepth);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pixMap))
-               return NULL;
-       _rv = GetPixDepth(pixMap);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetQDGlobalsRandomSeed(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetQDGlobalsRandomSeed
-       PyMac_PRECHECK(GetQDGlobalsRandomSeed);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetQDGlobalsRandomSeed();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetQDGlobalsScreenBits(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       BitMap screenBits;
-#ifndef GetQDGlobalsScreenBits
-       PyMac_PRECHECK(GetQDGlobalsScreenBits);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetQDGlobalsScreenBits(&screenBits);
-       _res = Py_BuildValue("O&",
-                            BMObj_NewCopied, &screenBits);
-       return _res;
-}
-
-static PyObject *Qd_GetQDGlobalsArrow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Cursor arrow__out__;
-#ifndef GetQDGlobalsArrow
-       PyMac_PRECHECK(GetQDGlobalsArrow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetQDGlobalsArrow(&arrow__out__);
-       _res = Py_BuildValue("s#",
-                            (char *)&arrow__out__, (int)sizeof(Cursor));
-       return _res;
-}
-
-static PyObject *Qd_GetQDGlobalsDarkGray(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Pattern dkGray__out__;
-#ifndef GetQDGlobalsDarkGray
-       PyMac_PRECHECK(GetQDGlobalsDarkGray);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetQDGlobalsDarkGray(&dkGray__out__);
-       _res = Py_BuildValue("s#",
-                            (char *)&dkGray__out__, (int)sizeof(Pattern));
-       return _res;
-}
-
-static PyObject *Qd_GetQDGlobalsLightGray(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Pattern ltGray__out__;
-#ifndef GetQDGlobalsLightGray
-       PyMac_PRECHECK(GetQDGlobalsLightGray);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetQDGlobalsLightGray(&ltGray__out__);
-       _res = Py_BuildValue("s#",
-                            (char *)&ltGray__out__, (int)sizeof(Pattern));
-       return _res;
-}
-
-static PyObject *Qd_GetQDGlobalsGray(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Pattern gray__out__;
-#ifndef GetQDGlobalsGray
-       PyMac_PRECHECK(GetQDGlobalsGray);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetQDGlobalsGray(&gray__out__);
-       _res = Py_BuildValue("s#",
-                            (char *)&gray__out__, (int)sizeof(Pattern));
-       return _res;
-}
-
-static PyObject *Qd_GetQDGlobalsBlack(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Pattern black__out__;
-#ifndef GetQDGlobalsBlack
-       PyMac_PRECHECK(GetQDGlobalsBlack);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetQDGlobalsBlack(&black__out__);
-       _res = Py_BuildValue("s#",
-                            (char *)&black__out__, (int)sizeof(Pattern));
-       return _res;
-}
-
-static PyObject *Qd_GetQDGlobalsWhite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Pattern white__out__;
-#ifndef GetQDGlobalsWhite
-       PyMac_PRECHECK(GetQDGlobalsWhite);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetQDGlobalsWhite(&white__out__);
-       _res = Py_BuildValue("s#",
-                            (char *)&white__out__, (int)sizeof(Pattern));
-       return _res;
-}
-
-static PyObject *Qd_GetQDGlobalsThePort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr _rv;
-#ifndef GetQDGlobalsThePort
-       PyMac_PRECHECK(GetQDGlobalsThePort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetQDGlobalsThePort();
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_SetQDGlobalsRandomSeed(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long randomSeed;
-#ifndef SetQDGlobalsRandomSeed
-       PyMac_PRECHECK(SetQDGlobalsRandomSeed);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &randomSeed))
-               return NULL;
-       SetQDGlobalsRandomSeed(randomSeed);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetQDGlobalsArrow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Cursor *arrow__in__;
-       int arrow__in_len__;
-#ifndef SetQDGlobalsArrow
-       PyMac_PRECHECK(SetQDGlobalsArrow);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             (char **)&arrow__in__, &arrow__in_len__))
-               return NULL;
-       if (arrow__in_len__ != sizeof(Cursor))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
-               goto arrow__error__;
-       }
-       SetQDGlobalsArrow(arrow__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- arrow__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_GetRegionBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle region;
-       Rect bounds;
-#ifndef GetRegionBounds
-       PyMac_PRECHECK(GetRegionBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &region))
-               return NULL;
-       GetRegionBounds(region,
-                       &bounds);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *Qd_IsRegionRectangular(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       RgnHandle region;
-#ifndef IsRegionRectangular
-       PyMac_PRECHECK(IsRegionRectangular);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &region))
-               return NULL;
-       _rv = IsRegionRectangular(region);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_CreateNewPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr _rv;
-#ifndef CreateNewPort
-       PyMac_PRECHECK(CreateNewPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CreateNewPort();
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_SetQDError(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr err;
-#ifndef SetQDError
-       PyMac_PRECHECK(SetQDError);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &err))
-               return NULL;
-       SetQDError(err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetScrVRes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef LMGetScrVRes
-       PyMac_PRECHECK(LMGetScrVRes);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetScrVRes();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetScrVRes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 value;
-#ifndef LMSetScrVRes
-       PyMac_PRECHECK(LMSetScrVRes);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &value))
-               return NULL;
-       LMSetScrVRes(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetScrHRes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 _rv;
-#ifndef LMGetScrHRes
-       PyMac_PRECHECK(LMGetScrHRes);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetScrHRes();
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetScrHRes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt16 value;
-#ifndef LMSetScrHRes
-       PyMac_PRECHECK(LMSetScrHRes);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &value))
-               return NULL;
-       LMSetScrHRes(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetMainDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-#ifndef LMGetMainDevice
-       PyMac_PRECHECK(LMGetMainDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetMainDevice();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetMainDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle value;
-#ifndef LMSetMainDevice
-       PyMac_PRECHECK(LMSetMainDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &value))
-               return NULL;
-       LMSetMainDevice(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetDeviceList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-#ifndef LMGetDeviceList
-       PyMac_PRECHECK(LMGetDeviceList);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetDeviceList();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetDeviceList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle value;
-#ifndef LMSetDeviceList
-       PyMac_PRECHECK(LMSetDeviceList);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &value))
-               return NULL;
-       LMSetDeviceList(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetQDColors(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef LMGetQDColors
-       PyMac_PRECHECK(LMGetQDColors);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetQDColors();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetQDColors(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle value;
-#ifndef LMSetQDColors
-       PyMac_PRECHECK(LMSetQDColors);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &value))
-               return NULL;
-       LMSetQDColors(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetWidthListHand(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef LMGetWidthListHand
-       PyMac_PRECHECK(LMGetWidthListHand);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetWidthListHand();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetWidthListHand(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle value;
-#ifndef LMSetWidthListHand
-       PyMac_PRECHECK(LMSetWidthListHand);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &value))
-               return NULL;
-       LMSetWidthListHand(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetHiliteMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 _rv;
-#ifndef LMGetHiliteMode
-       PyMac_PRECHECK(LMGetHiliteMode);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetHiliteMode();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetHiliteMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 value;
-#ifndef LMSetHiliteMode
-       PyMac_PRECHECK(LMSetHiliteMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &value))
-               return NULL;
-       LMSetHiliteMode(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetWidthTabHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef LMGetWidthTabHandle
-       PyMac_PRECHECK(LMGetWidthTabHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetWidthTabHandle();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetWidthTabHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle value;
-#ifndef LMSetWidthTabHandle
-       PyMac_PRECHECK(LMSetWidthTabHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &value))
-               return NULL;
-       LMSetWidthTabHandle(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetLastSPExtra(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 _rv;
-#ifndef LMGetLastSPExtra
-       PyMac_PRECHECK(LMGetLastSPExtra);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetLastSPExtra();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetLastSPExtra(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       SInt32 value;
-#ifndef LMSetLastSPExtra
-       PyMac_PRECHECK(LMSetLastSPExtra);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &value))
-               return NULL;
-       LMSetLastSPExtra(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetLastFOND(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef LMGetLastFOND
-       PyMac_PRECHECK(LMGetLastFOND);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetLastFOND();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetLastFOND(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle value;
-#ifndef LMSetLastFOND
-       PyMac_PRECHECK(LMSetLastFOND);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &value))
-               return NULL;
-       LMSetLastFOND(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetFractEnable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 _rv;
-#ifndef LMGetFractEnable
-       PyMac_PRECHECK(LMGetFractEnable);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetFractEnable();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetFractEnable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 value;
-#ifndef LMSetFractEnable
-       PyMac_PRECHECK(LMSetFractEnable);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &value))
-               return NULL;
-       LMSetFractEnable(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetTheGDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-#ifndef LMGetTheGDevice
-       PyMac_PRECHECK(LMGetTheGDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetTheGDevice();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetTheGDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle value;
-#ifndef LMSetTheGDevice
-       PyMac_PRECHECK(LMSetTheGDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &value))
-               return NULL;
-       LMSetTheGDevice(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetHiliteRGB(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor hiliteRGBValue;
-#ifndef LMGetHiliteRGB
-       PyMac_PRECHECK(LMGetHiliteRGB);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       LMGetHiliteRGB(&hiliteRGBValue);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &hiliteRGBValue);
-       return _res;
-}
-
-static PyObject *Qd_LMSetHiliteRGB(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RGBColor hiliteRGBValue;
-#ifndef LMSetHiliteRGB
-       PyMac_PRECHECK(LMSetHiliteRGB);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QdRGB_Convert, &hiliteRGBValue))
-               return NULL;
-       LMSetHiliteRGB(&hiliteRGBValue);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LMGetCursorNew(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef LMGetCursorNew
-       PyMac_PRECHECK(LMGetCursorNew);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetCursorNew();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_LMSetCursorNew(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean value;
-#ifndef LMSetCursorNew
-       PyMac_PRECHECK(LMSetCursorNew);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &value))
-               return NULL;
-       LMSetCursorNew(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_TextFont(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short font;
-#ifndef TextFont
-       PyMac_PRECHECK(TextFont);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &font))
-               return NULL;
-       TextFont(font);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_TextFace(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       StyleParameter face;
-#ifndef TextFace
-       PyMac_PRECHECK(TextFace);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &face))
-               return NULL;
-       TextFace(face);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_TextMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short mode;
-#ifndef TextMode
-       PyMac_PRECHECK(TextMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &mode))
-               return NULL;
-       TextMode(mode);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_TextSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short size;
-#ifndef TextSize
-       PyMac_PRECHECK(TextSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &size))
-               return NULL;
-       TextSize(size);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SpaceExtra(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed extra;
-#ifndef SpaceExtra
-       PyMac_PRECHECK(SpaceExtra);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFixed, &extra))
-               return NULL;
-       SpaceExtra(extra);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_DrawChar(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CharParameter ch;
-#ifndef DrawChar
-       PyMac_PRECHECK(DrawChar);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &ch))
-               return NULL;
-       DrawChar(ch);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_DrawString(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 s;
-#ifndef DrawString
-       PyMac_PRECHECK(DrawString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, s))
-               return NULL;
-       DrawString(s);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_MacDrawText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *textBuf__in__;
-       int textBuf__in_len__;
-       short firstByte;
-       short byteCount;
-#ifndef MacDrawText
-       PyMac_PRECHECK(MacDrawText);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#hh",
-                             &textBuf__in__, &textBuf__in_len__,
-                             &firstByte,
-                             &byteCount))
-               return NULL;
-       /* Fool compiler warnings */
-       textBuf__in_len__ = textBuf__in_len__;
-       MacDrawText(textBuf__in__,
-                   firstByte,
-                   byteCount);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_CharWidth(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       CharParameter ch;
-#ifndef CharWidth
-       PyMac_PRECHECK(CharWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &ch))
-               return NULL;
-       _rv = CharWidth(ch);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_StringWidth(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       Str255 s;
-#ifndef StringWidth
-       PyMac_PRECHECK(StringWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, s))
-               return NULL;
-       _rv = StringWidth(s);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_TextWidth(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       char *textBuf__in__;
-       int textBuf__in_len__;
-       short firstByte;
-       short byteCount;
-#ifndef TextWidth
-       PyMac_PRECHECK(TextWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#hh",
-                             &textBuf__in__, &textBuf__in_len__,
-                             &firstByte,
-                             &byteCount))
-               return NULL;
-       /* Fool compiler warnings */
-       textBuf__in_len__ = textBuf__in_len__;
-       _rv = TextWidth(textBuf__in__,
-                       firstByte,
-                       byteCount);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_GetFontInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       FontInfo info;
-#ifndef GetFontInfo
-       PyMac_PRECHECK(GetFontInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetFontInfo(&info);
-       _res = Py_BuildValue("O&",
-                            QdFI_New, &info);
-       return _res;
-}
-
-static PyObject *Qd_CharExtra(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed extra;
-#ifndef CharExtra
-       PyMac_PRECHECK(CharExtra);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFixed, &extra))
-               return NULL;
-       CharExtra(extra);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_TruncString(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       short width;
-       Str255 theString;
-       TruncCode truncWhere;
-#ifndef TruncString
-       PyMac_PRECHECK(TruncString);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&h",
-                             &width,
-                             PyMac_GetStr255, theString,
-                             &truncWhere))
-               return NULL;
-       _rv = TruncString(width,
-                         theString,
-                         truncWhere);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_SetPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GrafPtr thePort;
-#ifndef SetPort
-       PyMac_PRECHECK(SetPort);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             GrafObj_Convert, &thePort))
-               return NULL;
-       SetPort(thePort);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_GetCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CursHandle _rv;
-       short cursorID;
-#ifndef GetCursor
-       PyMac_PRECHECK(GetCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &cursorID))
-               return NULL;
-       _rv = GetCursor(cursorID);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qd_SetCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Cursor *crsr__in__;
-       int crsr__in_len__;
-#ifndef SetCursor
-       PyMac_PRECHECK(SetCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             (char **)&crsr__in__, &crsr__in_len__))
-               return NULL;
-       if (crsr__in_len__ != sizeof(Cursor))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
-               goto crsr__error__;
-       }
-       SetCursor(crsr__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- crsr__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_ShowCursor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ShowCursor
-       PyMac_PRECHECK(ShowCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ShowCursor();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_LineTo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short h;
-       short v;
-#ifndef LineTo
-       PyMac_PRECHECK(LineTo);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &h,
-                             &v))
-               return NULL;
-       LineTo(h,
-              v);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short left;
-       short top;
-       short right;
-       short bottom;
-#ifndef SetRect
-       PyMac_PRECHECK(SetRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhhh",
-                             &left,
-                             &top,
-                             &right,
-                             &bottom))
-               return NULL;
-       SetRect(&r,
-               left,
-               top,
-               right,
-               bottom);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qd_OffsetRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short dh;
-       short dv;
-#ifndef OffsetRect
-       PyMac_PRECHECK(OffsetRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &dh,
-                             &dv))
-               return NULL;
-       OffsetRect(&r,
-                  dh,
-                  dv);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qd_InsetRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       short dh;
-       short dv;
-#ifndef InsetRect
-       PyMac_PRECHECK(InsetRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetRect, &r,
-                             &dh,
-                             &dv))
-               return NULL;
-       InsetRect(&r,
-                 dh,
-                 dv);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qd_UnionRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect src1;
-       Rect src2;
-       Rect dstRect;
-#ifndef UnionRect
-       PyMac_PRECHECK(UnionRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &src1,
-                             PyMac_GetRect, &src2))
-               return NULL;
-       UnionRect(&src1,
-                 &src2,
-                 &dstRect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &dstRect);
-       return _res;
-}
-
-static PyObject *Qd_EqualRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Rect rect1;
-       Rect rect2;
-#ifndef EqualRect
-       PyMac_PRECHECK(EqualRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &rect1,
-                             PyMac_GetRect, &rect2))
-               return NULL;
-       _rv = EqualRect(&rect1,
-                       &rect2);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_FrameRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef FrameRect
-       PyMac_PRECHECK(FrameRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       FrameRect(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_InvertRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-#ifndef InvertRect
-       PyMac_PRECHECK(InvertRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &r))
-               return NULL;
-       InvertRect(&r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect r;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef FillRect
-       PyMac_PRECHECK(FillRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#",
-                             PyMac_GetRect, &r,
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       FillRect(&r,
-                pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_CopyRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle srcRgn;
-       RgnHandle dstRgn;
-#ifndef CopyRgn
-       PyMac_PRECHECK(CopyRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &srcRgn,
-                             ResObj_Convert, &dstRgn))
-               return NULL;
-       CopyRgn(srcRgn,
-               dstRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_SetRectRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       short left;
-       short top;
-       short right;
-       short bottom;
-#ifndef SetRectRgn
-       PyMac_PRECHECK(SetRectRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhhh",
-                             ResObj_Convert, &rgn,
-                             &left,
-                             &top,
-                             &right,
-                             &bottom))
-               return NULL;
-       SetRectRgn(rgn,
-                  left,
-                  top,
-                  right,
-                  bottom);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_OffsetRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       short dh;
-       short dv;
-#ifndef OffsetRgn
-       PyMac_PRECHECK(OffsetRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             ResObj_Convert, &rgn,
-                             &dh,
-                             &dv))
-               return NULL;
-       OffsetRgn(rgn,
-                 dh,
-                 dv);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_UnionRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle srcRgnA;
-       RgnHandle srcRgnB;
-       RgnHandle dstRgn;
-#ifndef UnionRgn
-       PyMac_PRECHECK(UnionRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &srcRgnA,
-                             ResObj_Convert, &srcRgnB,
-                             ResObj_Convert, &dstRgn))
-               return NULL;
-       UnionRgn(srcRgnA,
-                srcRgnB,
-                dstRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_XorRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle srcRgnA;
-       RgnHandle srcRgnB;
-       RgnHandle dstRgn;
-#ifndef XorRgn
-       PyMac_PRECHECK(XorRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &srcRgnA,
-                             ResObj_Convert, &srcRgnB,
-                             ResObj_Convert, &dstRgn))
-               return NULL;
-       XorRgn(srcRgnA,
-              srcRgnB,
-              dstRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_EqualRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       RgnHandle rgnA;
-       RgnHandle rgnB;
-#ifndef EqualRgn
-       PyMac_PRECHECK(EqualRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &rgnA,
-                             ResObj_Convert, &rgnB))
-               return NULL;
-       _rv = EqualRgn(rgnA,
-                      rgnB);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_FrameRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef FrameRgn
-       PyMac_PRECHECK(FrameRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       FrameRgn(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_PaintRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef PaintRgn
-       PyMac_PRECHECK(PaintRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       PaintRgn(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_InvertRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-#ifndef InvertRgn
-       PyMac_PRECHECK(InvertRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &rgn))
-               return NULL;
-       InvertRgn(rgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_FillRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle rgn;
-       Pattern *pat__in__;
-       int pat__in_len__;
-#ifndef FillRgn
-       PyMac_PRECHECK(FillRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s#",
-                             ResObj_Convert, &rgn,
-                             (char **)&pat__in__, &pat__in_len__))
-               return NULL;
-       if (pat__in_len__ != sizeof(Pattern))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
-               goto pat__error__;
-       }
-       FillRgn(rgn,
-               pat__in__);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- pat__error__: ;
-       return _res;
-}
-
-static PyObject *Qd_GetPixel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       short h;
-       short v;
-#ifndef GetPixel
-       PyMac_PRECHECK(GetPixel);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &h,
-                             &v))
-               return NULL;
-       _rv = GetPixel(h,
-                      v);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_PtInRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point pt;
-       Rect r;
-#ifndef PtInRect
-       PyMac_PRECHECK(PtInRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &pt,
-                             PyMac_GetRect, &r))
-               return NULL;
-       _rv = PtInRect(pt,
-                      &r);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qd_DrawText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *textBuf__in__;
-       int textBuf__in_len__;
-       short firstByte;
-       short byteCount;
-#ifndef DrawText
-       PyMac_PRECHECK(DrawText);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#hh",
-                             &textBuf__in__, &textBuf__in_len__,
-                             &firstByte,
-                             &byteCount))
-               return NULL;
-       /* Fool compiler warnings */
-       textBuf__in_len__ = textBuf__in_len__;
-       DrawText(textBuf__in__,
-                firstByte,
-                byteCount);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qd_BitMap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       BitMap *ptr;
-       PyObject *source;
-       Rect bounds;
-       int rowbytes;
-       char *data;
-
-       if ( !PyArg_ParseTuple(_args, "O!iO&", &PyString_Type, &source, &rowbytes, PyMac_GetRect,
-                       &bounds) )
-               return NULL;
-       data = PyString_AsString(source);
-       if ((ptr=(BitMap *)malloc(sizeof(BitMap))) == NULL )
-               return PyErr_NoMemory();
-       ptr->baseAddr = (Ptr)data;
-       ptr->rowBytes = rowbytes;
-       ptr->bounds = bounds;
-       if ( (_res = BMObj_New(ptr)) == NULL ) {
-               free(ptr);
-               return NULL;
-       }
-       ((BitMapObject *)_res)->referred_object = source;
-       Py_INCREF(source);
-       ((BitMapObject *)_res)->referred_bitmap = ptr;
-       return _res;
-
-}
-
-static PyObject *Qd_RawBitMap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       BitMap *ptr;
-       PyObject *source;
-
-       if ( !PyArg_ParseTuple(_args, "O!", &PyString_Type, &source) )
-               return NULL;
-       if ( PyString_Size(source) != sizeof(BitMap) && PyString_Size(source) != sizeof(PixMap) ) {
-               PyErr_Format(PyExc_TypeError,
-                       "Argument size was %ld, should be %lu (sizeof BitMap) or %lu (sizeof PixMap)",
-                       PyString_Size(source), sizeof(BitMap), sizeof(PixMap));
-               return NULL;
-       }
-       ptr = (BitMapPtr)PyString_AsString(source);
-       if ( (_res = BMObj_New(ptr)) == NULL ) {
-               return NULL;
-       }
-       ((BitMapObject *)_res)->referred_object = source;
-       Py_INCREF(source);
-       return _res;
-
-}
-
-static PyMethodDef Qd_methods[] = {
-       {"GetPort", (PyCFunction)Qd_GetPort, 1,
-        PyDoc_STR("() -> (GrafPtr port)")},
-       {"GrafDevice", (PyCFunction)Qd_GrafDevice, 1,
-        PyDoc_STR("(short device) -> None")},
-       {"SetPortBits", (PyCFunction)Qd_SetPortBits, 1,
-        PyDoc_STR("(BitMapPtr bm) -> None")},
-       {"PortSize", (PyCFunction)Qd_PortSize, 1,
-        PyDoc_STR("(short width, short height) -> None")},
-       {"MovePortTo", (PyCFunction)Qd_MovePortTo, 1,
-        PyDoc_STR("(short leftGlobal, short topGlobal) -> None")},
-       {"SetOrigin", (PyCFunction)Qd_SetOrigin, 1,
-        PyDoc_STR("(short h, short v) -> None")},
-       {"SetClip", (PyCFunction)Qd_SetClip, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"GetClip", (PyCFunction)Qd_GetClip, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"ClipRect", (PyCFunction)Qd_ClipRect, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"BackPat", (PyCFunction)Qd_BackPat, 1,
-        PyDoc_STR("(Pattern pat) -> None")},
-       {"InitCursor", (PyCFunction)Qd_InitCursor, 1,
-        PyDoc_STR("() -> None")},
-       {"MacSetCursor", (PyCFunction)Qd_MacSetCursor, 1,
-        PyDoc_STR("(Cursor crsr) -> None")},
-       {"HideCursor", (PyCFunction)Qd_HideCursor, 1,
-        PyDoc_STR("() -> None")},
-       {"MacShowCursor", (PyCFunction)Qd_MacShowCursor, 1,
-        PyDoc_STR("() -> None")},
-       {"ObscureCursor", (PyCFunction)Qd_ObscureCursor, 1,
-        PyDoc_STR("() -> None")},
-       {"HidePen", (PyCFunction)Qd_HidePen, 1,
-        PyDoc_STR("() -> None")},
-       {"ShowPen", (PyCFunction)Qd_ShowPen, 1,
-        PyDoc_STR("() -> None")},
-       {"GetPen", (PyCFunction)Qd_GetPen, 1,
-        PyDoc_STR("() -> (Point pt)")},
-       {"GetPenState", (PyCFunction)Qd_GetPenState, 1,
-        PyDoc_STR("() -> (PenState pnState)")},
-       {"SetPenState", (PyCFunction)Qd_SetPenState, 1,
-        PyDoc_STR("(PenState pnState) -> None")},
-       {"PenSize", (PyCFunction)Qd_PenSize, 1,
-        PyDoc_STR("(short width, short height) -> None")},
-       {"PenMode", (PyCFunction)Qd_PenMode, 1,
-        PyDoc_STR("(short mode) -> None")},
-       {"PenPat", (PyCFunction)Qd_PenPat, 1,
-        PyDoc_STR("(Pattern pat) -> None")},
-       {"PenNormal", (PyCFunction)Qd_PenNormal, 1,
-        PyDoc_STR("() -> None")},
-       {"MoveTo", (PyCFunction)Qd_MoveTo, 1,
-        PyDoc_STR("(short h, short v) -> None")},
-       {"Move", (PyCFunction)Qd_Move, 1,
-        PyDoc_STR("(short dh, short dv) -> None")},
-       {"MacLineTo", (PyCFunction)Qd_MacLineTo, 1,
-        PyDoc_STR("(short h, short v) -> None")},
-       {"Line", (PyCFunction)Qd_Line, 1,
-        PyDoc_STR("(short dh, short dv) -> None")},
-       {"ForeColor", (PyCFunction)Qd_ForeColor, 1,
-        PyDoc_STR("(long color) -> None")},
-       {"BackColor", (PyCFunction)Qd_BackColor, 1,
-        PyDoc_STR("(long color) -> None")},
-       {"ColorBit", (PyCFunction)Qd_ColorBit, 1,
-        PyDoc_STR("(short whichBit) -> None")},
-       {"MacSetRect", (PyCFunction)Qd_MacSetRect, 1,
-        PyDoc_STR("(short left, short top, short right, short bottom) -> (Rect r)")},
-       {"MacOffsetRect", (PyCFunction)Qd_MacOffsetRect, 1,
-        PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
-       {"MacInsetRect", (PyCFunction)Qd_MacInsetRect, 1,
-        PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
-       {"SectRect", (PyCFunction)Qd_SectRect, 1,
-        PyDoc_STR("(Rect src1, Rect src2) -> (Boolean _rv, Rect dstRect)")},
-       {"MacUnionRect", (PyCFunction)Qd_MacUnionRect, 1,
-        PyDoc_STR("(Rect src1, Rect src2) -> (Rect dstRect)")},
-       {"MacEqualRect", (PyCFunction)Qd_MacEqualRect, 1,
-        PyDoc_STR("(Rect rect1, Rect rect2) -> (Boolean _rv)")},
-       {"EmptyRect", (PyCFunction)Qd_EmptyRect, 1,
-        PyDoc_STR("(Rect r) -> (Boolean _rv)")},
-       {"MacFrameRect", (PyCFunction)Qd_MacFrameRect, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"PaintRect", (PyCFunction)Qd_PaintRect, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"EraseRect", (PyCFunction)Qd_EraseRect, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"MacInvertRect", (PyCFunction)Qd_MacInvertRect, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"MacFillRect", (PyCFunction)Qd_MacFillRect, 1,
-        PyDoc_STR("(Rect r, Pattern pat) -> None")},
-       {"FrameOval", (PyCFunction)Qd_FrameOval, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"PaintOval", (PyCFunction)Qd_PaintOval, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"EraseOval", (PyCFunction)Qd_EraseOval, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"InvertOval", (PyCFunction)Qd_InvertOval, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"FillOval", (PyCFunction)Qd_FillOval, 1,
-        PyDoc_STR("(Rect r, Pattern pat) -> None")},
-       {"FrameRoundRect", (PyCFunction)Qd_FrameRoundRect, 1,
-        PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
-       {"PaintRoundRect", (PyCFunction)Qd_PaintRoundRect, 1,
-        PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
-       {"EraseRoundRect", (PyCFunction)Qd_EraseRoundRect, 1,
-        PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
-       {"InvertRoundRect", (PyCFunction)Qd_InvertRoundRect, 1,
-        PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
-       {"FillRoundRect", (PyCFunction)Qd_FillRoundRect, 1,
-        PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight, Pattern pat) -> None")},
-       {"FrameArc", (PyCFunction)Qd_FrameArc, 1,
-        PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
-       {"PaintArc", (PyCFunction)Qd_PaintArc, 1,
-        PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
-       {"EraseArc", (PyCFunction)Qd_EraseArc, 1,
-        PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
-       {"InvertArc", (PyCFunction)Qd_InvertArc, 1,
-        PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
-       {"FillArc", (PyCFunction)Qd_FillArc, 1,
-        PyDoc_STR("(Rect r, short startAngle, short arcAngle, Pattern pat) -> None")},
-       {"NewRgn", (PyCFunction)Qd_NewRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"OpenRgn", (PyCFunction)Qd_OpenRgn, 1,
-        PyDoc_STR("() -> None")},
-       {"CloseRgn", (PyCFunction)Qd_CloseRgn, 1,
-        PyDoc_STR("(RgnHandle dstRgn) -> None")},
-       {"BitMapToRegion", (PyCFunction)Qd_BitMapToRegion, 1,
-        PyDoc_STR("(RgnHandle region, BitMapPtr bMap) -> None")},
-       {"RgnToHandle", (PyCFunction)Qd_RgnToHandle, 1,
-        PyDoc_STR("(RgnHandle region, Handle flattenedRgnDataHdl) -> None")},
-       {"DisposeRgn", (PyCFunction)Qd_DisposeRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"MacCopyRgn", (PyCFunction)Qd_MacCopyRgn, 1,
-        PyDoc_STR("(RgnHandle srcRgn, RgnHandle dstRgn) -> None")},
-       {"SetEmptyRgn", (PyCFunction)Qd_SetEmptyRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"MacSetRectRgn", (PyCFunction)Qd_MacSetRectRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, short left, short top, short right, short bottom) -> None")},
-       {"RectRgn", (PyCFunction)Qd_RectRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, Rect r) -> None")},
-       {"MacOffsetRgn", (PyCFunction)Qd_MacOffsetRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, short dh, short dv) -> None")},
-       {"InsetRgn", (PyCFunction)Qd_InsetRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, short dh, short dv) -> None")},
-       {"SectRgn", (PyCFunction)Qd_SectRgn, 1,
-        PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
-       {"MacUnionRgn", (PyCFunction)Qd_MacUnionRgn, 1,
-        PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
-       {"DiffRgn", (PyCFunction)Qd_DiffRgn, 1,
-        PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
-       {"MacXorRgn", (PyCFunction)Qd_MacXorRgn, 1,
-        PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
-       {"RectInRgn", (PyCFunction)Qd_RectInRgn, 1,
-        PyDoc_STR("(Rect r, RgnHandle rgn) -> (Boolean _rv)")},
-       {"MacEqualRgn", (PyCFunction)Qd_MacEqualRgn, 1,
-        PyDoc_STR("(RgnHandle rgnA, RgnHandle rgnB) -> (Boolean _rv)")},
-       {"EmptyRgn", (PyCFunction)Qd_EmptyRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> (Boolean _rv)")},
-       {"MacFrameRgn", (PyCFunction)Qd_MacFrameRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"MacPaintRgn", (PyCFunction)Qd_MacPaintRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"EraseRgn", (PyCFunction)Qd_EraseRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"MacInvertRgn", (PyCFunction)Qd_MacInvertRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"MacFillRgn", (PyCFunction)Qd_MacFillRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, Pattern pat) -> None")},
-       {"ScrollRect", (PyCFunction)Qd_ScrollRect, 1,
-        PyDoc_STR("(Rect r, short dh, short dv, RgnHandle updateRgn) -> None")},
-       {"CopyBits", (PyCFunction)Qd_CopyBits, 1,
-        PyDoc_STR("(BitMapPtr srcBits, BitMapPtr dstBits, Rect srcRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None")},
-       {"CopyMask", (PyCFunction)Qd_CopyMask, 1,
-        PyDoc_STR("(BitMapPtr srcBits, BitMapPtr maskBits, BitMapPtr dstBits, Rect srcRect, Rect maskRect, Rect dstRect) -> None")},
-       {"OpenPicture", (PyCFunction)Qd_OpenPicture, 1,
-        PyDoc_STR("(Rect picFrame) -> (PicHandle _rv)")},
-       {"PicComment", (PyCFunction)Qd_PicComment, 1,
-        PyDoc_STR("(short kind, short dataSize, Handle dataHandle) -> None")},
-       {"ClosePicture", (PyCFunction)Qd_ClosePicture, 1,
-        PyDoc_STR("() -> None")},
-       {"DrawPicture", (PyCFunction)Qd_DrawPicture, 1,
-        PyDoc_STR("(PicHandle myPicture, Rect dstRect) -> None")},
-       {"KillPicture", (PyCFunction)Qd_KillPicture, 1,
-        PyDoc_STR("(PicHandle myPicture) -> None")},
-       {"OpenPoly", (PyCFunction)Qd_OpenPoly, 1,
-        PyDoc_STR("() -> (PolyHandle _rv)")},
-       {"ClosePoly", (PyCFunction)Qd_ClosePoly, 1,
-        PyDoc_STR("() -> None")},
-       {"KillPoly", (PyCFunction)Qd_KillPoly, 1,
-        PyDoc_STR("(PolyHandle poly) -> None")},
-       {"OffsetPoly", (PyCFunction)Qd_OffsetPoly, 1,
-        PyDoc_STR("(PolyHandle poly, short dh, short dv) -> None")},
-       {"FramePoly", (PyCFunction)Qd_FramePoly, 1,
-        PyDoc_STR("(PolyHandle poly) -> None")},
-       {"PaintPoly", (PyCFunction)Qd_PaintPoly, 1,
-        PyDoc_STR("(PolyHandle poly) -> None")},
-       {"ErasePoly", (PyCFunction)Qd_ErasePoly, 1,
-        PyDoc_STR("(PolyHandle poly) -> None")},
-       {"InvertPoly", (PyCFunction)Qd_InvertPoly, 1,
-        PyDoc_STR("(PolyHandle poly) -> None")},
-       {"FillPoly", (PyCFunction)Qd_FillPoly, 1,
-        PyDoc_STR("(PolyHandle poly, Pattern pat) -> None")},
-       {"SetPt", (PyCFunction)Qd_SetPt, 1,
-        PyDoc_STR("(short h, short v) -> (Point pt)")},
-       {"LocalToGlobal", (PyCFunction)Qd_LocalToGlobal, 1,
-        PyDoc_STR("(Point pt) -> (Point pt)")},
-       {"GlobalToLocal", (PyCFunction)Qd_GlobalToLocal, 1,
-        PyDoc_STR("(Point pt) -> (Point pt)")},
-       {"Random", (PyCFunction)Qd_Random, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"MacGetPixel", (PyCFunction)Qd_MacGetPixel, 1,
-        PyDoc_STR("(short h, short v) -> (Boolean _rv)")},
-       {"ScalePt", (PyCFunction)Qd_ScalePt, 1,
-        PyDoc_STR("(Point pt, Rect srcRect, Rect dstRect) -> (Point pt)")},
-       {"MapPt", (PyCFunction)Qd_MapPt, 1,
-        PyDoc_STR("(Point pt, Rect srcRect, Rect dstRect) -> (Point pt)")},
-       {"MapRect", (PyCFunction)Qd_MapRect, 1,
-        PyDoc_STR("(Rect r, Rect srcRect, Rect dstRect) -> (Rect r)")},
-       {"MapRgn", (PyCFunction)Qd_MapRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, Rect srcRect, Rect dstRect) -> None")},
-       {"MapPoly", (PyCFunction)Qd_MapPoly, 1,
-        PyDoc_STR("(PolyHandle poly, Rect srcRect, Rect dstRect) -> None")},
-       {"StdBits", (PyCFunction)Qd_StdBits, 1,
-        PyDoc_STR("(BitMapPtr srcBits, Rect srcRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None")},
-       {"AddPt", (PyCFunction)Qd_AddPt, 1,
-        PyDoc_STR("(Point src, Point dst) -> (Point dst)")},
-       {"EqualPt", (PyCFunction)Qd_EqualPt, 1,
-        PyDoc_STR("(Point pt1, Point pt2) -> (Boolean _rv)")},
-       {"MacPtInRect", (PyCFunction)Qd_MacPtInRect, 1,
-        PyDoc_STR("(Point pt, Rect r) -> (Boolean _rv)")},
-       {"Pt2Rect", (PyCFunction)Qd_Pt2Rect, 1,
-        PyDoc_STR("(Point pt1, Point pt2) -> (Rect dstRect)")},
-       {"PtToAngle", (PyCFunction)Qd_PtToAngle, 1,
-        PyDoc_STR("(Rect r, Point pt) -> (short angle)")},
-       {"SubPt", (PyCFunction)Qd_SubPt, 1,
-        PyDoc_STR("(Point src, Point dst) -> (Point dst)")},
-       {"PtInRgn", (PyCFunction)Qd_PtInRgn, 1,
-        PyDoc_STR("(Point pt, RgnHandle rgn) -> (Boolean _rv)")},
-       {"NewPixMap", (PyCFunction)Qd_NewPixMap, 1,
-        PyDoc_STR("() -> (PixMapHandle _rv)")},
-       {"DisposePixMap", (PyCFunction)Qd_DisposePixMap, 1,
-        PyDoc_STR("(PixMapHandle pm) -> None")},
-       {"CopyPixMap", (PyCFunction)Qd_CopyPixMap, 1,
-        PyDoc_STR("(PixMapHandle srcPM, PixMapHandle dstPM) -> None")},
-       {"NewPixPat", (PyCFunction)Qd_NewPixPat, 1,
-        PyDoc_STR("() -> (PixPatHandle _rv)")},
-       {"DisposePixPat", (PyCFunction)Qd_DisposePixPat, 1,
-        PyDoc_STR("(PixPatHandle pp) -> None")},
-       {"CopyPixPat", (PyCFunction)Qd_CopyPixPat, 1,
-        PyDoc_STR("(PixPatHandle srcPP, PixPatHandle dstPP) -> None")},
-       {"PenPixPat", (PyCFunction)Qd_PenPixPat, 1,
-        PyDoc_STR("(PixPatHandle pp) -> None")},
-       {"BackPixPat", (PyCFunction)Qd_BackPixPat, 1,
-        PyDoc_STR("(PixPatHandle pp) -> None")},
-       {"GetPixPat", (PyCFunction)Qd_GetPixPat, 1,
-        PyDoc_STR("(short patID) -> (PixPatHandle _rv)")},
-       {"MakeRGBPat", (PyCFunction)Qd_MakeRGBPat, 1,
-        PyDoc_STR("(PixPatHandle pp, RGBColor myColor) -> None")},
-       {"FillCRect", (PyCFunction)Qd_FillCRect, 1,
-        PyDoc_STR("(Rect r, PixPatHandle pp) -> None")},
-       {"FillCOval", (PyCFunction)Qd_FillCOval, 1,
-        PyDoc_STR("(Rect r, PixPatHandle pp) -> None")},
-       {"FillCRoundRect", (PyCFunction)Qd_FillCRoundRect, 1,
-        PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight, PixPatHandle pp) -> None")},
-       {"FillCArc", (PyCFunction)Qd_FillCArc, 1,
-        PyDoc_STR("(Rect r, short startAngle, short arcAngle, PixPatHandle pp) -> None")},
-       {"FillCRgn", (PyCFunction)Qd_FillCRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, PixPatHandle pp) -> None")},
-       {"FillCPoly", (PyCFunction)Qd_FillCPoly, 1,
-        PyDoc_STR("(PolyHandle poly, PixPatHandle pp) -> None")},
-       {"RGBForeColor", (PyCFunction)Qd_RGBForeColor, 1,
-        PyDoc_STR("(RGBColor color) -> None")},
-       {"RGBBackColor", (PyCFunction)Qd_RGBBackColor, 1,
-        PyDoc_STR("(RGBColor color) -> None")},
-       {"SetCPixel", (PyCFunction)Qd_SetCPixel, 1,
-        PyDoc_STR("(short h, short v, RGBColor cPix) -> None")},
-       {"SetPortPix", (PyCFunction)Qd_SetPortPix, 1,
-        PyDoc_STR("(PixMapHandle pm) -> None")},
-       {"GetCPixel", (PyCFunction)Qd_GetCPixel, 1,
-        PyDoc_STR("(short h, short v) -> (RGBColor cPix)")},
-       {"GetForeColor", (PyCFunction)Qd_GetForeColor, 1,
-        PyDoc_STR("() -> (RGBColor color)")},
-       {"GetBackColor", (PyCFunction)Qd_GetBackColor, 1,
-        PyDoc_STR("() -> (RGBColor color)")},
-       {"OpColor", (PyCFunction)Qd_OpColor, 1,
-        PyDoc_STR("(RGBColor color) -> None")},
-       {"HiliteColor", (PyCFunction)Qd_HiliteColor, 1,
-        PyDoc_STR("(RGBColor color) -> None")},
-       {"DisposeCTable", (PyCFunction)Qd_DisposeCTable, 1,
-        PyDoc_STR("(CTabHandle cTable) -> None")},
-       {"GetCTable", (PyCFunction)Qd_GetCTable, 1,
-        PyDoc_STR("(short ctID) -> (CTabHandle _rv)")},
-       {"GetCCursor", (PyCFunction)Qd_GetCCursor, 1,
-        PyDoc_STR("(short crsrID) -> (CCrsrHandle _rv)")},
-       {"SetCCursor", (PyCFunction)Qd_SetCCursor, 1,
-        PyDoc_STR("(CCrsrHandle cCrsr) -> None")},
-       {"AllocCursor", (PyCFunction)Qd_AllocCursor, 1,
-        PyDoc_STR("() -> None")},
-       {"DisposeCCursor", (PyCFunction)Qd_DisposeCCursor, 1,
-        PyDoc_STR("(CCrsrHandle cCrsr) -> None")},
-       {"GetMaxDevice", (PyCFunction)Qd_GetMaxDevice, 1,
-        PyDoc_STR("(Rect globalRect) -> (GDHandle _rv)")},
-       {"GetCTSeed", (PyCFunction)Qd_GetCTSeed, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"GetDeviceList", (PyCFunction)Qd_GetDeviceList, 1,
-        PyDoc_STR("() -> (GDHandle _rv)")},
-       {"GetMainDevice", (PyCFunction)Qd_GetMainDevice, 1,
-        PyDoc_STR("() -> (GDHandle _rv)")},
-       {"GetNextDevice", (PyCFunction)Qd_GetNextDevice, 1,
-        PyDoc_STR("(GDHandle curDevice) -> (GDHandle _rv)")},
-       {"TestDeviceAttribute", (PyCFunction)Qd_TestDeviceAttribute, 1,
-        PyDoc_STR("(GDHandle gdh, short attribute) -> (Boolean _rv)")},
-       {"SetDeviceAttribute", (PyCFunction)Qd_SetDeviceAttribute, 1,
-        PyDoc_STR("(GDHandle gdh, short attribute, Boolean value) -> None")},
-       {"InitGDevice", (PyCFunction)Qd_InitGDevice, 1,
-        PyDoc_STR("(short qdRefNum, long mode, GDHandle gdh) -> None")},
-       {"NewGDevice", (PyCFunction)Qd_NewGDevice, 1,
-        PyDoc_STR("(short refNum, long mode) -> (GDHandle _rv)")},
-       {"DisposeGDevice", (PyCFunction)Qd_DisposeGDevice, 1,
-        PyDoc_STR("(GDHandle gdh) -> None")},
-       {"SetGDevice", (PyCFunction)Qd_SetGDevice, 1,
-        PyDoc_STR("(GDHandle gd) -> None")},
-       {"GetGDevice", (PyCFunction)Qd_GetGDevice, 1,
-        PyDoc_STR("() -> (GDHandle _rv)")},
-       {"Color2Index", (PyCFunction)Qd_Color2Index, 1,
-        PyDoc_STR("(RGBColor myColor) -> (long _rv)")},
-       {"Index2Color", (PyCFunction)Qd_Index2Color, 1,
-        PyDoc_STR("(long index) -> (RGBColor aColor)")},
-       {"InvertColor", (PyCFunction)Qd_InvertColor, 1,
-        PyDoc_STR("() -> (RGBColor myColor)")},
-       {"RealColor", (PyCFunction)Qd_RealColor, 1,
-        PyDoc_STR("(RGBColor color) -> (Boolean _rv)")},
-       {"GetSubTable", (PyCFunction)Qd_GetSubTable, 1,
-        PyDoc_STR("(CTabHandle myColors, short iTabRes, CTabHandle targetTbl) -> None")},
-       {"MakeITable", (PyCFunction)Qd_MakeITable, 1,
-        PyDoc_STR("(CTabHandle cTabH, ITabHandle iTabH, short res) -> None")},
-       {"SetClientID", (PyCFunction)Qd_SetClientID, 1,
-        PyDoc_STR("(short id) -> None")},
-       {"ProtectEntry", (PyCFunction)Qd_ProtectEntry, 1,
-        PyDoc_STR("(short index, Boolean protect) -> None")},
-       {"ReserveEntry", (PyCFunction)Qd_ReserveEntry, 1,
-        PyDoc_STR("(short index, Boolean reserve) -> None")},
-       {"QDError", (PyCFunction)Qd_QDError, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"CopyDeepMask", (PyCFunction)Qd_CopyDeepMask, 1,
-        PyDoc_STR("(BitMapPtr srcBits, BitMapPtr maskBits, BitMapPtr dstBits, Rect srcRect, Rect maskRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None")},
-       {"GetPattern", (PyCFunction)Qd_GetPattern, 1,
-        PyDoc_STR("(short patternID) -> (PatHandle _rv)")},
-       {"MacGetCursor", (PyCFunction)Qd_MacGetCursor, 1,
-        PyDoc_STR("(short cursorID) -> (CursHandle _rv)")},
-       {"GetPicture", (PyCFunction)Qd_GetPicture, 1,
-        PyDoc_STR("(short pictureID) -> (PicHandle _rv)")},
-       {"DeltaPoint", (PyCFunction)Qd_DeltaPoint, 1,
-        PyDoc_STR("(Point ptA, Point ptB) -> (long _rv)")},
-       {"ShieldCursor", (PyCFunction)Qd_ShieldCursor, 1,
-        PyDoc_STR("(Rect shieldRect, Point offsetPt) -> None")},
-       {"ScreenRes", (PyCFunction)Qd_ScreenRes, 1,
-        PyDoc_STR("() -> (short scrnHRes, short scrnVRes)")},
-       {"GetIndPattern", (PyCFunction)Qd_GetIndPattern, 1,
-        PyDoc_STR("(short patternListID, short index) -> (Pattern thePat)")},
-       {"SlopeFromAngle", (PyCFunction)Qd_SlopeFromAngle, 1,
-        PyDoc_STR("(short angle) -> (Fixed _rv)")},
-       {"AngleFromSlope", (PyCFunction)Qd_AngleFromSlope, 1,
-        PyDoc_STR("(Fixed slope) -> (short _rv)")},
-       {"GetPixBounds", (PyCFunction)Qd_GetPixBounds, 1,
-        PyDoc_STR("(PixMapHandle pixMap) -> (Rect bounds)")},
-       {"GetPixDepth", (PyCFunction)Qd_GetPixDepth, 1,
-        PyDoc_STR("(PixMapHandle pixMap) -> (short _rv)")},
-       {"GetQDGlobalsRandomSeed", (PyCFunction)Qd_GetQDGlobalsRandomSeed, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"GetQDGlobalsScreenBits", (PyCFunction)Qd_GetQDGlobalsScreenBits, 1,
-        PyDoc_STR("() -> (BitMap screenBits)")},
-       {"GetQDGlobalsArrow", (PyCFunction)Qd_GetQDGlobalsArrow, 1,
-        PyDoc_STR("() -> (Cursor arrow)")},
-       {"GetQDGlobalsDarkGray", (PyCFunction)Qd_GetQDGlobalsDarkGray, 1,
-        PyDoc_STR("() -> (Pattern dkGray)")},
-       {"GetQDGlobalsLightGray", (PyCFunction)Qd_GetQDGlobalsLightGray, 1,
-        PyDoc_STR("() -> (Pattern ltGray)")},
-       {"GetQDGlobalsGray", (PyCFunction)Qd_GetQDGlobalsGray, 1,
-        PyDoc_STR("() -> (Pattern gray)")},
-       {"GetQDGlobalsBlack", (PyCFunction)Qd_GetQDGlobalsBlack, 1,
-        PyDoc_STR("() -> (Pattern black)")},
-       {"GetQDGlobalsWhite", (PyCFunction)Qd_GetQDGlobalsWhite, 1,
-        PyDoc_STR("() -> (Pattern white)")},
-       {"GetQDGlobalsThePort", (PyCFunction)Qd_GetQDGlobalsThePort, 1,
-        PyDoc_STR("() -> (CGrafPtr _rv)")},
-       {"SetQDGlobalsRandomSeed", (PyCFunction)Qd_SetQDGlobalsRandomSeed, 1,
-        PyDoc_STR("(long randomSeed) -> None")},
-       {"SetQDGlobalsArrow", (PyCFunction)Qd_SetQDGlobalsArrow, 1,
-        PyDoc_STR("(Cursor arrow) -> None")},
-       {"GetRegionBounds", (PyCFunction)Qd_GetRegionBounds, 1,
-        PyDoc_STR("(RgnHandle region) -> (Rect bounds)")},
-       {"IsRegionRectangular", (PyCFunction)Qd_IsRegionRectangular, 1,
-        PyDoc_STR("(RgnHandle region) -> (Boolean _rv)")},
-       {"CreateNewPort", (PyCFunction)Qd_CreateNewPort, 1,
-        PyDoc_STR("() -> (CGrafPtr _rv)")},
-       {"SetQDError", (PyCFunction)Qd_SetQDError, 1,
-        PyDoc_STR("(OSErr err) -> None")},
-       {"LMGetScrVRes", (PyCFunction)Qd_LMGetScrVRes, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"LMSetScrVRes", (PyCFunction)Qd_LMSetScrVRes, 1,
-        PyDoc_STR("(SInt16 value) -> None")},
-       {"LMGetScrHRes", (PyCFunction)Qd_LMGetScrHRes, 1,
-        PyDoc_STR("() -> (SInt16 _rv)")},
-       {"LMSetScrHRes", (PyCFunction)Qd_LMSetScrHRes, 1,
-        PyDoc_STR("(SInt16 value) -> None")},
-       {"LMGetMainDevice", (PyCFunction)Qd_LMGetMainDevice, 1,
-        PyDoc_STR("() -> (GDHandle _rv)")},
-       {"LMSetMainDevice", (PyCFunction)Qd_LMSetMainDevice, 1,
-        PyDoc_STR("(GDHandle value) -> None")},
-       {"LMGetDeviceList", (PyCFunction)Qd_LMGetDeviceList, 1,
-        PyDoc_STR("() -> (GDHandle _rv)")},
-       {"LMSetDeviceList", (PyCFunction)Qd_LMSetDeviceList, 1,
-        PyDoc_STR("(GDHandle value) -> None")},
-       {"LMGetQDColors", (PyCFunction)Qd_LMGetQDColors, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"LMSetQDColors", (PyCFunction)Qd_LMSetQDColors, 1,
-        PyDoc_STR("(Handle value) -> None")},
-       {"LMGetWidthListHand", (PyCFunction)Qd_LMGetWidthListHand, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"LMSetWidthListHand", (PyCFunction)Qd_LMSetWidthListHand, 1,
-        PyDoc_STR("(Handle value) -> None")},
-       {"LMGetHiliteMode", (PyCFunction)Qd_LMGetHiliteMode, 1,
-        PyDoc_STR("() -> (UInt8 _rv)")},
-       {"LMSetHiliteMode", (PyCFunction)Qd_LMSetHiliteMode, 1,
-        PyDoc_STR("(UInt8 value) -> None")},
-       {"LMGetWidthTabHandle", (PyCFunction)Qd_LMGetWidthTabHandle, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"LMSetWidthTabHandle", (PyCFunction)Qd_LMSetWidthTabHandle, 1,
-        PyDoc_STR("(Handle value) -> None")},
-       {"LMGetLastSPExtra", (PyCFunction)Qd_LMGetLastSPExtra, 1,
-        PyDoc_STR("() -> (SInt32 _rv)")},
-       {"LMSetLastSPExtra", (PyCFunction)Qd_LMSetLastSPExtra, 1,
-        PyDoc_STR("(SInt32 value) -> None")},
-       {"LMGetLastFOND", (PyCFunction)Qd_LMGetLastFOND, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"LMSetLastFOND", (PyCFunction)Qd_LMSetLastFOND, 1,
-        PyDoc_STR("(Handle value) -> None")},
-       {"LMGetFractEnable", (PyCFunction)Qd_LMGetFractEnable, 1,
-        PyDoc_STR("() -> (UInt8 _rv)")},
-       {"LMSetFractEnable", (PyCFunction)Qd_LMSetFractEnable, 1,
-        PyDoc_STR("(UInt8 value) -> None")},
-       {"LMGetTheGDevice", (PyCFunction)Qd_LMGetTheGDevice, 1,
-        PyDoc_STR("() -> (GDHandle _rv)")},
-       {"LMSetTheGDevice", (PyCFunction)Qd_LMSetTheGDevice, 1,
-        PyDoc_STR("(GDHandle value) -> None")},
-       {"LMGetHiliteRGB", (PyCFunction)Qd_LMGetHiliteRGB, 1,
-        PyDoc_STR("() -> (RGBColor hiliteRGBValue)")},
-       {"LMSetHiliteRGB", (PyCFunction)Qd_LMSetHiliteRGB, 1,
-        PyDoc_STR("(RGBColor hiliteRGBValue) -> None")},
-       {"LMGetCursorNew", (PyCFunction)Qd_LMGetCursorNew, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"LMSetCursorNew", (PyCFunction)Qd_LMSetCursorNew, 1,
-        PyDoc_STR("(Boolean value) -> None")},
-       {"TextFont", (PyCFunction)Qd_TextFont, 1,
-        PyDoc_STR("(short font) -> None")},
-       {"TextFace", (PyCFunction)Qd_TextFace, 1,
-        PyDoc_STR("(StyleParameter face) -> None")},
-       {"TextMode", (PyCFunction)Qd_TextMode, 1,
-        PyDoc_STR("(short mode) -> None")},
-       {"TextSize", (PyCFunction)Qd_TextSize, 1,
-        PyDoc_STR("(short size) -> None")},
-       {"SpaceExtra", (PyCFunction)Qd_SpaceExtra, 1,
-        PyDoc_STR("(Fixed extra) -> None")},
-       {"DrawChar", (PyCFunction)Qd_DrawChar, 1,
-        PyDoc_STR("(CharParameter ch) -> None")},
-       {"DrawString", (PyCFunction)Qd_DrawString, 1,
-        PyDoc_STR("(Str255 s) -> None")},
-       {"MacDrawText", (PyCFunction)Qd_MacDrawText, 1,
-        PyDoc_STR("(Buffer textBuf, short firstByte, short byteCount) -> None")},
-       {"CharWidth", (PyCFunction)Qd_CharWidth, 1,
-        PyDoc_STR("(CharParameter ch) -> (short _rv)")},
-       {"StringWidth", (PyCFunction)Qd_StringWidth, 1,
-        PyDoc_STR("(Str255 s) -> (short _rv)")},
-       {"TextWidth", (PyCFunction)Qd_TextWidth, 1,
-        PyDoc_STR("(Buffer textBuf, short firstByte, short byteCount) -> (short _rv)")},
-       {"GetFontInfo", (PyCFunction)Qd_GetFontInfo, 1,
-        PyDoc_STR("() -> (FontInfo info)")},
-       {"CharExtra", (PyCFunction)Qd_CharExtra, 1,
-        PyDoc_STR("(Fixed extra) -> None")},
-       {"TruncString", (PyCFunction)Qd_TruncString, 1,
-        PyDoc_STR("(short width, Str255 theString, TruncCode truncWhere) -> (short _rv)")},
-       {"SetPort", (PyCFunction)Qd_SetPort, 1,
-        PyDoc_STR("(GrafPtr thePort) -> None")},
-       {"GetCursor", (PyCFunction)Qd_GetCursor, 1,
-        PyDoc_STR("(short cursorID) -> (CursHandle _rv)")},
-       {"SetCursor", (PyCFunction)Qd_SetCursor, 1,
-        PyDoc_STR("(Cursor crsr) -> None")},
-       {"ShowCursor", (PyCFunction)Qd_ShowCursor, 1,
-        PyDoc_STR("() -> None")},
-       {"LineTo", (PyCFunction)Qd_LineTo, 1,
-        PyDoc_STR("(short h, short v) -> None")},
-       {"SetRect", (PyCFunction)Qd_SetRect, 1,
-        PyDoc_STR("(short left, short top, short right, short bottom) -> (Rect r)")},
-       {"OffsetRect", (PyCFunction)Qd_OffsetRect, 1,
-        PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
-       {"InsetRect", (PyCFunction)Qd_InsetRect, 1,
-        PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
-       {"UnionRect", (PyCFunction)Qd_UnionRect, 1,
-        PyDoc_STR("(Rect src1, Rect src2) -> (Rect dstRect)")},
-       {"EqualRect", (PyCFunction)Qd_EqualRect, 1,
-        PyDoc_STR("(Rect rect1, Rect rect2) -> (Boolean _rv)")},
-       {"FrameRect", (PyCFunction)Qd_FrameRect, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"InvertRect", (PyCFunction)Qd_InvertRect, 1,
-        PyDoc_STR("(Rect r) -> None")},
-       {"FillRect", (PyCFunction)Qd_FillRect, 1,
-        PyDoc_STR("(Rect r, Pattern pat) -> None")},
-       {"CopyRgn", (PyCFunction)Qd_CopyRgn, 1,
-        PyDoc_STR("(RgnHandle srcRgn, RgnHandle dstRgn) -> None")},
-       {"SetRectRgn", (PyCFunction)Qd_SetRectRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, short left, short top, short right, short bottom) -> None")},
-       {"OffsetRgn", (PyCFunction)Qd_OffsetRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, short dh, short dv) -> None")},
-       {"UnionRgn", (PyCFunction)Qd_UnionRgn, 1,
-        PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
-       {"XorRgn", (PyCFunction)Qd_XorRgn, 1,
-        PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
-       {"EqualRgn", (PyCFunction)Qd_EqualRgn, 1,
-        PyDoc_STR("(RgnHandle rgnA, RgnHandle rgnB) -> (Boolean _rv)")},
-       {"FrameRgn", (PyCFunction)Qd_FrameRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"PaintRgn", (PyCFunction)Qd_PaintRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"InvertRgn", (PyCFunction)Qd_InvertRgn, 1,
-        PyDoc_STR("(RgnHandle rgn) -> None")},
-       {"FillRgn", (PyCFunction)Qd_FillRgn, 1,
-        PyDoc_STR("(RgnHandle rgn, Pattern pat) -> None")},
-       {"GetPixel", (PyCFunction)Qd_GetPixel, 1,
-        PyDoc_STR("(short h, short v) -> (Boolean _rv)")},
-       {"PtInRect", (PyCFunction)Qd_PtInRect, 1,
-        PyDoc_STR("(Point pt, Rect r) -> (Boolean _rv)")},
-       {"DrawText", (PyCFunction)Qd_DrawText, 1,
-        PyDoc_STR("(Buffer textBuf, short firstByte, short byteCount) -> None")},
-       {"BitMap", (PyCFunction)Qd_BitMap, 1,
-        PyDoc_STR("Take (string, int, Rect) argument and create BitMap")},
-       {"RawBitMap", (PyCFunction)Qd_RawBitMap, 1,
-        PyDoc_STR("Take string BitMap and turn into BitMap object")},
-       {NULL, NULL, 0}
-};
-
-
-
-/* Like BMObj_New, but the original bitmap data structure is copied (and
-** released when the object is released)
-*/
-PyObject *BMObj_NewCopied(BitMapPtr itself)
-{
-        BitMapObject *it;
-        BitMapPtr itself_copy;
-
-        if ((itself_copy=(BitMapPtr)malloc(sizeof(BitMap))) == NULL)
-                return PyErr_NoMemory();
-        *itself_copy = *itself;
-        it = (BitMapObject *)BMObj_New(itself_copy);
-        it->referred_bitmap = itself_copy;
-        return (PyObject *)it;
-}
-
-
-
-void init_Qd(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(BitMapPtr, BMObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(BitMapPtr, BMObj_Convert);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(GrafPtr, GrafObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GrafPtr, GrafObj_Convert);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(RGBColorPtr, QdRGB_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColor, QdRGB_Convert);
-
-
-       m = Py_InitModule("_Qd", Qd_methods);
-       d = PyModule_GetDict(m);
-       Qd_Error = PyMac_GetOSErrException();
-       if (Qd_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Qd_Error) != 0)
-               return;
-       Py_TYPE(&GrafPort_Type) = &PyType_Type;
-       if (PyType_Ready(&GrafPort_Type) < 0) return;
-       Py_INCREF(&GrafPort_Type);
-       PyModule_AddObject(m, "GrafPort", (PyObject *)&GrafPort_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&GrafPort_Type);
-       PyModule_AddObject(m, "GrafPortType", (PyObject *)&GrafPort_Type);
-       Py_TYPE(&BitMap_Type) = &PyType_Type;
-       if (PyType_Ready(&BitMap_Type) < 0) return;
-       Py_INCREF(&BitMap_Type);
-       PyModule_AddObject(m, "BitMap", (PyObject *)&BitMap_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&BitMap_Type);
-       PyModule_AddObject(m, "BitMapType", (PyObject *)&BitMap_Type);
-}
-
-/* ========================= End module _Qd ========================= */
-
diff --git a/Mac/Modules/qd/qdedit.py b/Mac/Modules/qd/qdedit.py
deleted file mode 100644 (file)
index 83d81ed..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-f = Function(void, 'SetPort',
-        (GrafPtr, 'thePort', InMode),
-)
-functions.append(f)
-
-f = Function(CursHandle, 'GetCursor',
-    (short, 'cursorID', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'SetCursor',
-    (Cursor_ptr, 'crsr', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'ShowCursor',
-)
-functions.append(f)
-
-f = Function(void, 'LineTo',
-    (short, 'h', InMode),
-    (short, 'v', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'SetRect',
-    (Rect, 'r', OutMode),
-    (short, 'left', InMode),
-    (short, 'top', InMode),
-    (short, 'right', InMode),
-    (short, 'bottom', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'OffsetRect',
-    (Rect, 'r', InOutMode),
-    (short, 'dh', InMode),
-    (short, 'dv', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'InsetRect',
-    (Rect, 'r', InOutMode),
-    (short, 'dh', InMode),
-    (short, 'dv', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'UnionRect',
-    (Rect_ptr, 'src1', InMode),
-    (Rect_ptr, 'src2', InMode),
-    (Rect, 'dstRect', OutMode),
-)
-functions.append(f)
-
-f = Function(Boolean, 'EqualRect',
-    (Rect_ptr, 'rect1', InMode),
-    (Rect_ptr, 'rect2', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'FrameRect',
-    (Rect_ptr, 'r', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'InvertRect',
-    (Rect_ptr, 'r', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'FillRect',
-    (Rect_ptr, 'r', InMode),
-    (Pattern_ptr, 'pat', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'CopyRgn',
-    (RgnHandle, 'srcRgn', InMode),
-    (RgnHandle, 'dstRgn', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'SetRectRgn',
-    (RgnHandle, 'rgn', InMode),
-    (short, 'left', InMode),
-    (short, 'top', InMode),
-    (short, 'right', InMode),
-    (short, 'bottom', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'OffsetRgn',
-    (RgnHandle, 'rgn', InMode),
-    (short, 'dh', InMode),
-    (short, 'dv', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'UnionRgn',
-    (RgnHandle, 'srcRgnA', InMode),
-    (RgnHandle, 'srcRgnB', InMode),
-    (RgnHandle, 'dstRgn', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'XorRgn',
-    (RgnHandle, 'srcRgnA', InMode),
-    (RgnHandle, 'srcRgnB', InMode),
-    (RgnHandle, 'dstRgn', InMode),
-)
-functions.append(f)
-
-f = Function(Boolean, 'EqualRgn',
-    (RgnHandle, 'rgnA', InMode),
-    (RgnHandle, 'rgnB', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'FrameRgn',
-    (RgnHandle, 'rgn', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'PaintRgn',
-    (RgnHandle, 'rgn', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'InvertRgn',
-    (RgnHandle, 'rgn', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'FillRgn',
-    (RgnHandle, 'rgn', InMode),
-    (Pattern_ptr, 'pat', InMode),
-)
-functions.append(f)
-
-f = Function(Boolean, 'GetPixel',
-    (short, 'h', InMode),
-    (short, 'v', InMode),
-)
-functions.append(f)
-
-f = Function(Boolean, 'PtInRect',
-    (Point, 'pt', InMode),
-    (Rect_ptr, 'r', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'DrawText',
-    (TextThingie, 'textBuf', InMode),
-    (short, 'firstByte', InMode),
-    (short, 'byteCount', InMode),
-)
-functions.append(f)
diff --git a/Mac/Modules/qd/qdscan.py b/Mac/Modules/qd/qdscan.py
deleted file mode 100644 (file)
index 9617b24..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-def main():
-    input = "QuickDraw.h"
-    output = "qdgen.py"
-    defsoutput = TOOLBOXDIR + "QuickDraw.py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-
-    # Grmpf. Universal Headers have Text-stuff in a different include file...
-    input = "QuickDrawText.h"
-    output = "@qdgentext.py"
-    defsoutput = "@QuickDrawText.py"
-    have_extra = 0
-    try:
-        scanner = MyScanner(input, output, defsoutput)
-        scanner.scan()
-        scanner.close()
-        have_extra = 1
-    except IOError:
-        pass
-    if have_extra:
-        print("=== Copying QuickDrawText stuff into main files... ===")
-        ifp = open("@qdgentext.py")
-        ofp = open("qdgen.py", "a")
-        ofp.write(ifp.read())
-        ifp.close()
-        ofp.close()
-        ifp = open("@QuickDrawText.py")
-        ofp = open(TOOLBOXDIR + "QuickDraw.py", "a")
-        ofp.write(ifp.read())
-        ifp.close()
-        ofp.close()
-
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    import qdsupport
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in ('GrafPtr', 'CGrafPtr') and m == 'InMode':
-                classname = "Method"
-                listname = "gr_methods"
-            elif t == 'BitMapPtr' and m == 'InMode':
-                classname = "Method"
-                listname = "bm_methods"
-##                      elif t == "PolyHandle" and m == "InMode":
-##                              classname = "Method"
-##                              listname = "p_methods"
-##                      elif t == "RgnHandle" and m == "InMode":
-##                              classname = "Method"
-##                              listname = "r_methods"
-        return classname, listname
-
-
-    def writeinitialdefs(self):
-        self.defsfile.write("""
-def FOUR_CHAR_CODE(x): return x
-normal                                          = 0
-bold                                            = 1
-italic                                          = 2
-underline                                       = 4
-outline                                         = 8
-shadow                                          = 0x10
-condense                                        = 0x20
-extend                                          = 0x40
-""")
-
-    def makeblacklistnames(self):
-        return [
-                'InitGraf',
-                'StuffHex',
-                'StdLine',
-                'StdComment',
-                'StdGetPic',
-                'OpenPort',
-                'InitPort',
-                'ClosePort',
-                'OpenCPort',
-                'InitCPort',
-                'CloseCPort',
-                'BitMapToRegionGlue',
-                'StdOpcode',    # XXXX Missing from library...
-                # The following are for non-macos use:
-                'LockPortBits',
-                'UnlockPortBits',
-                'UpdatePort',
-                'GetPortNativeWindow',
-                'GetNativeWindowPort',
-                'NativeRegionToMacRegion',
-                'MacRegionToNativeRegion',
-                'GetPortHWND',
-                'GetHWNDPort',
-                'GetPICTFromDIB',
-
-                'HandleToRgn', # Funny signature
-
-                # Need Cm, which we don't want to drag in just yet
-                'OpenCursorComponent',
-                'CloseCursorComponent',
-                'SetCursorComponent',
-                'CursorComponentChanged',
-                'CursorComponentSetData',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "QDRegionBitsRef", # Should do this, but too lazy now.
-                'CIconHandle', # Obsolete
-                'CQDProcs',
-                'CQDProcsPtr',
-                'CSpecArray',
-                'ColorComplementProcPtr',
-                'ColorComplementUPP',
-                'ColorSearchProcPtr',
-                'ColorSearchUPP',
-                'ConstPatternParam',
-                'DeviceLoopDrawingProcPtr',
-                'DeviceLoopFlags',
-                'GrafVerb',
-                'OpenCPicParams_ptr',
-                'Ptr',
-                'QDProcs',
-                'ReqListRec',
-                'void_ptr',
-                'CustomXFerProcPtr',
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([('void_ptr', 'textBuf', 'InMode'),
-                  ('short', 'firstByte', 'InMode'),
-                  ('short', 'byteCount', 'InMode')],
-                 [('TextThingie', '*', '*'), ('*', '*', '*'), ('*', '*', '*')]),
-
-                # GetPen and SetPt use a point-pointer as output-only:
-                ('GetPen', [('Point', '*', 'OutMode')], [('*', '*', 'OutMode')]),
-                ('SetPt', [('Point', '*', 'OutMode')], [('*', '*', 'OutMode')]),
-
-                # All others use it as input/output:
-                ([('Point', '*', 'OutMode')],
-                 [('*', '*', 'InOutMode')]),
-
-                 # InsetRect, OffsetRect
-                 ([('Rect', 'r', 'OutMode'),
-                        ('short', 'dh', 'InMode'),
-                        ('short', 'dv', 'InMode')],
-                  [('Rect', 'r', 'InOutMode'),
-                        ('short', 'dh', 'InMode'),
-                        ('short', 'dv', 'InMode')]),
-
-                 # MapRect
-                 ([('Rect', 'r', 'OutMode'),
-                        ('Rect_ptr', 'srcRect', 'InMode'),
-                        ('Rect_ptr', 'dstRect', 'InMode')],
-                  [('Rect', 'r', 'InOutMode'),
-                        ('Rect_ptr', 'srcRect', 'InMode'),
-                        ('Rect_ptr', 'dstRect', 'InMode')]),
-
-                 # CopyBits and friends
-                 ([('RgnHandle', 'maskRgn', 'InMode')],
-                  [('OptRgnHandle', 'maskRgn', 'InMode')]),
-
-                 ('QDFlushPortBuffer',
-                  [('RgnHandle', '*', 'InMode')],
-                  [('OptRgnHandle', '*', 'InMode')]),
-
-                 # Accessors with reference argument also returned.
-                 ([('Rect_ptr', 'GetPortBounds', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('RGBColor_ptr', 'GetPortForeColor', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('RGBColor_ptr', 'GetPortBackColor', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('RGBColor_ptr', 'GetPortOpColor', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('RGBColor_ptr', 'GetPortHiliteColor', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Point_ptr', 'GetPortPenSize', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Point_ptr', 'GetPortPenLocation', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Rect_ptr', 'GetPixBounds', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('BitMap_ptr', 'GetQDGlobalsScreenBits', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Cursor_ptr', 'GetQDGlobalsArrow', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Rect_ptr', 'GetRegionBounds', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Pattern_ptr', '*', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Point_ptr', 'QDLocalToGlobalPoint', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Rect_ptr', 'QDLocalToGlobalRect', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Point_ptr', 'QDGlobalToLocalPoint', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                 ([('Rect_ptr', 'QDGlobalToLocalRect', 'ReturnMode')],
-                  [('void', '*', 'ReturnMode')]),
-
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py
deleted file mode 100644 (file)
index 28c2595..0000000
+++ /dev/null
@@ -1,377 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'QuickDraw.h'           # The Apple header file
-MODNAME = '_Qd'                         # The name of the module
-OBJECTNAME = 'Graf'                     # The basic name of the objects used here
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Qd'                        # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + 'Ptr'         # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-EXTRAFILE = string.lower(MODPREFIX) + 'edit.py' # A similar file but hand-made
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-class TextThingieClass(FixedInputBufferType):
-    def getargsCheck(self, name):
-        Output("/* Fool compiler warnings */")
-        Output("%s__in_len__ = %s__in_len__;", name, name)
-
-    def declareSize(self, name):
-        Output("int %s__in_len__;", name)
-
-TextThingie = TextThingieClass(None)
-
-# These are temporary!
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-OptRgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
-PicHandle = OpaqueByValueType("PicHandle", "ResObj")
-PolyHandle = OpaqueByValueType("PolyHandle", "ResObj")
-PixMapHandle = OpaqueByValueType("PixMapHandle", "ResObj")
-PixPatHandle = OpaqueByValueType("PixPatHandle", "ResObj")
-PatHandle = OpaqueByValueType("PatHandle", "ResObj")
-CursHandle = OpaqueByValueType("CursHandle", "ResObj")
-CCrsrHandle = OpaqueByValueType("CCrsrHandle", "ResObj")
-CIconHandle = OpaqueByValueType("CIconHandle", "ResObj")
-CTabHandle = OpaqueByValueType("CTabHandle", "ResObj")
-ITabHandle = OpaqueByValueType("ITabHandle", "ResObj")
-GDHandle = OpaqueByValueType("GDHandle", "ResObj")
-CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
-GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
-BitMap_ptr = OpaqueByValueType("BitMapPtr", "BMObj")
-const_BitMap_ptr = OpaqueByValueType("const BitMap *", "BMObj")
-BitMap = OpaqueType("BitMap", "BMObj_NewCopied", "BUG")
-RGBColor = OpaqueType('RGBColor', 'QdRGB')
-RGBColor_ptr = RGBColor
-FontInfo = OpaqueType('FontInfo', 'QdFI')
-Component = OpaqueByValueType('Component', 'CmpObj')
-ComponentInstance = OpaqueByValueType('ComponentInstance', 'CmpInstObj')
-
-Cursor = StructOutputBufferType('Cursor')
-Cursor_ptr = StructInputBufferType('Cursor')
-Pattern = StructOutputBufferType('Pattern')
-Pattern_ptr = StructInputBufferType('Pattern')
-PenState = StructOutputBufferType('PenState')
-PenState_ptr = StructInputBufferType('PenState')
-TruncCode = Type("TruncCode", "h")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_GrafObj_New(GrafPtr);
-extern int _GrafObj_Convert(PyObject *, GrafPtr *);
-extern PyObject *_BMObj_New(BitMapPtr);
-extern int _BMObj_Convert(PyObject *, BitMapPtr *);
-extern PyObject *_QdRGB_New(RGBColorPtr);
-extern int _QdRGB_Convert(PyObject *, RGBColorPtr);
-
-#define GrafObj_New _GrafObj_New
-#define GrafObj_Convert _GrafObj_Convert
-#define BMObj_New _BMObj_New
-#define BMObj_Convert _BMObj_Convert
-#define QdRGB_New _QdRGB_New
-#define QdRGB_Convert _QdRGB_Convert
-#endif
-
-static PyObject *BMObj_NewCopied(BitMapPtr);
-
-/*
-** Parse/generate RGB records
-*/
-PyObject *QdRGB_New(RGBColorPtr itself)
-{
-
-        return Py_BuildValue("lll", (long)itself->red, (long)itself->green, (long)itself->blue);
-}
-
-int QdRGB_Convert(PyObject *v, RGBColorPtr p_itself)
-{
-        long red, green, blue;
-
-        if( !PyArg_ParseTuple(v, "lll", &red, &green, &blue) )
-                return 0;
-        p_itself->red = (unsigned short)red;
-        p_itself->green = (unsigned short)green;
-        p_itself->blue = (unsigned short)blue;
-        return 1;
-}
-
-/*
-** Generate FontInfo records
-*/
-static
-PyObject *QdFI_New(FontInfo *itself)
-{
-
-        return Py_BuildValue("hhhh", itself->ascent, itself->descent,
-                        itself->widMax, itself->leading);
-}
-"""
-
-finalstuff = finalstuff + """
-/* Like BMObj_New, but the original bitmap data structure is copied (and
-** released when the object is released)
-*/
-PyObject *BMObj_NewCopied(BitMapPtr itself)
-{
-        BitMapObject *it;
-        BitMapPtr itself_copy;
-
-        if ((itself_copy=(BitMapPtr)malloc(sizeof(BitMap))) == NULL)
-                return PyErr_NoMemory();
-        *itself_copy = *itself;
-        it = (BitMapObject *)BMObj_New(itself_copy);
-        it->referred_bitmap = itself_copy;
-        return (PyObject *)it;
-}
-
-"""
-
-variablestuff = ""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(BitMapPtr, BMObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(BitMapPtr, BMObj_Convert);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(GrafPtr, GrafObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GrafPtr, GrafObj_Convert);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(RGBColorPtr, QdRGB_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColor, QdRGB_Convert);
-"""
-
-## not yet...
-##
-##class Region_ObjectDefinition(GlobalObjectDefinition):
-##      def outputCheckNewArg(self):
-##              Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-##      def outputFreeIt(self, itselfname):
-##              Output("DisposeRegion(%s);", itselfname)
-##
-##class Polygon_ObjectDefinition(GlobalObjectDefinition):
-##      def outputCheckNewArg(self):
-##              Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-##      def outputFreeIt(self, itselfname):
-##              Output("KillPoly(%s);", itselfname)
-
-class MyGRObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    getsetlist = [
-            ('visRgn',
-            """RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
-            return Py_BuildValue("O&", ResObj_New, (Handle)GetPortVisibleRegion(self->ob_itself, h));
-            """,
-            None,
-            "Convenience attribute: return a copy of the visible region"
-            ), (
-            'clipRgn',
-            """RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
-            return Py_BuildValue("O&", ResObj_New, (Handle)GetPortClipRegion(self->ob_itself, h));
-            """,
-            None,
-            "Convenience attribute: return a copy of the clipping region"
-            )]
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-    def outputCheckConvertArg(self):
-        Output("#if 1")
-        OutLbrace()
-        Output("WindowRef win;")
-        OutLbrace("if (WinObj_Convert(v, &win) && v)")
-        Output("*p_itself = (GrafPtr)GetWindowPort(win);")
-        Output("return 1;")
-        OutRbrace()
-        Output("PyErr_Clear();")
-        OutRbrace()
-        Output("#else")
-        OutLbrace("if (DlgObj_Check(v))")
-        Output("DialogRef dlg = (DialogRef)((GrafPortObject *)v)->ob_itself;")
-        Output("*p_itself = (GrafPtr)GetWindowPort(GetDialogWindow(dlg));")
-        Output("return 1;")
-        OutRbrace()
-        OutLbrace("if (WinObj_Check(v))")
-        Output("WindowRef win = (WindowRef)((GrafPortObject *)v)->ob_itself;")
-        Output("*p_itself = (GrafPtr)GetWindowPort(win);")
-        Output("return 1;")
-        OutRbrace()
-        Output("#endif")
-
-class MyBMObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    getsetlist = [
-    (
-    'baseAddr',
-    'return PyInt_FromLong((long)self->ob_itself->baseAddr);',
-    None,
-    None
-    ), (
-    'rowBytes',
-    'return PyInt_FromLong((long)self->ob_itself->rowBytes);',
-    None,
-    None
-    ), (
-    'bounds',
-    'return Py_BuildValue("O&", PyMac_BuildRect, &self->ob_itself->bounds);',
-    None,
-    None
-    ), (
-    'bitmap_data',
-    'return PyString_FromStringAndSize((char *)self->ob_itself, sizeof(BitMap));',
-    None,
-    None
-    ), (
-    'pixmap_data',
-    'return PyString_FromStringAndSize((char *)self->ob_itself, sizeof(PixMap));',
-    None,
-    None
-    )]
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-    def outputStructMembers(self):
-        # We need to more items: a pointer to privately allocated data
-        # and a python object we're referring to.
-        Output("%s ob_itself;", self.itselftype)
-        Output("PyObject *referred_object;")
-        Output("BitMap *referred_bitmap;")
-    def outputInitStructMembers(self):
-        Output("it->ob_itself = %sitself;", self.argref)
-        Output("it->referred_object = NULL;")
-        Output("it->referred_bitmap = NULL;")
-    def outputCleanupStructMembers(self):
-        Output("Py_XDECREF(self->referred_object);")
-        Output("if (self->referred_bitmap) free(self->referred_bitmap);")
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff, variablestuff)
-##r_object = Region_ObjectDefinition('Region', 'QdRgn', 'RgnHandle')
-##po_object = Polygon_ObjectDefinition('Polygon', 'QdPgn', 'PolyHandle')
-##module.addobject(r_object)
-##module.addobject(po_object)
-gr_object = MyGRObjectDefinition("GrafPort", "GrafObj", "GrafPtr")
-module.addobject(gr_object)
-bm_object = MyBMObjectDefinition("BitMap", "BMObj", "BitMapPtr")
-module.addobject(bm_object)
-
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-gr_methods = []
-bm_methods = []
-#methods = []
-exec(open(INPUTFILE).read())
-exec(open(EXTRAFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in gr_methods: gr_object.add(f)
-for f in bm_methods: bm_object.add(f)
-
-# Manual generator: get data out of a bitmap
-getdata_body = """
-int from, length;
-char *cp;
-
-if ( !PyArg_ParseTuple(_args, "ii", &from, &length) )
-        return NULL;
-cp = _self->ob_itself->baseAddr+from;
-_res = PyString_FromStringAndSize(cp, length);
-return _res;
-"""
-f = ManualGenerator("getdata", getdata_body)
-f.docstring = lambda: """(int start, int size) -> string. Return bytes from the bitmap"""
-bm_object.add(f)
-
-# Manual generator: store data in a bitmap
-putdata_body = """
-int from, length;
-char *cp, *icp;
-
-if ( !PyArg_ParseTuple(_args, "is#", &from, &icp, &length) )
-        return NULL;
-cp = _self->ob_itself->baseAddr+from;
-memcpy(cp, icp, length);
-Py_INCREF(Py_None);
-_res = Py_None;
-return _res;
-"""
-f = ManualGenerator("putdata", putdata_body)
-f.docstring = lambda: """(int start, string data). Store bytes into the bitmap"""
-bm_object.add(f)
-
-#
-# We manually generate a routine to create a BitMap from python data.
-#
-BitMap_body = """
-BitMap *ptr;
-PyObject *source;
-Rect bounds;
-int rowbytes;
-char *data;
-
-if ( !PyArg_ParseTuple(_args, "O!iO&", &PyString_Type, &source, &rowbytes, PyMac_GetRect,
-                &bounds) )
-        return NULL;
-data = PyString_AsString(source);
-if ((ptr=(BitMap *)malloc(sizeof(BitMap))) == NULL )
-        return PyErr_NoMemory();
-ptr->baseAddr = (Ptr)data;
-ptr->rowBytes = rowbytes;
-ptr->bounds = bounds;
-if ( (_res = BMObj_New(ptr)) == NULL ) {
-        free(ptr);
-        return NULL;
-}
-((BitMapObject *)_res)->referred_object = source;
-Py_INCREF(source);
-((BitMapObject *)_res)->referred_bitmap = ptr;
-return _res;
-"""
-
-f = ManualGenerator("BitMap", BitMap_body)
-f.docstring = lambda: """Take (string, int, Rect) argument and create BitMap"""
-module.add(f)
-
-#
-# And again, for turning a correctly-formatted structure into the object
-#
-RawBitMap_body = """
-BitMap *ptr;
-PyObject *source;
-
-if ( !PyArg_ParseTuple(_args, "O!", &PyString_Type, &source) )
-        return NULL;
-if ( PyString_Size(source) != sizeof(BitMap) && PyString_Size(source) != sizeof(PixMap) ) {
-        PyErr_Format(PyExc_TypeError,
-                "Argument size was %d, should be %d (sizeof BitMap) or %d (sizeof PixMap)",
-                PyString_Size(source), sizeof(BitMap), sizeof(PixMap));
-        return NULL;
-}
-ptr = (BitMapPtr)PyString_AsString(source);
-if ( (_res = BMObj_New(ptr)) == NULL ) {
-        return NULL;
-}
-((BitMapObject *)_res)->referred_object = source;
-Py_INCREF(source);
-return _res;
-"""
-
-f = ManualGenerator("RawBitMap", RawBitMap_body)
-f.docstring = lambda: """Take string BitMap and turn into BitMap object"""
-module.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
-SetOutputFile() # Close it
diff --git a/Mac/Modules/qdoffs/_Qdoffsmodule.c b/Mac/Modules/qdoffs/_Qdoffsmodule.c
deleted file mode 100644 (file)
index be46765..0000000
+++ /dev/null
@@ -1,713 +0,0 @@
-
-/* ========================= Module _Qdoffs ========================= */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_GWorldObj_New(GWorldPtr);
-extern int _GWorldObj_Convert(PyObject *, GWorldPtr *);
-
-#define GWorldObj_New _GWorldObj_New
-#define GWorldObj_Convert _GWorldObj_Convert
-#endif
-
-#define as_GrafPtr(gworld) ((GrafPtr)(gworld))
-
-
-static PyObject *Qdoffs_Error;
-
-/* ----------------------- Object type GWorld ----------------------- */
-
-PyTypeObject GWorld_Type;
-
-#define GWorldObj_Check(x) (Py_TYPE(x) == &GWorld_Type || PyObject_TypeCheck((x), &GWorld_Type))
-
-typedef struct GWorldObject {
-       PyObject_HEAD
-       GWorldPtr ob_itself;
-} GWorldObject;
-
-PyObject *GWorldObj_New(GWorldPtr itself)
-{
-       GWorldObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(GWorldObject, &GWorld_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int GWorldObj_Convert(PyObject *v, GWorldPtr *p_itself)
-{
-       if (!GWorldObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "GWorld required");
-               return 0;
-       }
-       *p_itself = ((GWorldObject *)v)->ob_itself;
-       return 1;
-}
-
-static void GWorldObj_dealloc(GWorldObject *self)
-{
-       DisposeGWorld(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *GWorldObj_GetGWorldDevice(GWorldObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle _rv;
-#ifndef GetGWorldDevice
-       PyMac_PRECHECK(GetGWorldDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetGWorldDevice(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GWorldObj_GetGWorldPixMap(GWorldObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle _rv;
-#ifndef GetGWorldPixMap
-       PyMac_PRECHECK(GetGWorldPixMap);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetGWorldPixMap(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *GWorldObj_as_GrafPtr(GWorldObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GrafPtr _rv;
-#ifndef as_GrafPtr
-       PyMac_PRECHECK(as_GrafPtr);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = as_GrafPtr(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, _rv);
-       return _res;
-}
-
-static PyMethodDef GWorldObj_methods[] = {
-       {"GetGWorldDevice", (PyCFunction)GWorldObj_GetGWorldDevice, 1,
-        PyDoc_STR("() -> (GDHandle _rv)")},
-       {"GetGWorldPixMap", (PyCFunction)GWorldObj_GetGWorldPixMap, 1,
-        PyDoc_STR("() -> (PixMapHandle _rv)")},
-       {"as_GrafPtr", (PyCFunction)GWorldObj_as_GrafPtr, 1,
-        PyDoc_STR("() -> (GrafPtr _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define GWorldObj_getsetlist NULL
-
-
-#define GWorldObj_compare NULL
-
-#define GWorldObj_repr NULL
-
-#define GWorldObj_hash NULL
-#define GWorldObj_tp_init 0
-
-#define GWorldObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *GWorldObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       GWorldPtr itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, GWorldObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((GWorldObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define GWorldObj_tp_free PyObject_Del
-
-
-PyTypeObject GWorld_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qdoffs.GWorld", /*tp_name*/
-       sizeof(GWorldObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) GWorldObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) GWorldObj_compare, /*tp_compare*/
-       (reprfunc) GWorldObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) GWorldObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       GWorldObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       GWorldObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       GWorldObj_tp_init, /* tp_init */
-       GWorldObj_tp_alloc, /* tp_alloc */
-       GWorldObj_tp_new, /* tp_new */
-       GWorldObj_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type GWorld --------------------- */
-
-
-static PyObject *Qdoffs_NewGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       QDErr _err;
-       GWorldPtr offscreenGWorld;
-       short PixelDepth;
-       Rect boundsRect;
-       CTabHandle cTable;
-       GDHandle aGDevice;
-       GWorldFlags flags;
-#ifndef NewGWorld
-       PyMac_PRECHECK(NewGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&O&O&l",
-                             &PixelDepth,
-                             PyMac_GetRect, &boundsRect,
-                             OptResObj_Convert, &cTable,
-                             OptResObj_Convert, &aGDevice,
-                             &flags))
-               return NULL;
-       _err = NewGWorld(&offscreenGWorld,
-                        PixelDepth,
-                        &boundsRect,
-                        cTable,
-                        aGDevice,
-                        flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            GWorldObj_New, offscreenGWorld);
-       return _res;
-}
-
-static PyObject *Qdoffs_LockPixels(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       PixMapHandle pm;
-#ifndef LockPixels
-       PyMac_PRECHECK(LockPixels);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       _rv = LockPixels(pm);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qdoffs_UnlockPixels(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle pm;
-#ifndef UnlockPixels
-       PyMac_PRECHECK(UnlockPixels);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       UnlockPixels(pm);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_UpdateGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GWorldFlags _rv;
-       GWorldPtr offscreenGWorld;
-       short pixelDepth;
-       Rect boundsRect;
-       CTabHandle cTable;
-       GDHandle aGDevice;
-       GWorldFlags flags;
-#ifndef UpdateGWorld
-       PyMac_PRECHECK(UpdateGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&O&O&l",
-                             &pixelDepth,
-                             PyMac_GetRect, &boundsRect,
-                             OptResObj_Convert, &cTable,
-                             OptResObj_Convert, &aGDevice,
-                             &flags))
-               return NULL;
-       _rv = UpdateGWorld(&offscreenGWorld,
-                          pixelDepth,
-                          &boundsRect,
-                          cTable,
-                          aGDevice,
-                          flags);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            GWorldObj_New, offscreenGWorld);
-       return _res;
-}
-
-static PyObject *Qdoffs_GetGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr port;
-       GDHandle gdh;
-#ifndef GetGWorld
-       PyMac_PRECHECK(GetGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetGWorld(&port,
-                 &gdh);
-       _res = Py_BuildValue("O&O&",
-                            GrafObj_New, port,
-                            ResObj_New, gdh);
-       return _res;
-}
-
-static PyObject *Qdoffs_SetGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr port;
-       GDHandle gdh;
-#ifndef SetGWorld
-       PyMac_PRECHECK(SetGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             GrafObj_Convert, &port,
-                             OptResObj_Convert, &gdh))
-               return NULL;
-       SetGWorld(port,
-                 gdh);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_CTabChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CTabHandle ctab;
-#ifndef CTabChanged
-       PyMac_PRECHECK(CTabChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             OptResObj_Convert, &ctab))
-               return NULL;
-       CTabChanged(ctab);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_PixPatChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle ppat;
-#ifndef PixPatChanged
-       PyMac_PRECHECK(PixPatChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &ppat))
-               return NULL;
-       PixPatChanged(ppat);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_PortChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GrafPtr port;
-#ifndef PortChanged
-       PyMac_PRECHECK(PortChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             GrafObj_Convert, &port))
-               return NULL;
-       PortChanged(port);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_GDeviceChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GDHandle gdh;
-#ifndef GDeviceChanged
-       PyMac_PRECHECK(GDeviceChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             OptResObj_Convert, &gdh))
-               return NULL;
-       GDeviceChanged(gdh);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_AllowPurgePixels(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle pm;
-#ifndef AllowPurgePixels
-       PyMac_PRECHECK(AllowPurgePixels);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       AllowPurgePixels(pm);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_NoPurgePixels(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle pm;
-#ifndef NoPurgePixels
-       PyMac_PRECHECK(NoPurgePixels);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       NoPurgePixels(pm);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_GetPixelsState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GWorldFlags _rv;
-       PixMapHandle pm;
-#ifndef GetPixelsState
-       PyMac_PRECHECK(GetPixelsState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       _rv = GetPixelsState(pm);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qdoffs_SetPixelsState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle pm;
-       GWorldFlags state;
-#ifndef SetPixelsState
-       PyMac_PRECHECK(SetPixelsState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ResObj_Convert, &pm,
-                             &state))
-               return NULL;
-       SetPixelsState(pm,
-                      state);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_GetPixRowBytes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       PixMapHandle pm;
-#ifndef GetPixRowBytes
-       PyMac_PRECHECK(GetPixRowBytes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       _rv = GetPixRowBytes(pm);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qdoffs_NewScreenBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       QDErr _err;
-       Rect globalRect;
-       Boolean purgeable;
-       GDHandle gdh;
-       PixMapHandle offscreenPixMap;
-#ifndef NewScreenBuffer
-       PyMac_PRECHECK(NewScreenBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetRect, &globalRect,
-                             &purgeable))
-               return NULL;
-       _err = NewScreenBuffer(&globalRect,
-                              purgeable,
-                              &gdh,
-                              &offscreenPixMap);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            ResObj_New, gdh,
-                            ResObj_New, offscreenPixMap);
-       return _res;
-}
-
-static PyObject *Qdoffs_DisposeScreenBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle offscreenPixMap;
-#ifndef DisposeScreenBuffer
-       PyMac_PRECHECK(DisposeScreenBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &offscreenPixMap))
-               return NULL;
-       DisposeScreenBuffer(offscreenPixMap);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qdoffs_QDDone(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       GrafPtr port;
-#ifndef QDDone
-       PyMac_PRECHECK(QDDone);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             GrafObj_Convert, &port))
-               return NULL;
-       _rv = QDDone(port);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qdoffs_OffscreenVersion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef OffscreenVersion
-       PyMac_PRECHECK(OffscreenVersion);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = OffscreenVersion();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qdoffs_NewTempScreenBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       QDErr _err;
-       Rect globalRect;
-       Boolean purgeable;
-       GDHandle gdh;
-       PixMapHandle offscreenPixMap;
-#ifndef NewTempScreenBuffer
-       PyMac_PRECHECK(NewTempScreenBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetRect, &globalRect,
-                             &purgeable))
-               return NULL;
-       _err = NewTempScreenBuffer(&globalRect,
-                                  purgeable,
-                                  &gdh,
-                                  &offscreenPixMap);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            ResObj_New, gdh,
-                            ResObj_New, offscreenPixMap);
-       return _res;
-}
-
-static PyObject *Qdoffs_PixMap32Bit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       PixMapHandle pmHandle;
-#ifndef PixMap32Bit
-       PyMac_PRECHECK(PixMap32Bit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pmHandle))
-               return NULL;
-       _rv = PixMap32Bit(pmHandle);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qdoffs_GetPixMapBytes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       PixMapHandle pm;
-       int from, length;
-       char *cp;
-
-       if ( !PyArg_ParseTuple(_args, "O&ii", ResObj_Convert, &pm, &from, &length) )
-               return NULL;
-       cp = GetPixBaseAddr(pm)+from;
-       _res = PyString_FromStringAndSize(cp, length);
-       return _res;
-
-}
-
-static PyObject *Qdoffs_PutPixMapBytes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       PixMapHandle pm;
-       int from, length;
-       char *cp, *icp;
-
-       if ( !PyArg_ParseTuple(_args, "O&is#", ResObj_Convert, &pm, &from, &icp, &length) )
-               return NULL;
-       cp = GetPixBaseAddr(pm)+from;
-       memcpy(cp, icp, length);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-
-}
-
-static PyMethodDef Qdoffs_methods[] = {
-       {"NewGWorld", (PyCFunction)Qdoffs_NewGWorld, 1,
-        PyDoc_STR("(short PixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldPtr offscreenGWorld)")},
-       {"LockPixels", (PyCFunction)Qdoffs_LockPixels, 1,
-        PyDoc_STR("(PixMapHandle pm) -> (Boolean _rv)")},
-       {"UnlockPixels", (PyCFunction)Qdoffs_UnlockPixels, 1,
-        PyDoc_STR("(PixMapHandle pm) -> None")},
-       {"UpdateGWorld", (PyCFunction)Qdoffs_UpdateGWorld, 1,
-        PyDoc_STR("(short pixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldFlags _rv, GWorldPtr offscreenGWorld)")},
-       {"GetGWorld", (PyCFunction)Qdoffs_GetGWorld, 1,
-        PyDoc_STR("() -> (CGrafPtr port, GDHandle gdh)")},
-       {"SetGWorld", (PyCFunction)Qdoffs_SetGWorld, 1,
-        PyDoc_STR("(CGrafPtr port, GDHandle gdh) -> None")},
-       {"CTabChanged", (PyCFunction)Qdoffs_CTabChanged, 1,
-        PyDoc_STR("(CTabHandle ctab) -> None")},
-       {"PixPatChanged", (PyCFunction)Qdoffs_PixPatChanged, 1,
-        PyDoc_STR("(PixPatHandle ppat) -> None")},
-       {"PortChanged", (PyCFunction)Qdoffs_PortChanged, 1,
-        PyDoc_STR("(GrafPtr port) -> None")},
-       {"GDeviceChanged", (PyCFunction)Qdoffs_GDeviceChanged, 1,
-        PyDoc_STR("(GDHandle gdh) -> None")},
-       {"AllowPurgePixels", (PyCFunction)Qdoffs_AllowPurgePixels, 1,
-        PyDoc_STR("(PixMapHandle pm) -> None")},
-       {"NoPurgePixels", (PyCFunction)Qdoffs_NoPurgePixels, 1,
-        PyDoc_STR("(PixMapHandle pm) -> None")},
-       {"GetPixelsState", (PyCFunction)Qdoffs_GetPixelsState, 1,
-        PyDoc_STR("(PixMapHandle pm) -> (GWorldFlags _rv)")},
-       {"SetPixelsState", (PyCFunction)Qdoffs_SetPixelsState, 1,
-        PyDoc_STR("(PixMapHandle pm, GWorldFlags state) -> None")},
-       {"GetPixRowBytes", (PyCFunction)Qdoffs_GetPixRowBytes, 1,
-        PyDoc_STR("(PixMapHandle pm) -> (long _rv)")},
-       {"NewScreenBuffer", (PyCFunction)Qdoffs_NewScreenBuffer, 1,
-        PyDoc_STR("(Rect globalRect, Boolean purgeable) -> (GDHandle gdh, PixMapHandle offscreenPixMap)")},
-       {"DisposeScreenBuffer", (PyCFunction)Qdoffs_DisposeScreenBuffer, 1,
-        PyDoc_STR("(PixMapHandle offscreenPixMap) -> None")},
-       {"QDDone", (PyCFunction)Qdoffs_QDDone, 1,
-        PyDoc_STR("(GrafPtr port) -> (Boolean _rv)")},
-       {"OffscreenVersion", (PyCFunction)Qdoffs_OffscreenVersion, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"NewTempScreenBuffer", (PyCFunction)Qdoffs_NewTempScreenBuffer, 1,
-        PyDoc_STR("(Rect globalRect, Boolean purgeable) -> (GDHandle gdh, PixMapHandle offscreenPixMap)")},
-       {"PixMap32Bit", (PyCFunction)Qdoffs_PixMap32Bit, 1,
-        PyDoc_STR("(PixMapHandle pmHandle) -> (Boolean _rv)")},
-       {"GetPixMapBytes", (PyCFunction)Qdoffs_GetPixMapBytes, 1,
-        PyDoc_STR("(pixmap, int start, int size) -> string. Return bytes from the pixmap")},
-       {"PutPixMapBytes", (PyCFunction)Qdoffs_PutPixMapBytes, 1,
-        PyDoc_STR("(pixmap, int start, string data). Store bytes into the pixmap")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Qdoffs(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldPtr, GWorldObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldPtr, GWorldObj_Convert);
-
-
-       m = Py_InitModule("_Qdoffs", Qdoffs_methods);
-       d = PyModule_GetDict(m);
-       Qdoffs_Error = PyMac_GetOSErrException();
-       if (Qdoffs_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Qdoffs_Error) != 0)
-               return;
-       Py_TYPE(&GWorld_Type) = &PyType_Type;
-       if (PyType_Ready(&GWorld_Type) < 0) return;
-       Py_INCREF(&GWorld_Type);
-       PyModule_AddObject(m, "GWorld", (PyObject *)&GWorld_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&GWorld_Type);
-       PyModule_AddObject(m, "GWorldType", (PyObject *)&GWorld_Type);
-}
-
-/* ======================= End module _Qdoffs ======================= */
-
diff --git a/Mac/Modules/qdoffs/qdoffsscan.py b/Mac/Modules/qdoffs/qdoffsscan.py
deleted file mode 100644 (file)
index a179a27..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-def main():
-    input = "QDOffscreen.h"
-    output = "qdoffsgen.py"
-    defsoutput = TOOLBOXDIR + "QDOffscreen.py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    import qdoffssupport
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t == "GWorldPtr" and m in ("InMode", "InOutMode"):
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-    def makeblacklistnames(self):
-        return [
-                'DisposeGWorld', # Implied when the object is deleted
-                'NewGWorldFromHBITMAP', # Don't know what the args do
-                'GetGDeviceAttributes', # Windows-only
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "void_ptr",             # GetGDeviceSurface, blacklisted for now
-                "Ptr",                  # Again, for now (array is probably ok here)
-                ]
-
-    def makerepairinstructions(self):
-        return [
-
-##                      ("UpdateGWorld",
-##                       [("GWorldPtr", "*", "OutMode")],
-##                       [("*", "*", "InOutMode")]),
-
-                # This one is incorrect: we say that all input gdevices are
-                # optional, but some are not. Most are, however, so users passing
-                # None for non-optional gdevices will get a qd error, I guess, in
-                # stead of a python argument error.
-                ([("GDHandle", "*", "InMode")],
-                 [("OptGDHandle", "*", "InMode")]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/qdoffs/qdoffssupport.py b/Mac/Modules/qdoffs/qdoffssupport.py
deleted file mode 100644 (file)
index 73855a2..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'QDOffscreen.h'         # The Apple header file
-MODNAME = '_Qdoffs'                             # The name of the module
-OBJECTNAME = 'GWorld'                   # The basic name of the objects used here
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Qdoffs'                    # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + 'Ptr'         # The C type used to represent them
-OBJECTPREFIX = OBJECTNAME + 'Obj'       # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-#EDITFILE = string.lower(MODPREFIX) + 'edit.py' # The manual definitions
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-GWorldPtr = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
-GWorldFlags = Type("GWorldFlags", "l")
-GDHandle = OpaqueByValueType("GDHandle", "ResObj")
-OptGDHandle = OpaqueByValueType("GDHandle", "OptResObj")
-CTabHandle = OpaqueByValueType("CTabHandle", "OptResObj")
-PixPatHandle = OpaqueByValueType("PixPatHandle", "ResObj")
-PixMapHandle = OpaqueByValueType("PixMapHandle", "ResObj")
-CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
-GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
-QDErr = OSErrType("QDErr", 'h')
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_GWorldObj_New(GWorldPtr);
-extern int _GWorldObj_Convert(PyObject *, GWorldPtr *);
-
-#define GWorldObj_New _GWorldObj_New
-#define GWorldObj_Convert _GWorldObj_Convert
-#endif
-
-#define as_GrafPtr(gworld) ((GrafPtr)(gworld))
-
-"""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldPtr, GWorldObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldPtr, GWorldObj_Convert);
-"""
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    # XXXX Should inherit from GrafPtr?
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-##      def outputInitStructMembers(self):
-##              GlobalObjectDefinition.outputInitStructMembers(self)
-##              Output("SetWRefCon(itself, (long)it);")
-##      def outputCheckConvertArg(self):
-##              OutLbrace("if (DlgObj_Check(v))")
-##              Output("*p_itself = ((WindowObject *)v)->ob_itself;")
-##              Output("return 1;")
-##              OutRbrace()
-##              Out("""
-##              if (v == Py_None) { *p_itself = NULL; return 1; }
-##              if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }
-##              """)
-    def outputFreeIt(self, itselfname):
-        Output("DisposeGWorld(%s);", itselfname)
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-module.addobject(object)
-
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-
-# A method to convert a GWorldPtr to a GrafPtr
-f = Method(GrafPtr, 'as_GrafPtr', (GWorldPtr, 'p', InMode))
-methods.append(f)
-
-#
-# Manual generator: get data out of a pixmap
-pixmapgetbytes_body = """
-PixMapHandle pm;
-int from, length;
-char *cp;
-
-if ( !PyArg_ParseTuple(_args, "O&ii", ResObj_Convert, &pm, &from, &length) )
-        return NULL;
-cp = GetPixBaseAddr(pm)+from;
-_res = PyString_FromStringAndSize(cp, length);
-return _res;
-"""
-f = ManualGenerator("GetPixMapBytes", pixmapgetbytes_body)
-f.docstring = lambda: """(pixmap, int start, int size) -> string. Return bytes from the pixmap"""
-functions.append(f)
-
-# Manual generator: store data in a pixmap
-pixmapputbytes_body = """
-PixMapHandle pm;
-int from, length;
-char *cp, *icp;
-
-if ( !PyArg_ParseTuple(_args, "O&is#", ResObj_Convert, &pm, &from, &icp, &length) )
-        return NULL;
-cp = GetPixBaseAddr(pm)+from;
-memcpy(cp, icp, length);
-Py_INCREF(Py_None);
-_res = Py_None;
-return _res;
-"""
-f = ManualGenerator("PutPixMapBytes", pixmapputbytes_body)
-f.docstring = lambda: """(pixmap, int start, string data). Store bytes into the pixmap"""
-functions.append(f)
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/qt/_Qtmodule.c b/Mac/Modules/qt/_Qtmodule.c
deleted file mode 100644 (file)
index f0dd6c5..0000000
+++ /dev/null
@@ -1,28075 +0,0 @@
-
-/* =========================== Module _Qt =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <QuickTime/QuickTime.h>
-
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_TrackObj_New(Track);
-extern int _TrackObj_Convert(PyObject *, Track *);
-extern PyObject *_MovieObj_New(Movie);
-extern int _MovieObj_Convert(PyObject *, Movie *);
-extern PyObject *_MovieCtlObj_New(MovieController);
-extern int _MovieCtlObj_Convert(PyObject *, MovieController *);
-extern PyObject *_TimeBaseObj_New(TimeBase);
-extern int _TimeBaseObj_Convert(PyObject *, TimeBase *);
-extern PyObject *_UserDataObj_New(UserData);
-extern int _UserDataObj_Convert(PyObject *, UserData *);
-extern PyObject *_MediaObj_New(Media);
-extern int _MediaObj_Convert(PyObject *, Media *);
-
-#define TrackObj_New _TrackObj_New
-#define TrackObj_Convert _TrackObj_Convert
-#define MovieObj_New _MovieObj_New
-#define MovieObj_Convert _MovieObj_Convert
-#define MovieCtlObj_New _MovieCtlObj_New
-#define MovieCtlObj_Convert _MovieCtlObj_Convert
-#define TimeBaseObj_New _TimeBaseObj_New
-#define TimeBaseObj_Convert _TimeBaseObj_Convert
-#define UserDataObj_New _UserDataObj_New
-#define UserDataObj_Convert _UserDataObj_Convert
-#define MediaObj_New _MediaObj_New
-#define MediaObj_Convert _MediaObj_Convert
-#endif
-
-/* Macro to allow us to GetNextInterestingTime without duration */
-#define GetMediaNextInterestingTimeOnly(media, flags, time, rate, rv)                         GetMediaNextInterestingTime(media, flags, time, rate, rv, NULL)
-
-/*
-** Parse/generate time records
-*/
-static PyObject *
-QtTimeRecord_New(TimeRecord *itself)
-{
-        if (itself->base)
-                return Py_BuildValue("O&lO&", PyMac_Buildwide, &itself->value, itself->scale,
-                        TimeBaseObj_New, itself->base);
-        else
-                return  Py_BuildValue("O&lO", PyMac_Buildwide, &itself->value, itself->scale,
-                        Py_None);
-}
-
-static int
-QtTimeRecord_Convert(PyObject *v, TimeRecord *p_itself)
-{
-        PyObject *base = NULL;
-        if( !PyArg_ParseTuple(v, "O&l|O", PyMac_Getwide, &p_itself->value, &p_itself->scale,
-                        &base) )
-                return 0;
-        if ( base == NULL || base == Py_None )
-                p_itself->base = NULL;
-        else
-                if ( !TimeBaseObj_Convert(base, &p_itself->base) )
-                        return 0;
-        return 1;
-}
-
-static int
-QtMusicMIDIPacket_Convert(PyObject *v, MusicMIDIPacket *p_itself)
-{
-        int dummy;
-
-        if( !PyArg_ParseTuple(v, "hls#", &p_itself->length, &p_itself->reserved, p_itself->data, dummy) )
-                return 0;
-        return 1;
-}
-
-
-
-
-static PyObject *Qt_Error;
-
-/* -------------------- Object type IdleManager --------------------- */
-
-PyTypeObject IdleManager_Type;
-
-#define IdleManagerObj_Check(x) (Py_TYPE(x) == &IdleManager_Type || PyObject_TypeCheck((x), &IdleManager_Type))
-
-typedef struct IdleManagerObject {
-       PyObject_HEAD
-       IdleManager ob_itself;
-} IdleManagerObject;
-
-PyObject *IdleManagerObj_New(IdleManager itself)
-{
-       IdleManagerObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Qt_Error,"Cannot create IdleManager from NULL pointer");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(IdleManagerObject, &IdleManager_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int IdleManagerObj_Convert(PyObject *v, IdleManager *p_itself)
-{
-       if (v == Py_None)
-       {
-               *p_itself = NULL;
-               return 1;
-       }
-       if (!IdleManagerObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "IdleManager required");
-               return 0;
-       }
-       *p_itself = ((IdleManagerObject *)v)->ob_itself;
-       return 1;
-}
-
-static void IdleManagerObj_dealloc(IdleManagerObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyMethodDef IdleManagerObj_methods[] = {
-       {NULL, NULL, 0}
-};
-
-#define IdleManagerObj_getsetlist NULL
-
-
-#define IdleManagerObj_compare NULL
-
-#define IdleManagerObj_repr NULL
-
-#define IdleManagerObj_hash NULL
-#define IdleManagerObj_tp_init 0
-
-#define IdleManagerObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *IdleManagerObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       IdleManager itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, IdleManagerObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((IdleManagerObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define IdleManagerObj_tp_free PyObject_Del
-
-
-PyTypeObject IdleManager_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qt.IdleManager", /*tp_name*/
-       sizeof(IdleManagerObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) IdleManagerObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) IdleManagerObj_compare, /*tp_compare*/
-       (reprfunc) IdleManagerObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) IdleManagerObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       IdleManagerObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       IdleManagerObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       IdleManagerObj_tp_init, /* tp_init */
-       IdleManagerObj_tp_alloc, /* tp_alloc */
-       IdleManagerObj_tp_new, /* tp_new */
-       IdleManagerObj_tp_free, /* tp_free */
-};
-
-/* ------------------ End object type IdleManager ------------------- */
-
-
-/* ------------------ Object type MovieController ------------------- */
-
-PyTypeObject MovieController_Type;
-
-#define MovieCtlObj_Check(x) (Py_TYPE(x) == &MovieController_Type || PyObject_TypeCheck((x), &MovieController_Type))
-
-typedef struct MovieControllerObject {
-       PyObject_HEAD
-       MovieController ob_itself;
-} MovieControllerObject;
-
-PyObject *MovieCtlObj_New(MovieController itself)
-{
-       MovieControllerObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Qt_Error,"Cannot create MovieController from NULL pointer");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(MovieControllerObject, &MovieController_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int MovieCtlObj_Convert(PyObject *v, MovieController *p_itself)
-{
-       if (v == Py_None)
-       {
-               *p_itself = NULL;
-               return 1;
-       }
-       if (!MovieCtlObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "MovieController required");
-               return 0;
-       }
-       *p_itself = ((MovieControllerObject *)v)->ob_itself;
-       return 1;
-}
-
-static void MovieCtlObj_dealloc(MovieControllerObject *self)
-{
-       if (self->ob_itself) DisposeMovieController(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *MovieCtlObj_MCSetMovie(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Movie theMovie;
-       WindowPtr movieWindow;
-       Point where;
-#ifndef MCSetMovie
-       PyMac_PRECHECK(MCSetMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             MovieObj_Convert, &theMovie,
-                             WinObj_Convert, &movieWindow,
-                             PyMac_GetPoint, &where))
-               return NULL;
-       _rv = MCSetMovie(_self->ob_itself,
-                        theMovie,
-                        movieWindow,
-                        where);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetIndMovie(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-       short index;
-#ifndef MCGetIndMovie
-       PyMac_PRECHECK(MCGetIndMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &index))
-               return NULL;
-       _rv = MCGetIndMovie(_self->ob_itself,
-                           index);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCRemoveAllMovies(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-#ifndef MCRemoveAllMovies
-       PyMac_PRECHECK(MCRemoveAllMovies);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCRemoveAllMovies(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCRemoveAMovie(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Movie m;
-#ifndef MCRemoveAMovie
-       PyMac_PRECHECK(MCRemoveAMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             MovieObj_Convert, &m))
-               return NULL;
-       _rv = MCRemoveAMovie(_self->ob_itself,
-                            m);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCRemoveMovie(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-#ifndef MCRemoveMovie
-       PyMac_PRECHECK(MCRemoveMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCRemoveMovie(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCIsPlayerEvent(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       EventRecord e;
-#ifndef MCIsPlayerEvent
-       PyMac_PRECHECK(MCIsPlayerEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &e))
-               return NULL;
-       _rv = MCIsPlayerEvent(_self->ob_itself,
-                             &e);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCDoAction(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       short action;
-       void * params;
-#ifndef MCDoAction
-       PyMac_PRECHECK(MCDoAction);
-#endif
-       if (!PyArg_ParseTuple(_args, "hs",
-                             &action,
-                             &params))
-               return NULL;
-       _rv = MCDoAction(_self->ob_itself,
-                        action,
-                        params);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCSetControllerAttached(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Boolean attach;
-#ifndef MCSetControllerAttached
-       PyMac_PRECHECK(MCSetControllerAttached);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &attach))
-               return NULL;
-       _rv = MCSetControllerAttached(_self->ob_itself,
-                                     attach);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCIsControllerAttached(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-#ifndef MCIsControllerAttached
-       PyMac_PRECHECK(MCIsControllerAttached);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCIsControllerAttached(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCSetControllerPort(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       CGrafPtr gp;
-#ifndef MCSetControllerPort
-       PyMac_PRECHECK(MCSetControllerPort);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             GrafObj_Convert, &gp))
-               return NULL;
-       _rv = MCSetControllerPort(_self->ob_itself,
-                                 gp);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetControllerPort(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr _rv;
-#ifndef MCGetControllerPort
-       PyMac_PRECHECK(MCGetControllerPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCGetControllerPort(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCSetVisible(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Boolean visible;
-#ifndef MCSetVisible
-       PyMac_PRECHECK(MCSetVisible);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &visible))
-               return NULL;
-       _rv = MCSetVisible(_self->ob_itself,
-                          visible);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetVisible(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-#ifndef MCGetVisible
-       PyMac_PRECHECK(MCGetVisible);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCGetVisible(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Rect bounds;
-#ifndef MCGetControllerBoundsRect
-       PyMac_PRECHECK(MCGetControllerBoundsRect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCGetControllerBoundsRect(_self->ob_itself,
-                                       &bounds);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCSetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Rect bounds;
-#ifndef MCSetControllerBoundsRect
-       PyMac_PRECHECK(MCSetControllerBoundsRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &bounds))
-               return NULL;
-       _rv = MCSetControllerBoundsRect(_self->ob_itself,
-                                       &bounds);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetControllerBoundsRgn(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef MCGetControllerBoundsRgn
-       PyMac_PRECHECK(MCGetControllerBoundsRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCGetControllerBoundsRgn(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetWindowRgn(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-       WindowPtr w;
-#ifndef MCGetWindowRgn
-       PyMac_PRECHECK(MCGetWindowRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &w))
-               return NULL;
-       _rv = MCGetWindowRgn(_self->ob_itself,
-                            w);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCMovieChanged(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Movie m;
-#ifndef MCMovieChanged
-       PyMac_PRECHECK(MCMovieChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             MovieObj_Convert, &m))
-               return NULL;
-       _rv = MCMovieChanged(_self->ob_itself,
-                            m);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCSetDuration(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TimeValue duration;
-#ifndef MCSetDuration
-       PyMac_PRECHECK(MCSetDuration);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &duration))
-               return NULL;
-       _rv = MCSetDuration(_self->ob_itself,
-                           duration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetCurrentTime(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-       TimeScale scale;
-#ifndef MCGetCurrentTime
-       PyMac_PRECHECK(MCGetCurrentTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCGetCurrentTime(_self->ob_itself,
-                              &scale);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            scale);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCNewAttachedController(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Movie theMovie;
-       WindowPtr w;
-       Point where;
-#ifndef MCNewAttachedController
-       PyMac_PRECHECK(MCNewAttachedController);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             MovieObj_Convert, &theMovie,
-                             WinObj_Convert, &w,
-                             PyMac_GetPoint, &where))
-               return NULL;
-       _rv = MCNewAttachedController(_self->ob_itself,
-                                     theMovie,
-                                     w,
-                                     where);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCDraw(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       WindowPtr w;
-#ifndef MCDraw
-       PyMac_PRECHECK(MCDraw);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &w))
-               return NULL;
-       _rv = MCDraw(_self->ob_itself,
-                    w);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCActivate(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       WindowPtr w;
-       Boolean activate;
-#ifndef MCActivate
-       PyMac_PRECHECK(MCActivate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             WinObj_Convert, &w,
-                             &activate))
-               return NULL;
-       _rv = MCActivate(_self->ob_itself,
-                        w,
-                        activate);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCIdle(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-#ifndef MCIdle
-       PyMac_PRECHECK(MCIdle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCIdle(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCKey(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SInt8 key;
-       long modifiers;
-#ifndef MCKey
-       PyMac_PRECHECK(MCKey);
-#endif
-       if (!PyArg_ParseTuple(_args, "bl",
-                             &key,
-                             &modifiers))
-               return NULL;
-       _rv = MCKey(_self->ob_itself,
-                   key,
-                   modifiers);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCClick(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       WindowPtr w;
-       Point where;
-       long when;
-       long modifiers;
-#ifndef MCClick
-       PyMac_PRECHECK(MCClick);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&ll",
-                             WinObj_Convert, &w,
-                             PyMac_GetPoint, &where,
-                             &when,
-                             &modifiers))
-               return NULL;
-       _rv = MCClick(_self->ob_itself,
-                     w,
-                     where,
-                     when,
-                     modifiers);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCEnableEditing(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Boolean enabled;
-#ifndef MCEnableEditing
-       PyMac_PRECHECK(MCEnableEditing);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &enabled))
-               return NULL;
-       _rv = MCEnableEditing(_self->ob_itself,
-                             enabled);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCIsEditingEnabled(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef MCIsEditingEnabled
-       PyMac_PRECHECK(MCIsEditingEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCIsEditingEnabled(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCCopy(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-#ifndef MCCopy
-       PyMac_PRECHECK(MCCopy);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCCopy(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCCut(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-#ifndef MCCut
-       PyMac_PRECHECK(MCCut);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCCut(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCPaste(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Movie srcMovie;
-#ifndef MCPaste
-       PyMac_PRECHECK(MCPaste);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             MovieObj_Convert, &srcMovie))
-               return NULL;
-       _rv = MCPaste(_self->ob_itself,
-                     srcMovie);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCClear(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-#ifndef MCClear
-       PyMac_PRECHECK(MCClear);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCClear(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCUndo(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-#ifndef MCUndo
-       PyMac_PRECHECK(MCUndo);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCUndo(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCPositionController(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Rect movieRect;
-       Rect controllerRect;
-       long someFlags;
-#ifndef MCPositionController
-       PyMac_PRECHECK(MCPositionController);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             PyMac_GetRect, &movieRect,
-                             PyMac_GetRect, &controllerRect,
-                             &someFlags))
-               return NULL;
-       _rv = MCPositionController(_self->ob_itself,
-                                  &movieRect,
-                                  &controllerRect,
-                                  someFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetControllerInfo(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       long someFlags;
-#ifndef MCGetControllerInfo
-       PyMac_PRECHECK(MCGetControllerInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCGetControllerInfo(_self->ob_itself,
-                                 &someFlags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            someFlags);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCSetClip(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       RgnHandle theClip;
-       RgnHandle movieClip;
-#ifndef MCSetClip
-       PyMac_PRECHECK(MCSetClip);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &theClip,
-                             ResObj_Convert, &movieClip))
-               return NULL;
-       _rv = MCSetClip(_self->ob_itself,
-                       theClip,
-                       movieClip);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetClip(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       RgnHandle theClip;
-       RgnHandle movieClip;
-#ifndef MCGetClip
-       PyMac_PRECHECK(MCGetClip);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCGetClip(_self->ob_itself,
-                       &theClip,
-                       &movieClip);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, theClip,
-                            ResObj_New, movieClip);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCDrawBadge(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       RgnHandle movieRgn;
-       RgnHandle badgeRgn;
-#ifndef MCDrawBadge
-       PyMac_PRECHECK(MCDrawBadge);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &movieRgn))
-               return NULL;
-       _rv = MCDrawBadge(_self->ob_itself,
-                         movieRgn,
-                         &badgeRgn);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, badgeRgn);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCSetUpEditMenu(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       long modifiers;
-       MenuHandle mh;
-#ifndef MCSetUpEditMenu
-       PyMac_PRECHECK(MCSetUpEditMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &modifiers,
-                             MenuObj_Convert, &mh))
-               return NULL;
-       _rv = MCSetUpEditMenu(_self->ob_itself,
-                             modifiers,
-                             mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetMenuString(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       long modifiers;
-       short item;
-       Str255 aString;
-#ifndef MCGetMenuString
-       PyMac_PRECHECK(MCGetMenuString);
-#endif
-       if (!PyArg_ParseTuple(_args, "lhO&",
-                             &modifiers,
-                             &item,
-                             PyMac_GetStr255, aString))
-               return NULL;
-       _rv = MCGetMenuString(_self->ob_itself,
-                             modifiers,
-                             item,
-                             aString);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCPtInController(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Point thePt;
-       Boolean inController;
-#ifndef MCPtInController
-       PyMac_PRECHECK(MCPtInController);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &thePt))
-               return NULL;
-       _rv = MCPtInController(_self->ob_itself,
-                              thePt,
-                              &inController);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            inController);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCInvalidate(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       WindowPtr w;
-       RgnHandle invalidRgn;
-#ifndef MCInvalidate
-       PyMac_PRECHECK(MCInvalidate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &w,
-                             ResObj_Convert, &invalidRgn))
-               return NULL;
-       _rv = MCInvalidate(_self->ob_itself,
-                          w,
-                          invalidRgn);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCAdjustCursor(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       WindowPtr w;
-       Point where;
-       long modifiers;
-#ifndef MCAdjustCursor
-       PyMac_PRECHECK(MCAdjustCursor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             WinObj_Convert, &w,
-                             PyMac_GetPoint, &where,
-                             &modifiers))
-               return NULL;
-       _rv = MCAdjustCursor(_self->ob_itself,
-                            w,
-                            where,
-                            modifiers);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCGetInterfaceElement(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MCInterfaceElement whichElement;
-       void * element;
-#ifndef MCGetInterfaceElement
-       PyMac_PRECHECK(MCGetInterfaceElement);
-#endif
-       if (!PyArg_ParseTuple(_args, "ls",
-                             &whichElement,
-                             &element))
-               return NULL;
-       _rv = MCGetInterfaceElement(_self->ob_itself,
-                                   whichElement,
-                                   element);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCAddMovieSegment(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Movie srcMovie;
-       Boolean scaled;
-#ifndef MCAddMovieSegment
-       PyMac_PRECHECK(MCAddMovieSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             MovieObj_Convert, &srcMovie,
-                             &scaled))
-               return NULL;
-       _rv = MCAddMovieSegment(_self->ob_itself,
-                               srcMovie,
-                               scaled);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCTrimMovieSegment(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-#ifndef MCTrimMovieSegment
-       PyMac_PRECHECK(MCTrimMovieSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MCTrimMovieSegment(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCSetIdleManager(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       IdleManager im;
-#ifndef MCSetIdleManager
-       PyMac_PRECHECK(MCSetIdleManager);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             IdleManagerObj_Convert, &im))
-               return NULL;
-       _rv = MCSetIdleManager(_self->ob_itself,
-                              im);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieCtlObj_MCSetControllerCapabilities(MovieControllerObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       long flags;
-       long flagsMask;
-#ifndef MCSetControllerCapabilities
-       PyMac_PRECHECK(MCSetControllerCapabilities);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &flags,
-                             &flagsMask))
-               return NULL;
-       _rv = MCSetControllerCapabilities(_self->ob_itself,
-                                         flags,
-                                         flagsMask);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyMethodDef MovieCtlObj_methods[] = {
-       {"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1,
-        PyDoc_STR("(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)")},
-       {"MCGetIndMovie", (PyCFunction)MovieCtlObj_MCGetIndMovie, 1,
-        PyDoc_STR("(short index) -> (Movie _rv)")},
-       {"MCRemoveAllMovies", (PyCFunction)MovieCtlObj_MCRemoveAllMovies, 1,
-        PyDoc_STR("() -> (ComponentResult _rv)")},
-       {"MCRemoveAMovie", (PyCFunction)MovieCtlObj_MCRemoveAMovie, 1,
-        PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
-       {"MCRemoveMovie", (PyCFunction)MovieCtlObj_MCRemoveMovie, 1,
-        PyDoc_STR("() -> (ComponentResult _rv)")},
-       {"MCIsPlayerEvent", (PyCFunction)MovieCtlObj_MCIsPlayerEvent, 1,
-        PyDoc_STR("(EventRecord e) -> (ComponentResult _rv)")},
-       {"MCDoAction", (PyCFunction)MovieCtlObj_MCDoAction, 1,
-        PyDoc_STR("(short action, void * params) -> (ComponentResult _rv)")},
-       {"MCSetControllerAttached", (PyCFunction)MovieCtlObj_MCSetControllerAttached, 1,
-        PyDoc_STR("(Boolean attach) -> (ComponentResult _rv)")},
-       {"MCIsControllerAttached", (PyCFunction)MovieCtlObj_MCIsControllerAttached, 1,
-        PyDoc_STR("() -> (ComponentResult _rv)")},
-       {"MCSetControllerPort", (PyCFunction)MovieCtlObj_MCSetControllerPort, 1,
-        PyDoc_STR("(CGrafPtr gp) -> (ComponentResult _rv)")},
-       {"MCGetControllerPort", (PyCFunction)MovieCtlObj_MCGetControllerPort, 1,
-        PyDoc_STR("() -> (CGrafPtr _rv)")},
-       {"MCSetVisible", (PyCFunction)MovieCtlObj_MCSetVisible, 1,
-        PyDoc_STR("(Boolean visible) -> (ComponentResult _rv)")},
-       {"MCGetVisible", (PyCFunction)MovieCtlObj_MCGetVisible, 1,
-        PyDoc_STR("() -> (ComponentResult _rv)")},
-       {"MCGetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRect, 1,
-        PyDoc_STR("() -> (ComponentResult _rv, Rect bounds)")},
-       {"MCSetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCSetControllerBoundsRect, 1,
-        PyDoc_STR("(Rect bounds) -> (ComponentResult _rv)")},
-       {"MCGetControllerBoundsRgn", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"MCGetWindowRgn", (PyCFunction)MovieCtlObj_MCGetWindowRgn, 1,
-        PyDoc_STR("(WindowPtr w) -> (RgnHandle _rv)")},
-       {"MCMovieChanged", (PyCFunction)MovieCtlObj_MCMovieChanged, 1,
-        PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
-       {"MCSetDuration", (PyCFunction)MovieCtlObj_MCSetDuration, 1,
-        PyDoc_STR("(TimeValue duration) -> (ComponentResult _rv)")},
-       {"MCGetCurrentTime", (PyCFunction)MovieCtlObj_MCGetCurrentTime, 1,
-        PyDoc_STR("() -> (TimeValue _rv, TimeScale scale)")},
-       {"MCNewAttachedController", (PyCFunction)MovieCtlObj_MCNewAttachedController, 1,
-        PyDoc_STR("(Movie theMovie, WindowPtr w, Point where) -> (ComponentResult _rv)")},
-       {"MCDraw", (PyCFunction)MovieCtlObj_MCDraw, 1,
-        PyDoc_STR("(WindowPtr w) -> (ComponentResult _rv)")},
-       {"MCActivate", (PyCFunction)MovieCtlObj_MCActivate, 1,
-        PyDoc_STR("(WindowPtr w, Boolean activate) -> (ComponentResult _rv)")},
-       {"MCIdle", (PyCFunction)MovieCtlObj_MCIdle, 1,
-        PyDoc_STR("() -> (ComponentResult _rv)")},
-       {"MCKey", (PyCFunction)MovieCtlObj_MCKey, 1,
-        PyDoc_STR("(SInt8 key, long modifiers) -> (ComponentResult _rv)")},
-       {"MCClick", (PyCFunction)MovieCtlObj_MCClick, 1,
-        PyDoc_STR("(WindowPtr w, Point where, long when, long modifiers) -> (ComponentResult _rv)")},
-       {"MCEnableEditing", (PyCFunction)MovieCtlObj_MCEnableEditing, 1,
-        PyDoc_STR("(Boolean enabled) -> (ComponentResult _rv)")},
-       {"MCIsEditingEnabled", (PyCFunction)MovieCtlObj_MCIsEditingEnabled, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"MCCopy", (PyCFunction)MovieCtlObj_MCCopy, 1,
-        PyDoc_STR("() -> (Movie _rv)")},
-       {"MCCut", (PyCFunction)MovieCtlObj_MCCut, 1,
-        PyDoc_STR("() -> (Movie _rv)")},
-       {"MCPaste", (PyCFunction)MovieCtlObj_MCPaste, 1,
-        PyDoc_STR("(Movie srcMovie) -> (ComponentResult _rv)")},
-       {"MCClear", (PyCFunction)MovieCtlObj_MCClear, 1,
-        PyDoc_STR("() -> (ComponentResult _rv)")},
-       {"MCUndo", (PyCFunction)MovieCtlObj_MCUndo, 1,
-        PyDoc_STR("() -> (ComponentResult _rv)")},
-       {"MCPositionController", (PyCFunction)MovieCtlObj_MCPositionController, 1,
-        PyDoc_STR("(Rect movieRect, Rect controllerRect, long someFlags) -> (ComponentResult _rv)")},
-       {"MCGetControllerInfo", (PyCFunction)MovieCtlObj_MCGetControllerInfo, 1,
-        PyDoc_STR("() -> (ComponentResult _rv, long someFlags)")},
-       {"MCSetClip", (PyCFunction)MovieCtlObj_MCSetClip, 1,
-        PyDoc_STR("(RgnHandle theClip, RgnHandle movieClip) -> (ComponentResult _rv)")},
-       {"MCGetClip", (PyCFunction)MovieCtlObj_MCGetClip, 1,
-        PyDoc_STR("() -> (ComponentResult _rv, RgnHandle theClip, RgnHandle movieClip)")},
-       {"MCDrawBadge", (PyCFunction)MovieCtlObj_MCDrawBadge, 1,
-        PyDoc_STR("(RgnHandle movieRgn) -> (ComponentResult _rv, RgnHandle badgeRgn)")},
-       {"MCSetUpEditMenu", (PyCFunction)MovieCtlObj_MCSetUpEditMenu, 1,
-        PyDoc_STR("(long modifiers, MenuHandle mh) -> (ComponentResult _rv)")},
-       {"MCGetMenuString", (PyCFunction)MovieCtlObj_MCGetMenuString, 1,
-        PyDoc_STR("(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)")},
-       {"MCPtInController", (PyCFunction)MovieCtlObj_MCPtInController, 1,
-        PyDoc_STR("(Point thePt) -> (ComponentResult _rv, Boolean inController)")},
-       {"MCInvalidate", (PyCFunction)MovieCtlObj_MCInvalidate, 1,
-        PyDoc_STR("(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)")},
-       {"MCAdjustCursor", (PyCFunction)MovieCtlObj_MCAdjustCursor, 1,
-        PyDoc_STR("(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)")},
-       {"MCGetInterfaceElement", (PyCFunction)MovieCtlObj_MCGetInterfaceElement, 1,
-        PyDoc_STR("(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)")},
-       {"MCAddMovieSegment", (PyCFunction)MovieCtlObj_MCAddMovieSegment, 1,
-        PyDoc_STR("(Movie srcMovie, Boolean scaled) -> (ComponentResult _rv)")},
-       {"MCTrimMovieSegment", (PyCFunction)MovieCtlObj_MCTrimMovieSegment, 1,
-        PyDoc_STR("() -> (ComponentResult _rv)")},
-       {"MCSetIdleManager", (PyCFunction)MovieCtlObj_MCSetIdleManager, 1,
-        PyDoc_STR("(IdleManager im) -> (ComponentResult _rv)")},
-       {"MCSetControllerCapabilities", (PyCFunction)MovieCtlObj_MCSetControllerCapabilities, 1,
-        PyDoc_STR("(long flags, long flagsMask) -> (ComponentResult _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define MovieCtlObj_getsetlist NULL
-
-
-#define MovieCtlObj_compare NULL
-
-#define MovieCtlObj_repr NULL
-
-#define MovieCtlObj_hash NULL
-#define MovieCtlObj_tp_init 0
-
-#define MovieCtlObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *MovieCtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       MovieController itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MovieCtlObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((MovieControllerObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define MovieCtlObj_tp_free PyObject_Del
-
-
-PyTypeObject MovieController_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qt.MovieController", /*tp_name*/
-       sizeof(MovieControllerObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) MovieCtlObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) MovieCtlObj_compare, /*tp_compare*/
-       (reprfunc) MovieCtlObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) MovieCtlObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       MovieCtlObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       MovieCtlObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       MovieCtlObj_tp_init, /* tp_init */
-       MovieCtlObj_tp_alloc, /* tp_alloc */
-       MovieCtlObj_tp_new, /* tp_new */
-       MovieCtlObj_tp_free, /* tp_free */
-};
-
-/* ---------------- End object type MovieController ----------------- */
-
-
-/* ---------------------- Object type TimeBase ---------------------- */
-
-PyTypeObject TimeBase_Type;
-
-#define TimeBaseObj_Check(x) (Py_TYPE(x) == &TimeBase_Type || PyObject_TypeCheck((x), &TimeBase_Type))
-
-typedef struct TimeBaseObject {
-       PyObject_HEAD
-       TimeBase ob_itself;
-} TimeBaseObject;
-
-PyObject *TimeBaseObj_New(TimeBase itself)
-{
-       TimeBaseObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Qt_Error,"Cannot create TimeBase from NULL pointer");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(TimeBaseObject, &TimeBase_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int TimeBaseObj_Convert(PyObject *v, TimeBase *p_itself)
-{
-       if (v == Py_None)
-       {
-               *p_itself = NULL;
-               return 1;
-       }
-       if (!TimeBaseObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "TimeBase required");
-               return 0;
-       }
-       *p_itself = ((TimeBaseObject *)v)->ob_itself;
-       return 1;
-}
-
-static void TimeBaseObj_dealloc(TimeBaseObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *TimeBaseObj_DisposeTimeBase(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DisposeTimeBase
-       PyMac_PRECHECK(DisposeTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DisposeTimeBase(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_GetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-       TimeScale s;
-       TimeRecord tr;
-#ifndef GetTimeBaseTime
-       PyMac_PRECHECK(GetTimeBaseTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &s))
-               return NULL;
-       _rv = GetTimeBaseTime(_self->ob_itself,
-                             s,
-                             &tr);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QtTimeRecord_New, &tr);
-       return _res;
-}
-
-static PyObject *TimeBaseObj_SetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeRecord tr;
-#ifndef SetTimeBaseTime
-       PyMac_PRECHECK(SetTimeBaseTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QtTimeRecord_Convert, &tr))
-               return NULL;
-       SetTimeBaseTime(_self->ob_itself,
-                       &tr);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_SetTimeBaseValue(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue t;
-       TimeScale s;
-#ifndef SetTimeBaseValue
-       PyMac_PRECHECK(SetTimeBaseValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &t,
-                             &s))
-               return NULL;
-       SetTimeBaseValue(_self->ob_itself,
-                        t,
-                        s);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_GetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-#ifndef GetTimeBaseRate
-       PyMac_PRECHECK(GetTimeBaseRate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTimeBaseRate(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *TimeBaseObj_SetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed r;
-#ifndef SetTimeBaseRate
-       PyMac_PRECHECK(SetTimeBaseRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFixed, &r))
-               return NULL;
-       SetTimeBaseRate(_self->ob_itself,
-                       r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_GetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-       TimeScale s;
-       TimeRecord tr;
-#ifndef GetTimeBaseStartTime
-       PyMac_PRECHECK(GetTimeBaseStartTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &s))
-               return NULL;
-       _rv = GetTimeBaseStartTime(_self->ob_itself,
-                                  s,
-                                  &tr);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QtTimeRecord_New, &tr);
-       return _res;
-}
-
-static PyObject *TimeBaseObj_SetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeRecord tr;
-#ifndef SetTimeBaseStartTime
-       PyMac_PRECHECK(SetTimeBaseStartTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QtTimeRecord_Convert, &tr))
-               return NULL;
-       SetTimeBaseStartTime(_self->ob_itself,
-                            &tr);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_GetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-       TimeScale s;
-       TimeRecord tr;
-#ifndef GetTimeBaseStopTime
-       PyMac_PRECHECK(GetTimeBaseStopTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &s))
-               return NULL;
-       _rv = GetTimeBaseStopTime(_self->ob_itself,
-                                 s,
-                                 &tr);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QtTimeRecord_New, &tr);
-       return _res;
-}
-
-static PyObject *TimeBaseObj_SetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeRecord tr;
-#ifndef SetTimeBaseStopTime
-       PyMac_PRECHECK(SetTimeBaseStopTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QtTimeRecord_Convert, &tr))
-               return NULL;
-       SetTimeBaseStopTime(_self->ob_itself,
-                           &tr);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_GetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetTimeBaseFlags
-       PyMac_PRECHECK(GetTimeBaseFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTimeBaseFlags(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TimeBaseObj_SetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long timeBaseFlags;
-#ifndef SetTimeBaseFlags
-       PyMac_PRECHECK(SetTimeBaseFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &timeBaseFlags))
-               return NULL;
-       SetTimeBaseFlags(_self->ob_itself,
-                        timeBaseFlags);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_SetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeBase master;
-       TimeRecord slaveZero;
-#ifndef SetTimeBaseMasterTimeBase
-       PyMac_PRECHECK(SetTimeBaseMasterTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             TimeBaseObj_Convert, &master,
-                             QtTimeRecord_Convert, &slaveZero))
-               return NULL;
-       SetTimeBaseMasterTimeBase(_self->ob_itself,
-                                 master,
-                                 &slaveZero);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_GetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeBase _rv;
-#ifndef GetTimeBaseMasterTimeBase
-       PyMac_PRECHECK(GetTimeBaseMasterTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTimeBaseMasterTimeBase(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            TimeBaseObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TimeBaseObj_SetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Component clockMeister;
-       TimeRecord slaveZero;
-#ifndef SetTimeBaseMasterClock
-       PyMac_PRECHECK(SetTimeBaseMasterClock);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &clockMeister,
-                             QtTimeRecord_Convert, &slaveZero))
-               return NULL;
-       SetTimeBaseMasterClock(_self->ob_itself,
-                              clockMeister,
-                              &slaveZero);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_GetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentInstance _rv;
-#ifndef GetTimeBaseMasterClock
-       PyMac_PRECHECK(GetTimeBaseMasterClock);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTimeBaseMasterClock(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TimeBaseObj_GetTimeBaseStatus(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       TimeRecord unpinnedTime;
-#ifndef GetTimeBaseStatus
-       PyMac_PRECHECK(GetTimeBaseStatus);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTimeBaseStatus(_self->ob_itself,
-                               &unpinnedTime);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QtTimeRecord_New, &unpinnedTime);
-       return _res;
-}
-
-static PyObject *TimeBaseObj_SetTimeBaseZero(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeRecord zero;
-#ifndef SetTimeBaseZero
-       PyMac_PRECHECK(SetTimeBaseZero);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QtTimeRecord_Convert, &zero))
-               return NULL;
-       SetTimeBaseZero(_self->ob_itself,
-                       &zero);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TimeBaseObj_GetTimeBaseEffectiveRate(TimeBaseObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-#ifndef GetTimeBaseEffectiveRate
-       PyMac_PRECHECK(GetTimeBaseEffectiveRate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTimeBaseEffectiveRate(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyMethodDef TimeBaseObj_methods[] = {
-       {"DisposeTimeBase", (PyCFunction)TimeBaseObj_DisposeTimeBase, 1,
-        PyDoc_STR("() -> None")},
-       {"GetTimeBaseTime", (PyCFunction)TimeBaseObj_GetTimeBaseTime, 1,
-        PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
-       {"SetTimeBaseTime", (PyCFunction)TimeBaseObj_SetTimeBaseTime, 1,
-        PyDoc_STR("(TimeRecord tr) -> None")},
-       {"SetTimeBaseValue", (PyCFunction)TimeBaseObj_SetTimeBaseValue, 1,
-        PyDoc_STR("(TimeValue t, TimeScale s) -> None")},
-       {"GetTimeBaseRate", (PyCFunction)TimeBaseObj_GetTimeBaseRate, 1,
-        PyDoc_STR("() -> (Fixed _rv)")},
-       {"SetTimeBaseRate", (PyCFunction)TimeBaseObj_SetTimeBaseRate, 1,
-        PyDoc_STR("(Fixed r) -> None")},
-       {"GetTimeBaseStartTime", (PyCFunction)TimeBaseObj_GetTimeBaseStartTime, 1,
-        PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
-       {"SetTimeBaseStartTime", (PyCFunction)TimeBaseObj_SetTimeBaseStartTime, 1,
-        PyDoc_STR("(TimeRecord tr) -> None")},
-       {"GetTimeBaseStopTime", (PyCFunction)TimeBaseObj_GetTimeBaseStopTime, 1,
-        PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
-       {"SetTimeBaseStopTime", (PyCFunction)TimeBaseObj_SetTimeBaseStopTime, 1,
-        PyDoc_STR("(TimeRecord tr) -> None")},
-       {"GetTimeBaseFlags", (PyCFunction)TimeBaseObj_GetTimeBaseFlags, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"SetTimeBaseFlags", (PyCFunction)TimeBaseObj_SetTimeBaseFlags, 1,
-        PyDoc_STR("(long timeBaseFlags) -> None")},
-       {"SetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_SetTimeBaseMasterTimeBase, 1,
-        PyDoc_STR("(TimeBase master, TimeRecord slaveZero) -> None")},
-       {"GetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_GetTimeBaseMasterTimeBase, 1,
-        PyDoc_STR("() -> (TimeBase _rv)")},
-       {"SetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_SetTimeBaseMasterClock, 1,
-        PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
-       {"GetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_GetTimeBaseMasterClock, 1,
-        PyDoc_STR("() -> (ComponentInstance _rv)")},
-       {"GetTimeBaseStatus", (PyCFunction)TimeBaseObj_GetTimeBaseStatus, 1,
-        PyDoc_STR("() -> (long _rv, TimeRecord unpinnedTime)")},
-       {"SetTimeBaseZero", (PyCFunction)TimeBaseObj_SetTimeBaseZero, 1,
-        PyDoc_STR("(TimeRecord zero) -> None")},
-       {"GetTimeBaseEffectiveRate", (PyCFunction)TimeBaseObj_GetTimeBaseEffectiveRate, 1,
-        PyDoc_STR("() -> (Fixed _rv)")},
-       {NULL, NULL, 0}
-};
-
-#define TimeBaseObj_getsetlist NULL
-
-
-#define TimeBaseObj_compare NULL
-
-#define TimeBaseObj_repr NULL
-
-#define TimeBaseObj_hash NULL
-#define TimeBaseObj_tp_init 0
-
-#define TimeBaseObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *TimeBaseObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       TimeBase itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TimeBaseObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((TimeBaseObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define TimeBaseObj_tp_free PyObject_Del
-
-
-PyTypeObject TimeBase_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qt.TimeBase", /*tp_name*/
-       sizeof(TimeBaseObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) TimeBaseObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) TimeBaseObj_compare, /*tp_compare*/
-       (reprfunc) TimeBaseObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) TimeBaseObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       TimeBaseObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       TimeBaseObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       TimeBaseObj_tp_init, /* tp_init */
-       TimeBaseObj_tp_alloc, /* tp_alloc */
-       TimeBaseObj_tp_new, /* tp_new */
-       TimeBaseObj_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type TimeBase -------------------- */
-
-
-/* ---------------------- Object type UserData ---------------------- */
-
-PyTypeObject UserData_Type;
-
-#define UserDataObj_Check(x) (Py_TYPE(x) == &UserData_Type || PyObject_TypeCheck((x), &UserData_Type))
-
-typedef struct UserDataObject {
-       PyObject_HEAD
-       UserData ob_itself;
-} UserDataObject;
-
-PyObject *UserDataObj_New(UserData itself)
-{
-       UserDataObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Qt_Error,"Cannot create UserData from NULL pointer");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(UserDataObject, &UserData_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int UserDataObj_Convert(PyObject *v, UserData *p_itself)
-{
-       if (v == Py_None)
-       {
-               *p_itself = NULL;
-               return 1;
-       }
-       if (!UserDataObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "UserData required");
-               return 0;
-       }
-       *p_itself = ((UserDataObject *)v)->ob_itself;
-       return 1;
-}
-
-static void UserDataObj_dealloc(UserDataObject *self)
-{
-       if (self->ob_itself) DisposeUserData(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *UserDataObj_GetUserData(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle data;
-       OSType udType;
-       long index;
-#ifndef GetUserData
-       PyMac_PRECHECK(GetUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             ResObj_Convert, &data,
-                             PyMac_GetOSType, &udType,
-                             &index))
-               return NULL;
-       _err = GetUserData(_self->ob_itself,
-                          data,
-                          udType,
-                          index);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *UserDataObj_AddUserData(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle data;
-       OSType udType;
-#ifndef AddUserData
-       PyMac_PRECHECK(AddUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &data,
-                             PyMac_GetOSType, &udType))
-               return NULL;
-       _err = AddUserData(_self->ob_itself,
-                          data,
-                          udType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *UserDataObj_RemoveUserData(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType udType;
-       long index;
-#ifndef RemoveUserData
-       PyMac_PRECHECK(RemoveUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetOSType, &udType,
-                             &index))
-               return NULL;
-       _err = RemoveUserData(_self->ob_itself,
-                             udType,
-                             index);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *UserDataObj_CountUserDataType(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       OSType udType;
-#ifndef CountUserDataType
-       PyMac_PRECHECK(CountUserDataType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &udType))
-               return NULL;
-       _rv = CountUserDataType(_self->ob_itself,
-                               udType);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *UserDataObj_GetNextUserDataType(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       OSType udType;
-#ifndef GetNextUserDataType
-       PyMac_PRECHECK(GetNextUserDataType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &udType))
-               return NULL;
-       _rv = GetNextUserDataType(_self->ob_itself,
-                                 udType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *UserDataObj_AddUserDataText(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle data;
-       OSType udType;
-       long index;
-       short itlRegionTag;
-#ifndef AddUserDataText
-       PyMac_PRECHECK(AddUserDataText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lh",
-                             ResObj_Convert, &data,
-                             PyMac_GetOSType, &udType,
-                             &index,
-                             &itlRegionTag))
-               return NULL;
-       _err = AddUserDataText(_self->ob_itself,
-                              data,
-                              udType,
-                              index,
-                              itlRegionTag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *UserDataObj_GetUserDataText(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle data;
-       OSType udType;
-       long index;
-       short itlRegionTag;
-#ifndef GetUserDataText
-       PyMac_PRECHECK(GetUserDataText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lh",
-                             ResObj_Convert, &data,
-                             PyMac_GetOSType, &udType,
-                             &index,
-                             &itlRegionTag))
-               return NULL;
-       _err = GetUserDataText(_self->ob_itself,
-                              data,
-                              udType,
-                              index,
-                              itlRegionTag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *UserDataObj_RemoveUserDataText(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType udType;
-       long index;
-       short itlRegionTag;
-#ifndef RemoveUserDataText
-       PyMac_PRECHECK(RemoveUserDataText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lh",
-                             PyMac_GetOSType, &udType,
-                             &index,
-                             &itlRegionTag))
-               return NULL;
-       _err = RemoveUserDataText(_self->ob_itself,
-                                 udType,
-                                 index,
-                                 itlRegionTag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *UserDataObj_PutUserDataIntoHandle(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle h;
-#ifndef PutUserDataIntoHandle
-       PyMac_PRECHECK(PutUserDataIntoHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &h))
-               return NULL;
-       _err = PutUserDataIntoHandle(_self->ob_itself,
-                                    h);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *UserDataObj_CopyUserData(UserDataObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UserData dstUserData;
-       OSType copyRule;
-#ifndef CopyUserData
-       PyMac_PRECHECK(CopyUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             UserDataObj_Convert, &dstUserData,
-                             PyMac_GetOSType, &copyRule))
-               return NULL;
-       _err = CopyUserData(_self->ob_itself,
-                           dstUserData,
-                           copyRule);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef UserDataObj_methods[] = {
-       {"GetUserData", (PyCFunction)UserDataObj_GetUserData, 1,
-        PyDoc_STR("(Handle data, OSType udType, long index) -> None")},
-       {"AddUserData", (PyCFunction)UserDataObj_AddUserData, 1,
-        PyDoc_STR("(Handle data, OSType udType) -> None")},
-       {"RemoveUserData", (PyCFunction)UserDataObj_RemoveUserData, 1,
-        PyDoc_STR("(OSType udType, long index) -> None")},
-       {"CountUserDataType", (PyCFunction)UserDataObj_CountUserDataType, 1,
-        PyDoc_STR("(OSType udType) -> (short _rv)")},
-       {"GetNextUserDataType", (PyCFunction)UserDataObj_GetNextUserDataType, 1,
-        PyDoc_STR("(OSType udType) -> (long _rv)")},
-       {"AddUserDataText", (PyCFunction)UserDataObj_AddUserDataText, 1,
-        PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
-       {"GetUserDataText", (PyCFunction)UserDataObj_GetUserDataText, 1,
-        PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
-       {"RemoveUserDataText", (PyCFunction)UserDataObj_RemoveUserDataText, 1,
-        PyDoc_STR("(OSType udType, long index, short itlRegionTag) -> None")},
-       {"PutUserDataIntoHandle", (PyCFunction)UserDataObj_PutUserDataIntoHandle, 1,
-        PyDoc_STR("(Handle h) -> None")},
-       {"CopyUserData", (PyCFunction)UserDataObj_CopyUserData, 1,
-        PyDoc_STR("(UserData dstUserData, OSType copyRule) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define UserDataObj_getsetlist NULL
-
-
-#define UserDataObj_compare NULL
-
-#define UserDataObj_repr NULL
-
-#define UserDataObj_hash NULL
-#define UserDataObj_tp_init 0
-
-#define UserDataObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *UserDataObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       UserData itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, UserDataObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((UserDataObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define UserDataObj_tp_free PyObject_Del
-
-
-PyTypeObject UserData_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qt.UserData", /*tp_name*/
-       sizeof(UserDataObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) UserDataObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) UserDataObj_compare, /*tp_compare*/
-       (reprfunc) UserDataObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) UserDataObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       UserDataObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       UserDataObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       UserDataObj_tp_init, /* tp_init */
-       UserDataObj_tp_alloc, /* tp_alloc */
-       UserDataObj_tp_new, /* tp_new */
-       UserDataObj_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type UserData -------------------- */
-
-
-/* ----------------------- Object type Media ------------------------ */
-
-PyTypeObject Media_Type;
-
-#define MediaObj_Check(x) (Py_TYPE(x) == &Media_Type || PyObject_TypeCheck((x), &Media_Type))
-
-typedef struct MediaObject {
-       PyObject_HEAD
-       Media ob_itself;
-} MediaObject;
-
-PyObject *MediaObj_New(Media itself)
-{
-       MediaObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Qt_Error,"Cannot create Media from NULL pointer");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(MediaObject, &Media_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int MediaObj_Convert(PyObject *v, Media *p_itself)
-{
-       if (v == Py_None)
-       {
-               *p_itself = NULL;
-               return 1;
-       }
-       if (!MediaObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Media required");
-               return 0;
-       }
-       *p_itself = ((MediaObject *)v)->ob_itself;
-       return 1;
-}
-
-static void MediaObj_dealloc(MediaObject *self)
-{
-       if (self->ob_itself) DisposeTrackMedia(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *MediaObj_LoadMediaIntoRam(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue time;
-       TimeValue duration;
-       long flags;
-#ifndef LoadMediaIntoRam
-       PyMac_PRECHECK(LoadMediaIntoRam);
-#endif
-       if (!PyArg_ParseTuple(_args, "lll",
-                             &time,
-                             &duration,
-                             &flags))
-               return NULL;
-       _err = LoadMediaIntoRam(_self->ob_itself,
-                               time,
-                               duration,
-                               flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaTrack(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track _rv;
-#ifndef GetMediaTrack
-       PyMac_PRECHECK(GetMediaTrack);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaTrack(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaCreationTime(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       unsigned long _rv;
-#ifndef GetMediaCreationTime
-       PyMac_PRECHECK(GetMediaCreationTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaCreationTime(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaModificationTime(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       unsigned long _rv;
-#ifndef GetMediaModificationTime
-       PyMac_PRECHECK(GetMediaModificationTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaModificationTime(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaTimeScale(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeScale _rv;
-#ifndef GetMediaTimeScale
-       PyMac_PRECHECK(GetMediaTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaTimeScale(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaTimeScale(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeScale timeScale;
-#ifndef SetMediaTimeScale
-       PyMac_PRECHECK(SetMediaTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &timeScale))
-               return NULL;
-       SetMediaTimeScale(_self->ob_itself,
-                         timeScale);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaDuration(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-#ifndef GetMediaDuration
-       PyMac_PRECHECK(GetMediaDuration);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaDuration(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaLanguage(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetMediaLanguage
-       PyMac_PRECHECK(GetMediaLanguage);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaLanguage(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaLanguage(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short language;
-#ifndef SetMediaLanguage
-       PyMac_PRECHECK(SetMediaLanguage);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &language))
-               return NULL;
-       SetMediaLanguage(_self->ob_itself,
-                        language);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaQuality(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetMediaQuality
-       PyMac_PRECHECK(GetMediaQuality);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaQuality(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaQuality(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short quality;
-#ifndef SetMediaQuality
-       PyMac_PRECHECK(SetMediaQuality);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &quality))
-               return NULL;
-       SetMediaQuality(_self->ob_itself,
-                       quality);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaHandlerDescription(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSType mediaType;
-       Str255 creatorName;
-       OSType creatorManufacturer;
-#ifndef GetMediaHandlerDescription
-       PyMac_PRECHECK(GetMediaHandlerDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, creatorName))
-               return NULL;
-       GetMediaHandlerDescription(_self->ob_itself,
-                                  &mediaType,
-                                  creatorName,
-                                  &creatorManufacturer);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildOSType, mediaType,
-                            PyMac_BuildOSType, creatorManufacturer);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaUserData(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UserData _rv;
-#ifndef GetMediaUserData
-       PyMac_PRECHECK(GetMediaUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaUserData(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            UserDataObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaHandler(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MediaHandler _rv;
-#ifndef GetMediaHandler
-       PyMac_PRECHECK(GetMediaHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaHandler(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaHandler(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       MediaHandlerComponent mH;
-#ifndef SetMediaHandler
-       PyMac_PRECHECK(SetMediaHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &mH))
-               return NULL;
-       _err = SetMediaHandler(_self->ob_itself,
-                              mH);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_BeginMediaEdits(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef BeginMediaEdits
-       PyMac_PRECHECK(BeginMediaEdits);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = BeginMediaEdits(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_EndMediaEdits(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef EndMediaEdits
-       PyMac_PRECHECK(EndMediaEdits);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = EndMediaEdits(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaDefaultDataRefIndex(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short index;
-#ifndef SetMediaDefaultDataRefIndex
-       PyMac_PRECHECK(SetMediaDefaultDataRefIndex);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &index))
-               return NULL;
-       _err = SetMediaDefaultDataRefIndex(_self->ob_itself,
-                                          index);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaDataHandlerDescription(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short index;
-       OSType dhType;
-       Str255 creatorName;
-       OSType creatorManufacturer;
-#ifndef GetMediaDataHandlerDescription
-       PyMac_PRECHECK(GetMediaDataHandlerDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &index,
-                             PyMac_GetStr255, creatorName))
-               return NULL;
-       GetMediaDataHandlerDescription(_self->ob_itself,
-                                      index,
-                                      &dhType,
-                                      creatorName,
-                                      &creatorManufacturer);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildOSType, dhType,
-                            PyMac_BuildOSType, creatorManufacturer);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaDataHandler(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       DataHandler _rv;
-       short index;
-#ifndef GetMediaDataHandler
-       PyMac_PRECHECK(GetMediaDataHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &index))
-               return NULL;
-       _rv = GetMediaDataHandler(_self->ob_itself,
-                                 index);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaDataHandler(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short index;
-       DataHandlerComponent dataHandler;
-#ifndef SetMediaDataHandler
-       PyMac_PRECHECK(SetMediaDataHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &index,
-                             CmpObj_Convert, &dataHandler))
-               return NULL;
-       _err = SetMediaDataHandler(_self->ob_itself,
-                                  index,
-                                  dataHandler);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaSampleDescriptionCount(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetMediaSampleDescriptionCount
-       PyMac_PRECHECK(GetMediaSampleDescriptionCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaSampleDescriptionCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaSampleDescription(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long index;
-       SampleDescriptionHandle descH;
-#ifndef GetMediaSampleDescription
-       PyMac_PRECHECK(GetMediaSampleDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &index,
-                             ResObj_Convert, &descH))
-               return NULL;
-       GetMediaSampleDescription(_self->ob_itself,
-                                 index,
-                                 descH);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaSampleDescription(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long index;
-       SampleDescriptionHandle descH;
-#ifndef SetMediaSampleDescription
-       PyMac_PRECHECK(SetMediaSampleDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &index,
-                             ResObj_Convert, &descH))
-               return NULL;
-       _err = SetMediaSampleDescription(_self->ob_itself,
-                                        index,
-                                        descH);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaSampleCount(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetMediaSampleCount
-       PyMac_PRECHECK(GetMediaSampleCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaSampleCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaSyncSampleCount(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetMediaSyncSampleCount
-       PyMac_PRECHECK(GetMediaSyncSampleCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMediaSyncSampleCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_SampleNumToMediaTime(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long logicalSampleNum;
-       TimeValue sampleTime;
-       TimeValue sampleDuration;
-#ifndef SampleNumToMediaTime
-       PyMac_PRECHECK(SampleNumToMediaTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &logicalSampleNum))
-               return NULL;
-       SampleNumToMediaTime(_self->ob_itself,
-                            logicalSampleNum,
-                            &sampleTime,
-                            &sampleDuration);
-       _res = Py_BuildValue("ll",
-                            sampleTime,
-                            sampleDuration);
-       return _res;
-}
-
-static PyObject *MediaObj_MediaTimeToSampleNum(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue time;
-       long sampleNum;
-       TimeValue sampleTime;
-       TimeValue sampleDuration;
-#ifndef MediaTimeToSampleNum
-       PyMac_PRECHECK(MediaTimeToSampleNum);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &time))
-               return NULL;
-       MediaTimeToSampleNum(_self->ob_itself,
-                            time,
-                            &sampleNum,
-                            &sampleTime,
-                            &sampleDuration);
-       _res = Py_BuildValue("lll",
-                            sampleNum,
-                            sampleTime,
-                            sampleDuration);
-       return _res;
-}
-
-static PyObject *MediaObj_AddMediaSample(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataIn;
-       long inOffset;
-       unsigned long size;
-       TimeValue durationPerSample;
-       SampleDescriptionHandle sampleDescriptionH;
-       long numberOfSamples;
-       short sampleFlags;
-       TimeValue sampleTime;
-#ifndef AddMediaSample
-       PyMac_PRECHECK(AddMediaSample);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lllO&lh",
-                             ResObj_Convert, &dataIn,
-                             &inOffset,
-                             &size,
-                             &durationPerSample,
-                             ResObj_Convert, &sampleDescriptionH,
-                             &numberOfSamples,
-                             &sampleFlags))
-               return NULL;
-       _err = AddMediaSample(_self->ob_itself,
-                             dataIn,
-                             inOffset,
-                             size,
-                             durationPerSample,
-                             sampleDescriptionH,
-                             numberOfSamples,
-                             sampleFlags,
-                             &sampleTime);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            sampleTime);
-       return _res;
-}
-
-static PyObject *MediaObj_AddMediaSampleReference(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long dataOffset;
-       unsigned long size;
-       TimeValue durationPerSample;
-       SampleDescriptionHandle sampleDescriptionH;
-       long numberOfSamples;
-       short sampleFlags;
-       TimeValue sampleTime;
-#ifndef AddMediaSampleReference
-       PyMac_PRECHECK(AddMediaSampleReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "lllO&lh",
-                             &dataOffset,
-                             &size,
-                             &durationPerSample,
-                             ResObj_Convert, &sampleDescriptionH,
-                             &numberOfSamples,
-                             &sampleFlags))
-               return NULL;
-       _err = AddMediaSampleReference(_self->ob_itself,
-                                      dataOffset,
-                                      size,
-                                      durationPerSample,
-                                      sampleDescriptionH,
-                                      numberOfSamples,
-                                      sampleFlags,
-                                      &sampleTime);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            sampleTime);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaSample(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataOut;
-       long maxSizeToGrow;
-       long size;
-       TimeValue time;
-       TimeValue sampleTime;
-       TimeValue durationPerSample;
-       SampleDescriptionHandle sampleDescriptionH;
-       long sampleDescriptionIndex;
-       long maxNumberOfSamples;
-       long numberOfSamples;
-       short sampleFlags;
-#ifndef GetMediaSample
-       PyMac_PRECHECK(GetMediaSample);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llO&l",
-                             ResObj_Convert, &dataOut,
-                             &maxSizeToGrow,
-                             &time,
-                             ResObj_Convert, &sampleDescriptionH,
-                             &maxNumberOfSamples))
-               return NULL;
-       _err = GetMediaSample(_self->ob_itself,
-                             dataOut,
-                             maxSizeToGrow,
-                             &size,
-                             time,
-                             &sampleTime,
-                             &durationPerSample,
-                             sampleDescriptionH,
-                             &sampleDescriptionIndex,
-                             maxNumberOfSamples,
-                             &numberOfSamples,
-                             &sampleFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("lllllh",
-                            size,
-                            sampleTime,
-                            durationPerSample,
-                            sampleDescriptionIndex,
-                            numberOfSamples,
-                            sampleFlags);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaSampleReference(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long dataOffset;
-       long size;
-       TimeValue time;
-       TimeValue sampleTime;
-       TimeValue durationPerSample;
-       SampleDescriptionHandle sampleDescriptionH;
-       long sampleDescriptionIndex;
-       long maxNumberOfSamples;
-       long numberOfSamples;
-       short sampleFlags;
-#ifndef GetMediaSampleReference
-       PyMac_PRECHECK(GetMediaSampleReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&l",
-                             &time,
-                             ResObj_Convert, &sampleDescriptionH,
-                             &maxNumberOfSamples))
-               return NULL;
-       _err = GetMediaSampleReference(_self->ob_itself,
-                                      &dataOffset,
-                                      &size,
-                                      time,
-                                      &sampleTime,
-                                      &durationPerSample,
-                                      sampleDescriptionH,
-                                      &sampleDescriptionIndex,
-                                      maxNumberOfSamples,
-                                      &numberOfSamples,
-                                      &sampleFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("llllllh",
-                            dataOffset,
-                            size,
-                            sampleTime,
-                            durationPerSample,
-                            sampleDescriptionIndex,
-                            numberOfSamples,
-                            sampleFlags);
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long maxChunkSize;
-#ifndef SetMediaPreferredChunkSize
-       PyMac_PRECHECK(SetMediaPreferredChunkSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &maxChunkSize))
-               return NULL;
-       _err = SetMediaPreferredChunkSize(_self->ob_itself,
-                                         maxChunkSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long maxChunkSize;
-#ifndef GetMediaPreferredChunkSize
-       PyMac_PRECHECK(GetMediaPreferredChunkSize);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMediaPreferredChunkSize(_self->ob_itself,
-                                         &maxChunkSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            maxChunkSize);
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaShadowSync(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long frameDiffSampleNum;
-       long syncSampleNum;
-#ifndef SetMediaShadowSync
-       PyMac_PRECHECK(SetMediaShadowSync);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &frameDiffSampleNum,
-                             &syncSampleNum))
-               return NULL;
-       _err = SetMediaShadowSync(_self->ob_itself,
-                                 frameDiffSampleNum,
-                                 syncSampleNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaShadowSync(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long frameDiffSampleNum;
-       long syncSampleNum;
-#ifndef GetMediaShadowSync
-       PyMac_PRECHECK(GetMediaShadowSync);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &frameDiffSampleNum))
-               return NULL;
-       _err = GetMediaShadowSync(_self->ob_itself,
-                                 frameDiffSampleNum,
-                                 &syncSampleNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            syncSampleNum);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaDataSize(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef GetMediaDataSize
-       PyMac_PRECHECK(GetMediaDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &startTime,
-                             &duration))
-               return NULL;
-       _rv = GetMediaDataSize(_self->ob_itself,
-                              startTime,
-                              duration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaDataSize64(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue startTime;
-       TimeValue duration;
-       wide dataSize;
-#ifndef GetMediaDataSize64
-       PyMac_PRECHECK(GetMediaDataSize64);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &startTime,
-                             &duration))
-               return NULL;
-       _err = GetMediaDataSize64(_self->ob_itself,
-                                 startTime,
-                                 duration,
-                                 &dataSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_Buildwide, dataSize);
-       return _res;
-}
-
-static PyObject *MediaObj_CopyMediaUserData(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Media dstMedia;
-       OSType copyRule;
-#ifndef CopyMediaUserData
-       PyMac_PRECHECK(CopyMediaUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             MediaObj_Convert, &dstMedia,
-                             PyMac_GetOSType, &copyRule))
-               return NULL;
-       _err = CopyMediaUserData(_self->ob_itself,
-                                dstMedia,
-                                copyRule);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaNextInterestingTime(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short interestingTimeFlags;
-       TimeValue time;
-       Fixed rate;
-       TimeValue interestingTime;
-       TimeValue interestingDuration;
-#ifndef GetMediaNextInterestingTime
-       PyMac_PRECHECK(GetMediaNextInterestingTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &interestingTimeFlags,
-                             &time,
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       GetMediaNextInterestingTime(_self->ob_itself,
-                                   interestingTimeFlags,
-                                   time,
-                                   rate,
-                                   &interestingTime,
-                                   &interestingDuration);
-       _res = Py_BuildValue("ll",
-                            interestingTime,
-                            interestingDuration);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaDataRef(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short index;
-       Handle dataRef;
-       OSType dataRefType;
-       long dataRefAttributes;
-#ifndef GetMediaDataRef
-       PyMac_PRECHECK(GetMediaDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &index))
-               return NULL;
-       _err = GetMediaDataRef(_self->ob_itself,
-                              index,
-                              &dataRef,
-                              &dataRefType,
-                              &dataRefAttributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&l",
-                            ResObj_New, dataRef,
-                            PyMac_BuildOSType, dataRefType,
-                            dataRefAttributes);
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaDataRef(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short index;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef SetMediaDataRef
-       PyMac_PRECHECK(SetMediaDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&O&",
-                             &index,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _err = SetMediaDataRef(_self->ob_itself,
-                              index,
-                              dataRef,
-                              dataRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaDataRefAttributes(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short index;
-       long dataRefAttributes;
-#ifndef SetMediaDataRefAttributes
-       PyMac_PRECHECK(SetMediaDataRefAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &index,
-                             &dataRefAttributes))
-               return NULL;
-       _err = SetMediaDataRefAttributes(_self->ob_itself,
-                                        index,
-                                        dataRefAttributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_AddMediaDataRef(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short index;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef AddMediaDataRef
-       PyMac_PRECHECK(AddMediaDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _err = AddMediaDataRef(_self->ob_itself,
-                              &index,
-                              dataRef,
-                              dataRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            index);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaDataRefCount(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short count;
-#ifndef GetMediaDataRefCount
-       PyMac_PRECHECK(GetMediaDataRefCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMediaDataRefCount(_self->ob_itself,
-                                   &count);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            count);
-       return _res;
-}
-
-static PyObject *MediaObj_SetMediaPlayHints(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long flags;
-       long flagsMask;
-#ifndef SetMediaPlayHints
-       PyMac_PRECHECK(SetMediaPlayHints);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &flags,
-                             &flagsMask))
-               return NULL;
-       SetMediaPlayHints(_self->ob_itself,
-                         flags,
-                         flagsMask);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaPlayHints(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long flags;
-#ifndef GetMediaPlayHints
-       PyMac_PRECHECK(GetMediaPlayHints);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetMediaPlayHints(_self->ob_itself,
-                         &flags);
-       _res = Py_BuildValue("l",
-                            flags);
-       return _res;
-}
-
-static PyObject *MediaObj_GetMediaNextInterestingTimeOnly(MediaObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short interestingTimeFlags;
-       TimeValue time;
-       Fixed rate;
-       TimeValue interestingTime;
-#ifndef GetMediaNextInterestingTimeOnly
-       PyMac_PRECHECK(GetMediaNextInterestingTimeOnly);
-#endif
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &interestingTimeFlags,
-                             &time,
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       GetMediaNextInterestingTimeOnly(_self->ob_itself,
-                                       interestingTimeFlags,
-                                       time,
-                                       rate,
-                                       &interestingTime);
-       _res = Py_BuildValue("l",
-                            interestingTime);
-       return _res;
-}
-
-static PyMethodDef MediaObj_methods[] = {
-       {"LoadMediaIntoRam", (PyCFunction)MediaObj_LoadMediaIntoRam, 1,
-        PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
-       {"GetMediaTrack", (PyCFunction)MediaObj_GetMediaTrack, 1,
-        PyDoc_STR("() -> (Track _rv)")},
-       {"GetMediaCreationTime", (PyCFunction)MediaObj_GetMediaCreationTime, 1,
-        PyDoc_STR("() -> (unsigned long _rv)")},
-       {"GetMediaModificationTime", (PyCFunction)MediaObj_GetMediaModificationTime, 1,
-        PyDoc_STR("() -> (unsigned long _rv)")},
-       {"GetMediaTimeScale", (PyCFunction)MediaObj_GetMediaTimeScale, 1,
-        PyDoc_STR("() -> (TimeScale _rv)")},
-       {"SetMediaTimeScale", (PyCFunction)MediaObj_SetMediaTimeScale, 1,
-        PyDoc_STR("(TimeScale timeScale) -> None")},
-       {"GetMediaDuration", (PyCFunction)MediaObj_GetMediaDuration, 1,
-        PyDoc_STR("() -> (TimeValue _rv)")},
-       {"GetMediaLanguage", (PyCFunction)MediaObj_GetMediaLanguage, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"SetMediaLanguage", (PyCFunction)MediaObj_SetMediaLanguage, 1,
-        PyDoc_STR("(short language) -> None")},
-       {"GetMediaQuality", (PyCFunction)MediaObj_GetMediaQuality, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"SetMediaQuality", (PyCFunction)MediaObj_SetMediaQuality, 1,
-        PyDoc_STR("(short quality) -> None")},
-       {"GetMediaHandlerDescription", (PyCFunction)MediaObj_GetMediaHandlerDescription, 1,
-        PyDoc_STR("(Str255 creatorName) -> (OSType mediaType, OSType creatorManufacturer)")},
-       {"GetMediaUserData", (PyCFunction)MediaObj_GetMediaUserData, 1,
-        PyDoc_STR("() -> (UserData _rv)")},
-       {"GetMediaHandler", (PyCFunction)MediaObj_GetMediaHandler, 1,
-        PyDoc_STR("() -> (MediaHandler _rv)")},
-       {"SetMediaHandler", (PyCFunction)MediaObj_SetMediaHandler, 1,
-        PyDoc_STR("(MediaHandlerComponent mH) -> None")},
-       {"BeginMediaEdits", (PyCFunction)MediaObj_BeginMediaEdits, 1,
-        PyDoc_STR("() -> None")},
-       {"EndMediaEdits", (PyCFunction)MediaObj_EndMediaEdits, 1,
-        PyDoc_STR("() -> None")},
-       {"SetMediaDefaultDataRefIndex", (PyCFunction)MediaObj_SetMediaDefaultDataRefIndex, 1,
-        PyDoc_STR("(short index) -> None")},
-       {"GetMediaDataHandlerDescription", (PyCFunction)MediaObj_GetMediaDataHandlerDescription, 1,
-        PyDoc_STR("(short index, Str255 creatorName) -> (OSType dhType, OSType creatorManufacturer)")},
-       {"GetMediaDataHandler", (PyCFunction)MediaObj_GetMediaDataHandler, 1,
-        PyDoc_STR("(short index) -> (DataHandler _rv)")},
-       {"SetMediaDataHandler", (PyCFunction)MediaObj_SetMediaDataHandler, 1,
-        PyDoc_STR("(short index, DataHandlerComponent dataHandler) -> None")},
-       {"GetMediaSampleDescriptionCount", (PyCFunction)MediaObj_GetMediaSampleDescriptionCount, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"GetMediaSampleDescription", (PyCFunction)MediaObj_GetMediaSampleDescription, 1,
-        PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
-       {"SetMediaSampleDescription", (PyCFunction)MediaObj_SetMediaSampleDescription, 1,
-        PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
-       {"GetMediaSampleCount", (PyCFunction)MediaObj_GetMediaSampleCount, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"GetMediaSyncSampleCount", (PyCFunction)MediaObj_GetMediaSyncSampleCount, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"SampleNumToMediaTime", (PyCFunction)MediaObj_SampleNumToMediaTime, 1,
-        PyDoc_STR("(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)")},
-       {"MediaTimeToSampleNum", (PyCFunction)MediaObj_MediaTimeToSampleNum, 1,
-        PyDoc_STR("(TimeValue time) -> (long sampleNum, TimeValue sampleTime, TimeValue sampleDuration)")},
-       {"AddMediaSample", (PyCFunction)MediaObj_AddMediaSample, 1,
-        PyDoc_STR("(Handle dataIn, long inOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
-       {"AddMediaSampleReference", (PyCFunction)MediaObj_AddMediaSampleReference, 1,
-        PyDoc_STR("(long dataOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
-       {"GetMediaSample", (PyCFunction)MediaObj_GetMediaSample, 1,
-        PyDoc_STR("(Handle dataOut, long maxSizeToGrow, TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
-       {"GetMediaSampleReference", (PyCFunction)MediaObj_GetMediaSampleReference, 1,
-        PyDoc_STR("(TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long dataOffset, long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
-       {"SetMediaPreferredChunkSize", (PyCFunction)MediaObj_SetMediaPreferredChunkSize, 1,
-        PyDoc_STR("(long maxChunkSize) -> None")},
-       {"GetMediaPreferredChunkSize", (PyCFunction)MediaObj_GetMediaPreferredChunkSize, 1,
-        PyDoc_STR("() -> (long maxChunkSize)")},
-       {"SetMediaShadowSync", (PyCFunction)MediaObj_SetMediaShadowSync, 1,
-        PyDoc_STR("(long frameDiffSampleNum, long syncSampleNum) -> None")},
-       {"GetMediaShadowSync", (PyCFunction)MediaObj_GetMediaShadowSync, 1,
-        PyDoc_STR("(long frameDiffSampleNum) -> (long syncSampleNum)")},
-       {"GetMediaDataSize", (PyCFunction)MediaObj_GetMediaDataSize, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
-       {"GetMediaDataSize64", (PyCFunction)MediaObj_GetMediaDataSize64, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
-       {"CopyMediaUserData", (PyCFunction)MediaObj_CopyMediaUserData, 1,
-        PyDoc_STR("(Media dstMedia, OSType copyRule) -> None")},
-       {"GetMediaNextInterestingTime", (PyCFunction)MediaObj_GetMediaNextInterestingTime, 1,
-        PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
-       {"GetMediaDataRef", (PyCFunction)MediaObj_GetMediaDataRef, 1,
-        PyDoc_STR("(short index) -> (Handle dataRef, OSType dataRefType, long dataRefAttributes)")},
-       {"SetMediaDataRef", (PyCFunction)MediaObj_SetMediaDataRef, 1,
-        PyDoc_STR("(short index, Handle dataRef, OSType dataRefType) -> None")},
-       {"SetMediaDataRefAttributes", (PyCFunction)MediaObj_SetMediaDataRefAttributes, 1,
-        PyDoc_STR("(short index, long dataRefAttributes) -> None")},
-       {"AddMediaDataRef", (PyCFunction)MediaObj_AddMediaDataRef, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType) -> (short index)")},
-       {"GetMediaDataRefCount", (PyCFunction)MediaObj_GetMediaDataRefCount, 1,
-        PyDoc_STR("() -> (short count)")},
-       {"SetMediaPlayHints", (PyCFunction)MediaObj_SetMediaPlayHints, 1,
-        PyDoc_STR("(long flags, long flagsMask) -> None")},
-       {"GetMediaPlayHints", (PyCFunction)MediaObj_GetMediaPlayHints, 1,
-        PyDoc_STR("() -> (long flags)")},
-       {"GetMediaNextInterestingTimeOnly", (PyCFunction)MediaObj_GetMediaNextInterestingTimeOnly, 1,
-        PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime)")},
-       {NULL, NULL, 0}
-};
-
-#define MediaObj_getsetlist NULL
-
-
-#define MediaObj_compare NULL
-
-#define MediaObj_repr NULL
-
-#define MediaObj_hash NULL
-#define MediaObj_tp_init 0
-
-#define MediaObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *MediaObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       Media itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MediaObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((MediaObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define MediaObj_tp_free PyObject_Del
-
-
-PyTypeObject Media_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qt.Media", /*tp_name*/
-       sizeof(MediaObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) MediaObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) MediaObj_compare, /*tp_compare*/
-       (reprfunc) MediaObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) MediaObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       MediaObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       MediaObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       MediaObj_tp_init, /* tp_init */
-       MediaObj_tp_alloc, /* tp_alloc */
-       MediaObj_tp_new, /* tp_new */
-       MediaObj_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type Media ---------------------- */
-
-
-/* ----------------------- Object type Track ------------------------ */
-
-PyTypeObject Track_Type;
-
-#define TrackObj_Check(x) (Py_TYPE(x) == &Track_Type || PyObject_TypeCheck((x), &Track_Type))
-
-typedef struct TrackObject {
-       PyObject_HEAD
-       Track ob_itself;
-} TrackObject;
-
-PyObject *TrackObj_New(Track itself)
-{
-       TrackObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Qt_Error,"Cannot create Track from NULL pointer");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(TrackObject, &Track_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int TrackObj_Convert(PyObject *v, Track *p_itself)
-{
-       if (v == Py_None)
-       {
-               *p_itself = NULL;
-               return 1;
-       }
-       if (!TrackObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Track required");
-               return 0;
-       }
-       *p_itself = ((TrackObject *)v)->ob_itself;
-       return 1;
-}
-
-static void TrackObj_dealloc(TrackObject *self)
-{
-       if (self->ob_itself) DisposeMovieTrack(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *TrackObj_LoadTrackIntoRam(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue time;
-       TimeValue duration;
-       long flags;
-#ifndef LoadTrackIntoRam
-       PyMac_PRECHECK(LoadTrackIntoRam);
-#endif
-       if (!PyArg_ParseTuple(_args, "lll",
-                             &time,
-                             &duration,
-                             &flags))
-               return NULL;
-       _err = LoadTrackIntoRam(_self->ob_itself,
-                               time,
-                               duration,
-                               flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackPict(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PicHandle _rv;
-       TimeValue time;
-#ifndef GetTrackPict
-       PyMac_PRECHECK(GetTrackPict);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &time))
-               return NULL;
-       _rv = GetTrackPict(_self->ob_itself,
-                          time);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackClipRgn(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef GetTrackClipRgn
-       PyMac_PRECHECK(GetTrackClipRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackClipRgn(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackClipRgn(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle theClip;
-#ifndef SetTrackClipRgn
-       PyMac_PRECHECK(SetTrackClipRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theClip))
-               return NULL;
-       SetTrackClipRgn(_self->ob_itself,
-                       theClip);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackDisplayBoundsRgn(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef GetTrackDisplayBoundsRgn
-       PyMac_PRECHECK(GetTrackDisplayBoundsRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackDisplayBoundsRgn(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackMovieBoundsRgn(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef GetTrackMovieBoundsRgn
-       PyMac_PRECHECK(GetTrackMovieBoundsRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackMovieBoundsRgn(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackBoundsRgn(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef GetTrackBoundsRgn
-       PyMac_PRECHECK(GetTrackBoundsRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackBoundsRgn(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackMatte(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle _rv;
-#ifndef GetTrackMatte
-       PyMac_PRECHECK(GetTrackMatte);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackMatte(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackMatte(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle theMatte;
-#ifndef SetTrackMatte
-       PyMac_PRECHECK(SetTrackMatte);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theMatte))
-               return NULL;
-       SetTrackMatte(_self->ob_itself,
-                     theMatte);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackID(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetTrackID
-       PyMac_PRECHECK(GetTrackID);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackID(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackMovie(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-#ifndef GetTrackMovie
-       PyMac_PRECHECK(GetTrackMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackMovie(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackCreationTime(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       unsigned long _rv;
-#ifndef GetTrackCreationTime
-       PyMac_PRECHECK(GetTrackCreationTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackCreationTime(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackModificationTime(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       unsigned long _rv;
-#ifndef GetTrackModificationTime
-       PyMac_PRECHECK(GetTrackModificationTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackModificationTime(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackEnabled(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef GetTrackEnabled
-       PyMac_PRECHECK(GetTrackEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackEnabled(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackEnabled(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean isEnabled;
-#ifndef SetTrackEnabled
-       PyMac_PRECHECK(SetTrackEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &isEnabled))
-               return NULL;
-       SetTrackEnabled(_self->ob_itself,
-                       isEnabled);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackUsage(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetTrackUsage
-       PyMac_PRECHECK(GetTrackUsage);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackUsage(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackUsage(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long usage;
-#ifndef SetTrackUsage
-       PyMac_PRECHECK(SetTrackUsage);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &usage))
-               return NULL;
-       SetTrackUsage(_self->ob_itself,
-                     usage);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackDuration(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-#ifndef GetTrackDuration
-       PyMac_PRECHECK(GetTrackDuration);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackDuration(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackOffset(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-#ifndef GetTrackOffset
-       PyMac_PRECHECK(GetTrackOffset);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackOffset(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackOffset(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue movieOffsetTime;
-#ifndef SetTrackOffset
-       PyMac_PRECHECK(SetTrackOffset);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &movieOffsetTime))
-               return NULL;
-       SetTrackOffset(_self->ob_itself,
-                      movieOffsetTime);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackLayer(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetTrackLayer
-       PyMac_PRECHECK(GetTrackLayer);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackLayer(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackLayer(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short layer;
-#ifndef SetTrackLayer
-       PyMac_PRECHECK(SetTrackLayer);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &layer))
-               return NULL;
-       SetTrackLayer(_self->ob_itself,
-                     layer);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackAlternate(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track _rv;
-#ifndef GetTrackAlternate
-       PyMac_PRECHECK(GetTrackAlternate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackAlternate(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackAlternate(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track alternateT;
-#ifndef SetTrackAlternate
-       PyMac_PRECHECK(SetTrackAlternate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             TrackObj_Convert, &alternateT))
-               return NULL;
-       SetTrackAlternate(_self->ob_itself,
-                         alternateT);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackVolume(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetTrackVolume
-       PyMac_PRECHECK(GetTrackVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackVolume(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackVolume(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short volume;
-#ifndef SetTrackVolume
-       PyMac_PRECHECK(SetTrackVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &volume))
-               return NULL;
-       SetTrackVolume(_self->ob_itself,
-                      volume);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackDimensions(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed width;
-       Fixed height;
-#ifndef GetTrackDimensions
-       PyMac_PRECHECK(GetTrackDimensions);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetTrackDimensions(_self->ob_itself,
-                          &width,
-                          &height);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildFixed, width,
-                            PyMac_BuildFixed, height);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackDimensions(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed width;
-       Fixed height;
-#ifndef SetTrackDimensions
-       PyMac_PRECHECK(SetTrackDimensions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetFixed, &width,
-                             PyMac_GetFixed, &height))
-               return NULL;
-       SetTrackDimensions(_self->ob_itself,
-                          width,
-                          height);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackUserData(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UserData _rv;
-#ifndef GetTrackUserData
-       PyMac_PRECHECK(GetTrackUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackUserData(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            UserDataObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle settings;
-#ifndef GetTrackSoundLocalizationSettings
-       PyMac_PRECHECK(GetTrackSoundLocalizationSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetTrackSoundLocalizationSettings(_self->ob_itself,
-                                                &settings);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, settings);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle settings;
-#ifndef SetTrackSoundLocalizationSettings
-       PyMac_PRECHECK(SetTrackSoundLocalizationSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &settings))
-               return NULL;
-       _err = SetTrackSoundLocalizationSettings(_self->ob_itself,
-                                                settings);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_NewTrackMedia(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Media _rv;
-       OSType mediaType;
-       TimeScale timeScale;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef NewTrackMedia
-       PyMac_PRECHECK(NewTrackMedia);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&O&",
-                             PyMac_GetOSType, &mediaType,
-                             &timeScale,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _rv = NewTrackMedia(_self->ob_itself,
-                           mediaType,
-                           timeScale,
-                           dataRef,
-                           dataRefType);
-       _res = Py_BuildValue("O&",
-                            MediaObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackMedia(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Media _rv;
-#ifndef GetTrackMedia
-       PyMac_PRECHECK(GetTrackMedia);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackMedia(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            MediaObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_InsertMediaIntoTrack(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue trackStart;
-       TimeValue mediaTime;
-       TimeValue mediaDuration;
-       Fixed mediaRate;
-#ifndef InsertMediaIntoTrack
-       PyMac_PRECHECK(InsertMediaIntoTrack);
-#endif
-       if (!PyArg_ParseTuple(_args, "lllO&",
-                             &trackStart,
-                             &mediaTime,
-                             &mediaDuration,
-                             PyMac_GetFixed, &mediaRate))
-               return NULL;
-       _err = InsertMediaIntoTrack(_self->ob_itself,
-                                   trackStart,
-                                   mediaTime,
-                                   mediaDuration,
-                                   mediaRate);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_InsertTrackSegment(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Track dstTrack;
-       TimeValue srcIn;
-       TimeValue srcDuration;
-       TimeValue dstIn;
-#ifndef InsertTrackSegment
-       PyMac_PRECHECK(InsertTrackSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lll",
-                             TrackObj_Convert, &dstTrack,
-                             &srcIn,
-                             &srcDuration,
-                             &dstIn))
-               return NULL;
-       _err = InsertTrackSegment(_self->ob_itself,
-                                 dstTrack,
-                                 srcIn,
-                                 srcDuration,
-                                 dstIn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_InsertEmptyTrackSegment(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue dstIn;
-       TimeValue dstDuration;
-#ifndef InsertEmptyTrackSegment
-       PyMac_PRECHECK(InsertEmptyTrackSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &dstIn,
-                             &dstDuration))
-               return NULL;
-       _err = InsertEmptyTrackSegment(_self->ob_itself,
-                                      dstIn,
-                                      dstDuration);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_DeleteTrackSegment(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef DeleteTrackSegment
-       PyMac_PRECHECK(DeleteTrackSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &startTime,
-                             &duration))
-               return NULL;
-       _err = DeleteTrackSegment(_self->ob_itself,
-                                 startTime,
-                                 duration);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_ScaleTrackSegment(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue startTime;
-       TimeValue oldDuration;
-       TimeValue newDuration;
-#ifndef ScaleTrackSegment
-       PyMac_PRECHECK(ScaleTrackSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "lll",
-                             &startTime,
-                             &oldDuration,
-                             &newDuration))
-               return NULL;
-       _err = ScaleTrackSegment(_self->ob_itself,
-                                startTime,
-                                oldDuration,
-                                newDuration);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_IsScrapMovie(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Component _rv;
-#ifndef IsScrapMovie
-       PyMac_PRECHECK(IsScrapMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsScrapMovie(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            CmpObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_CopyTrackSettings(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Track dstTrack;
-#ifndef CopyTrackSettings
-       PyMac_PRECHECK(CopyTrackSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             TrackObj_Convert, &dstTrack))
-               return NULL;
-       _err = CopyTrackSettings(_self->ob_itself,
-                                dstTrack);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_AddEmptyTrackToMovie(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie dstMovie;
-       Handle dataRef;
-       OSType dataRefType;
-       Track dstTrack;
-#ifndef AddEmptyTrackToMovie
-       PyMac_PRECHECK(AddEmptyTrackToMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             MovieObj_Convert, &dstMovie,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _err = AddEmptyTrackToMovie(_self->ob_itself,
-                                   dstMovie,
-                                   dataRef,
-                                   dataRefType,
-                                   &dstTrack);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, dstTrack);
-       return _res;
-}
-
-static PyObject *TrackObj_AddClonedTrackToMovie(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie dstMovie;
-       long flags;
-       Track dstTrack;
-#ifndef AddClonedTrackToMovie
-       PyMac_PRECHECK(AddClonedTrackToMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             MovieObj_Convert, &dstMovie,
-                             &flags))
-               return NULL;
-       _err = AddClonedTrackToMovie(_self->ob_itself,
-                                    dstMovie,
-                                    flags,
-                                    &dstTrack);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, dstTrack);
-       return _res;
-}
-
-static PyObject *TrackObj_AddTrackReference(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Track refTrack;
-       OSType refType;
-       long addedIndex;
-#ifndef AddTrackReference
-       PyMac_PRECHECK(AddTrackReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             TrackObj_Convert, &refTrack,
-                             PyMac_GetOSType, &refType))
-               return NULL;
-       _err = AddTrackReference(_self->ob_itself,
-                                refTrack,
-                                refType,
-                                &addedIndex);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            addedIndex);
-       return _res;
-}
-
-static PyObject *TrackObj_DeleteTrackReference(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType refType;
-       long index;
-#ifndef DeleteTrackReference
-       PyMac_PRECHECK(DeleteTrackReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetOSType, &refType,
-                             &index))
-               return NULL;
-       _err = DeleteTrackReference(_self->ob_itself,
-                                   refType,
-                                   index);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackReference(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Track refTrack;
-       OSType refType;
-       long index;
-#ifndef SetTrackReference
-       PyMac_PRECHECK(SetTrackReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             TrackObj_Convert, &refTrack,
-                             PyMac_GetOSType, &refType,
-                             &index))
-               return NULL;
-       _err = SetTrackReference(_self->ob_itself,
-                                refTrack,
-                                refType,
-                                index);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackReference(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track _rv;
-       OSType refType;
-       long index;
-#ifndef GetTrackReference
-       PyMac_PRECHECK(GetTrackReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetOSType, &refType,
-                             &index))
-               return NULL;
-       _rv = GetTrackReference(_self->ob_itself,
-                               refType,
-                               index);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetNextTrackReferenceType(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSType _rv;
-       OSType refType;
-#ifndef GetNextTrackReferenceType
-       PyMac_PRECHECK(GetNextTrackReferenceType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &refType))
-               return NULL;
-       _rv = GetNextTrackReferenceType(_self->ob_itself,
-                                       refType);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildOSType, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackReferenceCount(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       OSType refType;
-#ifndef GetTrackReferenceCount
-       PyMac_PRECHECK(GetTrackReferenceCount);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &refType))
-               return NULL;
-       _rv = GetTrackReferenceCount(_self->ob_itself,
-                                    refType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackEditRate(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       TimeValue atTime;
-#ifndef GetTrackEditRate
-       PyMac_PRECHECK(GetTrackEditRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &atTime))
-               return NULL;
-       _rv = GetTrackEditRate(_self->ob_itself,
-                              atTime);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackDataSize(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef GetTrackDataSize
-       PyMac_PRECHECK(GetTrackDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &startTime,
-                             &duration))
-               return NULL;
-       _rv = GetTrackDataSize(_self->ob_itself,
-                              startTime,
-                              duration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackDataSize64(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue startTime;
-       TimeValue duration;
-       wide dataSize;
-#ifndef GetTrackDataSize64
-       PyMac_PRECHECK(GetTrackDataSize64);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &startTime,
-                             &duration))
-               return NULL;
-       _err = GetTrackDataSize64(_self->ob_itself,
-                                 startTime,
-                                 duration,
-                                 &dataSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_Buildwide, dataSize);
-       return _res;
-}
-
-static PyObject *TrackObj_PtInTrack(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point pt;
-#ifndef PtInTrack
-       PyMac_PRECHECK(PtInTrack);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &pt))
-               return NULL;
-       _rv = PtInTrack(_self->ob_itself,
-                       pt);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_CopyTrackUserData(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Track dstTrack;
-       OSType copyRule;
-#ifndef CopyTrackUserData
-       PyMac_PRECHECK(CopyTrackUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             TrackObj_Convert, &dstTrack,
-                             PyMac_GetOSType, &copyRule))
-               return NULL;
-       _err = CopyTrackUserData(_self->ob_itself,
-                                dstTrack,
-                                copyRule);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackNextInterestingTime(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short interestingTimeFlags;
-       TimeValue time;
-       Fixed rate;
-       TimeValue interestingTime;
-       TimeValue interestingDuration;
-#ifndef GetTrackNextInterestingTime
-       PyMac_PRECHECK(GetTrackNextInterestingTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &interestingTimeFlags,
-                             &time,
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       GetTrackNextInterestingTime(_self->ob_itself,
-                                   interestingTimeFlags,
-                                   time,
-                                   rate,
-                                   &interestingTime,
-                                   &interestingDuration);
-       _res = Py_BuildValue("ll",
-                            interestingTime,
-                            interestingDuration);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackSegmentDisplayBoundsRgn(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-       TimeValue time;
-       TimeValue duration;
-#ifndef GetTrackSegmentDisplayBoundsRgn
-       PyMac_PRECHECK(GetTrackSegmentDisplayBoundsRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &time,
-                             &duration))
-               return NULL;
-       _rv = GetTrackSegmentDisplayBoundsRgn(_self->ob_itself,
-                                             time,
-                                             duration);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackStatus(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-#ifndef GetTrackStatus
-       PyMac_PRECHECK(GetTrackStatus);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetTrackStatus(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TrackObj_SetTrackLoadSettings(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue preloadTime;
-       TimeValue preloadDuration;
-       long preloadFlags;
-       long defaultHints;
-#ifndef SetTrackLoadSettings
-       PyMac_PRECHECK(SetTrackLoadSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "llll",
-                             &preloadTime,
-                             &preloadDuration,
-                             &preloadFlags,
-                             &defaultHints))
-               return NULL;
-       SetTrackLoadSettings(_self->ob_itself,
-                            preloadTime,
-                            preloadDuration,
-                            preloadFlags,
-                            defaultHints);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TrackObj_GetTrackLoadSettings(TrackObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue preloadTime;
-       TimeValue preloadDuration;
-       long preloadFlags;
-       long defaultHints;
-#ifndef GetTrackLoadSettings
-       PyMac_PRECHECK(GetTrackLoadSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetTrackLoadSettings(_self->ob_itself,
-                            &preloadTime,
-                            &preloadDuration,
-                            &preloadFlags,
-                            &defaultHints);
-       _res = Py_BuildValue("llll",
-                            preloadTime,
-                            preloadDuration,
-                            preloadFlags,
-                            defaultHints);
-       return _res;
-}
-
-static PyMethodDef TrackObj_methods[] = {
-       {"LoadTrackIntoRam", (PyCFunction)TrackObj_LoadTrackIntoRam, 1,
-        PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
-       {"GetTrackPict", (PyCFunction)TrackObj_GetTrackPict, 1,
-        PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
-       {"GetTrackClipRgn", (PyCFunction)TrackObj_GetTrackClipRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"SetTrackClipRgn", (PyCFunction)TrackObj_SetTrackClipRgn, 1,
-        PyDoc_STR("(RgnHandle theClip) -> None")},
-       {"GetTrackDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackDisplayBoundsRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"GetTrackMovieBoundsRgn", (PyCFunction)TrackObj_GetTrackMovieBoundsRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"GetTrackBoundsRgn", (PyCFunction)TrackObj_GetTrackBoundsRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"GetTrackMatte", (PyCFunction)TrackObj_GetTrackMatte, 1,
-        PyDoc_STR("() -> (PixMapHandle _rv)")},
-       {"SetTrackMatte", (PyCFunction)TrackObj_SetTrackMatte, 1,
-        PyDoc_STR("(PixMapHandle theMatte) -> None")},
-       {"GetTrackID", (PyCFunction)TrackObj_GetTrackID, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"GetTrackMovie", (PyCFunction)TrackObj_GetTrackMovie, 1,
-        PyDoc_STR("() -> (Movie _rv)")},
-       {"GetTrackCreationTime", (PyCFunction)TrackObj_GetTrackCreationTime, 1,
-        PyDoc_STR("() -> (unsigned long _rv)")},
-       {"GetTrackModificationTime", (PyCFunction)TrackObj_GetTrackModificationTime, 1,
-        PyDoc_STR("() -> (unsigned long _rv)")},
-       {"GetTrackEnabled", (PyCFunction)TrackObj_GetTrackEnabled, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"SetTrackEnabled", (PyCFunction)TrackObj_SetTrackEnabled, 1,
-        PyDoc_STR("(Boolean isEnabled) -> None")},
-       {"GetTrackUsage", (PyCFunction)TrackObj_GetTrackUsage, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"SetTrackUsage", (PyCFunction)TrackObj_SetTrackUsage, 1,
-        PyDoc_STR("(long usage) -> None")},
-       {"GetTrackDuration", (PyCFunction)TrackObj_GetTrackDuration, 1,
-        PyDoc_STR("() -> (TimeValue _rv)")},
-       {"GetTrackOffset", (PyCFunction)TrackObj_GetTrackOffset, 1,
-        PyDoc_STR("() -> (TimeValue _rv)")},
-       {"SetTrackOffset", (PyCFunction)TrackObj_SetTrackOffset, 1,
-        PyDoc_STR("(TimeValue movieOffsetTime) -> None")},
-       {"GetTrackLayer", (PyCFunction)TrackObj_GetTrackLayer, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"SetTrackLayer", (PyCFunction)TrackObj_SetTrackLayer, 1,
-        PyDoc_STR("(short layer) -> None")},
-       {"GetTrackAlternate", (PyCFunction)TrackObj_GetTrackAlternate, 1,
-        PyDoc_STR("() -> (Track _rv)")},
-       {"SetTrackAlternate", (PyCFunction)TrackObj_SetTrackAlternate, 1,
-        PyDoc_STR("(Track alternateT) -> None")},
-       {"GetTrackVolume", (PyCFunction)TrackObj_GetTrackVolume, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"SetTrackVolume", (PyCFunction)TrackObj_SetTrackVolume, 1,
-        PyDoc_STR("(short volume) -> None")},
-       {"GetTrackDimensions", (PyCFunction)TrackObj_GetTrackDimensions, 1,
-        PyDoc_STR("() -> (Fixed width, Fixed height)")},
-       {"SetTrackDimensions", (PyCFunction)TrackObj_SetTrackDimensions, 1,
-        PyDoc_STR("(Fixed width, Fixed height) -> None")},
-       {"GetTrackUserData", (PyCFunction)TrackObj_GetTrackUserData, 1,
-        PyDoc_STR("() -> (UserData _rv)")},
-       {"GetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_GetTrackSoundLocalizationSettings, 1,
-        PyDoc_STR("() -> (Handle settings)")},
-       {"SetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_SetTrackSoundLocalizationSettings, 1,
-        PyDoc_STR("(Handle settings) -> None")},
-       {"NewTrackMedia", (PyCFunction)TrackObj_NewTrackMedia, 1,
-        PyDoc_STR("(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)")},
-       {"GetTrackMedia", (PyCFunction)TrackObj_GetTrackMedia, 1,
-        PyDoc_STR("() -> (Media _rv)")},
-       {"InsertMediaIntoTrack", (PyCFunction)TrackObj_InsertMediaIntoTrack, 1,
-        PyDoc_STR("(TimeValue trackStart, TimeValue mediaTime, TimeValue mediaDuration, Fixed mediaRate) -> None")},
-       {"InsertTrackSegment", (PyCFunction)TrackObj_InsertTrackSegment, 1,
-        PyDoc_STR("(Track dstTrack, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
-       {"InsertEmptyTrackSegment", (PyCFunction)TrackObj_InsertEmptyTrackSegment, 1,
-        PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
-       {"DeleteTrackSegment", (PyCFunction)TrackObj_DeleteTrackSegment, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
-       {"ScaleTrackSegment", (PyCFunction)TrackObj_ScaleTrackSegment, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
-       {"IsScrapMovie", (PyCFunction)TrackObj_IsScrapMovie, 1,
-        PyDoc_STR("() -> (Component _rv)")},
-       {"CopyTrackSettings", (PyCFunction)TrackObj_CopyTrackSettings, 1,
-        PyDoc_STR("(Track dstTrack) -> None")},
-       {"AddEmptyTrackToMovie", (PyCFunction)TrackObj_AddEmptyTrackToMovie, 1,
-        PyDoc_STR("(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)")},
-       {"AddClonedTrackToMovie", (PyCFunction)TrackObj_AddClonedTrackToMovie, 1,
-        PyDoc_STR("(Movie dstMovie, long flags) -> (Track dstTrack)")},
-       {"AddTrackReference", (PyCFunction)TrackObj_AddTrackReference, 1,
-        PyDoc_STR("(Track refTrack, OSType refType) -> (long addedIndex)")},
-       {"DeleteTrackReference", (PyCFunction)TrackObj_DeleteTrackReference, 1,
-        PyDoc_STR("(OSType refType, long index) -> None")},
-       {"SetTrackReference", (PyCFunction)TrackObj_SetTrackReference, 1,
-        PyDoc_STR("(Track refTrack, OSType refType, long index) -> None")},
-       {"GetTrackReference", (PyCFunction)TrackObj_GetTrackReference, 1,
-        PyDoc_STR("(OSType refType, long index) -> (Track _rv)")},
-       {"GetNextTrackReferenceType", (PyCFunction)TrackObj_GetNextTrackReferenceType, 1,
-        PyDoc_STR("(OSType refType) -> (OSType _rv)")},
-       {"GetTrackReferenceCount", (PyCFunction)TrackObj_GetTrackReferenceCount, 1,
-        PyDoc_STR("(OSType refType) -> (long _rv)")},
-       {"GetTrackEditRate", (PyCFunction)TrackObj_GetTrackEditRate, 1,
-        PyDoc_STR("(TimeValue atTime) -> (Fixed _rv)")},
-       {"GetTrackDataSize", (PyCFunction)TrackObj_GetTrackDataSize, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
-       {"GetTrackDataSize64", (PyCFunction)TrackObj_GetTrackDataSize64, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
-       {"PtInTrack", (PyCFunction)TrackObj_PtInTrack, 1,
-        PyDoc_STR("(Point pt) -> (Boolean _rv)")},
-       {"CopyTrackUserData", (PyCFunction)TrackObj_CopyTrackUserData, 1,
-        PyDoc_STR("(Track dstTrack, OSType copyRule) -> None")},
-       {"GetTrackNextInterestingTime", (PyCFunction)TrackObj_GetTrackNextInterestingTime, 1,
-        PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
-       {"GetTrackSegmentDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackSegmentDisplayBoundsRgn, 1,
-        PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
-       {"GetTrackStatus", (PyCFunction)TrackObj_GetTrackStatus, 1,
-        PyDoc_STR("() -> (ComponentResult _rv)")},
-       {"SetTrackLoadSettings", (PyCFunction)TrackObj_SetTrackLoadSettings, 1,
-        PyDoc_STR("(TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints) -> None")},
-       {"GetTrackLoadSettings", (PyCFunction)TrackObj_GetTrackLoadSettings, 1,
-        PyDoc_STR("() -> (TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints)")},
-       {NULL, NULL, 0}
-};
-
-#define TrackObj_getsetlist NULL
-
-
-#define TrackObj_compare NULL
-
-#define TrackObj_repr NULL
-
-#define TrackObj_hash NULL
-#define TrackObj_tp_init 0
-
-#define TrackObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *TrackObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       Track itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TrackObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((TrackObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define TrackObj_tp_free PyObject_Del
-
-
-PyTypeObject Track_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qt.Track", /*tp_name*/
-       sizeof(TrackObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) TrackObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) TrackObj_compare, /*tp_compare*/
-       (reprfunc) TrackObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) TrackObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       TrackObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       TrackObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       TrackObj_tp_init, /* tp_init */
-       TrackObj_tp_alloc, /* tp_alloc */
-       TrackObj_tp_new, /* tp_new */
-       TrackObj_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type Track ---------------------- */
-
-
-/* ----------------------- Object type Movie ------------------------ */
-
-PyTypeObject Movie_Type;
-
-#define MovieObj_Check(x) (Py_TYPE(x) == &Movie_Type || PyObject_TypeCheck((x), &Movie_Type))
-
-typedef struct MovieObject {
-       PyObject_HEAD
-       Movie ob_itself;
-} MovieObject;
-
-PyObject *MovieObj_New(Movie itself)
-{
-       MovieObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Qt_Error,"Cannot create Movie from NULL pointer");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(MovieObject, &Movie_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int MovieObj_Convert(PyObject *v, Movie *p_itself)
-{
-       if (v == Py_None)
-       {
-               *p_itself = NULL;
-               return 1;
-       }
-       if (!MovieObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Movie required");
-               return 0;
-       }
-       *p_itself = ((MovieObject *)v)->ob_itself;
-       return 1;
-}
-
-static void MovieObj_dealloc(MovieObject *self)
-{
-       if (self->ob_itself) DisposeMovie(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *MovieObj_MoviesTask(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long maxMilliSecToUse;
-#ifndef MoviesTask
-       PyMac_PRECHECK(MoviesTask);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &maxMilliSecToUse))
-               return NULL;
-       MoviesTask(_self->ob_itself,
-                  maxMilliSecToUse);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_PrerollMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue time;
-       Fixed Rate;
-#ifndef PrerollMovie
-       PyMac_PRECHECK(PrerollMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &time,
-                             PyMac_GetFixed, &Rate))
-               return NULL;
-       _err = PrerollMovie(_self->ob_itself,
-                           time,
-                           Rate);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_AbortPrePrerollMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr err;
-#ifndef AbortPrePrerollMovie
-       PyMac_PRECHECK(AbortPrePrerollMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &err))
-               return NULL;
-       AbortPrePrerollMovie(_self->ob_itself,
-                            err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_LoadMovieIntoRam(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue time;
-       TimeValue duration;
-       long flags;
-#ifndef LoadMovieIntoRam
-       PyMac_PRECHECK(LoadMovieIntoRam);
-#endif
-       if (!PyArg_ParseTuple(_args, "lll",
-                             &time,
-                             &duration,
-                             &flags))
-               return NULL;
-       _err = LoadMovieIntoRam(_self->ob_itself,
-                               time,
-                               duration,
-                               flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieActive(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean active;
-#ifndef SetMovieActive
-       PyMac_PRECHECK(SetMovieActive);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &active))
-               return NULL;
-       SetMovieActive(_self->ob_itself,
-                      active);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieActive(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef GetMovieActive
-       PyMac_PRECHECK(GetMovieActive);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieActive(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_StartMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef StartMovie
-       PyMac_PRECHECK(StartMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       StartMovie(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_StopMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef StopMovie
-       PyMac_PRECHECK(StopMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       StopMovie(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GoToBeginningOfMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef GoToBeginningOfMovie
-       PyMac_PRECHECK(GoToBeginningOfMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GoToBeginningOfMovie(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GoToEndOfMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef GoToEndOfMovie
-       PyMac_PRECHECK(GoToEndOfMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GoToEndOfMovie(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_IsMovieDone(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsMovieDone
-       PyMac_PRECHECK(IsMovieDone);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsMovieDone(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMoviePreviewMode(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef GetMoviePreviewMode
-       PyMac_PRECHECK(GetMoviePreviewMode);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMoviePreviewMode(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMoviePreviewMode(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean usePreview;
-#ifndef SetMoviePreviewMode
-       PyMac_PRECHECK(SetMoviePreviewMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &usePreview))
-               return NULL;
-       SetMoviePreviewMode(_self->ob_itself,
-                           usePreview);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_ShowMoviePoster(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ShowMoviePoster
-       PyMac_PRECHECK(ShowMoviePoster);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ShowMoviePoster(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieTimeBase(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeBase _rv;
-#ifndef GetMovieTimeBase
-       PyMac_PRECHECK(GetMovieTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieTimeBase(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            TimeBaseObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieMasterTimeBase(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeBase tb;
-       TimeRecord slaveZero;
-#ifndef SetMovieMasterTimeBase
-       PyMac_PRECHECK(SetMovieMasterTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             TimeBaseObj_Convert, &tb,
-                             QtTimeRecord_Convert, &slaveZero))
-               return NULL;
-       SetMovieMasterTimeBase(_self->ob_itself,
-                              tb,
-                              &slaveZero);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieMasterClock(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Component clockMeister;
-       TimeRecord slaveZero;
-#ifndef SetMovieMasterClock
-       PyMac_PRECHECK(SetMovieMasterClock);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &clockMeister,
-                             QtTimeRecord_Convert, &slaveZero))
-               return NULL;
-       SetMovieMasterClock(_self->ob_itself,
-                           clockMeister,
-                           &slaveZero);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_ChooseMovieClock(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long flags;
-#ifndef ChooseMovieClock
-       PyMac_PRECHECK(ChooseMovieClock);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &flags))
-               return NULL;
-       ChooseMovieClock(_self->ob_itself,
-                        flags);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieGWorld(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr port;
-       GDHandle gdh;
-#ifndef GetMovieGWorld
-       PyMac_PRECHECK(GetMovieGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetMovieGWorld(_self->ob_itself,
-                      &port,
-                      &gdh);
-       _res = Py_BuildValue("O&O&",
-                            GrafObj_New, port,
-                            OptResObj_New, gdh);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieGWorld(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr port;
-       GDHandle gdh;
-#ifndef SetMovieGWorld
-       PyMac_PRECHECK(SetMovieGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             GrafObj_Convert, &port,
-                             OptResObj_Convert, &gdh))
-               return NULL;
-       SetMovieGWorld(_self->ob_itself,
-                      port,
-                      gdh);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieNaturalBoundsRect(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect naturalBounds;
-#ifndef GetMovieNaturalBoundsRect
-       PyMac_PRECHECK(GetMovieNaturalBoundsRect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetMovieNaturalBoundsRect(_self->ob_itself,
-                                 &naturalBounds);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &naturalBounds);
-       return _res;
-}
-
-static PyObject *MovieObj_GetNextTrackForCompositing(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track _rv;
-       Track theTrack;
-#ifndef GetNextTrackForCompositing
-       PyMac_PRECHECK(GetNextTrackForCompositing);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             TrackObj_Convert, &theTrack))
-               return NULL;
-       _rv = GetNextTrackForCompositing(_self->ob_itself,
-                                        theTrack);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetPrevTrackForCompositing(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track _rv;
-       Track theTrack;
-#ifndef GetPrevTrackForCompositing
-       PyMac_PRECHECK(GetPrevTrackForCompositing);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             TrackObj_Convert, &theTrack))
-               return NULL;
-       _rv = GetPrevTrackForCompositing(_self->ob_itself,
-                                        theTrack);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMoviePict(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PicHandle _rv;
-       TimeValue time;
-#ifndef GetMoviePict
-       PyMac_PRECHECK(GetMoviePict);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &time))
-               return NULL;
-       _rv = GetMoviePict(_self->ob_itself,
-                          time);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMoviePosterPict(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PicHandle _rv;
-#ifndef GetMoviePosterPict
-       PyMac_PRECHECK(GetMoviePosterPict);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMoviePosterPict(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_UpdateMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef UpdateMovie
-       PyMac_PRECHECK(UpdateMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = UpdateMovie(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_InvalidateMovieRegion(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       RgnHandle invalidRgn;
-#ifndef InvalidateMovieRegion
-       PyMac_PRECHECK(InvalidateMovieRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &invalidRgn))
-               return NULL;
-       _err = InvalidateMovieRegion(_self->ob_itself,
-                                    invalidRgn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieBox(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect boxRect;
-#ifndef GetMovieBox
-       PyMac_PRECHECK(GetMovieBox);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetMovieBox(_self->ob_itself,
-                   &boxRect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &boxRect);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieBox(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect boxRect;
-#ifndef SetMovieBox
-       PyMac_PRECHECK(SetMovieBox);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &boxRect))
-               return NULL;
-       SetMovieBox(_self->ob_itself,
-                   &boxRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef GetMovieDisplayClipRgn
-       PyMac_PRECHECK(GetMovieDisplayClipRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieDisplayClipRgn(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle theClip;
-#ifndef SetMovieDisplayClipRgn
-       PyMac_PRECHECK(SetMovieDisplayClipRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theClip))
-               return NULL;
-       SetMovieDisplayClipRgn(_self->ob_itself,
-                              theClip);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieClipRgn(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef GetMovieClipRgn
-       PyMac_PRECHECK(GetMovieClipRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieClipRgn(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieClipRgn(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle theClip;
-#ifndef SetMovieClipRgn
-       PyMac_PRECHECK(SetMovieClipRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theClip))
-               return NULL;
-       SetMovieClipRgn(_self->ob_itself,
-                       theClip);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieDisplayBoundsRgn(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef GetMovieDisplayBoundsRgn
-       PyMac_PRECHECK(GetMovieDisplayBoundsRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieDisplayBoundsRgn(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieBoundsRgn(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef GetMovieBoundsRgn
-       PyMac_PRECHECK(GetMovieBoundsRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieBoundsRgn(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieVideoOutput(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentInstance vout;
-#ifndef SetMovieVideoOutput
-       PyMac_PRECHECK(SetMovieVideoOutput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &vout))
-               return NULL;
-       SetMovieVideoOutput(_self->ob_itself,
-                           vout);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_PutMovieIntoHandle(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle publicMovie;
-#ifndef PutMovieIntoHandle
-       PyMac_PRECHECK(PutMovieIntoHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &publicMovie))
-               return NULL;
-       _err = PutMovieIntoHandle(_self->ob_itself,
-                                 publicMovie);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_PutMovieIntoDataFork(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short fRefNum;
-       long offset;
-       long maxSize;
-#ifndef PutMovieIntoDataFork
-       PyMac_PRECHECK(PutMovieIntoDataFork);
-#endif
-       if (!PyArg_ParseTuple(_args, "hll",
-                             &fRefNum,
-                             &offset,
-                             &maxSize))
-               return NULL;
-       _err = PutMovieIntoDataFork(_self->ob_itself,
-                                   fRefNum,
-                                   offset,
-                                   maxSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_PutMovieIntoDataFork64(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long fRefNum;
-       wide offset;
-       unsigned long maxSize;
-#ifndef PutMovieIntoDataFork64
-       PyMac_PRECHECK(PutMovieIntoDataFork64);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&l",
-                             &fRefNum,
-                             PyMac_Getwide, &offset,
-                             &maxSize))
-               return NULL;
-       _err = PutMovieIntoDataFork64(_self->ob_itself,
-                                     fRefNum,
-                                     &offset,
-                                     maxSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_PutMovieIntoStorage(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DataHandler dh;
-       wide offset;
-       unsigned long maxSize;
-#ifndef PutMovieIntoStorage
-       PyMac_PRECHECK(PutMovieIntoStorage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_Getwide, &offset,
-                             &maxSize))
-               return NULL;
-       _err = PutMovieIntoStorage(_self->ob_itself,
-                                  dh,
-                                  &offset,
-                                  maxSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_PutMovieForDataRefIntoHandle(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-       Handle publicMovie;
-#ifndef PutMovieForDataRefIntoHandle
-       PyMac_PRECHECK(PutMovieForDataRefIntoHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             ResObj_Convert, &publicMovie))
-               return NULL;
-       _err = PutMovieForDataRefIntoHandle(_self->ob_itself,
-                                           dataRef,
-                                           dataRefType,
-                                           publicMovie);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieCreationTime(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       unsigned long _rv;
-#ifndef GetMovieCreationTime
-       PyMac_PRECHECK(GetMovieCreationTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieCreationTime(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieModificationTime(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       unsigned long _rv;
-#ifndef GetMovieModificationTime
-       PyMac_PRECHECK(GetMovieModificationTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieModificationTime(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieTimeScale(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeScale _rv;
-#ifndef GetMovieTimeScale
-       PyMac_PRECHECK(GetMovieTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieTimeScale(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieTimeScale(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeScale timeScale;
-#ifndef SetMovieTimeScale
-       PyMac_PRECHECK(SetMovieTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &timeScale))
-               return NULL;
-       SetMovieTimeScale(_self->ob_itself,
-                         timeScale);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieDuration(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-#ifndef GetMovieDuration
-       PyMac_PRECHECK(GetMovieDuration);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieDuration(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieRate(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-#ifndef GetMovieRate
-       PyMac_PRECHECK(GetMovieRate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieRate(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieRate(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed rate;
-#ifndef SetMovieRate
-       PyMac_PRECHECK(SetMovieRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       SetMovieRate(_self->ob_itself,
-                    rate);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMoviePreferredRate(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-#ifndef GetMoviePreferredRate
-       PyMac_PRECHECK(GetMoviePreferredRate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMoviePreferredRate(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMoviePreferredRate(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed rate;
-#ifndef SetMoviePreferredRate
-       PyMac_PRECHECK(SetMoviePreferredRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       SetMoviePreferredRate(_self->ob_itself,
-                             rate);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMoviePreferredVolume(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetMoviePreferredVolume
-       PyMac_PRECHECK(GetMoviePreferredVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMoviePreferredVolume(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMoviePreferredVolume(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short volume;
-#ifndef SetMoviePreferredVolume
-       PyMac_PRECHECK(SetMoviePreferredVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &volume))
-               return NULL;
-       SetMoviePreferredVolume(_self->ob_itself,
-                               volume);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieVolume(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetMovieVolume
-       PyMac_PRECHECK(GetMovieVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieVolume(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieVolume(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short volume;
-#ifndef SetMovieVolume
-       PyMac_PRECHECK(SetMovieVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &volume))
-               return NULL;
-       SetMovieVolume(_self->ob_itself,
-                      volume);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMoviePreviewTime(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue previewTime;
-       TimeValue previewDuration;
-#ifndef GetMoviePreviewTime
-       PyMac_PRECHECK(GetMoviePreviewTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetMoviePreviewTime(_self->ob_itself,
-                           &previewTime,
-                           &previewDuration);
-       _res = Py_BuildValue("ll",
-                            previewTime,
-                            previewDuration);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMoviePreviewTime(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue previewTime;
-       TimeValue previewDuration;
-#ifndef SetMoviePreviewTime
-       PyMac_PRECHECK(SetMoviePreviewTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &previewTime,
-                             &previewDuration))
-               return NULL;
-       SetMoviePreviewTime(_self->ob_itself,
-                           previewTime,
-                           previewDuration);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMoviePosterTime(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-#ifndef GetMoviePosterTime
-       PyMac_PRECHECK(GetMoviePosterTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMoviePosterTime(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMoviePosterTime(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue posterTime;
-#ifndef SetMoviePosterTime
-       PyMac_PRECHECK(SetMoviePosterTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &posterTime))
-               return NULL;
-       SetMoviePosterTime(_self->ob_itself,
-                          posterTime);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieSelection(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue selectionTime;
-       TimeValue selectionDuration;
-#ifndef GetMovieSelection
-       PyMac_PRECHECK(GetMovieSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetMovieSelection(_self->ob_itself,
-                         &selectionTime,
-                         &selectionDuration);
-       _res = Py_BuildValue("ll",
-                            selectionTime,
-                            selectionDuration);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieSelection(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue selectionTime;
-       TimeValue selectionDuration;
-#ifndef SetMovieSelection
-       PyMac_PRECHECK(SetMovieSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &selectionTime,
-                             &selectionDuration))
-               return NULL;
-       SetMovieSelection(_self->ob_itself,
-                         selectionTime,
-                         selectionDuration);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieActiveSegment(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef SetMovieActiveSegment
-       PyMac_PRECHECK(SetMovieActiveSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &startTime,
-                             &duration))
-               return NULL;
-       SetMovieActiveSegment(_self->ob_itself,
-                             startTime,
-                             duration);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieActiveSegment(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef GetMovieActiveSegment
-       PyMac_PRECHECK(GetMovieActiveSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetMovieActiveSegment(_self->ob_itself,
-                             &startTime,
-                             &duration);
-       _res = Py_BuildValue("ll",
-                            startTime,
-                            duration);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieTime(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-       TimeRecord currentTime;
-#ifndef GetMovieTime
-       PyMac_PRECHECK(GetMovieTime);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieTime(_self->ob_itself,
-                          &currentTime);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QtTimeRecord_New, &currentTime);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieTime(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeRecord newtime;
-#ifndef SetMovieTime
-       PyMac_PRECHECK(SetMovieTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QtTimeRecord_Convert, &newtime))
-               return NULL;
-       SetMovieTime(_self->ob_itself,
-                    &newtime);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieTimeValue(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue newtime;
-#ifndef SetMovieTimeValue
-       PyMac_PRECHECK(SetMovieTimeValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &newtime))
-               return NULL;
-       SetMovieTimeValue(_self->ob_itself,
-                         newtime);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieUserData(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UserData _rv;
-#ifndef GetMovieUserData
-       PyMac_PRECHECK(GetMovieUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieUserData(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            UserDataObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieTrackCount(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetMovieTrackCount
-       PyMac_PRECHECK(GetMovieTrackCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieTrackCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieTrack(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track _rv;
-       long trackID;
-#ifndef GetMovieTrack
-       PyMac_PRECHECK(GetMovieTrack);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &trackID))
-               return NULL;
-       _rv = GetMovieTrack(_self->ob_itself,
-                           trackID);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieIndTrack(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track _rv;
-       long index;
-#ifndef GetMovieIndTrack
-       PyMac_PRECHECK(GetMovieIndTrack);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &index))
-               return NULL;
-       _rv = GetMovieIndTrack(_self->ob_itself,
-                              index);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieIndTrackType(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track _rv;
-       long index;
-       OSType trackType;
-       long flags;
-#ifndef GetMovieIndTrackType
-       PyMac_PRECHECK(GetMovieIndTrackType);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&l",
-                             &index,
-                             PyMac_GetOSType, &trackType,
-                             &flags))
-               return NULL;
-       _rv = GetMovieIndTrackType(_self->ob_itself,
-                                  index,
-                                  trackType,
-                                  flags);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_NewMovieTrack(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Track _rv;
-       Fixed width;
-       Fixed height;
-       short trackVolume;
-#ifndef NewMovieTrack
-       PyMac_PRECHECK(NewMovieTrack);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             PyMac_GetFixed, &width,
-                             PyMac_GetFixed, &height,
-                             &trackVolume))
-               return NULL;
-       _rv = NewMovieTrack(_self->ob_itself,
-                           width,
-                           height,
-                           trackVolume);
-       _res = Py_BuildValue("O&",
-                            TrackObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetAutoTrackAlternatesEnabled(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean enable;
-#ifndef SetAutoTrackAlternatesEnabled
-       PyMac_PRECHECK(SetAutoTrackAlternatesEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &enable))
-               return NULL;
-       SetAutoTrackAlternatesEnabled(_self->ob_itself,
-                                     enable);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_SelectMovieAlternates(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef SelectMovieAlternates
-       PyMac_PRECHECK(SelectMovieAlternates);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       SelectMovieAlternates(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_InsertMovieSegment(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie dstMovie;
-       TimeValue srcIn;
-       TimeValue srcDuration;
-       TimeValue dstIn;
-#ifndef InsertMovieSegment
-       PyMac_PRECHECK(InsertMovieSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lll",
-                             MovieObj_Convert, &dstMovie,
-                             &srcIn,
-                             &srcDuration,
-                             &dstIn))
-               return NULL;
-       _err = InsertMovieSegment(_self->ob_itself,
-                                 dstMovie,
-                                 srcIn,
-                                 srcDuration,
-                                 dstIn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_InsertEmptyMovieSegment(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue dstIn;
-       TimeValue dstDuration;
-#ifndef InsertEmptyMovieSegment
-       PyMac_PRECHECK(InsertEmptyMovieSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &dstIn,
-                             &dstDuration))
-               return NULL;
-       _err = InsertEmptyMovieSegment(_self->ob_itself,
-                                      dstIn,
-                                      dstDuration);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_DeleteMovieSegment(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef DeleteMovieSegment
-       PyMac_PRECHECK(DeleteMovieSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &startTime,
-                             &duration))
-               return NULL;
-       _err = DeleteMovieSegment(_self->ob_itself,
-                                 startTime,
-                                 duration);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_ScaleMovieSegment(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue startTime;
-       TimeValue oldDuration;
-       TimeValue newDuration;
-#ifndef ScaleMovieSegment
-       PyMac_PRECHECK(ScaleMovieSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "lll",
-                             &startTime,
-                             &oldDuration,
-                             &newDuration))
-               return NULL;
-       _err = ScaleMovieSegment(_self->ob_itself,
-                                startTime,
-                                oldDuration,
-                                newDuration);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_CutMovieSelection(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-#ifndef CutMovieSelection
-       PyMac_PRECHECK(CutMovieSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CutMovieSelection(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_CopyMovieSelection(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-#ifndef CopyMovieSelection
-       PyMac_PRECHECK(CopyMovieSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CopyMovieSelection(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_PasteMovieSelection(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie src;
-#ifndef PasteMovieSelection
-       PyMac_PRECHECK(PasteMovieSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             MovieObj_Convert, &src))
-               return NULL;
-       PasteMovieSelection(_self->ob_itself,
-                           src);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_AddMovieSelection(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie src;
-#ifndef AddMovieSelection
-       PyMac_PRECHECK(AddMovieSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             MovieObj_Convert, &src))
-               return NULL;
-       AddMovieSelection(_self->ob_itself,
-                         src);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_ClearMovieSelection(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ClearMovieSelection
-       PyMac_PRECHECK(ClearMovieSelection);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ClearMovieSelection(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_PutMovieIntoTypedHandle(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Track targetTrack;
-       OSType handleType;
-       Handle publicMovie;
-       TimeValue start;
-       TimeValue dur;
-       long flags;
-       ComponentInstance userComp;
-#ifndef PutMovieIntoTypedHandle
-       PyMac_PRECHECK(PutMovieIntoTypedHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&lllO&",
-                             TrackObj_Convert, &targetTrack,
-                             PyMac_GetOSType, &handleType,
-                             ResObj_Convert, &publicMovie,
-                             &start,
-                             &dur,
-                             &flags,
-                             CmpInstObj_Convert, &userComp))
-               return NULL;
-       _err = PutMovieIntoTypedHandle(_self->ob_itself,
-                                      targetTrack,
-                                      handleType,
-                                      publicMovie,
-                                      start,
-                                      dur,
-                                      flags,
-                                      userComp);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_CopyMovieSettings(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie dstMovie;
-#ifndef CopyMovieSettings
-       PyMac_PRECHECK(CopyMovieSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             MovieObj_Convert, &dstMovie))
-               return NULL;
-       _err = CopyMovieSettings(_self->ob_itself,
-                                dstMovie);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_ConvertMovieToFile(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Track onlyTrack;
-       FSSpec outputFile;
-       OSType fileType;
-       OSType creator;
-       ScriptCode scriptTag;
-       short resID;
-       long flags;
-       ComponentInstance userComp;
-#ifndef ConvertMovieToFile
-       PyMac_PRECHECK(ConvertMovieToFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&hlO&",
-                             TrackObj_Convert, &onlyTrack,
-                             PyMac_GetFSSpec, &outputFile,
-                             PyMac_GetOSType, &fileType,
-                             PyMac_GetOSType, &creator,
-                             &scriptTag,
-                             &flags,
-                             CmpInstObj_Convert, &userComp))
-               return NULL;
-       _err = ConvertMovieToFile(_self->ob_itself,
-                                 onlyTrack,
-                                 &outputFile,
-                                 fileType,
-                                 creator,
-                                 scriptTag,
-                                 &resID,
-                                 flags,
-                                 userComp);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            resID);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieDataSize(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef GetMovieDataSize
-       PyMac_PRECHECK(GetMovieDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &startTime,
-                             &duration))
-               return NULL;
-       _rv = GetMovieDataSize(_self->ob_itself,
-                              startTime,
-                              duration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieDataSize64(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue startTime;
-       TimeValue duration;
-       wide dataSize;
-#ifndef GetMovieDataSize64
-       PyMac_PRECHECK(GetMovieDataSize64);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &startTime,
-                             &duration))
-               return NULL;
-       _err = GetMovieDataSize64(_self->ob_itself,
-                                 startTime,
-                                 duration,
-                                 &dataSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_Buildwide, dataSize);
-       return _res;
-}
-
-static PyObject *MovieObj_PtInMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point pt;
-#ifndef PtInMovie
-       PyMac_PRECHECK(PtInMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &pt))
-               return NULL;
-       _rv = PtInMovie(_self->ob_itself,
-                       pt);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieLanguage(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long language;
-#ifndef SetMovieLanguage
-       PyMac_PRECHECK(SetMovieLanguage);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &language))
-               return NULL;
-       SetMovieLanguage(_self->ob_itself,
-                        language);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_CopyMovieUserData(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie dstMovie;
-       OSType copyRule;
-#ifndef CopyMovieUserData
-       PyMac_PRECHECK(CopyMovieUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             MovieObj_Convert, &dstMovie,
-                             PyMac_GetOSType, &copyRule))
-               return NULL;
-       _err = CopyMovieUserData(_self->ob_itself,
-                                dstMovie,
-                                copyRule);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieNextInterestingTime(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short interestingTimeFlags;
-       short numMediaTypes;
-       OSType whichMediaTypes;
-       TimeValue time;
-       Fixed rate;
-       TimeValue interestingTime;
-       TimeValue interestingDuration;
-#ifndef GetMovieNextInterestingTime
-       PyMac_PRECHECK(GetMovieNextInterestingTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhO&lO&",
-                             &interestingTimeFlags,
-                             &numMediaTypes,
-                             PyMac_GetOSType, &whichMediaTypes,
-                             &time,
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       GetMovieNextInterestingTime(_self->ob_itself,
-                                   interestingTimeFlags,
-                                   numMediaTypes,
-                                   &whichMediaTypes,
-                                   time,
-                                   rate,
-                                   &interestingTime,
-                                   &interestingDuration);
-       _res = Py_BuildValue("ll",
-                            interestingTime,
-                            interestingDuration);
-       return _res;
-}
-
-static PyObject *MovieObj_AddMovieResource(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short resRefNum;
-       short resId;
-       Str255 resName;
-#ifndef AddMovieResource
-       PyMac_PRECHECK(AddMovieResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &resRefNum,
-                             PyMac_GetStr255, resName))
-               return NULL;
-       _err = AddMovieResource(_self->ob_itself,
-                               resRefNum,
-                               &resId,
-                               resName);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            resId);
-       return _res;
-}
-
-static PyObject *MovieObj_UpdateMovieResource(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short resRefNum;
-       short resId;
-       Str255 resName;
-#ifndef UpdateMovieResource
-       PyMac_PRECHECK(UpdateMovieResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhO&",
-                             &resRefNum,
-                             &resId,
-                             PyMac_GetStr255, resName))
-               return NULL;
-       _err = UpdateMovieResource(_self->ob_itself,
-                                  resRefNum,
-                                  resId,
-                                  resName);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_AddMovieToStorage(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DataHandler dh;
-#ifndef AddMovieToStorage
-       PyMac_PRECHECK(AddMovieToStorage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _err = AddMovieToStorage(_self->ob_itself,
-                                dh);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_UpdateMovieInStorage(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DataHandler dh;
-#ifndef UpdateMovieInStorage
-       PyMac_PRECHECK(UpdateMovieInStorage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _err = UpdateMovieInStorage(_self->ob_itself,
-                                   dh);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_HasMovieChanged(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef HasMovieChanged
-       PyMac_PRECHECK(HasMovieChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = HasMovieChanged(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_ClearMovieChanged(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ClearMovieChanged
-       PyMac_PRECHECK(ClearMovieChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ClearMovieChanged(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieDefaultDataRef(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef SetMovieDefaultDataRef
-       PyMac_PRECHECK(SetMovieDefaultDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _err = SetMovieDefaultDataRef(_self->ob_itself,
-                                     dataRef,
-                                     dataRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieDefaultDataRef(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef GetMovieDefaultDataRef
-       PyMac_PRECHECK(GetMovieDefaultDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMovieDefaultDataRef(_self->ob_itself,
-                                     &dataRef,
-                                     &dataRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            ResObj_New, dataRef,
-                            PyMac_BuildOSType, dataRefType);
-       return _res;
-}
-
-static PyObject *MovieObj_SetMovieColorTable(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       CTabHandle ctab;
-#ifndef SetMovieColorTable
-       PyMac_PRECHECK(SetMovieColorTable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &ctab))
-               return NULL;
-       _err = SetMovieColorTable(_self->ob_itself,
-                                 ctab);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieColorTable(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       CTabHandle ctab;
-#ifndef GetMovieColorTable
-       PyMac_PRECHECK(GetMovieColorTable);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMovieColorTable(_self->ob_itself,
-                                 &ctab);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, ctab);
-       return _res;
-}
-
-static PyObject *MovieObj_FlattenMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long movieFlattenFlags;
-       FSSpec theFile;
-       OSType creator;
-       ScriptCode scriptTag;
-       long createMovieFileFlags;
-       short resId;
-       Str255 resName;
-#ifndef FlattenMovie
-       PyMac_PRECHECK(FlattenMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&O&hlO&",
-                             &movieFlattenFlags,
-                             PyMac_GetFSSpec, &theFile,
-                             PyMac_GetOSType, &creator,
-                             &scriptTag,
-                             &createMovieFileFlags,
-                             PyMac_GetStr255, resName))
-               return NULL;
-       FlattenMovie(_self->ob_itself,
-                    movieFlattenFlags,
-                    &theFile,
-                    creator,
-                    scriptTag,
-                    createMovieFileFlags,
-                    &resId,
-                    resName);
-       _res = Py_BuildValue("h",
-                            resId);
-       return _res;
-}
-
-static PyObject *MovieObj_FlattenMovieData(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-       long movieFlattenFlags;
-       FSSpec theFile;
-       OSType creator;
-       ScriptCode scriptTag;
-       long createMovieFileFlags;
-#ifndef FlattenMovieData
-       PyMac_PRECHECK(FlattenMovieData);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&O&hl",
-                             &movieFlattenFlags,
-                             PyMac_GetFSSpec, &theFile,
-                             PyMac_GetOSType, &creator,
-                             &scriptTag,
-                             &createMovieFileFlags))
-               return NULL;
-       _rv = FlattenMovieData(_self->ob_itself,
-                              movieFlattenFlags,
-                              &theFile,
-                              creator,
-                              scriptTag,
-                              createMovieFileFlags);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_FlattenMovieDataToDataRef(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-       long movieFlattenFlags;
-       Handle dataRef;
-       OSType dataRefType;
-       OSType creator;
-       ScriptCode scriptTag;
-       long createMovieFileFlags;
-#ifndef FlattenMovieDataToDataRef
-       PyMac_PRECHECK(FlattenMovieDataToDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&O&O&hl",
-                             &movieFlattenFlags,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             PyMac_GetOSType, &creator,
-                             &scriptTag,
-                             &createMovieFileFlags))
-               return NULL;
-       _rv = FlattenMovieDataToDataRef(_self->ob_itself,
-                                       movieFlattenFlags,
-                                       dataRef,
-                                       dataRefType,
-                                       creator,
-                                       scriptTag,
-                                       createMovieFileFlags);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_MovieSearchText(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Ptr text;
-       long size;
-       long searchFlags;
-       Track searchTrack;
-       TimeValue searchTime;
-       long searchOffset;
-#ifndef MovieSearchText
-       PyMac_PRECHECK(MovieSearchText);
-#endif
-       if (!PyArg_ParseTuple(_args, "sll",
-                             &text,
-                             &size,
-                             &searchFlags))
-               return NULL;
-       _err = MovieSearchText(_self->ob_itself,
-                              text,
-                              size,
-                              searchFlags,
-                              &searchTrack,
-                              &searchTime,
-                              &searchOffset);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&ll",
-                            TrackObj_New, searchTrack,
-                            searchTime,
-                            searchOffset);
-       return _res;
-}
-
-static PyObject *MovieObj_GetPosterBox(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect boxRect;
-#ifndef GetPosterBox
-       PyMac_PRECHECK(GetPosterBox);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetPosterBox(_self->ob_itself,
-                    &boxRect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &boxRect);
-       return _res;
-}
-
-static PyObject *MovieObj_SetPosterBox(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect boxRect;
-#ifndef SetPosterBox
-       PyMac_PRECHECK(SetPosterBox);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &boxRect))
-               return NULL;
-       SetPosterBox(_self->ob_itself,
-                    &boxRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieSegmentDisplayBoundsRgn(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-       TimeValue time;
-       TimeValue duration;
-#ifndef GetMovieSegmentDisplayBoundsRgn
-       PyMac_PRECHECK(GetMovieSegmentDisplayBoundsRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &time,
-                             &duration))
-               return NULL;
-       _rv = GetMovieSegmentDisplayBoundsRgn(_self->ob_itself,
-                                             time,
-                                             duration);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_GetMovieStatus(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       Track firstProblemTrack;
-#ifndef GetMovieStatus
-       PyMac_PRECHECK(GetMovieStatus);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieStatus(_self->ob_itself,
-                            &firstProblemTrack);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            TrackObj_New, firstProblemTrack);
-       return _res;
-}
-
-static PyObject *MovieObj_NewMovieController(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       MovieController _rv;
-       Rect movieRect;
-       long someFlags;
-#ifndef NewMovieController
-       PyMac_PRECHECK(NewMovieController);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetRect, &movieRect,
-                             &someFlags))
-               return NULL;
-       _rv = NewMovieController(_self->ob_itself,
-                                &movieRect,
-                                someFlags);
-       _res = Py_BuildValue("O&",
-                            MovieCtlObj_New, _rv);
-       return _res;
-}
-
-static PyObject *MovieObj_PutMovieOnScrap(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long movieScrapFlags;
-#ifndef PutMovieOnScrap
-       PyMac_PRECHECK(PutMovieOnScrap);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &movieScrapFlags))
-               return NULL;
-       _err = PutMovieOnScrap(_self->ob_itself,
-                              movieScrapFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_SetMoviePlayHints(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long flags;
-       long flagsMask;
-#ifndef SetMoviePlayHints
-       PyMac_PRECHECK(SetMoviePlayHints);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &flags,
-                             &flagsMask))
-               return NULL;
-       SetMoviePlayHints(_self->ob_itself,
-                         flags,
-                         flagsMask);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *MovieObj_GetMaxLoadedTimeInMovie(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeValue time;
-#ifndef GetMaxLoadedTimeInMovie
-       PyMac_PRECHECK(GetMaxLoadedTimeInMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMaxLoadedTimeInMovie(_self->ob_itself,
-                                      &time);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            time);
-       return _res;
-}
-
-static PyObject *MovieObj_QTMovieNeedsTimeTable(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Boolean needsTimeTable;
-#ifndef QTMovieNeedsTimeTable
-       PyMac_PRECHECK(QTMovieNeedsTimeTable);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = QTMovieNeedsTimeTable(_self->ob_itself,
-                                    &needsTimeTable);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            needsTimeTable);
-       return _res;
-}
-
-static PyObject *MovieObj_QTGetDataRefMaxFileOffset(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType dataRefType;
-       Handle dataRef;
-       long offset;
-#ifndef QTGetDataRefMaxFileOffset
-       PyMac_PRECHECK(QTGetDataRefMaxFileOffset);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &dataRefType,
-                             ResObj_Convert, &dataRef))
-               return NULL;
-       _err = QTGetDataRefMaxFileOffset(_self->ob_itself,
-                                        dataRefType,
-                                        dataRef,
-                                        &offset);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            offset);
-       return _res;
-}
-
-static PyMethodDef MovieObj_methods[] = {
-       {"MoviesTask", (PyCFunction)MovieObj_MoviesTask, 1,
-        PyDoc_STR("(long maxMilliSecToUse) -> None")},
-       {"PrerollMovie", (PyCFunction)MovieObj_PrerollMovie, 1,
-        PyDoc_STR("(TimeValue time, Fixed Rate) -> None")},
-       {"AbortPrePrerollMovie", (PyCFunction)MovieObj_AbortPrePrerollMovie, 1,
-        PyDoc_STR("(OSErr err) -> None")},
-       {"LoadMovieIntoRam", (PyCFunction)MovieObj_LoadMovieIntoRam, 1,
-        PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
-       {"SetMovieActive", (PyCFunction)MovieObj_SetMovieActive, 1,
-        PyDoc_STR("(Boolean active) -> None")},
-       {"GetMovieActive", (PyCFunction)MovieObj_GetMovieActive, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"StartMovie", (PyCFunction)MovieObj_StartMovie, 1,
-        PyDoc_STR("() -> None")},
-       {"StopMovie", (PyCFunction)MovieObj_StopMovie, 1,
-        PyDoc_STR("() -> None")},
-       {"GoToBeginningOfMovie", (PyCFunction)MovieObj_GoToBeginningOfMovie, 1,
-        PyDoc_STR("() -> None")},
-       {"GoToEndOfMovie", (PyCFunction)MovieObj_GoToEndOfMovie, 1,
-        PyDoc_STR("() -> None")},
-       {"IsMovieDone", (PyCFunction)MovieObj_IsMovieDone, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"GetMoviePreviewMode", (PyCFunction)MovieObj_GetMoviePreviewMode, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"SetMoviePreviewMode", (PyCFunction)MovieObj_SetMoviePreviewMode, 1,
-        PyDoc_STR("(Boolean usePreview) -> None")},
-       {"ShowMoviePoster", (PyCFunction)MovieObj_ShowMoviePoster, 1,
-        PyDoc_STR("() -> None")},
-       {"GetMovieTimeBase", (PyCFunction)MovieObj_GetMovieTimeBase, 1,
-        PyDoc_STR("() -> (TimeBase _rv)")},
-       {"SetMovieMasterTimeBase", (PyCFunction)MovieObj_SetMovieMasterTimeBase, 1,
-        PyDoc_STR("(TimeBase tb, TimeRecord slaveZero) -> None")},
-       {"SetMovieMasterClock", (PyCFunction)MovieObj_SetMovieMasterClock, 1,
-        PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
-       {"ChooseMovieClock", (PyCFunction)MovieObj_ChooseMovieClock, 1,
-        PyDoc_STR("(long flags) -> None")},
-       {"GetMovieGWorld", (PyCFunction)MovieObj_GetMovieGWorld, 1,
-        PyDoc_STR("() -> (CGrafPtr port, GDHandle gdh)")},
-       {"SetMovieGWorld", (PyCFunction)MovieObj_SetMovieGWorld, 1,
-        PyDoc_STR("(CGrafPtr port, GDHandle gdh) -> None")},
-       {"GetMovieNaturalBoundsRect", (PyCFunction)MovieObj_GetMovieNaturalBoundsRect, 1,
-        PyDoc_STR("() -> (Rect naturalBounds)")},
-       {"GetNextTrackForCompositing", (PyCFunction)MovieObj_GetNextTrackForCompositing, 1,
-        PyDoc_STR("(Track theTrack) -> (Track _rv)")},
-       {"GetPrevTrackForCompositing", (PyCFunction)MovieObj_GetPrevTrackForCompositing, 1,
-        PyDoc_STR("(Track theTrack) -> (Track _rv)")},
-       {"GetMoviePict", (PyCFunction)MovieObj_GetMoviePict, 1,
-        PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
-       {"GetMoviePosterPict", (PyCFunction)MovieObj_GetMoviePosterPict, 1,
-        PyDoc_STR("() -> (PicHandle _rv)")},
-       {"UpdateMovie", (PyCFunction)MovieObj_UpdateMovie, 1,
-        PyDoc_STR("() -> None")},
-       {"InvalidateMovieRegion", (PyCFunction)MovieObj_InvalidateMovieRegion, 1,
-        PyDoc_STR("(RgnHandle invalidRgn) -> None")},
-       {"GetMovieBox", (PyCFunction)MovieObj_GetMovieBox, 1,
-        PyDoc_STR("() -> (Rect boxRect)")},
-       {"SetMovieBox", (PyCFunction)MovieObj_SetMovieBox, 1,
-        PyDoc_STR("(Rect boxRect) -> None")},
-       {"GetMovieDisplayClipRgn", (PyCFunction)MovieObj_GetMovieDisplayClipRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"SetMovieDisplayClipRgn", (PyCFunction)MovieObj_SetMovieDisplayClipRgn, 1,
-        PyDoc_STR("(RgnHandle theClip) -> None")},
-       {"GetMovieClipRgn", (PyCFunction)MovieObj_GetMovieClipRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"SetMovieClipRgn", (PyCFunction)MovieObj_SetMovieClipRgn, 1,
-        PyDoc_STR("(RgnHandle theClip) -> None")},
-       {"GetMovieDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieDisplayBoundsRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"GetMovieBoundsRgn", (PyCFunction)MovieObj_GetMovieBoundsRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"SetMovieVideoOutput", (PyCFunction)MovieObj_SetMovieVideoOutput, 1,
-        PyDoc_STR("(ComponentInstance vout) -> None")},
-       {"PutMovieIntoHandle", (PyCFunction)MovieObj_PutMovieIntoHandle, 1,
-        PyDoc_STR("(Handle publicMovie) -> None")},
-       {"PutMovieIntoDataFork", (PyCFunction)MovieObj_PutMovieIntoDataFork, 1,
-        PyDoc_STR("(short fRefNum, long offset, long maxSize) -> None")},
-       {"PutMovieIntoDataFork64", (PyCFunction)MovieObj_PutMovieIntoDataFork64, 1,
-        PyDoc_STR("(long fRefNum, wide offset, unsigned long maxSize) -> None")},
-       {"PutMovieIntoStorage", (PyCFunction)MovieObj_PutMovieIntoStorage, 1,
-        PyDoc_STR("(DataHandler dh, wide offset, unsigned long maxSize) -> None")},
-       {"PutMovieForDataRefIntoHandle", (PyCFunction)MovieObj_PutMovieForDataRefIntoHandle, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType, Handle publicMovie) -> None")},
-       {"GetMovieCreationTime", (PyCFunction)MovieObj_GetMovieCreationTime, 1,
-        PyDoc_STR("() -> (unsigned long _rv)")},
-       {"GetMovieModificationTime", (PyCFunction)MovieObj_GetMovieModificationTime, 1,
-        PyDoc_STR("() -> (unsigned long _rv)")},
-       {"GetMovieTimeScale", (PyCFunction)MovieObj_GetMovieTimeScale, 1,
-        PyDoc_STR("() -> (TimeScale _rv)")},
-       {"SetMovieTimeScale", (PyCFunction)MovieObj_SetMovieTimeScale, 1,
-        PyDoc_STR("(TimeScale timeScale) -> None")},
-       {"GetMovieDuration", (PyCFunction)MovieObj_GetMovieDuration, 1,
-        PyDoc_STR("() -> (TimeValue _rv)")},
-       {"GetMovieRate", (PyCFunction)MovieObj_GetMovieRate, 1,
-        PyDoc_STR("() -> (Fixed _rv)")},
-       {"SetMovieRate", (PyCFunction)MovieObj_SetMovieRate, 1,
-        PyDoc_STR("(Fixed rate) -> None")},
-       {"GetMoviePreferredRate", (PyCFunction)MovieObj_GetMoviePreferredRate, 1,
-        PyDoc_STR("() -> (Fixed _rv)")},
-       {"SetMoviePreferredRate", (PyCFunction)MovieObj_SetMoviePreferredRate, 1,
-        PyDoc_STR("(Fixed rate) -> None")},
-       {"GetMoviePreferredVolume", (PyCFunction)MovieObj_GetMoviePreferredVolume, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"SetMoviePreferredVolume", (PyCFunction)MovieObj_SetMoviePreferredVolume, 1,
-        PyDoc_STR("(short volume) -> None")},
-       {"GetMovieVolume", (PyCFunction)MovieObj_GetMovieVolume, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"SetMovieVolume", (PyCFunction)MovieObj_SetMovieVolume, 1,
-        PyDoc_STR("(short volume) -> None")},
-       {"GetMoviePreviewTime", (PyCFunction)MovieObj_GetMoviePreviewTime, 1,
-        PyDoc_STR("() -> (TimeValue previewTime, TimeValue previewDuration)")},
-       {"SetMoviePreviewTime", (PyCFunction)MovieObj_SetMoviePreviewTime, 1,
-        PyDoc_STR("(TimeValue previewTime, TimeValue previewDuration) -> None")},
-       {"GetMoviePosterTime", (PyCFunction)MovieObj_GetMoviePosterTime, 1,
-        PyDoc_STR("() -> (TimeValue _rv)")},
-       {"SetMoviePosterTime", (PyCFunction)MovieObj_SetMoviePosterTime, 1,
-        PyDoc_STR("(TimeValue posterTime) -> None")},
-       {"GetMovieSelection", (PyCFunction)MovieObj_GetMovieSelection, 1,
-        PyDoc_STR("() -> (TimeValue selectionTime, TimeValue selectionDuration)")},
-       {"SetMovieSelection", (PyCFunction)MovieObj_SetMovieSelection, 1,
-        PyDoc_STR("(TimeValue selectionTime, TimeValue selectionDuration) -> None")},
-       {"SetMovieActiveSegment", (PyCFunction)MovieObj_SetMovieActiveSegment, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
-       {"GetMovieActiveSegment", (PyCFunction)MovieObj_GetMovieActiveSegment, 1,
-        PyDoc_STR("() -> (TimeValue startTime, TimeValue duration)")},
-       {"GetMovieTime", (PyCFunction)MovieObj_GetMovieTime, 1,
-        PyDoc_STR("() -> (TimeValue _rv, TimeRecord currentTime)")},
-       {"SetMovieTime", (PyCFunction)MovieObj_SetMovieTime, 1,
-        PyDoc_STR("(TimeRecord newtime) -> None")},
-       {"SetMovieTimeValue", (PyCFunction)MovieObj_SetMovieTimeValue, 1,
-        PyDoc_STR("(TimeValue newtime) -> None")},
-       {"GetMovieUserData", (PyCFunction)MovieObj_GetMovieUserData, 1,
-        PyDoc_STR("() -> (UserData _rv)")},
-       {"GetMovieTrackCount", (PyCFunction)MovieObj_GetMovieTrackCount, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"GetMovieTrack", (PyCFunction)MovieObj_GetMovieTrack, 1,
-        PyDoc_STR("(long trackID) -> (Track _rv)")},
-       {"GetMovieIndTrack", (PyCFunction)MovieObj_GetMovieIndTrack, 1,
-        PyDoc_STR("(long index) -> (Track _rv)")},
-       {"GetMovieIndTrackType", (PyCFunction)MovieObj_GetMovieIndTrackType, 1,
-        PyDoc_STR("(long index, OSType trackType, long flags) -> (Track _rv)")},
-       {"NewMovieTrack", (PyCFunction)MovieObj_NewMovieTrack, 1,
-        PyDoc_STR("(Fixed width, Fixed height, short trackVolume) -> (Track _rv)")},
-       {"SetAutoTrackAlternatesEnabled", (PyCFunction)MovieObj_SetAutoTrackAlternatesEnabled, 1,
-        PyDoc_STR("(Boolean enable) -> None")},
-       {"SelectMovieAlternates", (PyCFunction)MovieObj_SelectMovieAlternates, 1,
-        PyDoc_STR("() -> None")},
-       {"InsertMovieSegment", (PyCFunction)MovieObj_InsertMovieSegment, 1,
-        PyDoc_STR("(Movie dstMovie, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
-       {"InsertEmptyMovieSegment", (PyCFunction)MovieObj_InsertEmptyMovieSegment, 1,
-        PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
-       {"DeleteMovieSegment", (PyCFunction)MovieObj_DeleteMovieSegment, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
-       {"ScaleMovieSegment", (PyCFunction)MovieObj_ScaleMovieSegment, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
-       {"CutMovieSelection", (PyCFunction)MovieObj_CutMovieSelection, 1,
-        PyDoc_STR("() -> (Movie _rv)")},
-       {"CopyMovieSelection", (PyCFunction)MovieObj_CopyMovieSelection, 1,
-        PyDoc_STR("() -> (Movie _rv)")},
-       {"PasteMovieSelection", (PyCFunction)MovieObj_PasteMovieSelection, 1,
-        PyDoc_STR("(Movie src) -> None")},
-       {"AddMovieSelection", (PyCFunction)MovieObj_AddMovieSelection, 1,
-        PyDoc_STR("(Movie src) -> None")},
-       {"ClearMovieSelection", (PyCFunction)MovieObj_ClearMovieSelection, 1,
-        PyDoc_STR("() -> None")},
-       {"PutMovieIntoTypedHandle", (PyCFunction)MovieObj_PutMovieIntoTypedHandle, 1,
-        PyDoc_STR("(Track targetTrack, OSType handleType, Handle publicMovie, TimeValue start, TimeValue dur, long flags, ComponentInstance userComp) -> None")},
-       {"CopyMovieSettings", (PyCFunction)MovieObj_CopyMovieSettings, 1,
-        PyDoc_STR("(Movie dstMovie) -> None")},
-       {"ConvertMovieToFile", (PyCFunction)MovieObj_ConvertMovieToFile, 1,
-        PyDoc_STR("(Track onlyTrack, FSSpec outputFile, OSType fileType, OSType creator, ScriptCode scriptTag, long flags, ComponentInstance userComp) -> (short resID)")},
-       {"GetMovieDataSize", (PyCFunction)MovieObj_GetMovieDataSize, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
-       {"GetMovieDataSize64", (PyCFunction)MovieObj_GetMovieDataSize64, 1,
-        PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
-       {"PtInMovie", (PyCFunction)MovieObj_PtInMovie, 1,
-        PyDoc_STR("(Point pt) -> (Boolean _rv)")},
-       {"SetMovieLanguage", (PyCFunction)MovieObj_SetMovieLanguage, 1,
-        PyDoc_STR("(long language) -> None")},
-       {"CopyMovieUserData", (PyCFunction)MovieObj_CopyMovieUserData, 1,
-        PyDoc_STR("(Movie dstMovie, OSType copyRule) -> None")},
-       {"GetMovieNextInterestingTime", (PyCFunction)MovieObj_GetMovieNextInterestingTime, 1,
-        PyDoc_STR("(short interestingTimeFlags, short numMediaTypes, OSType whichMediaTypes, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
-       {"AddMovieResource", (PyCFunction)MovieObj_AddMovieResource, 1,
-        PyDoc_STR("(short resRefNum, Str255 resName) -> (short resId)")},
-       {"UpdateMovieResource", (PyCFunction)MovieObj_UpdateMovieResource, 1,
-        PyDoc_STR("(short resRefNum, short resId, Str255 resName) -> None")},
-       {"AddMovieToStorage", (PyCFunction)MovieObj_AddMovieToStorage, 1,
-        PyDoc_STR("(DataHandler dh) -> None")},
-       {"UpdateMovieInStorage", (PyCFunction)MovieObj_UpdateMovieInStorage, 1,
-        PyDoc_STR("(DataHandler dh) -> None")},
-       {"HasMovieChanged", (PyCFunction)MovieObj_HasMovieChanged, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"ClearMovieChanged", (PyCFunction)MovieObj_ClearMovieChanged, 1,
-        PyDoc_STR("() -> None")},
-       {"SetMovieDefaultDataRef", (PyCFunction)MovieObj_SetMovieDefaultDataRef, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
-       {"GetMovieDefaultDataRef", (PyCFunction)MovieObj_GetMovieDefaultDataRef, 1,
-        PyDoc_STR("() -> (Handle dataRef, OSType dataRefType)")},
-       {"SetMovieColorTable", (PyCFunction)MovieObj_SetMovieColorTable, 1,
-        PyDoc_STR("(CTabHandle ctab) -> None")},
-       {"GetMovieColorTable", (PyCFunction)MovieObj_GetMovieColorTable, 1,
-        PyDoc_STR("() -> (CTabHandle ctab)")},
-       {"FlattenMovie", (PyCFunction)MovieObj_FlattenMovie, 1,
-        PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Str255 resName) -> (short resId)")},
-       {"FlattenMovieData", (PyCFunction)MovieObj_FlattenMovieData, 1,
-        PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)")},
-       {"FlattenMovieDataToDataRef", (PyCFunction)MovieObj_FlattenMovieDataToDataRef, 1,
-        PyDoc_STR("(long movieFlattenFlags, Handle dataRef, OSType dataRefType, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)")},
-       {"MovieSearchText", (PyCFunction)MovieObj_MovieSearchText, 1,
-        PyDoc_STR("(Ptr text, long size, long searchFlags) -> (Track searchTrack, TimeValue searchTime, long searchOffset)")},
-       {"GetPosterBox", (PyCFunction)MovieObj_GetPosterBox, 1,
-        PyDoc_STR("() -> (Rect boxRect)")},
-       {"SetPosterBox", (PyCFunction)MovieObj_SetPosterBox, 1,
-        PyDoc_STR("(Rect boxRect) -> None")},
-       {"GetMovieSegmentDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieSegmentDisplayBoundsRgn, 1,
-        PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
-       {"GetMovieStatus", (PyCFunction)MovieObj_GetMovieStatus, 1,
-        PyDoc_STR("() -> (ComponentResult _rv, Track firstProblemTrack)")},
-       {"NewMovieController", (PyCFunction)MovieObj_NewMovieController, 1,
-        PyDoc_STR("(Rect movieRect, long someFlags) -> (MovieController _rv)")},
-       {"PutMovieOnScrap", (PyCFunction)MovieObj_PutMovieOnScrap, 1,
-        PyDoc_STR("(long movieScrapFlags) -> None")},
-       {"SetMoviePlayHints", (PyCFunction)MovieObj_SetMoviePlayHints, 1,
-        PyDoc_STR("(long flags, long flagsMask) -> None")},
-       {"GetMaxLoadedTimeInMovie", (PyCFunction)MovieObj_GetMaxLoadedTimeInMovie, 1,
-        PyDoc_STR("() -> (TimeValue time)")},
-       {"QTMovieNeedsTimeTable", (PyCFunction)MovieObj_QTMovieNeedsTimeTable, 1,
-        PyDoc_STR("() -> (Boolean needsTimeTable)")},
-       {"QTGetDataRefMaxFileOffset", (PyCFunction)MovieObj_QTGetDataRefMaxFileOffset, 1,
-        PyDoc_STR("(OSType dataRefType, Handle dataRef) -> (long offset)")},
-       {NULL, NULL, 0}
-};
-
-#define MovieObj_getsetlist NULL
-
-
-#define MovieObj_compare NULL
-
-#define MovieObj_repr NULL
-
-#define MovieObj_hash NULL
-#define MovieObj_tp_init 0
-
-#define MovieObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *MovieObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       Movie itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MovieObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((MovieObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define MovieObj_tp_free PyObject_Del
-
-
-PyTypeObject Movie_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qt.Movie", /*tp_name*/
-       sizeof(MovieObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) MovieObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) MovieObj_compare, /*tp_compare*/
-       (reprfunc) MovieObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) MovieObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       MovieObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       MovieObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       MovieObj_tp_init, /* tp_init */
-       MovieObj_tp_alloc, /* tp_alloc */
-       MovieObj_tp_new, /* tp_new */
-       MovieObj_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type Movie ---------------------- */
-
-
-/* ---------------------- Object type SGOutput ---------------------- */
-
-PyTypeObject SGOutput_Type;
-
-#define SGOutputObj_Check(x) (Py_TYPE(x) == &SGOutput_Type || PyObject_TypeCheck((x), &SGOutput_Type))
-
-typedef struct SGOutputObject {
-       PyObject_HEAD
-       SGOutput ob_itself;
-} SGOutputObject;
-
-PyObject *SGOutputObj_New(SGOutput itself)
-{
-       SGOutputObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(Qt_Error,"Cannot create SGOutput from NULL pointer");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(SGOutputObject, &SGOutput_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int SGOutputObj_Convert(PyObject *v, SGOutput *p_itself)
-{
-       if (v == Py_None)
-       {
-               *p_itself = NULL;
-               return 1;
-       }
-       if (!SGOutputObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "SGOutput required");
-               return 0;
-       }
-       *p_itself = ((SGOutputObject *)v)->ob_itself;
-       return 1;
-}
-
-static void SGOutputObj_dealloc(SGOutputObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyMethodDef SGOutputObj_methods[] = {
-       {NULL, NULL, 0}
-};
-
-#define SGOutputObj_getsetlist NULL
-
-
-#define SGOutputObj_compare NULL
-
-#define SGOutputObj_repr NULL
-
-#define SGOutputObj_hash NULL
-#define SGOutputObj_tp_init 0
-
-#define SGOutputObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *SGOutputObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       SGOutput itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, SGOutputObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((SGOutputObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define SGOutputObj_tp_free PyObject_Del
-
-
-PyTypeObject SGOutput_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Qt.SGOutput", /*tp_name*/
-       sizeof(SGOutputObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) SGOutputObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) SGOutputObj_compare, /*tp_compare*/
-       (reprfunc) SGOutputObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) SGOutputObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       SGOutputObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       SGOutputObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       SGOutputObj_tp_init, /* tp_init */
-       SGOutputObj_tp_alloc, /* tp_alloc */
-       SGOutputObj_tp_new, /* tp_new */
-       SGOutputObj_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type SGOutput -------------------- */
-
-
-static PyObject *Qt_EnterMovies(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef EnterMovies
-       PyMac_PRECHECK(EnterMovies);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = EnterMovies();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_ExitMovies(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ExitMovies
-       PyMac_PRECHECK(ExitMovies);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ExitMovies();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_GetMoviesError(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef GetMoviesError
-       PyMac_PRECHECK(GetMoviesError);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMoviesError();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_ClearMoviesStickyError(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ClearMoviesStickyError
-       PyMac_PRECHECK(ClearMoviesStickyError);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ClearMoviesStickyError();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_GetMoviesStickyError(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef GetMoviesStickyError
-       PyMac_PRECHECK(GetMoviesStickyError);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMoviesStickyError();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_QTGetWallClockTimeBase(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       TimeBase wallClockTimeBase;
-#ifndef QTGetWallClockTimeBase
-       PyMac_PRECHECK(QTGetWallClockTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = QTGetWallClockTimeBase(&wallClockTimeBase);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            TimeBaseObj_New, wallClockTimeBase);
-       return _res;
-}
-
-static PyObject *Qt_QTIdleManagerOpen(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       IdleManager _rv;
-#ifndef QTIdleManagerOpen
-       PyMac_PRECHECK(QTIdleManagerOpen);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = QTIdleManagerOpen();
-       _res = Py_BuildValue("O&",
-                            IdleManagerObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qt_CreateMovieControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr theWindow;
-       Rect localRect;
-       Movie theMovie;
-       UInt32 options;
-       ControlHandle returnedControl;
-#ifndef CreateMovieControl
-       PyMac_PRECHECK(CreateMovieControl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             WinObj_Convert, &theWindow,
-                             MovieObj_Convert, &theMovie,
-                             &options))
-               return NULL;
-       _err = CreateMovieControl(theWindow,
-                                 &localRect,
-                                 theMovie,
-                                 options,
-                                 &returnedControl);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildRect, &localRect,
-                            CtlObj_New, returnedControl);
-       return _res;
-}
-
-static PyObject *Qt_DisposeMatte(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixMapHandle theMatte;
-#ifndef DisposeMatte
-       PyMac_PRECHECK(DisposeMatte);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theMatte))
-               return NULL;
-       DisposeMatte(theMatte);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_NewMovie(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-       long flags;
-#ifndef NewMovie
-       PyMac_PRECHECK(NewMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &flags))
-               return NULL;
-       _rv = NewMovie(flags);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTGetTimeUntilNextTask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long duration;
-       long scale;
-#ifndef QTGetTimeUntilNextTask
-       PyMac_PRECHECK(QTGetTimeUntilNextTask);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &scale))
-               return NULL;
-       _err = QTGetTimeUntilNextTask(&duration,
-                                     scale);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            duration);
-       return _res;
-}
-
-static PyObject *Qt_GetDataHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Component _rv;
-       Handle dataRef;
-       OSType dataHandlerSubType;
-       long flags;
-#ifndef GetDataHandler
-       PyMac_PRECHECK(GetDataHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataHandlerSubType,
-                             &flags))
-               return NULL;
-       _rv = GetDataHandler(dataRef,
-                            dataHandlerSubType,
-                            flags);
-       _res = Py_BuildValue("O&",
-                            CmpObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qt_PasteHandleIntoMovie(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle h;
-       OSType handleType;
-       Movie theMovie;
-       long flags;
-       ComponentInstance userComp;
-#ifndef PasteHandleIntoMovie
-       PyMac_PRECHECK(PasteHandleIntoMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&lO&",
-                             ResObj_Convert, &h,
-                             PyMac_GetOSType, &handleType,
-                             MovieObj_Convert, &theMovie,
-                             &flags,
-                             CmpInstObj_Convert, &userComp))
-               return NULL;
-       _err = PasteHandleIntoMovie(h,
-                                   handleType,
-                                   theMovie,
-                                   flags,
-                                   userComp);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_GetMovieImporterForDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType dataRefType;
-       Handle dataRef;
-       long flags;
-       Component importer;
-#ifndef GetMovieImporterForDataRef
-       PyMac_PRECHECK(GetMovieImporterForDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             PyMac_GetOSType, &dataRefType,
-                             ResObj_Convert, &dataRef,
-                             &flags))
-               return NULL;
-       _err = GetMovieImporterForDataRef(dataRefType,
-                                         dataRef,
-                                         flags,
-                                         &importer);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CmpObj_New, importer);
-       return _res;
-}
-
-static PyObject *Qt_QTGetMIMETypeInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       char* mimeStringStart;
-       short mimeStringLength;
-       OSType infoSelector;
-       void * infoDataPtr;
-       long infoDataSize;
-#ifndef QTGetMIMETypeInfo
-       PyMac_PRECHECK(QTGetMIMETypeInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "shO&s",
-                             &mimeStringStart,
-                             &mimeStringLength,
-                             PyMac_GetOSType, &infoSelector,
-                             &infoDataPtr))
-               return NULL;
-       _err = QTGetMIMETypeInfo(mimeStringStart,
-                                mimeStringLength,
-                                infoSelector,
-                                infoDataPtr,
-                                &infoDataSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            infoDataSize);
-       return _res;
-}
-
-static PyObject *Qt_TrackTimeToMediaTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeValue _rv;
-       TimeValue value;
-       Track theTrack;
-#ifndef TrackTimeToMediaTime
-       PyMac_PRECHECK(TrackTimeToMediaTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &value,
-                             TrackObj_Convert, &theTrack))
-               return NULL;
-       _rv = TrackTimeToMediaTime(value,
-                                  theTrack);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_NewUserData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       UserData theUserData;
-#ifndef NewUserData
-       PyMac_PRECHECK(NewUserData);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = NewUserData(&theUserData);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            UserDataObj_New, theUserData);
-       return _res;
-}
-
-static PyObject *Qt_NewUserDataFromHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle h;
-       UserData theUserData;
-#ifndef NewUserDataFromHandle
-       PyMac_PRECHECK(NewUserDataFromHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &h))
-               return NULL;
-       _err = NewUserDataFromHandle(h,
-                                    &theUserData);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            UserDataObj_New, theUserData);
-       return _res;
-}
-
-static PyObject *Qt_CreateMovieFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fileSpec;
-       OSType creator;
-       ScriptCode scriptTag;
-       long createMovieFileFlags;
-       short resRefNum;
-       Movie newmovie;
-#ifndef CreateMovieFile
-       PyMac_PRECHECK(CreateMovieFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hl",
-                             PyMac_GetFSSpec, &fileSpec,
-                             PyMac_GetOSType, &creator,
-                             &scriptTag,
-                             &createMovieFileFlags))
-               return NULL;
-       _err = CreateMovieFile(&fileSpec,
-                              creator,
-                              scriptTag,
-                              createMovieFileFlags,
-                              &resRefNum,
-                              &newmovie);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hO&",
-                            resRefNum,
-                            MovieObj_New, newmovie);
-       return _res;
-}
-
-static PyObject *Qt_OpenMovieFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fileSpec;
-       short resRefNum;
-       SInt8 permission;
-#ifndef OpenMovieFile
-       PyMac_PRECHECK(OpenMovieFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetFSSpec, &fileSpec,
-                             &permission))
-               return NULL;
-       _err = OpenMovieFile(&fileSpec,
-                            &resRefNum,
-                            permission);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            resRefNum);
-       return _res;
-}
-
-static PyObject *Qt_CloseMovieFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short resRefNum;
-#ifndef CloseMovieFile
-       PyMac_PRECHECK(CloseMovieFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &resRefNum))
-               return NULL;
-       _err = CloseMovieFile(resRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_DeleteMovieFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fileSpec;
-#ifndef DeleteMovieFile
-       PyMac_PRECHECK(DeleteMovieFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSSpec, &fileSpec))
-               return NULL;
-       _err = DeleteMovieFile(&fileSpec);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_NewMovieFromFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie theMovie;
-       short resRefNum;
-       short resId;
-       short newMovieFlags;
-       Boolean dataRefWasChanged;
-#ifndef NewMovieFromFile
-       PyMac_PRECHECK(NewMovieFromFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhh",
-                             &resRefNum,
-                             &resId,
-                             &newMovieFlags))
-               return NULL;
-       _err = NewMovieFromFile(&theMovie,
-                               resRefNum,
-                               &resId,
-                               (StringPtr)0,
-                               newMovieFlags,
-                               &dataRefWasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&hb",
-                            MovieObj_New, theMovie,
-                            resId,
-                            dataRefWasChanged);
-       return _res;
-}
-
-static PyObject *Qt_NewMovieFromHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie theMovie;
-       Handle h;
-       short newMovieFlags;
-       Boolean dataRefWasChanged;
-#ifndef NewMovieFromHandle
-       PyMac_PRECHECK(NewMovieFromHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             ResObj_Convert, &h,
-                             &newMovieFlags))
-               return NULL;
-       _err = NewMovieFromHandle(&theMovie,
-                                 h,
-                                 newMovieFlags,
-                                 &dataRefWasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            MovieObj_New, theMovie,
-                            dataRefWasChanged);
-       return _res;
-}
-
-static PyObject *Qt_NewMovieFromDataFork(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie theMovie;
-       short fRefNum;
-       long fileOffset;
-       short newMovieFlags;
-       Boolean dataRefWasChanged;
-#ifndef NewMovieFromDataFork
-       PyMac_PRECHECK(NewMovieFromDataFork);
-#endif
-       if (!PyArg_ParseTuple(_args, "hlh",
-                             &fRefNum,
-                             &fileOffset,
-                             &newMovieFlags))
-               return NULL;
-       _err = NewMovieFromDataFork(&theMovie,
-                                   fRefNum,
-                                   fileOffset,
-                                   newMovieFlags,
-                                   &dataRefWasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            MovieObj_New, theMovie,
-                            dataRefWasChanged);
-       return _res;
-}
-
-static PyObject *Qt_NewMovieFromDataFork64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie theMovie;
-       long fRefNum;
-       wide fileOffset;
-       short newMovieFlags;
-       Boolean dataRefWasChanged;
-#ifndef NewMovieFromDataFork64
-       PyMac_PRECHECK(NewMovieFromDataFork64);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&h",
-                             &fRefNum,
-                             PyMac_Getwide, &fileOffset,
-                             &newMovieFlags))
-               return NULL;
-       _err = NewMovieFromDataFork64(&theMovie,
-                                     fRefNum,
-                                     &fileOffset,
-                                     newMovieFlags,
-                                     &dataRefWasChanged);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            MovieObj_New, theMovie,
-                            dataRefWasChanged);
-       return _res;
-}
-
-static PyObject *Qt_NewMovieFromDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie m;
-       short flags;
-       short id;
-       Handle dataRef;
-       OSType dtaRefType;
-#ifndef NewMovieFromDataRef
-       PyMac_PRECHECK(NewMovieFromDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&O&",
-                             &flags,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dtaRefType))
-               return NULL;
-       _err = NewMovieFromDataRef(&m,
-                                  flags,
-                                  &id,
-                                  dataRef,
-                                  dtaRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&h",
-                            MovieObj_New, m,
-                            id);
-       return _res;
-}
-
-static PyObject *Qt_NewMovieFromStorageOffset(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie theMovie;
-       DataHandler dh;
-       wide fileOffset;
-       short newMovieFlags;
-       Boolean dataRefWasCataRefType;
-#ifndef NewMovieFromStorageOffset
-       PyMac_PRECHECK(NewMovieFromStorageOffset);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_Getwide, &fileOffset,
-                             &newMovieFlags))
-               return NULL;
-       _err = NewMovieFromStorageOffset(&theMovie,
-                                        dh,
-                                        &fileOffset,
-                                        newMovieFlags,
-                                        &dataRefWasCataRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            MovieObj_New, theMovie,
-                            dataRefWasCataRefType);
-       return _res;
-}
-
-static PyObject *Qt_NewMovieForDataRefFromHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Movie theMovie;
-       Handle h;
-       short newMovieFlags;
-       Boolean dataRefWasChanged;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef NewMovieForDataRefFromHandle
-       PyMac_PRECHECK(NewMovieForDataRefFromHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hO&O&",
-                             ResObj_Convert, &h,
-                             &newMovieFlags,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _err = NewMovieForDataRefFromHandle(&theMovie,
-                                           h,
-                                           newMovieFlags,
-                                           &dataRefWasChanged,
-                                           dataRef,
-                                           dataRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&b",
-                            MovieObj_New, theMovie,
-                            dataRefWasChanged);
-       return _res;
-}
-
-static PyObject *Qt_RemoveMovieResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short resRefNum;
-       short resId;
-#ifndef RemoveMovieResource
-       PyMac_PRECHECK(RemoveMovieResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &resRefNum,
-                             &resId))
-               return NULL;
-       _err = RemoveMovieResource(resRefNum,
-                                  resId);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_CreateMovieStorage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-       OSType creator;
-       ScriptCode scriptTag;
-       long createMovieFileFlags;
-       DataHandler outDataHandler;
-       Movie newmovie;
-#ifndef CreateMovieStorage
-       PyMac_PRECHECK(CreateMovieStorage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&hl",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             PyMac_GetOSType, &creator,
-                             &scriptTag,
-                             &createMovieFileFlags))
-               return NULL;
-       _err = CreateMovieStorage(dataRef,
-                                 dataRefType,
-                                 creator,
-                                 scriptTag,
-                                 createMovieFileFlags,
-                                 &outDataHandler,
-                                 &newmovie);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            CmpInstObj_New, outDataHandler,
-                            MovieObj_New, newmovie);
-       return _res;
-}
-
-static PyObject *Qt_OpenMovieStorage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-       long flags;
-       DataHandler outDataHandler;
-#ifndef OpenMovieStorage
-       PyMac_PRECHECK(OpenMovieStorage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             &flags))
-               return NULL;
-       _err = OpenMovieStorage(dataRef,
-                               dataRefType,
-                               flags,
-                               &outDataHandler);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, outDataHandler);
-       return _res;
-}
-
-static PyObject *Qt_CloseMovieStorage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       DataHandler dh;
-#ifndef CloseMovieStorage
-       PyMac_PRECHECK(CloseMovieStorage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _err = CloseMovieStorage(dh);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_DeleteMovieStorage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef DeleteMovieStorage
-       PyMac_PRECHECK(DeleteMovieStorage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _err = DeleteMovieStorage(dataRef,
-                                 dataRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_CreateShortcutMovieFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fileSpec;
-       OSType creator;
-       ScriptCode scriptTag;
-       long createMovieFileFlags;
-       Handle targetDataRef;
-       OSType targetDataRefType;
-#ifndef CreateShortcutMovieFile
-       PyMac_PRECHECK(CreateShortcutMovieFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hlO&O&",
-                             PyMac_GetFSSpec, &fileSpec,
-                             PyMac_GetOSType, &creator,
-                             &scriptTag,
-                             &createMovieFileFlags,
-                             ResObj_Convert, &targetDataRef,
-                             PyMac_GetOSType, &targetDataRefType))
-               return NULL;
-       _err = CreateShortcutMovieFile(&fileSpec,
-                                      creator,
-                                      scriptTag,
-                                      createMovieFileFlags,
-                                      targetDataRef,
-                                      targetDataRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_CanQuickTimeOpenFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fileSpec;
-       OSType fileType;
-       OSType fileNameExtension;
-       Boolean outCanOpenWithGraphicsImporter;
-       Boolean outCanOpenAsMovie;
-       Boolean outPreferGraphicsImporter;
-       UInt32 inFlags;
-#ifndef CanQuickTimeOpenFile
-       PyMac_PRECHECK(CanQuickTimeOpenFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&l",
-                             PyMac_GetFSSpec, &fileSpec,
-                             PyMac_GetOSType, &fileType,
-                             PyMac_GetOSType, &fileNameExtension,
-                             &inFlags))
-               return NULL;
-       _err = CanQuickTimeOpenFile(&fileSpec,
-                                   fileType,
-                                   fileNameExtension,
-                                   &outCanOpenWithGraphicsImporter,
-                                   &outCanOpenAsMovie,
-                                   &outPreferGraphicsImporter,
-                                   inFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("bbb",
-                            outCanOpenWithGraphicsImporter,
-                            outCanOpenAsMovie,
-                            outPreferGraphicsImporter);
-       return _res;
-}
-
-static PyObject *Qt_CanQuickTimeOpenDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-       Boolean outCanOpenWithGraphicsImporter;
-       Boolean outCanOpenAsMovie;
-       Boolean outPreferGraphicsImporter;
-       UInt32 inFlags;
-#ifndef CanQuickTimeOpenDataRef
-       PyMac_PRECHECK(CanQuickTimeOpenDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             &inFlags))
-               return NULL;
-       _err = CanQuickTimeOpenDataRef(dataRef,
-                                      dataRefType,
-                                      &outCanOpenWithGraphicsImporter,
-                                      &outCanOpenAsMovie,
-                                      &outPreferGraphicsImporter,
-                                      inFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("bbb",
-                            outCanOpenWithGraphicsImporter,
-                            outCanOpenAsMovie,
-                            outPreferGraphicsImporter);
-       return _res;
-}
-
-static PyObject *Qt_NewMovieFromScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-       long newMovieFlags;
-#ifndef NewMovieFromScrap
-       PyMac_PRECHECK(NewMovieFromScrap);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &newMovieFlags))
-               return NULL;
-       _rv = NewMovieFromScrap(newMovieFlags);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTNewAlias(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec fss;
-       AliasHandle alias;
-       Boolean minimal;
-#ifndef QTNewAlias
-       PyMac_PRECHECK(QTNewAlias);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetFSSpec, &fss,
-                             &minimal))
-               return NULL;
-       _err = QTNewAlias(&fss,
-                         &alias,
-                         minimal);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, alias);
-       return _res;
-}
-
-static PyObject *Qt_EndFullScreen(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Ptr fullState;
-       long flags;
-#ifndef EndFullScreen
-       PyMac_PRECHECK(EndFullScreen);
-#endif
-       if (!PyArg_ParseTuple(_args, "sl",
-                             &fullState,
-                             &flags))
-               return NULL;
-       _err = EndFullScreen(fullState,
-                            flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_AddSoundDescriptionExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SoundDescriptionHandle desc;
-       Handle extension;
-       OSType idType;
-#ifndef AddSoundDescriptionExtension
-       PyMac_PRECHECK(AddSoundDescriptionExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             ResObj_Convert, &desc,
-                             ResObj_Convert, &extension,
-                             PyMac_GetOSType, &idType))
-               return NULL;
-       _err = AddSoundDescriptionExtension(desc,
-                                           extension,
-                                           idType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_GetSoundDescriptionExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SoundDescriptionHandle desc;
-       Handle extension;
-       OSType idType;
-#ifndef GetSoundDescriptionExtension
-       PyMac_PRECHECK(GetSoundDescriptionExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &desc,
-                             PyMac_GetOSType, &idType))
-               return NULL;
-       _err = GetSoundDescriptionExtension(desc,
-                                           &extension,
-                                           idType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, extension);
-       return _res;
-}
-
-static PyObject *Qt_RemoveSoundDescriptionExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SoundDescriptionHandle desc;
-       OSType idType;
-#ifndef RemoveSoundDescriptionExtension
-       PyMac_PRECHECK(RemoveSoundDescriptionExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &desc,
-                             PyMac_GetOSType, &idType))
-               return NULL;
-       _err = RemoveSoundDescriptionExtension(desc,
-                                              idType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_QTIsStandardParameterDialogEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       EventRecord pEvent;
-       QTParameterDialog createdDialog;
-#ifndef QTIsStandardParameterDialogEvent
-       PyMac_PRECHECK(QTIsStandardParameterDialogEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &createdDialog))
-               return NULL;
-       _err = QTIsStandardParameterDialogEvent(&pEvent,
-                                               createdDialog);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildEventRecord, &pEvent);
-       return _res;
-}
-
-static PyObject *Qt_QTDismissStandardParameterDialog(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       QTParameterDialog createdDialog;
-#ifndef QTDismissStandardParameterDialog
-       PyMac_PRECHECK(QTDismissStandardParameterDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &createdDialog))
-               return NULL;
-       _err = QTDismissStandardParameterDialog(createdDialog);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_QTStandardParameterDialogDoAction(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       QTParameterDialog createdDialog;
-       long action;
-       void * params;
-#ifndef QTStandardParameterDialogDoAction
-       PyMac_PRECHECK(QTStandardParameterDialogDoAction);
-#endif
-       if (!PyArg_ParseTuple(_args, "lls",
-                             &createdDialog,
-                             &action,
-                             &params))
-               return NULL;
-       _err = QTStandardParameterDialogDoAction(createdDialog,
-                                                action,
-                                                params);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_QTRegisterAccessKey(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Str255 accessKeyType;
-       long flags;
-       Handle accessKey;
-#ifndef QTRegisterAccessKey
-       PyMac_PRECHECK(QTRegisterAccessKey);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             PyMac_GetStr255, accessKeyType,
-                             &flags,
-                             ResObj_Convert, &accessKey))
-               return NULL;
-       _err = QTRegisterAccessKey(accessKeyType,
-                                  flags,
-                                  accessKey);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_QTUnregisterAccessKey(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Str255 accessKeyType;
-       long flags;
-       Handle accessKey;
-#ifndef QTUnregisterAccessKey
-       PyMac_PRECHECK(QTUnregisterAccessKey);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             PyMac_GetStr255, accessKeyType,
-                             &flags,
-                             ResObj_Convert, &accessKey))
-               return NULL;
-       _err = QTUnregisterAccessKey(accessKeyType,
-                                    flags,
-                                    accessKey);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_QTGetSupportedRestrictions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType inRestrictionClass;
-       UInt32 outRestrictionIDs;
-#ifndef QTGetSupportedRestrictions
-       PyMac_PRECHECK(QTGetSupportedRestrictions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &inRestrictionClass))
-               return NULL;
-       _err = QTGetSupportedRestrictions(inRestrictionClass,
-                                         &outRestrictionIDs);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outRestrictionIDs);
-       return _res;
-}
-
-static PyObject *Qt_QTTextToNativeText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle theText;
-       long encoding;
-       long flags;
-#ifndef QTTextToNativeText
-       PyMac_PRECHECK(QTTextToNativeText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             ResObj_Convert, &theText,
-                             &encoding,
-                             &flags))
-               return NULL;
-       _err = QTTextToNativeText(theText,
-                                 encoding,
-                                 flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_VideoMediaResetStatistics(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-#ifndef VideoMediaResetStatistics
-       PyMac_PRECHECK(VideoMediaResetStatistics);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = VideoMediaResetStatistics(mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VideoMediaGetStatistics(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-#ifndef VideoMediaGetStatistics
-       PyMac_PRECHECK(VideoMediaGetStatistics);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = VideoMediaGetStatistics(mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VideoMediaGetStallCount(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       unsigned long stalls;
-#ifndef VideoMediaGetStallCount
-       PyMac_PRECHECK(VideoMediaGetStallCount);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = VideoMediaGetStallCount(mh,
-                                     &stalls);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            stalls);
-       return _res;
-}
-
-static PyObject *Qt_VideoMediaSetCodecParameter(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       CodecType cType;
-       OSType parameterID;
-       long parameterChangeSeed;
-       void * dataPtr;
-       long dataSize;
-#ifndef VideoMediaSetCodecParameter
-       PyMac_PRECHECK(VideoMediaSetCodecParameter);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&lsl",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetOSType, &cType,
-                             PyMac_GetOSType, &parameterID,
-                             &parameterChangeSeed,
-                             &dataPtr,
-                             &dataSize))
-               return NULL;
-       _rv = VideoMediaSetCodecParameter(mh,
-                                         cType,
-                                         parameterID,
-                                         parameterChangeSeed,
-                                         dataPtr,
-                                         dataSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VideoMediaGetCodecParameter(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       CodecType cType;
-       OSType parameterID;
-       Handle outParameterData;
-#ifndef VideoMediaGetCodecParameter
-       PyMac_PRECHECK(VideoMediaGetCodecParameter);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetOSType, &cType,
-                             PyMac_GetOSType, &parameterID,
-                             ResObj_Convert, &outParameterData))
-               return NULL;
-       _rv = VideoMediaGetCodecParameter(mh,
-                                         cType,
-                                         parameterID,
-                                         outParameterData);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaAddTextSample(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Ptr text;
-       unsigned long size;
-       short fontNumber;
-       short fontSize;
-       Style textFace;
-       RGBColor textColor;
-       RGBColor backColor;
-       short textJustification;
-       Rect textBox;
-       long displayFlags;
-       TimeValue scrollDelay;
-       short hiliteStart;
-       short hiliteEnd;
-       RGBColor rgbHiliteColor;
-       TimeValue duration;
-       TimeValue sampleTime;
-#ifndef TextMediaAddTextSample
-       PyMac_PRECHECK(TextMediaAddTextSample);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&slhhbhllhhl",
-                             CmpInstObj_Convert, &mh,
-                             &text,
-                             &size,
-                             &fontNumber,
-                             &fontSize,
-                             &textFace,
-                             &textJustification,
-                             &displayFlags,
-                             &scrollDelay,
-                             &hiliteStart,
-                             &hiliteEnd,
-                             &duration))
-               return NULL;
-       _rv = TextMediaAddTextSample(mh,
-                                    text,
-                                    size,
-                                    fontNumber,
-                                    fontSize,
-                                    textFace,
-                                    &textColor,
-                                    &backColor,
-                                    textJustification,
-                                    &textBox,
-                                    displayFlags,
-                                    scrollDelay,
-                                    hiliteStart,
-                                    hiliteEnd,
-                                    &rgbHiliteColor,
-                                    duration,
-                                    &sampleTime);
-       _res = Py_BuildValue("lO&O&O&O&l",
-                            _rv,
-                            QdRGB_New, &textColor,
-                            QdRGB_New, &backColor,
-                            PyMac_BuildRect, &textBox,
-                            QdRGB_New, &rgbHiliteColor,
-                            sampleTime);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaAddTESample(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TEHandle hTE;
-       RGBColor backColor;
-       short textJustification;
-       Rect textBox;
-       long displayFlags;
-       TimeValue scrollDelay;
-       short hiliteStart;
-       short hiliteEnd;
-       RGBColor rgbHiliteColor;
-       TimeValue duration;
-       TimeValue sampleTime;
-#ifndef TextMediaAddTESample
-       PyMac_PRECHECK(TextMediaAddTESample);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hllhhl",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &hTE,
-                             &textJustification,
-                             &displayFlags,
-                             &scrollDelay,
-                             &hiliteStart,
-                             &hiliteEnd,
-                             &duration))
-               return NULL;
-       _rv = TextMediaAddTESample(mh,
-                                  hTE,
-                                  &backColor,
-                                  textJustification,
-                                  &textBox,
-                                  displayFlags,
-                                  scrollDelay,
-                                  hiliteStart,
-                                  hiliteEnd,
-                                  &rgbHiliteColor,
-                                  duration,
-                                  &sampleTime);
-       _res = Py_BuildValue("lO&O&O&l",
-                            _rv,
-                            QdRGB_New, &backColor,
-                            PyMac_BuildRect, &textBox,
-                            QdRGB_New, &rgbHiliteColor,
-                            sampleTime);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaAddHiliteSample(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short hiliteStart;
-       short hiliteEnd;
-       RGBColor rgbHiliteColor;
-       TimeValue duration;
-       TimeValue sampleTime;
-#ifndef TextMediaAddHiliteSample
-       PyMac_PRECHECK(TextMediaAddHiliteSample);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhl",
-                             CmpInstObj_Convert, &mh,
-                             &hiliteStart,
-                             &hiliteEnd,
-                             &duration))
-               return NULL;
-       _rv = TextMediaAddHiliteSample(mh,
-                                      hiliteStart,
-                                      hiliteEnd,
-                                      &rgbHiliteColor,
-                                      duration,
-                                      &sampleTime);
-       _res = Py_BuildValue("lO&l",
-                            _rv,
-                            QdRGB_New, &rgbHiliteColor,
-                            sampleTime);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaDrawRaw(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       GWorldPtr gw;
-       GDHandle gd;
-       void * data;
-       long dataSize;
-       TextDescriptionHandle tdh;
-#ifndef TextMediaDrawRaw
-       PyMac_PRECHECK(TextMediaDrawRaw);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&slO&",
-                             CmpInstObj_Convert, &mh,
-                             GWorldObj_Convert, &gw,
-                             OptResObj_Convert, &gd,
-                             &data,
-                             &dataSize,
-                             ResObj_Convert, &tdh))
-               return NULL;
-       _rv = TextMediaDrawRaw(mh,
-                              gw,
-                              gd,
-                              data,
-                              dataSize,
-                              tdh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaSetTextProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TimeValue atMediaTime;
-       long propertyType;
-       void * data;
-       long dataSize;
-#ifndef TextMediaSetTextProperty
-       PyMac_PRECHECK(TextMediaSetTextProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llsl",
-                             CmpInstObj_Convert, &mh,
-                             &atMediaTime,
-                             &propertyType,
-                             &data,
-                             &dataSize))
-               return NULL;
-       _rv = TextMediaSetTextProperty(mh,
-                                      atMediaTime,
-                                      propertyType,
-                                      data,
-                                      dataSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaRawSetup(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       GWorldPtr gw;
-       GDHandle gd;
-       void * data;
-       long dataSize;
-       TextDescriptionHandle tdh;
-       TimeValue sampleDuration;
-#ifndef TextMediaRawSetup
-       PyMac_PRECHECK(TextMediaRawSetup);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&slO&l",
-                             CmpInstObj_Convert, &mh,
-                             GWorldObj_Convert, &gw,
-                             OptResObj_Convert, &gd,
-                             &data,
-                             &dataSize,
-                             ResObj_Convert, &tdh,
-                             &sampleDuration))
-               return NULL;
-       _rv = TextMediaRawSetup(mh,
-                               gw,
-                               gd,
-                               data,
-                               dataSize,
-                               tdh,
-                               sampleDuration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaRawIdle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       GWorldPtr gw;
-       GDHandle gd;
-       TimeValue sampleTime;
-       long flagsIn;
-       long flagsOut;
-#ifndef TextMediaRawIdle
-       PyMac_PRECHECK(TextMediaRawIdle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&ll",
-                             CmpInstObj_Convert, &mh,
-                             GWorldObj_Convert, &gw,
-                             OptResObj_Convert, &gd,
-                             &sampleTime,
-                             &flagsIn))
-               return NULL;
-       _rv = TextMediaRawIdle(mh,
-                              gw,
-                              gd,
-                              sampleTime,
-                              flagsIn,
-                              &flagsOut);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            flagsOut);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaGetTextProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TimeValue atMediaTime;
-       long propertyType;
-       void * data;
-       long dataSize;
-#ifndef TextMediaGetTextProperty
-       PyMac_PRECHECK(TextMediaGetTextProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llsl",
-                             CmpInstObj_Convert, &mh,
-                             &atMediaTime,
-                             &propertyType,
-                             &data,
-                             &dataSize))
-               return NULL;
-       _rv = TextMediaGetTextProperty(mh,
-                                      atMediaTime,
-                                      propertyType,
-                                      data,
-                                      dataSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaFindNextText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Ptr text;
-       long size;
-       short findFlags;
-       TimeValue startTime;
-       TimeValue foundTime;
-       TimeValue foundDuration;
-       long offset;
-#ifndef TextMediaFindNextText
-       PyMac_PRECHECK(TextMediaFindNextText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&slhl",
-                             CmpInstObj_Convert, &mh,
-                             &text,
-                             &size,
-                             &findFlags,
-                             &startTime))
-               return NULL;
-       _rv = TextMediaFindNextText(mh,
-                                   text,
-                                   size,
-                                   findFlags,
-                                   startTime,
-                                   &foundTime,
-                                   &foundDuration,
-                                   &offset);
-       _res = Py_BuildValue("llll",
-                            _rv,
-                            foundTime,
-                            foundDuration,
-                            offset);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaHiliteTextSample(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TimeValue sampleTime;
-       short hiliteStart;
-       short hiliteEnd;
-       RGBColor rgbHiliteColor;
-#ifndef TextMediaHiliteTextSample
-       PyMac_PRECHECK(TextMediaHiliteTextSample);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lhh",
-                             CmpInstObj_Convert, &mh,
-                             &sampleTime,
-                             &hiliteStart,
-                             &hiliteEnd))
-               return NULL;
-       _rv = TextMediaHiliteTextSample(mh,
-                                       sampleTime,
-                                       hiliteStart,
-                                       hiliteEnd,
-                                       &rgbHiliteColor);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QdRGB_New, &rgbHiliteColor);
-       return _res;
-}
-
-static PyObject *Qt_TextMediaSetTextSampleData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       void * data;
-       OSType dataType;
-#ifndef TextMediaSetTextSampleData
-       PyMac_PRECHECK(TextMediaSetTextSampleData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&sO&",
-                             CmpInstObj_Convert, &mh,
-                             &data,
-                             PyMac_GetOSType, &dataType))
-               return NULL;
-       _rv = TextMediaSetTextSampleData(mh,
-                                        data,
-                                        dataType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaSetProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short spriteIndex;
-       long propertyType;
-       void * propertyValue;
-#ifndef SpriteMediaSetProperty
-       PyMac_PRECHECK(SpriteMediaSetProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hls",
-                             CmpInstObj_Convert, &mh,
-                             &spriteIndex,
-                             &propertyType,
-                             &propertyValue))
-               return NULL;
-       _rv = SpriteMediaSetProperty(mh,
-                                    spriteIndex,
-                                    propertyType,
-                                    propertyValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaGetProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short spriteIndex;
-       long propertyType;
-       void * propertyValue;
-#ifndef SpriteMediaGetProperty
-       PyMac_PRECHECK(SpriteMediaGetProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hls",
-                             CmpInstObj_Convert, &mh,
-                             &spriteIndex,
-                             &propertyType,
-                             &propertyValue))
-               return NULL;
-       _rv = SpriteMediaGetProperty(mh,
-                                    spriteIndex,
-                                    propertyType,
-                                    propertyValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaHitTestSprites(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long flags;
-       Point loc;
-       short spriteHitIndex;
-#ifndef SpriteMediaHitTestSprites
-       PyMac_PRECHECK(SpriteMediaHitTestSprites);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &mh,
-                             &flags,
-                             PyMac_GetPoint, &loc))
-               return NULL;
-       _rv = SpriteMediaHitTestSprites(mh,
-                                       flags,
-                                       loc,
-                                       &spriteHitIndex);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            spriteHitIndex);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaCountSprites(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short numSprites;
-#ifndef SpriteMediaCountSprites
-       PyMac_PRECHECK(SpriteMediaCountSprites);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = SpriteMediaCountSprites(mh,
-                                     &numSprites);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            numSprites);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaCountImages(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short numImages;
-#ifndef SpriteMediaCountImages
-       PyMac_PRECHECK(SpriteMediaCountImages);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = SpriteMediaCountImages(mh,
-                                    &numImages);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            numImages);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaGetIndImageDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short imageIndex;
-       ImageDescriptionHandle imageDescription;
-#ifndef SpriteMediaGetIndImageDescription
-       PyMac_PRECHECK(SpriteMediaGetIndImageDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hO&",
-                             CmpInstObj_Convert, &mh,
-                             &imageIndex,
-                             ResObj_Convert, &imageDescription))
-               return NULL;
-       _rv = SpriteMediaGetIndImageDescription(mh,
-                                               imageIndex,
-                                               imageDescription);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaGetDisplayedSampleNumber(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long sampleNum;
-#ifndef SpriteMediaGetDisplayedSampleNumber
-       PyMac_PRECHECK(SpriteMediaGetDisplayedSampleNumber);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = SpriteMediaGetDisplayedSampleNumber(mh,
-                                                 &sampleNum);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            sampleNum);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaGetSpriteName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID spriteID;
-       Str255 spriteName;
-#ifndef SpriteMediaGetSpriteName
-       PyMac_PRECHECK(SpriteMediaGetSpriteName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &mh,
-                             &spriteID,
-                             PyMac_GetStr255, spriteName))
-               return NULL;
-       _rv = SpriteMediaGetSpriteName(mh,
-                                      spriteID,
-                                      spriteName);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaGetImageName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short imageIndex;
-       Str255 imageName;
-#ifndef SpriteMediaGetImageName
-       PyMac_PRECHECK(SpriteMediaGetImageName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hO&",
-                             CmpInstObj_Convert, &mh,
-                             &imageIndex,
-                             PyMac_GetStr255, imageName))
-               return NULL;
-       _rv = SpriteMediaGetImageName(mh,
-                                     imageIndex,
-                                     imageName);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaSetSpriteProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID spriteID;
-       long propertyType;
-       void * propertyValue;
-#ifndef SpriteMediaSetSpriteProperty
-       PyMac_PRECHECK(SpriteMediaSetSpriteProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lls",
-                             CmpInstObj_Convert, &mh,
-                             &spriteID,
-                             &propertyType,
-                             &propertyValue))
-               return NULL;
-       _rv = SpriteMediaSetSpriteProperty(mh,
-                                          spriteID,
-                                          propertyType,
-                                          propertyValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaGetSpriteProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID spriteID;
-       long propertyType;
-       void * propertyValue;
-#ifndef SpriteMediaGetSpriteProperty
-       PyMac_PRECHECK(SpriteMediaGetSpriteProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lls",
-                             CmpInstObj_Convert, &mh,
-                             &spriteID,
-                             &propertyType,
-                             &propertyValue))
-               return NULL;
-       _rv = SpriteMediaGetSpriteProperty(mh,
-                                          spriteID,
-                                          propertyType,
-                                          propertyValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaHitTestAllSprites(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long flags;
-       Point loc;
-       QTAtomID spriteHitID;
-#ifndef SpriteMediaHitTestAllSprites
-       PyMac_PRECHECK(SpriteMediaHitTestAllSprites);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &mh,
-                             &flags,
-                             PyMac_GetPoint, &loc))
-               return NULL;
-       _rv = SpriteMediaHitTestAllSprites(mh,
-                                          flags,
-                                          loc,
-                                          &spriteHitID);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            spriteHitID);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaHitTestOneSprite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID spriteID;
-       long flags;
-       Point loc;
-       Boolean wasHit;
-#ifndef SpriteMediaHitTestOneSprite
-       PyMac_PRECHECK(SpriteMediaHitTestOneSprite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llO&",
-                             CmpInstObj_Convert, &mh,
-                             &spriteID,
-                             &flags,
-                             PyMac_GetPoint, &loc))
-               return NULL;
-       _rv = SpriteMediaHitTestOneSprite(mh,
-                                         spriteID,
-                                         flags,
-                                         loc,
-                                         &wasHit);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            wasHit);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaSpriteIndexToID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short spriteIndex;
-       QTAtomID spriteID;
-#ifndef SpriteMediaSpriteIndexToID
-       PyMac_PRECHECK(SpriteMediaSpriteIndexToID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &mh,
-                             &spriteIndex))
-               return NULL;
-       _rv = SpriteMediaSpriteIndexToID(mh,
-                                        spriteIndex,
-                                        &spriteID);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            spriteID);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaSpriteIDToIndex(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID spriteID;
-       short spriteIndex;
-#ifndef SpriteMediaSpriteIDToIndex
-       PyMac_PRECHECK(SpriteMediaSpriteIDToIndex);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &spriteID))
-               return NULL;
-       _rv = SpriteMediaSpriteIDToIndex(mh,
-                                        spriteID,
-                                        &spriteIndex);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            spriteIndex);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaSetActionVariable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID variableID;
-       float value;
-#ifndef SpriteMediaSetActionVariable
-       PyMac_PRECHECK(SpriteMediaSetActionVariable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lf",
-                             CmpInstObj_Convert, &mh,
-                             &variableID,
-                             &value))
-               return NULL;
-       _rv = SpriteMediaSetActionVariable(mh,
-                                          variableID,
-                                          &value);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaGetActionVariable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID variableID;
-       float value;
-#ifndef SpriteMediaGetActionVariable
-       PyMac_PRECHECK(SpriteMediaGetActionVariable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &variableID))
-               return NULL;
-       _rv = SpriteMediaGetActionVariable(mh,
-                                          variableID,
-                                          &value);
-       _res = Py_BuildValue("lf",
-                            _rv,
-                            value);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaDisposeSprite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID spriteID;
-#ifndef SpriteMediaDisposeSprite
-       PyMac_PRECHECK(SpriteMediaDisposeSprite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &spriteID))
-               return NULL;
-       _rv = SpriteMediaDisposeSprite(mh,
-                                      spriteID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaSetActionVariableToString(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID variableID;
-       Ptr theCString;
-#ifndef SpriteMediaSetActionVariableToString
-       PyMac_PRECHECK(SpriteMediaSetActionVariableToString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ls",
-                             CmpInstObj_Convert, &mh,
-                             &variableID,
-                             &theCString))
-               return NULL;
-       _rv = SpriteMediaSetActionVariableToString(mh,
-                                                  variableID,
-                                                  theCString);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaGetActionVariableAsString(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID variableID;
-       Handle theCString;
-#ifndef SpriteMediaGetActionVariableAsString
-       PyMac_PRECHECK(SpriteMediaGetActionVariableAsString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &variableID))
-               return NULL;
-       _rv = SpriteMediaGetActionVariableAsString(mh,
-                                                  variableID,
-                                                  &theCString);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, theCString);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaNewImage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Handle dataRef;
-       OSType dataRefType;
-       QTAtomID desiredID;
-#ifndef SpriteMediaNewImage
-       PyMac_PRECHECK(SpriteMediaNewImage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&l",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             &desiredID))
-               return NULL;
-       _rv = SpriteMediaNewImage(mh,
-                                 dataRef,
-                                 dataRefType,
-                                 desiredID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaDisposeImage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short imageIndex;
-#ifndef SpriteMediaDisposeImage
-       PyMac_PRECHECK(SpriteMediaDisposeImage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &mh,
-                             &imageIndex))
-               return NULL;
-       _rv = SpriteMediaDisposeImage(mh,
-                                     imageIndex);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaImageIndexToID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short imageIndex;
-       QTAtomID imageID;
-#ifndef SpriteMediaImageIndexToID
-       PyMac_PRECHECK(SpriteMediaImageIndexToID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &mh,
-                             &imageIndex))
-               return NULL;
-       _rv = SpriteMediaImageIndexToID(mh,
-                                       imageIndex,
-                                       &imageID);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            imageID);
-       return _res;
-}
-
-static PyObject *Qt_SpriteMediaImageIDToIndex(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID imageID;
-       short imageIndex;
-#ifndef SpriteMediaImageIDToIndex
-       PyMac_PRECHECK(SpriteMediaImageIDToIndex);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &imageID))
-               return NULL;
-       _rv = SpriteMediaImageIDToIndex(mh,
-                                       imageID,
-                                       &imageIndex);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            imageIndex);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaSetPan(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short xPercent;
-       short yPercent;
-#ifndef FlashMediaSetPan
-       PyMac_PRECHECK(FlashMediaSetPan);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             CmpInstObj_Convert, &mh,
-                             &xPercent,
-                             &yPercent))
-               return NULL;
-       _rv = FlashMediaSetPan(mh,
-                              xPercent,
-                              yPercent);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaSetZoom(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short factor;
-#ifndef FlashMediaSetZoom
-       PyMac_PRECHECK(FlashMediaSetZoom);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &mh,
-                             &factor))
-               return NULL;
-       _rv = FlashMediaSetZoom(mh,
-                               factor);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaSetZoomRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long left;
-       long top;
-       long right;
-       long bottom;
-#ifndef FlashMediaSetZoomRect
-       PyMac_PRECHECK(FlashMediaSetZoomRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llll",
-                             CmpInstObj_Convert, &mh,
-                             &left,
-                             &top,
-                             &right,
-                             &bottom))
-               return NULL;
-       _rv = FlashMediaSetZoomRect(mh,
-                                   left,
-                                   top,
-                                   right,
-                                   bottom);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaGetRefConBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long refCon;
-       long left;
-       long top;
-       long right;
-       long bottom;
-#ifndef FlashMediaGetRefConBounds
-       PyMac_PRECHECK(FlashMediaGetRefConBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &refCon))
-               return NULL;
-       _rv = FlashMediaGetRefConBounds(mh,
-                                       refCon,
-                                       &left,
-                                       &top,
-                                       &right,
-                                       &bottom);
-       _res = Py_BuildValue("lllll",
-                            _rv,
-                            left,
-                            top,
-                            right,
-                            bottom);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaGetRefConID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long refCon;
-       long refConID;
-#ifndef FlashMediaGetRefConID
-       PyMac_PRECHECK(FlashMediaGetRefConID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &refCon))
-               return NULL;
-       _rv = FlashMediaGetRefConID(mh,
-                                   refCon,
-                                   &refConID);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            refConID);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaIDToRefCon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long refConID;
-       long refCon;
-#ifndef FlashMediaIDToRefCon
-       PyMac_PRECHECK(FlashMediaIDToRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &refConID))
-               return NULL;
-       _rv = FlashMediaIDToRefCon(mh,
-                                  refConID,
-                                  &refCon);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            refCon);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaGetDisplayedFrameNumber(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long flashFrameNumber;
-#ifndef FlashMediaGetDisplayedFrameNumber
-       PyMac_PRECHECK(FlashMediaGetDisplayedFrameNumber);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = FlashMediaGetDisplayedFrameNumber(mh,
-                                               &flashFrameNumber);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            flashFrameNumber);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaFrameNumberToMovieTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long flashFrameNumber;
-       TimeValue movieTime;
-#ifndef FlashMediaFrameNumberToMovieTime
-       PyMac_PRECHECK(FlashMediaFrameNumberToMovieTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &flashFrameNumber))
-               return NULL;
-       _rv = FlashMediaFrameNumberToMovieTime(mh,
-                                              flashFrameNumber,
-                                              &movieTime);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            movieTime);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaFrameLabelToMovieTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Ptr theLabel;
-       TimeValue movieTime;
-#ifndef FlashMediaFrameLabelToMovieTime
-       PyMac_PRECHECK(FlashMediaFrameLabelToMovieTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &mh,
-                             &theLabel))
-               return NULL;
-       _rv = FlashMediaFrameLabelToMovieTime(mh,
-                                             theLabel,
-                                             &movieTime);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            movieTime);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaGetFlashVariable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       char path;
-       char name;
-       Handle theVariableCStringOut;
-#ifndef FlashMediaGetFlashVariable
-       PyMac_PRECHECK(FlashMediaGetFlashVariable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = FlashMediaGetFlashVariable(mh,
-                                        &path,
-                                        &name,
-                                        &theVariableCStringOut);
-       _res = Py_BuildValue("lccO&",
-                            _rv,
-                            path,
-                            name,
-                            ResObj_New, theVariableCStringOut);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaSetFlashVariable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       char path;
-       char name;
-       char value;
-       Boolean updateFocus;
-#ifndef FlashMediaSetFlashVariable
-       PyMac_PRECHECK(FlashMediaSetFlashVariable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpInstObj_Convert, &mh,
-                             &updateFocus))
-               return NULL;
-       _rv = FlashMediaSetFlashVariable(mh,
-                                        &path,
-                                        &name,
-                                        &value,
-                                        updateFocus);
-       _res = Py_BuildValue("lccc",
-                            _rv,
-                            path,
-                            name,
-                            value);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaDoButtonActions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       char path;
-       long buttonID;
-       long transition;
-#ifndef FlashMediaDoButtonActions
-       PyMac_PRECHECK(FlashMediaDoButtonActions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mh,
-                             &buttonID,
-                             &transition))
-               return NULL;
-       _rv = FlashMediaDoButtonActions(mh,
-                                       &path,
-                                       buttonID,
-                                       transition);
-       _res = Py_BuildValue("lc",
-                            _rv,
-                            path);
-       return _res;
-}
-
-static PyObject *Qt_FlashMediaGetSupportedSwfVersion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       UInt8 swfVersion;
-#ifndef FlashMediaGetSupportedSwfVersion
-       PyMac_PRECHECK(FlashMediaGetSupportedSwfVersion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = FlashMediaGetSupportedSwfVersion(mh,
-                                              &swfVersion);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            swfVersion);
-       return _res;
-}
-
-static PyObject *Qt_Media3DGetCurrentGroup(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       void * group;
-#ifndef Media3DGetCurrentGroup
-       PyMac_PRECHECK(Media3DGetCurrentGroup);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &mh,
-                             &group))
-               return NULL;
-       _rv = Media3DGetCurrentGroup(mh,
-                                    group);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_Media3DTranslateNamedObjectTo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       char objectName;
-       Fixed x;
-       Fixed y;
-       Fixed z;
-#ifndef Media3DTranslateNamedObjectTo
-       PyMac_PRECHECK(Media3DTranslateNamedObjectTo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetFixed, &x,
-                             PyMac_GetFixed, &y,
-                             PyMac_GetFixed, &z))
-               return NULL;
-       _rv = Media3DTranslateNamedObjectTo(mh,
-                                           &objectName,
-                                           x,
-                                           y,
-                                           z);
-       _res = Py_BuildValue("lc",
-                            _rv,
-                            objectName);
-       return _res;
-}
-
-static PyObject *Qt_Media3DScaleNamedObjectTo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       char objectName;
-       Fixed xScale;
-       Fixed yScale;
-       Fixed zScale;
-#ifndef Media3DScaleNamedObjectTo
-       PyMac_PRECHECK(Media3DScaleNamedObjectTo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetFixed, &xScale,
-                             PyMac_GetFixed, &yScale,
-                             PyMac_GetFixed, &zScale))
-               return NULL;
-       _rv = Media3DScaleNamedObjectTo(mh,
-                                       &objectName,
-                                       xScale,
-                                       yScale,
-                                       zScale);
-       _res = Py_BuildValue("lc",
-                            _rv,
-                            objectName);
-       return _res;
-}
-
-static PyObject *Qt_Media3DRotateNamedObjectTo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       char objectName;
-       Fixed xDegrees;
-       Fixed yDegrees;
-       Fixed zDegrees;
-#ifndef Media3DRotateNamedObjectTo
-       PyMac_PRECHECK(Media3DRotateNamedObjectTo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetFixed, &xDegrees,
-                             PyMac_GetFixed, &yDegrees,
-                             PyMac_GetFixed, &zDegrees))
-               return NULL;
-       _rv = Media3DRotateNamedObjectTo(mh,
-                                        &objectName,
-                                        xDegrees,
-                                        yDegrees,
-                                        zDegrees);
-       _res = Py_BuildValue("lc",
-                            _rv,
-                            objectName);
-       return _res;
-}
-
-static PyObject *Qt_Media3DSetCameraData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       void * cameraData;
-#ifndef Media3DSetCameraData
-       PyMac_PRECHECK(Media3DSetCameraData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &mh,
-                             &cameraData))
-               return NULL;
-       _rv = Media3DSetCameraData(mh,
-                                  cameraData);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_Media3DGetCameraData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       void * cameraData;
-#ifndef Media3DGetCameraData
-       PyMac_PRECHECK(Media3DGetCameraData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &mh,
-                             &cameraData))
-               return NULL;
-       _rv = Media3DGetCameraData(mh,
-                                  cameraData);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_Media3DSetCameraAngleAspect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTFloatSingle fov;
-       QTFloatSingle aspectRatioXToY;
-#ifndef Media3DSetCameraAngleAspect
-       PyMac_PRECHECK(Media3DSetCameraAngleAspect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ff",
-                             CmpInstObj_Convert, &mh,
-                             &fov,
-                             &aspectRatioXToY))
-               return NULL;
-       _rv = Media3DSetCameraAngleAspect(mh,
-                                         fov,
-                                         aspectRatioXToY);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_Media3DGetCameraAngleAspect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTFloatSingle fov;
-       QTFloatSingle aspectRatioXToY;
-#ifndef Media3DGetCameraAngleAspect
-       PyMac_PRECHECK(Media3DGetCameraAngleAspect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = Media3DGetCameraAngleAspect(mh,
-                                         &fov,
-                                         &aspectRatioXToY);
-       _res = Py_BuildValue("lff",
-                            _rv,
-                            fov,
-                            aspectRatioXToY);
-       return _res;
-}
-
-static PyObject *Qt_Media3DSetCameraRange(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       void * tQ3CameraRange;
-#ifndef Media3DSetCameraRange
-       PyMac_PRECHECK(Media3DSetCameraRange);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &mh,
-                             &tQ3CameraRange))
-               return NULL;
-       _rv = Media3DSetCameraRange(mh,
-                                   tQ3CameraRange);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_Media3DGetCameraRange(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       void * tQ3CameraRange;
-#ifndef Media3DGetCameraRange
-       PyMac_PRECHECK(Media3DGetCameraRange);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &mh,
-                             &tQ3CameraRange))
-               return NULL;
-       _rv = Media3DGetCameraRange(mh,
-                                   tQ3CameraRange);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_NewTimeBase(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeBase _rv;
-#ifndef NewTimeBase
-       PyMac_PRECHECK(NewTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = NewTimeBase();
-       _res = Py_BuildValue("O&",
-                            TimeBaseObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qt_ConvertTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeRecord theTime;
-       TimeBase newBase;
-#ifndef ConvertTime
-       PyMac_PRECHECK(ConvertTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             QtTimeRecord_Convert, &theTime,
-                             TimeBaseObj_Convert, &newBase))
-               return NULL;
-       ConvertTime(&theTime,
-                   newBase);
-       _res = Py_BuildValue("O&",
-                            QtTimeRecord_New, &theTime);
-       return _res;
-}
-
-static PyObject *Qt_ConvertTimeScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeRecord theTime;
-       TimeScale newScale;
-#ifndef ConvertTimeScale
-       PyMac_PRECHECK(ConvertTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             QtTimeRecord_Convert, &theTime,
-                             &newScale))
-               return NULL;
-       ConvertTimeScale(&theTime,
-                        newScale);
-       _res = Py_BuildValue("O&",
-                            QtTimeRecord_New, &theTime);
-       return _res;
-}
-
-static PyObject *Qt_AddTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeRecord dst;
-       TimeRecord src;
-#ifndef AddTime
-       PyMac_PRECHECK(AddTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             QtTimeRecord_Convert, &dst,
-                             QtTimeRecord_Convert, &src))
-               return NULL;
-       AddTime(&dst,
-               &src);
-       _res = Py_BuildValue("O&",
-                            QtTimeRecord_New, &dst);
-       return _res;
-}
-
-static PyObject *Qt_SubtractTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TimeRecord dst;
-       TimeRecord src;
-#ifndef SubtractTime
-       PyMac_PRECHECK(SubtractTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             QtTimeRecord_Convert, &dst,
-                             QtTimeRecord_Convert, &src))
-               return NULL;
-       SubtractTime(&dst,
-                    &src);
-       _res = Py_BuildValue("O&",
-                            QtTimeRecord_New, &dst);
-       return _res;
-}
-
-static PyObject *Qt_MusicMediaGetIndexedTunePlayer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ti;
-       long sampleDescIndex;
-       ComponentInstance tp;
-#ifndef MusicMediaGetIndexedTunePlayer
-       PyMac_PRECHECK(MusicMediaGetIndexedTunePlayer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &ti,
-                             &sampleDescIndex))
-               return NULL;
-       _rv = MusicMediaGetIndexedTunePlayer(ti,
-                                            sampleDescIndex,
-                                            &tp);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CmpInstObj_New, tp);
-       return _res;
-}
-
-static PyObject *Qt_CodecManagerVersion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long version;
-#ifndef CodecManagerVersion
-       PyMac_PRECHECK(CodecManagerVersion);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CodecManagerVersion(&version);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            version);
-       return _res;
-}
-
-static PyObject *Qt_GetMaxCompressionSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PixMapHandle src;
-       Rect srcRect;
-       short colorDepth;
-       CodecQ quality;
-       CodecType cType;
-       CompressorComponent codec;
-       long size;
-#ifndef GetMaxCompressionSize
-       PyMac_PRECHECK(GetMaxCompressionSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hlO&O&",
-                             ResObj_Convert, &src,
-                             PyMac_GetRect, &srcRect,
-                             &colorDepth,
-                             &quality,
-                             PyMac_GetOSType, &cType,
-                             CmpObj_Convert, &codec))
-               return NULL;
-       _err = GetMaxCompressionSize(src,
-                                    &srcRect,
-                                    colorDepth,
-                                    quality,
-                                    cType,
-                                    codec,
-                                    &size);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            size);
-       return _res;
-}
-
-static PyObject *Qt_GetCompressionTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PixMapHandle src;
-       Rect srcRect;
-       short colorDepth;
-       CodecType cType;
-       CompressorComponent codec;
-       CodecQ spatialQuality;
-       CodecQ temporalQuality;
-       unsigned long compressTime;
-#ifndef GetCompressionTime
-       PyMac_PRECHECK(GetCompressionTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hO&O&",
-                             ResObj_Convert, &src,
-                             PyMac_GetRect, &srcRect,
-                             &colorDepth,
-                             PyMac_GetOSType, &cType,
-                             CmpObj_Convert, &codec))
-               return NULL;
-       _err = GetCompressionTime(src,
-                                 &srcRect,
-                                 colorDepth,
-                                 cType,
-                                 codec,
-                                 &spatialQuality,
-                                 &temporalQuality,
-                                 &compressTime);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("lll",
-                            spatialQuality,
-                            temporalQuality,
-                            compressTime);
-       return _res;
-}
-
-static PyObject *Qt_CompressImage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PixMapHandle src;
-       Rect srcRect;
-       CodecQ quality;
-       CodecType cType;
-       ImageDescriptionHandle desc;
-       Ptr data;
-#ifndef CompressImage
-       PyMac_PRECHECK(CompressImage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lO&O&s",
-                             ResObj_Convert, &src,
-                             PyMac_GetRect, &srcRect,
-                             &quality,
-                             PyMac_GetOSType, &cType,
-                             ResObj_Convert, &desc,
-                             &data))
-               return NULL;
-       _err = CompressImage(src,
-                            &srcRect,
-                            quality,
-                            cType,
-                            desc,
-                            data);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_DecompressImage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Ptr data;
-       ImageDescriptionHandle desc;
-       PixMapHandle dst;
-       Rect srcRect;
-       Rect dstRect;
-       short mode;
-       RgnHandle mask;
-#ifndef DecompressImage
-       PyMac_PRECHECK(DecompressImage);
-#endif
-       if (!PyArg_ParseTuple(_args, "sO&O&O&O&hO&",
-                             &data,
-                             ResObj_Convert, &desc,
-                             ResObj_Convert, &dst,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &dstRect,
-                             &mode,
-                             ResObj_Convert, &mask))
-               return NULL;
-       _err = DecompressImage(data,
-                              desc,
-                              dst,
-                              &srcRect,
-                              &dstRect,
-                              mode,
-                              mask);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_GetSimilarity(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PixMapHandle src;
-       Rect srcRect;
-       ImageDescriptionHandle desc;
-       Ptr data;
-       Fixed similarity;
-#ifndef GetSimilarity
-       PyMac_PRECHECK(GetSimilarity);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&s",
-                             ResObj_Convert, &src,
-                             PyMac_GetRect, &srcRect,
-                             ResObj_Convert, &desc,
-                             &data))
-               return NULL;
-       _err = GetSimilarity(src,
-                            &srcRect,
-                            desc,
-                            data,
-                            &similarity);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, similarity);
-       return _res;
-}
-
-static PyObject *Qt_GetImageDescriptionCTable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ImageDescriptionHandle desc;
-       CTabHandle ctable;
-#ifndef GetImageDescriptionCTable
-       PyMac_PRECHECK(GetImageDescriptionCTable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &desc))
-               return NULL;
-       _err = GetImageDescriptionCTable(desc,
-                                        &ctable);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, ctable);
-       return _res;
-}
-
-static PyObject *Qt_SetImageDescriptionCTable(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ImageDescriptionHandle desc;
-       CTabHandle ctable;
-#ifndef SetImageDescriptionCTable
-       PyMac_PRECHECK(SetImageDescriptionCTable);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &desc,
-                             ResObj_Convert, &ctable))
-               return NULL;
-       _err = SetImageDescriptionCTable(desc,
-                                        ctable);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_GetImageDescriptionExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ImageDescriptionHandle desc;
-       Handle extension;
-       long idType;
-       long index;
-#ifndef GetImageDescriptionExtension
-       PyMac_PRECHECK(GetImageDescriptionExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             ResObj_Convert, &desc,
-                             &idType,
-                             &index))
-               return NULL;
-       _err = GetImageDescriptionExtension(desc,
-                                           &extension,
-                                           idType,
-                                           index);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, extension);
-       return _res;
-}
-
-static PyObject *Qt_AddImageDescriptionExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ImageDescriptionHandle desc;
-       Handle extension;
-       long idType;
-#ifndef AddImageDescriptionExtension
-       PyMac_PRECHECK(AddImageDescriptionExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             ResObj_Convert, &desc,
-                             ResObj_Convert, &extension,
-                             &idType))
-               return NULL;
-       _err = AddImageDescriptionExtension(desc,
-                                           extension,
-                                           idType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_RemoveImageDescriptionExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ImageDescriptionHandle desc;
-       long idType;
-       long index;
-#ifndef RemoveImageDescriptionExtension
-       PyMac_PRECHECK(RemoveImageDescriptionExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             ResObj_Convert, &desc,
-                             &idType,
-                             &index))
-               return NULL;
-       _err = RemoveImageDescriptionExtension(desc,
-                                              idType,
-                                              index);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_CountImageDescriptionExtensionType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ImageDescriptionHandle desc;
-       long idType;
-       long count;
-#ifndef CountImageDescriptionExtensionType
-       PyMac_PRECHECK(CountImageDescriptionExtensionType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ResObj_Convert, &desc,
-                             &idType))
-               return NULL;
-       _err = CountImageDescriptionExtensionType(desc,
-                                                 idType,
-                                                 &count);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            count);
-       return _res;
-}
-
-static PyObject *Qt_GetNextImageDescriptionExtensionType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ImageDescriptionHandle desc;
-       long idType;
-#ifndef GetNextImageDescriptionExtensionType
-       PyMac_PRECHECK(GetNextImageDescriptionExtensionType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &desc))
-               return NULL;
-       _err = GetNextImageDescriptionExtensionType(desc,
-                                                   &idType);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            idType);
-       return _res;
-}
-
-static PyObject *Qt_FindCodec(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       CodecType cType;
-       CodecComponent specCodec;
-       CompressorComponent compressor;
-       DecompressorComponent decompressor;
-#ifndef FindCodec
-       PyMac_PRECHECK(FindCodec);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &cType,
-                             CmpObj_Convert, &specCodec))
-               return NULL;
-       _err = FindCodec(cType,
-                        specCodec,
-                        &compressor,
-                        &decompressor);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            CmpObj_New, compressor,
-                            CmpObj_New, decompressor);
-       return _res;
-}
-
-static PyObject *Qt_CompressPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PicHandle srcPicture;
-       PicHandle dstPicture;
-       CodecQ quality;
-       CodecType cType;
-#ifndef CompressPicture
-       PyMac_PRECHECK(CompressPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lO&",
-                             ResObj_Convert, &srcPicture,
-                             ResObj_Convert, &dstPicture,
-                             &quality,
-                             PyMac_GetOSType, &cType))
-               return NULL;
-       _err = CompressPicture(srcPicture,
-                              dstPicture,
-                              quality,
-                              cType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_CompressPictureFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short srcRefNum;
-       short dstRefNum;
-       CodecQ quality;
-       CodecType cType;
-#ifndef CompressPictureFile
-       PyMac_PRECHECK(CompressPictureFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhlO&",
-                             &srcRefNum,
-                             &dstRefNum,
-                             &quality,
-                             PyMac_GetOSType, &cType))
-               return NULL;
-       _err = CompressPictureFile(srcRefNum,
-                                  dstRefNum,
-                                  quality,
-                                  cType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_ConvertImage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       ImageDescriptionHandle srcDD;
-       Ptr srcData;
-       short colorDepth;
-       CTabHandle ctable;
-       CodecQ accuracy;
-       CodecQ quality;
-       CodecType cType;
-       CodecComponent codec;
-       ImageDescriptionHandle dstDD;
-       Ptr dstData;
-#ifndef ConvertImage
-       PyMac_PRECHECK(ConvertImage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&shO&llO&O&O&s",
-                             ResObj_Convert, &srcDD,
-                             &srcData,
-                             &colorDepth,
-                             ResObj_Convert, &ctable,
-                             &accuracy,
-                             &quality,
-                             PyMac_GetOSType, &cType,
-                             CmpObj_Convert, &codec,
-                             ResObj_Convert, &dstDD,
-                             &dstData))
-               return NULL;
-       _err = ConvertImage(srcDD,
-                           srcData,
-                           colorDepth,
-                           ctable,
-                           accuracy,
-                           quality,
-                           cType,
-                           codec,
-                           dstDD,
-                           dstData);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_AddFilePreview(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short resRefNum;
-       OSType previewType;
-       Handle previewData;
-#ifndef AddFilePreview
-       PyMac_PRECHECK(AddFilePreview);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&O&",
-                             &resRefNum,
-                             PyMac_GetOSType, &previewType,
-                             ResObj_Convert, &previewData))
-               return NULL;
-       _err = AddFilePreview(resRefNum,
-                             previewType,
-                             previewData);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_GetBestDeviceRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       GDHandle gdh;
-       Rect rp;
-#ifndef GetBestDeviceRect
-       PyMac_PRECHECK(GetBestDeviceRect);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetBestDeviceRect(&gdh,
-                                &rp);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            OptResObj_New, gdh,
-                            PyMac_BuildRect, &rp);
-       return _res;
-}
-
-static PyObject *Qt_GDHasScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       GDHandle gdh;
-       short depth;
-       Fixed scale;
-#ifndef GDHasScale
-       PyMac_PRECHECK(GDHasScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             OptResObj_Convert, &gdh,
-                             &depth))
-               return NULL;
-       _err = GDHasScale(gdh,
-                         depth,
-                         &scale);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, scale);
-       return _res;
-}
-
-static PyObject *Qt_GDGetScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       GDHandle gdh;
-       Fixed scale;
-       short flags;
-#ifndef GDGetScale
-       PyMac_PRECHECK(GDGetScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             OptResObj_Convert, &gdh))
-               return NULL;
-       _err = GDGetScale(gdh,
-                         &scale,
-                         &flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&h",
-                            PyMac_BuildFixed, scale,
-                            flags);
-       return _res;
-}
-
-static PyObject *Qt_GDSetScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       GDHandle gdh;
-       Fixed scale;
-       short flags;
-#ifndef GDSetScale
-       PyMac_PRECHECK(GDSetScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             OptResObj_Convert, &gdh,
-                             PyMac_GetFixed, &scale,
-                             &flags))
-               return NULL;
-       _err = GDSetScale(gdh,
-                         scale,
-                         flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_GetGraphicsImporterForFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec theFile;
-       ComponentInstance gi;
-#ifndef GetGraphicsImporterForFile
-       PyMac_PRECHECK(GetGraphicsImporterForFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSSpec, &theFile))
-               return NULL;
-       _err = GetGraphicsImporterForFile(&theFile,
-                                         &gi);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, gi);
-       return _res;
-}
-
-static PyObject *Qt_GetGraphicsImporterForDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-       ComponentInstance gi;
-#ifndef GetGraphicsImporterForDataRef
-       PyMac_PRECHECK(GetGraphicsImporterForDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _err = GetGraphicsImporterForDataRef(dataRef,
-                                            dataRefType,
-                                            &gi);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, gi);
-       return _res;
-}
-
-static PyObject *Qt_GetGraphicsImporterForFileWithFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec theFile;
-       ComponentInstance gi;
-       long flags;
-#ifndef GetGraphicsImporterForFileWithFlags
-       PyMac_PRECHECK(GetGraphicsImporterForFileWithFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetFSSpec, &theFile,
-                             &flags))
-               return NULL;
-       _err = GetGraphicsImporterForFileWithFlags(&theFile,
-                                                  &gi,
-                                                  flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, gi);
-       return _res;
-}
-
-static PyObject *Qt_GetGraphicsImporterForDataRefWithFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-       ComponentInstance gi;
-       long flags;
-#ifndef GetGraphicsImporterForDataRefWithFlags
-       PyMac_PRECHECK(GetGraphicsImporterForDataRefWithFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             &flags))
-               return NULL;
-       _err = GetGraphicsImporterForDataRefWithFlags(dataRef,
-                                                     dataRefType,
-                                                     &gi,
-                                                     flags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, gi);
-       return _res;
-}
-
-static PyObject *Qt_MakeImageDescriptionForPixMap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PixMapHandle pixmap;
-       ImageDescriptionHandle idh;
-#ifndef MakeImageDescriptionForPixMap
-       PyMac_PRECHECK(MakeImageDescriptionForPixMap);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pixmap))
-               return NULL;
-       _err = MakeImageDescriptionForPixMap(pixmap,
-                                            &idh);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, idh);
-       return _res;
-}
-
-static PyObject *Qt_MakeImageDescriptionForEffect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType effectType;
-       ImageDescriptionHandle idh;
-#ifndef MakeImageDescriptionForEffect
-       PyMac_PRECHECK(MakeImageDescriptionForEffect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &effectType))
-               return NULL;
-       _err = MakeImageDescriptionForEffect(effectType,
-                                            &idh);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, idh);
-       return _res;
-}
-
-static PyObject *Qt_QTGetPixelSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       OSType PixelFormat;
-#ifndef QTGetPixelSize
-       PyMac_PRECHECK(QTGetPixelSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &PixelFormat))
-               return NULL;
-       _rv = QTGetPixelSize(PixelFormat);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTGetPixelFormatDepthForImageDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       OSType PixelFormat;
-#ifndef QTGetPixelFormatDepthForImageDescription
-       PyMac_PRECHECK(QTGetPixelFormatDepthForImageDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &PixelFormat))
-               return NULL;
-       _rv = QTGetPixelFormatDepthForImageDescription(PixelFormat);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTGetPixMapHandleRowBytes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       PixMapHandle pm;
-#ifndef QTGetPixMapHandleRowBytes
-       PyMac_PRECHECK(QTGetPixMapHandleRowBytes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       _rv = QTGetPixMapHandleRowBytes(pm);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTSetPixMapHandleRowBytes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PixMapHandle pm;
-       long rowBytes;
-#ifndef QTSetPixMapHandleRowBytes
-       PyMac_PRECHECK(QTSetPixMapHandleRowBytes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             ResObj_Convert, &pm,
-                             &rowBytes))
-               return NULL;
-       _err = QTSetPixMapHandleRowBytes(pm,
-                                        rowBytes);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_QTGetPixMapHandleGammaLevel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       PixMapHandle pm;
-#ifndef QTGetPixMapHandleGammaLevel
-       PyMac_PRECHECK(QTGetPixMapHandleGammaLevel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       _rv = QTGetPixMapHandleGammaLevel(pm);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTSetPixMapHandleGammaLevel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PixMapHandle pm;
-       Fixed gammaLevel;
-#ifndef QTSetPixMapHandleGammaLevel
-       PyMac_PRECHECK(QTSetPixMapHandleGammaLevel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &pm,
-                             PyMac_GetFixed, &gammaLevel))
-               return NULL;
-       _err = QTSetPixMapHandleGammaLevel(pm,
-                                          gammaLevel);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_QTGetPixMapHandleRequestedGammaLevel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       PixMapHandle pm;
-#ifndef QTGetPixMapHandleRequestedGammaLevel
-       PyMac_PRECHECK(QTGetPixMapHandleRequestedGammaLevel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pm))
-               return NULL;
-       _rv = QTGetPixMapHandleRequestedGammaLevel(pm);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTSetPixMapHandleRequestedGammaLevel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       PixMapHandle pm;
-       Fixed requestedGammaLevel;
-#ifndef QTSetPixMapHandleRequestedGammaLevel
-       PyMac_PRECHECK(QTSetPixMapHandleRequestedGammaLevel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &pm,
-                             PyMac_GetFixed, &requestedGammaLevel))
-               return NULL;
-       _err = QTSetPixMapHandleRequestedGammaLevel(pm,
-                                                   requestedGammaLevel);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_CompAdd(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       wide src;
-       wide dst;
-#ifndef CompAdd
-       PyMac_PRECHECK(CompAdd);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CompAdd(&src,
-               &dst);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_Buildwide, src,
-                            PyMac_Buildwide, dst);
-       return _res;
-}
-
-static PyObject *Qt_CompSub(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       wide src;
-       wide dst;
-#ifndef CompSub
-       PyMac_PRECHECK(CompSub);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CompSub(&src,
-               &dst);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_Buildwide, src,
-                            PyMac_Buildwide, dst);
-       return _res;
-}
-
-static PyObject *Qt_CompNeg(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       wide dst;
-#ifndef CompNeg
-       PyMac_PRECHECK(CompNeg);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CompNeg(&dst);
-       _res = Py_BuildValue("O&",
-                            PyMac_Buildwide, dst);
-       return _res;
-}
-
-static PyObject *Qt_CompShift(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       wide src;
-       short shift;
-#ifndef CompShift
-       PyMac_PRECHECK(CompShift);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &shift))
-               return NULL;
-       CompShift(&src,
-                 shift);
-       _res = Py_BuildValue("O&",
-                            PyMac_Buildwide, src);
-       return _res;
-}
-
-static PyObject *Qt_CompMul(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long src1;
-       long src2;
-       wide dst;
-#ifndef CompMul
-       PyMac_PRECHECK(CompMul);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &src1,
-                             &src2))
-               return NULL;
-       CompMul(src1,
-               src2,
-               &dst);
-       _res = Py_BuildValue("O&",
-                            PyMac_Buildwide, dst);
-       return _res;
-}
-
-static PyObject *Qt_CompDiv(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       wide numerator;
-       long denominator;
-       long remainder;
-#ifndef CompDiv
-       PyMac_PRECHECK(CompDiv);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &denominator))
-               return NULL;
-       _rv = CompDiv(&numerator,
-                     denominator,
-                     &remainder);
-       _res = Py_BuildValue("lO&l",
-                            _rv,
-                            PyMac_Buildwide, numerator,
-                            remainder);
-       return _res;
-}
-
-static PyObject *Qt_CompFixMul(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       wide compSrc;
-       Fixed fixSrc;
-       wide compDst;
-#ifndef CompFixMul
-       PyMac_PRECHECK(CompFixMul);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFixed, &fixSrc))
-               return NULL;
-       CompFixMul(&compSrc,
-                  fixSrc,
-                  &compDst);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_Buildwide, compSrc,
-                            PyMac_Buildwide, compDst);
-       return _res;
-}
-
-static PyObject *Qt_CompMulDiv(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       wide co;
-       long mul;
-       long divisor;
-#ifndef CompMulDiv
-       PyMac_PRECHECK(CompMulDiv);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &mul,
-                             &divisor))
-               return NULL;
-       CompMulDiv(&co,
-                  mul,
-                  divisor);
-       _res = Py_BuildValue("O&",
-                            PyMac_Buildwide, co);
-       return _res;
-}
-
-static PyObject *Qt_CompMulDivTrunc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       wide co;
-       long mul;
-       long divisor;
-       long remainder;
-#ifndef CompMulDivTrunc
-       PyMac_PRECHECK(CompMulDivTrunc);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &mul,
-                             &divisor))
-               return NULL;
-       CompMulDivTrunc(&co,
-                       mul,
-                       divisor,
-                       &remainder);
-       _res = Py_BuildValue("O&l",
-                            PyMac_Buildwide, co,
-                            remainder);
-       return _res;
-}
-
-static PyObject *Qt_CompCompare(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       wide a;
-       wide minusb;
-#ifndef CompCompare
-       PyMac_PRECHECK(CompCompare);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_Getwide, &a,
-                             PyMac_Getwide, &minusb))
-               return NULL;
-       _rv = CompCompare(&a,
-                         &minusb);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_CompSquareRoot(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       unsigned long _rv;
-       wide src;
-#ifndef CompSquareRoot
-       PyMac_PRECHECK(CompSquareRoot);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_Getwide, &src))
-               return NULL;
-       _rv = CompSquareRoot(&src);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_FixMulDiv(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       Fixed src;
-       Fixed mul;
-       Fixed divisor;
-#ifndef FixMulDiv
-       PyMac_PRECHECK(FixMulDiv);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetFixed, &src,
-                             PyMac_GetFixed, &mul,
-                             PyMac_GetFixed, &divisor))
-               return NULL;
-       _rv = FixMulDiv(src,
-                       mul,
-                       divisor);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *Qt_UnsignedFixMulDiv(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       Fixed src;
-       Fixed mul;
-       Fixed divisor;
-#ifndef UnsignedFixMulDiv
-       PyMac_PRECHECK(UnsignedFixMulDiv);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetFixed, &src,
-                             PyMac_GetFixed, &mul,
-                             PyMac_GetFixed, &divisor))
-               return NULL;
-       _rv = UnsignedFixMulDiv(src,
-                               mul,
-                               divisor);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *Qt_FixExp2(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       Fixed src;
-#ifndef FixExp2
-       PyMac_PRECHECK(FixExp2);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFixed, &src))
-               return NULL;
-       _rv = FixExp2(src);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *Qt_FixLog2(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       Fixed src;
-#ifndef FixLog2
-       PyMac_PRECHECK(FixLog2);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFixed, &src))
-               return NULL;
-       _rv = FixLog2(src);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *Qt_FixPow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       Fixed base;
-       Fixed exp;
-#ifndef FixPow
-       PyMac_PRECHECK(FixPow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetFixed, &base,
-                             PyMac_GetFixed, &exp))
-               return NULL;
-       _rv = FixPow(base,
-                    exp);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Handle dataRef;
-       OSType dataReType;
-#ifndef GraphicsImportSetDataReference
-       PyMac_PRECHECK(GraphicsImportSetDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataReType))
-               return NULL;
-       _rv = GraphicsImportSetDataReference(ci,
-                                            dataRef,
-                                            dataReType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Handle dataRef;
-       OSType dataReType;
-#ifndef GraphicsImportGetDataReference
-       PyMac_PRECHECK(GraphicsImportGetDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDataReference(ci,
-                                            &dataRef,
-                                            &dataReType);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, dataRef,
-                            PyMac_BuildOSType, dataReType);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetDataFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       FSSpec theFile;
-#ifndef GraphicsImportSetDataFile
-       PyMac_PRECHECK(GraphicsImportSetDataFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile))
-               return NULL;
-       _rv = GraphicsImportSetDataFile(ci,
-                                       &theFile);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDataFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       FSSpec theFile;
-#ifndef GraphicsImportGetDataFile
-       PyMac_PRECHECK(GraphicsImportGetDataFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile))
-               return NULL;
-       _rv = GraphicsImportGetDataFile(ci,
-                                       &theFile);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetDataHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Handle h;
-#ifndef GraphicsImportSetDataHandle
-       PyMac_PRECHECK(GraphicsImportSetDataHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &h))
-               return NULL;
-       _rv = GraphicsImportSetDataHandle(ci,
-                                         h);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDataHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Handle h;
-#ifndef GraphicsImportGetDataHandle
-       PyMac_PRECHECK(GraphicsImportGetDataHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDataHandle(ci,
-                                         &h);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, h);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetImageDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       ImageDescriptionHandle desc;
-#ifndef GraphicsImportGetImageDescription
-       PyMac_PRECHECK(GraphicsImportGetImageDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetImageDescription(ci,
-                                               &desc);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, desc);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDataOffsetAndSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       unsigned long offset;
-       unsigned long size;
-#ifndef GraphicsImportGetDataOffsetAndSize
-       PyMac_PRECHECK(GraphicsImportGetDataOffsetAndSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDataOffsetAndSize(ci,
-                                                &offset,
-                                                &size);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            offset,
-                            size);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportReadData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       void * dataPtr;
-       unsigned long dataOffset;
-       unsigned long dataSize;
-#ifndef GraphicsImportReadData
-       PyMac_PRECHECK(GraphicsImportReadData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&sll",
-                             CmpObj_Convert, &ci,
-                             &dataPtr,
-                             &dataOffset,
-                             &dataSize))
-               return NULL;
-       _rv = GraphicsImportReadData(ci,
-                                    dataPtr,
-                                    dataOffset,
-                                    dataSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetClip(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       RgnHandle clipRgn;
-#ifndef GraphicsImportSetClip
-       PyMac_PRECHECK(GraphicsImportSetClip);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &clipRgn))
-               return NULL;
-       _rv = GraphicsImportSetClip(ci,
-                                   clipRgn);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetClip(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       RgnHandle clipRgn;
-#ifndef GraphicsImportGetClip
-       PyMac_PRECHECK(GraphicsImportGetClip);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetClip(ci,
-                                   &clipRgn);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, clipRgn);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetSourceRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Rect sourceRect;
-#ifndef GraphicsImportSetSourceRect
-       PyMac_PRECHECK(GraphicsImportSetSourceRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetRect, &sourceRect))
-               return NULL;
-       _rv = GraphicsImportSetSourceRect(ci,
-                                         &sourceRect);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetSourceRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Rect sourceRect;
-#ifndef GraphicsImportGetSourceRect
-       PyMac_PRECHECK(GraphicsImportGetSourceRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetSourceRect(ci,
-                                         &sourceRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &sourceRect);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetNaturalBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Rect naturalBounds;
-#ifndef GraphicsImportGetNaturalBounds
-       PyMac_PRECHECK(GraphicsImportGetNaturalBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetNaturalBounds(ci,
-                                            &naturalBounds);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &naturalBounds);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportDraw(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-#ifndef GraphicsImportDraw
-       PyMac_PRECHECK(GraphicsImportDraw);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportDraw(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       CGrafPtr port;
-       GDHandle gd;
-#ifndef GraphicsImportSetGWorld
-       PyMac_PRECHECK(GraphicsImportSetGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             GrafObj_Convert, &port,
-                             OptResObj_Convert, &gd))
-               return NULL;
-       _rv = GraphicsImportSetGWorld(ci,
-                                     port,
-                                     gd);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       CGrafPtr port;
-       GDHandle gd;
-#ifndef GraphicsImportGetGWorld
-       PyMac_PRECHECK(GraphicsImportGetGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetGWorld(ci,
-                                     &port,
-                                     &gd);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            GrafObj_New, port,
-                            OptResObj_New, gd);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetBoundsRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Rect bounds;
-#ifndef GraphicsImportSetBoundsRect
-       PyMac_PRECHECK(GraphicsImportSetBoundsRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetRect, &bounds))
-               return NULL;
-       _rv = GraphicsImportSetBoundsRect(ci,
-                                         &bounds);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetBoundsRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Rect bounds;
-#ifndef GraphicsImportGetBoundsRect
-       PyMac_PRECHECK(GraphicsImportGetBoundsRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetBoundsRect(ci,
-                                         &bounds);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSaveAsPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       FSSpec fss;
-       ScriptCode scriptTag;
-#ifndef GraphicsImportSaveAsPicture
-       PyMac_PRECHECK(GraphicsImportSaveAsPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &fss,
-                             &scriptTag))
-               return NULL;
-       _rv = GraphicsImportSaveAsPicture(ci,
-                                         &fss,
-                                         scriptTag);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetGraphicsMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       long graphicsMode;
-       RGBColor opColor;
-#ifndef GraphicsImportSetGraphicsMode
-       PyMac_PRECHECK(GraphicsImportSetGraphicsMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpObj_Convert, &ci,
-                             &graphicsMode,
-                             QdRGB_Convert, &opColor))
-               return NULL;
-       _rv = GraphicsImportSetGraphicsMode(ci,
-                                           graphicsMode,
-                                           &opColor);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetGraphicsMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       long graphicsMode;
-       RGBColor opColor;
-#ifndef GraphicsImportGetGraphicsMode
-       PyMac_PRECHECK(GraphicsImportGetGraphicsMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetGraphicsMode(ci,
-                                           &graphicsMode,
-                                           &opColor);
-       _res = Py_BuildValue("llO&",
-                            _rv,
-                            graphicsMode,
-                            QdRGB_New, &opColor);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetQuality(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       CodecQ quality;
-#ifndef GraphicsImportSetQuality
-       PyMac_PRECHECK(GraphicsImportSetQuality);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &quality))
-               return NULL;
-       _rv = GraphicsImportSetQuality(ci,
-                                      quality);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetQuality(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       CodecQ quality;
-#ifndef GraphicsImportGetQuality
-       PyMac_PRECHECK(GraphicsImportGetQuality);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetQuality(ci,
-                                      &quality);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            quality);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSaveAsQuickTimeImageFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       FSSpec fss;
-       ScriptCode scriptTag;
-#ifndef GraphicsImportSaveAsQuickTimeImageFile
-       PyMac_PRECHECK(GraphicsImportSaveAsQuickTimeImageFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &fss,
-                             &scriptTag))
-               return NULL;
-       _rv = GraphicsImportSaveAsQuickTimeImageFile(ci,
-                                                    &fss,
-                                                    scriptTag);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetDataReferenceOffsetAndLimit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       unsigned long offset;
-       unsigned long limit;
-#ifndef GraphicsImportSetDataReferenceOffsetAndLimit
-       PyMac_PRECHECK(GraphicsImportSetDataReferenceOffsetAndLimit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpObj_Convert, &ci,
-                             &offset,
-                             &limit))
-               return NULL;
-       _rv = GraphicsImportSetDataReferenceOffsetAndLimit(ci,
-                                                          offset,
-                                                          limit);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDataReferenceOffsetAndLimit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       unsigned long offset;
-       unsigned long limit;
-#ifndef GraphicsImportGetDataReferenceOffsetAndLimit
-       PyMac_PRECHECK(GraphicsImportGetDataReferenceOffsetAndLimit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDataReferenceOffsetAndLimit(ci,
-                                                          &offset,
-                                                          &limit);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            offset,
-                            limit);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetAliasedDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef GraphicsImportGetAliasedDataReference
-       PyMac_PRECHECK(GraphicsImportGetAliasedDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetAliasedDataReference(ci,
-                                                   &dataRef,
-                                                   &dataRefType);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, dataRef,
-                            PyMac_BuildOSType, dataRefType);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportValidate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Boolean valid;
-#ifndef GraphicsImportValidate
-       PyMac_PRECHECK(GraphicsImportValidate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportValidate(ci,
-                                    &valid);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            valid);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetMetaData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       void * userData;
-#ifndef GraphicsImportGetMetaData
-       PyMac_PRECHECK(GraphicsImportGetMetaData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &userData))
-               return NULL;
-       _rv = GraphicsImportGetMetaData(ci,
-                                       userData);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetMIMETypeList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       void * qtAtomContainerPtr;
-#ifndef GraphicsImportGetMIMETypeList
-       PyMac_PRECHECK(GraphicsImportGetMIMETypeList);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &qtAtomContainerPtr))
-               return NULL;
-       _rv = GraphicsImportGetMIMETypeList(ci,
-                                           qtAtomContainerPtr);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportDoesDrawAllPixels(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       short drawsAllPixels;
-#ifndef GraphicsImportDoesDrawAllPixels
-       PyMac_PRECHECK(GraphicsImportDoesDrawAllPixels);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportDoesDrawAllPixels(ci,
-                                             &drawsAllPixels);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            drawsAllPixels);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetAsPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       PicHandle picture;
-#ifndef GraphicsImportGetAsPicture
-       PyMac_PRECHECK(GraphicsImportGetAsPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetAsPicture(ci,
-                                        &picture);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, picture);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportExportImageFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       OSType fileType;
-       OSType fileCreator;
-       FSSpec fss;
-       ScriptCode scriptTag;
-#ifndef GraphicsImportExportImageFile
-       PyMac_PRECHECK(GraphicsImportExportImageFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&h",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetOSType, &fileType,
-                             PyMac_GetOSType, &fileCreator,
-                             PyMac_GetFSSpec, &fss,
-                             &scriptTag))
-               return NULL;
-       _rv = GraphicsImportExportImageFile(ci,
-                                           fileType,
-                                           fileCreator,
-                                           &fss,
-                                           scriptTag);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetExportImageTypeList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       void * qtAtomContainerPtr;
-#ifndef GraphicsImportGetExportImageTypeList
-       PyMac_PRECHECK(GraphicsImportGetExportImageTypeList);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &qtAtomContainerPtr))
-               return NULL;
-       _rv = GraphicsImportGetExportImageTypeList(ci,
-                                                  qtAtomContainerPtr);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetExportSettingsAsAtomContainer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       void * qtAtomContainerPtr;
-#ifndef GraphicsImportGetExportSettingsAsAtomContainer
-       PyMac_PRECHECK(GraphicsImportGetExportSettingsAsAtomContainer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &qtAtomContainerPtr))
-               return NULL;
-       _rv = GraphicsImportGetExportSettingsAsAtomContainer(ci,
-                                                            qtAtomContainerPtr);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetExportSettingsFromAtomContainer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       void * qtAtomContainer;
-#ifndef GraphicsImportSetExportSettingsFromAtomContainer
-       PyMac_PRECHECK(GraphicsImportSetExportSettingsFromAtomContainer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &qtAtomContainer))
-               return NULL;
-       _rv = GraphicsImportSetExportSettingsFromAtomContainer(ci,
-                                                              qtAtomContainer);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetImageCount(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       unsigned long imageCount;
-#ifndef GraphicsImportGetImageCount
-       PyMac_PRECHECK(GraphicsImportGetImageCount);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetImageCount(ci,
-                                         &imageCount);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            imageCount);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetImageIndex(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       unsigned long imageIndex;
-#ifndef GraphicsImportSetImageIndex
-       PyMac_PRECHECK(GraphicsImportSetImageIndex);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &imageIndex))
-               return NULL;
-       _rv = GraphicsImportSetImageIndex(ci,
-                                         imageIndex);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetImageIndex(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       unsigned long imageIndex;
-#ifndef GraphicsImportGetImageIndex
-       PyMac_PRECHECK(GraphicsImportGetImageIndex);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetImageIndex(ci,
-                                         &imageIndex);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            imageIndex);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDataOffsetAndSize64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       wide offset;
-       wide size;
-#ifndef GraphicsImportGetDataOffsetAndSize64
-       PyMac_PRECHECK(GraphicsImportGetDataOffsetAndSize64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDataOffsetAndSize64(ci,
-                                                  &offset,
-                                                  &size);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            PyMac_Buildwide, offset,
-                            PyMac_Buildwide, size);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportReadData64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       void * dataPtr;
-       wide dataOffset;
-       unsigned long dataSize;
-#ifndef GraphicsImportReadData64
-       PyMac_PRECHECK(GraphicsImportReadData64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&sO&l",
-                             CmpObj_Convert, &ci,
-                             &dataPtr,
-                             PyMac_Getwide, &dataOffset,
-                             &dataSize))
-               return NULL;
-       _rv = GraphicsImportReadData64(ci,
-                                      dataPtr,
-                                      &dataOffset,
-                                      dataSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetDataReferenceOffsetAndLimit64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       wide offset;
-       wide limit;
-#ifndef GraphicsImportSetDataReferenceOffsetAndLimit64
-       PyMac_PRECHECK(GraphicsImportSetDataReferenceOffsetAndLimit64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_Getwide, &offset,
-                             PyMac_Getwide, &limit))
-               return NULL;
-       _rv = GraphicsImportSetDataReferenceOffsetAndLimit64(ci,
-                                                            &offset,
-                                                            &limit);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDataReferenceOffsetAndLimit64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       wide offset;
-       wide limit;
-#ifndef GraphicsImportGetDataReferenceOffsetAndLimit64
-       PyMac_PRECHECK(GraphicsImportGetDataReferenceOffsetAndLimit64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDataReferenceOffsetAndLimit64(ci,
-                                                            &offset,
-                                                            &limit);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            PyMac_Buildwide, offset,
-                            PyMac_Buildwide, limit);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDefaultClip(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       RgnHandle defaultRgn;
-#ifndef GraphicsImportGetDefaultClip
-       PyMac_PRECHECK(GraphicsImportGetDefaultClip);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDefaultClip(ci,
-                                          &defaultRgn);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, defaultRgn);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDefaultGraphicsMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       long defaultGraphicsMode;
-       RGBColor defaultOpColor;
-#ifndef GraphicsImportGetDefaultGraphicsMode
-       PyMac_PRECHECK(GraphicsImportGetDefaultGraphicsMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDefaultGraphicsMode(ci,
-                                                  &defaultGraphicsMode,
-                                                  &defaultOpColor);
-       _res = Py_BuildValue("llO&",
-                            _rv,
-                            defaultGraphicsMode,
-                            QdRGB_New, &defaultOpColor);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDefaultSourceRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Rect defaultSourceRect;
-#ifndef GraphicsImportGetDefaultSourceRect
-       PyMac_PRECHECK(GraphicsImportGetDefaultSourceRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDefaultSourceRect(ci,
-                                                &defaultSourceRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &defaultSourceRect);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetColorSyncProfile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Handle profile;
-#ifndef GraphicsImportGetColorSyncProfile
-       PyMac_PRECHECK(GraphicsImportGetColorSyncProfile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetColorSyncProfile(ci,
-                                               &profile);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, profile);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetDestRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Rect destRect;
-#ifndef GraphicsImportSetDestRect
-       PyMac_PRECHECK(GraphicsImportSetDestRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetRect, &destRect))
-               return NULL;
-       _rv = GraphicsImportSetDestRect(ci,
-                                       &destRect);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetDestRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       Rect destRect;
-#ifndef GraphicsImportGetDestRect
-       PyMac_PRECHECK(GraphicsImportGetDestRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetDestRect(ci,
-                                       &destRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &destRect);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       long flags;
-#ifndef GraphicsImportSetFlags
-       PyMac_PRECHECK(GraphicsImportSetFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &flags))
-               return NULL;
-       _rv = GraphicsImportSetFlags(ci,
-                                    flags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       long flags;
-#ifndef GraphicsImportGetFlags
-       PyMac_PRECHECK(GraphicsImportGetFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetFlags(ci,
-                                    &flags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            flags);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportGetBaseDataOffsetAndSize64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-       wide offset;
-       wide size;
-#ifndef GraphicsImportGetBaseDataOffsetAndSize64
-       PyMac_PRECHECK(GraphicsImportGetBaseDataOffsetAndSize64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportGetBaseDataOffsetAndSize64(ci,
-                                                      &offset,
-                                                      &size);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            PyMac_Buildwide, offset,
-                            PyMac_Buildwide, size);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImportSetImageIndexToThumbnail(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsImportComponent ci;
-#ifndef GraphicsImportSetImageIndexToThumbnail
-       PyMac_PRECHECK(GraphicsImportSetImageIndexToThumbnail);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImportSetImageIndexToThumbnail(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportDoExport(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long actualSizeWritten;
-#ifndef GraphicsExportDoExport
-       PyMac_PRECHECK(GraphicsExportDoExport);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportDoExport(ci,
-                                    &actualSizeWritten);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            actualSizeWritten);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportCanTranscode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Boolean canTranscode;
-#ifndef GraphicsExportCanTranscode
-       PyMac_PRECHECK(GraphicsExportCanTranscode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportCanTranscode(ci,
-                                        &canTranscode);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            canTranscode);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportDoTranscode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-#ifndef GraphicsExportDoTranscode
-       PyMac_PRECHECK(GraphicsExportDoTranscode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportDoTranscode(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportCanUseCompressor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Boolean canUseCompressor;
-       void * codecSettingsAtomContainerPtr;
-#ifndef GraphicsExportCanUseCompressor
-       PyMac_PRECHECK(GraphicsExportCanUseCompressor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &codecSettingsAtomContainerPtr))
-               return NULL;
-       _rv = GraphicsExportCanUseCompressor(ci,
-                                            &canUseCompressor,
-                                            codecSettingsAtomContainerPtr);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            canUseCompressor);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportDoUseCompressor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       void * codecSettingsAtomContainer;
-       ImageDescriptionHandle outDesc;
-#ifndef GraphicsExportDoUseCompressor
-       PyMac_PRECHECK(GraphicsExportDoUseCompressor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &codecSettingsAtomContainer))
-               return NULL;
-       _rv = GraphicsExportDoUseCompressor(ci,
-                                           codecSettingsAtomContainer,
-                                           &outDesc);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, outDesc);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportDoStandaloneExport(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-#ifndef GraphicsExportDoStandaloneExport
-       PyMac_PRECHECK(GraphicsExportDoStandaloneExport);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportDoStandaloneExport(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetDefaultFileTypeAndCreator(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       OSType fileType;
-       OSType fileCreator;
-#ifndef GraphicsExportGetDefaultFileTypeAndCreator
-       PyMac_PRECHECK(GraphicsExportGetDefaultFileTypeAndCreator);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetDefaultFileTypeAndCreator(ci,
-                                                        &fileType,
-                                                        &fileCreator);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            PyMac_BuildOSType, fileType,
-                            PyMac_BuildOSType, fileCreator);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetDefaultFileNameExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       OSType fileNameExtension;
-#ifndef GraphicsExportGetDefaultFileNameExtension
-       PyMac_PRECHECK(GraphicsExportGetDefaultFileNameExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetDefaultFileNameExtension(ci,
-                                                       &fileNameExtension);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, fileNameExtension);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetMIMETypeList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       void * qtAtomContainerPtr;
-#ifndef GraphicsExportGetMIMETypeList
-       PyMac_PRECHECK(GraphicsExportGetMIMETypeList);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &qtAtomContainerPtr))
-               return NULL;
-       _rv = GraphicsExportGetMIMETypeList(ci,
-                                           qtAtomContainerPtr);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetSettingsFromAtomContainer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       void * qtAtomContainer;
-#ifndef GraphicsExportSetSettingsFromAtomContainer
-       PyMac_PRECHECK(GraphicsExportSetSettingsFromAtomContainer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &qtAtomContainer))
-               return NULL;
-       _rv = GraphicsExportSetSettingsFromAtomContainer(ci,
-                                                        qtAtomContainer);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetSettingsAsAtomContainer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       void * qtAtomContainerPtr;
-#ifndef GraphicsExportGetSettingsAsAtomContainer
-       PyMac_PRECHECK(GraphicsExportGetSettingsAsAtomContainer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &qtAtomContainerPtr))
-               return NULL;
-       _rv = GraphicsExportGetSettingsAsAtomContainer(ci,
-                                                      qtAtomContainerPtr);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetSettingsAsText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle theText;
-#ifndef GraphicsExportGetSettingsAsText
-       PyMac_PRECHECK(GraphicsExportGetSettingsAsText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetSettingsAsText(ci,
-                                             &theText);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, theText);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetDontRecompress(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Boolean dontRecompress;
-#ifndef GraphicsExportSetDontRecompress
-       PyMac_PRECHECK(GraphicsExportSetDontRecompress);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpObj_Convert, &ci,
-                             &dontRecompress))
-               return NULL;
-       _rv = GraphicsExportSetDontRecompress(ci,
-                                             dontRecompress);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetDontRecompress(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Boolean dontRecompress;
-#ifndef GraphicsExportGetDontRecompress
-       PyMac_PRECHECK(GraphicsExportGetDontRecompress);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetDontRecompress(ci,
-                                             &dontRecompress);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            dontRecompress);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInterlaceStyle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long interlaceStyle;
-#ifndef GraphicsExportSetInterlaceStyle
-       PyMac_PRECHECK(GraphicsExportSetInterlaceStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &interlaceStyle))
-               return NULL;
-       _rv = GraphicsExportSetInterlaceStyle(ci,
-                                             interlaceStyle);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInterlaceStyle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long interlaceStyle;
-#ifndef GraphicsExportGetInterlaceStyle
-       PyMac_PRECHECK(GraphicsExportGetInterlaceStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInterlaceStyle(ci,
-                                             &interlaceStyle);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            interlaceStyle);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetMetaData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       void * userData;
-#ifndef GraphicsExportSetMetaData
-       PyMac_PRECHECK(GraphicsExportSetMetaData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &userData))
-               return NULL;
-       _rv = GraphicsExportSetMetaData(ci,
-                                       userData);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetMetaData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       void * userData;
-#ifndef GraphicsExportGetMetaData
-       PyMac_PRECHECK(GraphicsExportGetMetaData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &ci,
-                             &userData))
-               return NULL;
-       _rv = GraphicsExportGetMetaData(ci,
-                                       userData);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetTargetDataSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long targetDataSize;
-#ifndef GraphicsExportSetTargetDataSize
-       PyMac_PRECHECK(GraphicsExportSetTargetDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &targetDataSize))
-               return NULL;
-       _rv = GraphicsExportSetTargetDataSize(ci,
-                                             targetDataSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetTargetDataSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long targetDataSize;
-#ifndef GraphicsExportGetTargetDataSize
-       PyMac_PRECHECK(GraphicsExportGetTargetDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetTargetDataSize(ci,
-                                             &targetDataSize);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            targetDataSize);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetCompressionMethod(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       long compressionMethod;
-#ifndef GraphicsExportSetCompressionMethod
-       PyMac_PRECHECK(GraphicsExportSetCompressionMethod);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &compressionMethod))
-               return NULL;
-       _rv = GraphicsExportSetCompressionMethod(ci,
-                                                compressionMethod);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetCompressionMethod(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       long compressionMethod;
-#ifndef GraphicsExportGetCompressionMethod
-       PyMac_PRECHECK(GraphicsExportGetCompressionMethod);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetCompressionMethod(ci,
-                                                &compressionMethod);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            compressionMethod);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetCompressionQuality(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       CodecQ spatialQuality;
-#ifndef GraphicsExportSetCompressionQuality
-       PyMac_PRECHECK(GraphicsExportSetCompressionQuality);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &spatialQuality))
-               return NULL;
-       _rv = GraphicsExportSetCompressionQuality(ci,
-                                                 spatialQuality);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetCompressionQuality(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       CodecQ spatialQuality;
-#ifndef GraphicsExportGetCompressionQuality
-       PyMac_PRECHECK(GraphicsExportGetCompressionQuality);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetCompressionQuality(ci,
-                                                 &spatialQuality);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            spatialQuality);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetResolution(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Fixed horizontalResolution;
-       Fixed verticalResolution;
-#ifndef GraphicsExportSetResolution
-       PyMac_PRECHECK(GraphicsExportSetResolution);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFixed, &horizontalResolution,
-                             PyMac_GetFixed, &verticalResolution))
-               return NULL;
-       _rv = GraphicsExportSetResolution(ci,
-                                         horizontalResolution,
-                                         verticalResolution);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetResolution(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Fixed horizontalResolution;
-       Fixed verticalResolution;
-#ifndef GraphicsExportGetResolution
-       PyMac_PRECHECK(GraphicsExportGetResolution);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetResolution(ci,
-                                         &horizontalResolution,
-                                         &verticalResolution);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            PyMac_BuildFixed, horizontalResolution,
-                            PyMac_BuildFixed, verticalResolution);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetDepth(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       long depth;
-#ifndef GraphicsExportSetDepth
-       PyMac_PRECHECK(GraphicsExportSetDepth);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &depth))
-               return NULL;
-       _rv = GraphicsExportSetDepth(ci,
-                                    depth);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetDepth(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       long depth;
-#ifndef GraphicsExportGetDepth
-       PyMac_PRECHECK(GraphicsExportGetDepth);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetDepth(ci,
-                                    &depth);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            depth);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetColorSyncProfile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle colorSyncProfile;
-#ifndef GraphicsExportSetColorSyncProfile
-       PyMac_PRECHECK(GraphicsExportSetColorSyncProfile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &colorSyncProfile))
-               return NULL;
-       _rv = GraphicsExportSetColorSyncProfile(ci,
-                                               colorSyncProfile);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetColorSyncProfile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle colorSyncProfile;
-#ifndef GraphicsExportGetColorSyncProfile
-       PyMac_PRECHECK(GraphicsExportGetColorSyncProfile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetColorSyncProfile(ci,
-                                               &colorSyncProfile);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, colorSyncProfile);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInputDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle dataRef;
-       OSType dataRefType;
-       ImageDescriptionHandle desc;
-#ifndef GraphicsExportSetInputDataReference
-       PyMac_PRECHECK(GraphicsExportSetInputDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             ResObj_Convert, &desc))
-               return NULL;
-       _rv = GraphicsExportSetInputDataReference(ci,
-                                                 dataRef,
-                                                 dataRefType,
-                                                 desc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef GraphicsExportGetInputDataReference
-       PyMac_PRECHECK(GraphicsExportGetInputDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputDataReference(ci,
-                                                 &dataRef,
-                                                 &dataRefType);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, dataRef,
-                            PyMac_BuildOSType, dataRefType);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInputFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       FSSpec theFile;
-       ImageDescriptionHandle desc;
-#ifndef GraphicsExportSetInputFile
-       PyMac_PRECHECK(GraphicsExportSetInputFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile,
-                             ResObj_Convert, &desc))
-               return NULL;
-       _rv = GraphicsExportSetInputFile(ci,
-                                        &theFile,
-                                        desc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       FSSpec theFile;
-#ifndef GraphicsExportGetInputFile
-       PyMac_PRECHECK(GraphicsExportGetInputFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile))
-               return NULL;
-       _rv = GraphicsExportGetInputFile(ci,
-                                        &theFile);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInputHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle h;
-       ImageDescriptionHandle desc;
-#ifndef GraphicsExportSetInputHandle
-       PyMac_PRECHECK(GraphicsExportSetInputHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &h,
-                             ResObj_Convert, &desc))
-               return NULL;
-       _rv = GraphicsExportSetInputHandle(ci,
-                                          h,
-                                          desc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle h;
-#ifndef GraphicsExportGetInputHandle
-       PyMac_PRECHECK(GraphicsExportGetInputHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputHandle(ci,
-                                          &h);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, h);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInputPtr(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Ptr p;
-       unsigned long size;
-       ImageDescriptionHandle desc;
-#ifndef GraphicsExportSetInputPtr
-       PyMac_PRECHECK(GraphicsExportSetInputPtr);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&slO&",
-                             CmpObj_Convert, &ci,
-                             &p,
-                             &size,
-                             ResObj_Convert, &desc))
-               return NULL;
-       _rv = GraphicsExportSetInputPtr(ci,
-                                       p,
-                                       size,
-                                       desc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInputGraphicsImporter(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       GraphicsImportComponent grip;
-#ifndef GraphicsExportSetInputGraphicsImporter
-       PyMac_PRECHECK(GraphicsExportSetInputGraphicsImporter);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             CmpObj_Convert, &grip))
-               return NULL;
-       _rv = GraphicsExportSetInputGraphicsImporter(ci,
-                                                    grip);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputGraphicsImporter(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       GraphicsImportComponent grip;
-#ifndef GraphicsExportGetInputGraphicsImporter
-       PyMac_PRECHECK(GraphicsExportGetInputGraphicsImporter);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputGraphicsImporter(ci,
-                                                    &grip);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CmpObj_New, grip);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInputPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       PicHandle picture;
-#ifndef GraphicsExportSetInputPicture
-       PyMac_PRECHECK(GraphicsExportSetInputPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &picture))
-               return NULL;
-       _rv = GraphicsExportSetInputPicture(ci,
-                                           picture);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       PicHandle picture;
-#ifndef GraphicsExportGetInputPicture
-       PyMac_PRECHECK(GraphicsExportGetInputPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputPicture(ci,
-                                           &picture);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, picture);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInputGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       GWorldPtr gworld;
-#ifndef GraphicsExportSetInputGWorld
-       PyMac_PRECHECK(GraphicsExportSetInputGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             GWorldObj_Convert, &gworld))
-               return NULL;
-       _rv = GraphicsExportSetInputGWorld(ci,
-                                          gworld);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       GWorldPtr gworld;
-#ifndef GraphicsExportGetInputGWorld
-       PyMac_PRECHECK(GraphicsExportGetInputGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputGWorld(ci,
-                                          &gworld);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            GWorldObj_New, gworld);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInputPixmap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       PixMapHandle pixmap;
-#ifndef GraphicsExportSetInputPixmap
-       PyMac_PRECHECK(GraphicsExportSetInputPixmap);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &pixmap))
-               return NULL;
-       _rv = GraphicsExportSetInputPixmap(ci,
-                                          pixmap);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputPixmap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       PixMapHandle pixmap;
-#ifndef GraphicsExportGetInputPixmap
-       PyMac_PRECHECK(GraphicsExportGetInputPixmap);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputPixmap(ci,
-                                          &pixmap);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, pixmap);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetInputOffsetAndLimit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long offset;
-       unsigned long limit;
-#ifndef GraphicsExportSetInputOffsetAndLimit
-       PyMac_PRECHECK(GraphicsExportSetInputOffsetAndLimit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpObj_Convert, &ci,
-                             &offset,
-                             &limit))
-               return NULL;
-       _rv = GraphicsExportSetInputOffsetAndLimit(ci,
-                                                  offset,
-                                                  limit);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputOffsetAndLimit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long offset;
-       unsigned long limit;
-#ifndef GraphicsExportGetInputOffsetAndLimit
-       PyMac_PRECHECK(GraphicsExportGetInputOffsetAndLimit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputOffsetAndLimit(ci,
-                                                  &offset,
-                                                  &limit);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            offset,
-                            limit);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportMayExporterReadInputData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Boolean mayReadInputData;
-#ifndef GraphicsExportMayExporterReadInputData
-       PyMac_PRECHECK(GraphicsExportMayExporterReadInputData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportMayExporterReadInputData(ci,
-                                                    &mayReadInputData);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            mayReadInputData);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputDataSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long size;
-#ifndef GraphicsExportGetInputDataSize
-       PyMac_PRECHECK(GraphicsExportGetInputDataSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputDataSize(ci,
-                                            &size);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            size);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportReadInputData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       void * dataPtr;
-       unsigned long dataOffset;
-       unsigned long dataSize;
-#ifndef GraphicsExportReadInputData
-       PyMac_PRECHECK(GraphicsExportReadInputData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&sll",
-                             CmpObj_Convert, &ci,
-                             &dataPtr,
-                             &dataOffset,
-                             &dataSize))
-               return NULL;
-       _rv = GraphicsExportReadInputData(ci,
-                                         dataPtr,
-                                         dataOffset,
-                                         dataSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputImageDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       ImageDescriptionHandle desc;
-#ifndef GraphicsExportGetInputImageDescription
-       PyMac_PRECHECK(GraphicsExportGetInputImageDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputImageDescription(ci,
-                                                    &desc);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, desc);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputImageDimensions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Rect dimensions;
-#ifndef GraphicsExportGetInputImageDimensions
-       PyMac_PRECHECK(GraphicsExportGetInputImageDimensions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputImageDimensions(ci,
-                                                   &dimensions);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &dimensions);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetInputImageDepth(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       long inputDepth;
-#ifndef GraphicsExportGetInputImageDepth
-       PyMac_PRECHECK(GraphicsExportGetInputImageDepth);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetInputImageDepth(ci,
-                                              &inputDepth);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            inputDepth);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportDrawInputImage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       CGrafPtr gw;
-       GDHandle gd;
-       Rect srcRect;
-       Rect dstRect;
-#ifndef GraphicsExportDrawInputImage
-       PyMac_PRECHECK(GraphicsExportDrawInputImage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
-                             CmpObj_Convert, &ci,
-                             GrafObj_Convert, &gw,
-                             OptResObj_Convert, &gd,
-                             PyMac_GetRect, &srcRect,
-                             PyMac_GetRect, &dstRect))
-               return NULL;
-       _rv = GraphicsExportDrawInputImage(ci,
-                                          gw,
-                                          gd,
-                                          &srcRect,
-                                          &dstRect);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetOutputDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef GraphicsExportSetOutputDataReference
-       PyMac_PRECHECK(GraphicsExportSetOutputDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _rv = GraphicsExportSetOutputDataReference(ci,
-                                                  dataRef,
-                                                  dataRefType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetOutputDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef GraphicsExportGetOutputDataReference
-       PyMac_PRECHECK(GraphicsExportGetOutputDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetOutputDataReference(ci,
-                                                  &dataRef,
-                                                  &dataRefType);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, dataRef,
-                            PyMac_BuildOSType, dataRefType);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetOutputFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       FSSpec theFile;
-#ifndef GraphicsExportSetOutputFile
-       PyMac_PRECHECK(GraphicsExportSetOutputFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile))
-               return NULL;
-       _rv = GraphicsExportSetOutputFile(ci,
-                                         &theFile);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetOutputFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       FSSpec theFile;
-#ifndef GraphicsExportGetOutputFile
-       PyMac_PRECHECK(GraphicsExportGetOutputFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile))
-               return NULL;
-       _rv = GraphicsExportGetOutputFile(ci,
-                                         &theFile);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetOutputHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle h;
-#ifndef GraphicsExportSetOutputHandle
-       PyMac_PRECHECK(GraphicsExportSetOutputHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &h))
-               return NULL;
-       _rv = GraphicsExportSetOutputHandle(ci,
-                                           h);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetOutputHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Handle h;
-#ifndef GraphicsExportGetOutputHandle
-       PyMac_PRECHECK(GraphicsExportGetOutputHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetOutputHandle(ci,
-                                           &h);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, h);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetOutputOffsetAndMaxSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long offset;
-       unsigned long maxSize;
-       Boolean truncateFile;
-#ifndef GraphicsExportSetOutputOffsetAndMaxSize
-       PyMac_PRECHECK(GraphicsExportSetOutputOffsetAndMaxSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llb",
-                             CmpObj_Convert, &ci,
-                             &offset,
-                             &maxSize,
-                             &truncateFile))
-               return NULL;
-       _rv = GraphicsExportSetOutputOffsetAndMaxSize(ci,
-                                                     offset,
-                                                     maxSize,
-                                                     truncateFile);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetOutputOffsetAndMaxSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long offset;
-       unsigned long maxSize;
-       Boolean truncateFile;
-#ifndef GraphicsExportGetOutputOffsetAndMaxSize
-       PyMac_PRECHECK(GraphicsExportGetOutputOffsetAndMaxSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetOutputOffsetAndMaxSize(ci,
-                                                     &offset,
-                                                     &maxSize,
-                                                     &truncateFile);
-       _res = Py_BuildValue("lllb",
-                            _rv,
-                            offset,
-                            maxSize,
-                            truncateFile);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetOutputFileTypeAndCreator(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       OSType fileType;
-       OSType fileCreator;
-#ifndef GraphicsExportSetOutputFileTypeAndCreator
-       PyMac_PRECHECK(GraphicsExportSetOutputFileTypeAndCreator);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetOSType, &fileType,
-                             PyMac_GetOSType, &fileCreator))
-               return NULL;
-       _rv = GraphicsExportSetOutputFileTypeAndCreator(ci,
-                                                       fileType,
-                                                       fileCreator);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetOutputFileTypeAndCreator(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       OSType fileType;
-       OSType fileCreator;
-#ifndef GraphicsExportGetOutputFileTypeAndCreator
-       PyMac_PRECHECK(GraphicsExportGetOutputFileTypeAndCreator);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetOutputFileTypeAndCreator(ci,
-                                                       &fileType,
-                                                       &fileCreator);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            PyMac_BuildOSType, fileType,
-                            PyMac_BuildOSType, fileCreator);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetOutputMark(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long mark;
-#ifndef GraphicsExportSetOutputMark
-       PyMac_PRECHECK(GraphicsExportSetOutputMark);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &mark))
-               return NULL;
-       _rv = GraphicsExportSetOutputMark(ci,
-                                         mark);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetOutputMark(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       unsigned long mark;
-#ifndef GraphicsExportGetOutputMark
-       PyMac_PRECHECK(GraphicsExportGetOutputMark);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetOutputMark(ci,
-                                         &mark);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            mark);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportReadOutputData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       void * dataPtr;
-       unsigned long dataOffset;
-       unsigned long dataSize;
-#ifndef GraphicsExportReadOutputData
-       PyMac_PRECHECK(GraphicsExportReadOutputData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&sll",
-                             CmpObj_Convert, &ci,
-                             &dataPtr,
-                             &dataOffset,
-                             &dataSize))
-               return NULL;
-       _rv = GraphicsExportReadOutputData(ci,
-                                          dataPtr,
-                                          dataOffset,
-                                          dataSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetThumbnailEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Boolean enableThumbnail;
-       long maxThumbnailWidth;
-       long maxThumbnailHeight;
-#ifndef GraphicsExportSetThumbnailEnabled
-       PyMac_PRECHECK(GraphicsExportSetThumbnailEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&bll",
-                             CmpObj_Convert, &ci,
-                             &enableThumbnail,
-                             &maxThumbnailWidth,
-                             &maxThumbnailHeight))
-               return NULL;
-       _rv = GraphicsExportSetThumbnailEnabled(ci,
-                                               enableThumbnail,
-                                               maxThumbnailWidth,
-                                               maxThumbnailHeight);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetThumbnailEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Boolean thumbnailEnabled;
-       long maxThumbnailWidth;
-       long maxThumbnailHeight;
-#ifndef GraphicsExportGetThumbnailEnabled
-       PyMac_PRECHECK(GraphicsExportGetThumbnailEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetThumbnailEnabled(ci,
-                                               &thumbnailEnabled,
-                                               &maxThumbnailWidth,
-                                               &maxThumbnailHeight);
-       _res = Py_BuildValue("lbll",
-                            _rv,
-                            thumbnailEnabled,
-                            maxThumbnailWidth,
-                            maxThumbnailHeight);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportSetExifEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Boolean enableExif;
-#ifndef GraphicsExportSetExifEnabled
-       PyMac_PRECHECK(GraphicsExportSetExifEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpObj_Convert, &ci,
-                             &enableExif))
-               return NULL;
-       _rv = GraphicsExportSetExifEnabled(ci,
-                                          enableExif);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsExportGetExifEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicsExportComponent ci;
-       Boolean exifEnabled;
-#ifndef GraphicsExportGetExifEnabled
-       PyMac_PRECHECK(GraphicsExportGetExifEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsExportGetExifEnabled(ci,
-                                          &exifEnabled);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            exifEnabled);
-       return _res;
-}
-
-static PyObject *Qt_ImageTranscoderBeginSequence(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ImageTranscoderComponent itc;
-       ImageDescriptionHandle srcDesc;
-       ImageDescriptionHandle dstDesc;
-       void * data;
-       long dataSize;
-#ifndef ImageTranscoderBeginSequence
-       PyMac_PRECHECK(ImageTranscoderBeginSequence);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&sl",
-                             CmpObj_Convert, &itc,
-                             ResObj_Convert, &srcDesc,
-                             &data,
-                             &dataSize))
-               return NULL;
-       _rv = ImageTranscoderBeginSequence(itc,
-                                          srcDesc,
-                                          &dstDesc,
-                                          data,
-                                          dataSize);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, dstDesc);
-       return _res;
-}
-
-static PyObject *Qt_ImageTranscoderDisposeData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ImageTranscoderComponent itc;
-       void * dstData;
-#ifndef ImageTranscoderDisposeData
-       PyMac_PRECHECK(ImageTranscoderDisposeData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpObj_Convert, &itc,
-                             &dstData))
-               return NULL;
-       _rv = ImageTranscoderDisposeData(itc,
-                                        dstData);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_ImageTranscoderEndSequence(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ImageTranscoderComponent itc;
-#ifndef ImageTranscoderEndSequence
-       PyMac_PRECHECK(ImageTranscoderEndSequence);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &itc))
-               return NULL;
-       _rv = ImageTranscoderEndSequence(itc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_ClockGetTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aClock;
-       TimeRecord out;
-#ifndef ClockGetTime
-       PyMac_PRECHECK(ClockGetTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &aClock))
-               return NULL;
-       _rv = ClockGetTime(aClock,
-                          &out);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QtTimeRecord_New, &out);
-       return _res;
-}
-
-static PyObject *Qt_ClockSetTimeBase(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aClock;
-       TimeBase tb;
-#ifndef ClockSetTimeBase
-       PyMac_PRECHECK(ClockSetTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &aClock,
-                             TimeBaseObj_Convert, &tb))
-               return NULL;
-       _rv = ClockSetTimeBase(aClock,
-                              tb);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_ClockGetRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aClock;
-       Fixed rate;
-#ifndef ClockGetRate
-       PyMac_PRECHECK(ClockGetRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &aClock))
-               return NULL;
-       _rv = ClockGetRate(aClock,
-                          &rate);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildFixed, rate);
-       return _res;
-}
-
-static PyObject *Qt_SCPositionRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       Rect rp;
-       Point where;
-#ifndef SCPositionRect
-       PyMac_PRECHECK(SCPositionRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &ci))
-               return NULL;
-       _rv = SCPositionRect(ci,
-                            &rp,
-                            &where);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            PyMac_BuildRect, &rp,
-                            PyMac_BuildPoint, where);
-       return _res;
-}
-
-static PyObject *Qt_SCPositionDialog(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       short id;
-       Point where;
-#ifndef SCPositionDialog
-       PyMac_PRECHECK(SCPositionDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &ci,
-                             &id))
-               return NULL;
-       _rv = SCPositionDialog(ci,
-                              id,
-                              &where);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildPoint, where);
-       return _res;
-}
-
-static PyObject *Qt_SCSetTestImagePictHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       PicHandle testPict;
-       Rect testRect;
-       short testFlags;
-#ifndef SCSetTestImagePictHandle
-       PyMac_PRECHECK(SCSetTestImagePictHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpInstObj_Convert, &ci,
-                             ResObj_Convert, &testPict,
-                             &testFlags))
-               return NULL;
-       _rv = SCSetTestImagePictHandle(ci,
-                                      testPict,
-                                      &testRect,
-                                      testFlags);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &testRect);
-       return _res;
-}
-
-static PyObject *Qt_SCSetTestImagePictFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       short testFileRef;
-       Rect testRect;
-       short testFlags;
-#ifndef SCSetTestImagePictFile
-       PyMac_PRECHECK(SCSetTestImagePictFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             CmpInstObj_Convert, &ci,
-                             &testFileRef,
-                             &testFlags))
-               return NULL;
-       _rv = SCSetTestImagePictFile(ci,
-                                    testFileRef,
-                                    &testRect,
-                                    testFlags);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &testRect);
-       return _res;
-}
-
-static PyObject *Qt_SCSetTestImagePixMap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       PixMapHandle testPixMap;
-       Rect testRect;
-       short testFlags;
-#ifndef SCSetTestImagePixMap
-       PyMac_PRECHECK(SCSetTestImagePixMap);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpInstObj_Convert, &ci,
-                             ResObj_Convert, &testPixMap,
-                             &testFlags))
-               return NULL;
-       _rv = SCSetTestImagePixMap(ci,
-                                  testPixMap,
-                                  &testRect,
-                                  testFlags);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &testRect);
-       return _res;
-}
-
-static PyObject *Qt_SCGetBestDeviceRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       Rect r;
-#ifndef SCGetBestDeviceRect
-       PyMac_PRECHECK(SCGetBestDeviceRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &ci))
-               return NULL;
-       _rv = SCGetBestDeviceRect(ci,
-                                 &r);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qt_SCRequestImageSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-#ifndef SCRequestImageSettings
-       PyMac_PRECHECK(SCRequestImageSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &ci))
-               return NULL;
-       _rv = SCRequestImageSettings(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCCompressImage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       PixMapHandle src;
-       Rect srcRect;
-       ImageDescriptionHandle desc;
-       Handle data;
-#ifndef SCCompressImage
-       PyMac_PRECHECK(SCCompressImage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &ci,
-                             ResObj_Convert, &src,
-                             PyMac_GetRect, &srcRect))
-               return NULL;
-       _rv = SCCompressImage(ci,
-                             src,
-                             &srcRect,
-                             &desc,
-                             &data);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, desc,
-                            ResObj_New, data);
-       return _res;
-}
-
-static PyObject *Qt_SCCompressPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       PicHandle srcPicture;
-       PicHandle dstPicture;
-#ifndef SCCompressPicture
-       PyMac_PRECHECK(SCCompressPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &ci,
-                             ResObj_Convert, &srcPicture,
-                             ResObj_Convert, &dstPicture))
-               return NULL;
-       _rv = SCCompressPicture(ci,
-                               srcPicture,
-                               dstPicture);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCCompressPictureFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       short srcRefNum;
-       short dstRefNum;
-#ifndef SCCompressPictureFile
-       PyMac_PRECHECK(SCCompressPictureFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             CmpInstObj_Convert, &ci,
-                             &srcRefNum,
-                             &dstRefNum))
-               return NULL;
-       _rv = SCCompressPictureFile(ci,
-                                   srcRefNum,
-                                   dstRefNum);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCRequestSequenceSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-#ifndef SCRequestSequenceSettings
-       PyMac_PRECHECK(SCRequestSequenceSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &ci))
-               return NULL;
-       _rv = SCRequestSequenceSettings(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCCompressSequenceBegin(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       PixMapHandle src;
-       Rect srcRect;
-       ImageDescriptionHandle desc;
-#ifndef SCCompressSequenceBegin
-       PyMac_PRECHECK(SCCompressSequenceBegin);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &ci,
-                             ResObj_Convert, &src,
-                             PyMac_GetRect, &srcRect))
-               return NULL;
-       _rv = SCCompressSequenceBegin(ci,
-                                     src,
-                                     &srcRect,
-                                     &desc);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, desc);
-       return _res;
-}
-
-static PyObject *Qt_SCCompressSequenceFrame(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       PixMapHandle src;
-       Rect srcRect;
-       Handle data;
-       long dataSize;
-       short notSyncFlag;
-#ifndef SCCompressSequenceFrame
-       PyMac_PRECHECK(SCCompressSequenceFrame);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &ci,
-                             ResObj_Convert, &src,
-                             PyMac_GetRect, &srcRect))
-               return NULL;
-       _rv = SCCompressSequenceFrame(ci,
-                                     src,
-                                     &srcRect,
-                                     &data,
-                                     &dataSize,
-                                     &notSyncFlag);
-       _res = Py_BuildValue("lO&lh",
-                            _rv,
-                            ResObj_New, data,
-                            dataSize,
-                            notSyncFlag);
-       return _res;
-}
-
-static PyObject *Qt_SCCompressSequenceEnd(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-#ifndef SCCompressSequenceEnd
-       PyMac_PRECHECK(SCCompressSequenceEnd);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &ci))
-               return NULL;
-       _rv = SCCompressSequenceEnd(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCDefaultPictHandleSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       PicHandle srcPicture;
-       short motion;
-#ifndef SCDefaultPictHandleSettings
-       PyMac_PRECHECK(SCDefaultPictHandleSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpInstObj_Convert, &ci,
-                             ResObj_Convert, &srcPicture,
-                             &motion))
-               return NULL;
-       _rv = SCDefaultPictHandleSettings(ci,
-                                         srcPicture,
-                                         motion);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCDefaultPictFileSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       short srcRef;
-       short motion;
-#ifndef SCDefaultPictFileSettings
-       PyMac_PRECHECK(SCDefaultPictFileSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             CmpInstObj_Convert, &ci,
-                             &srcRef,
-                             &motion))
-               return NULL;
-       _rv = SCDefaultPictFileSettings(ci,
-                                       srcRef,
-                                       motion);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCDefaultPixMapSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       PixMapHandle src;
-       short motion;
-#ifndef SCDefaultPixMapSettings
-       PyMac_PRECHECK(SCDefaultPixMapSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpInstObj_Convert, &ci,
-                             ResObj_Convert, &src,
-                             &motion))
-               return NULL;
-       _rv = SCDefaultPixMapSettings(ci,
-                                     src,
-                                     motion);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCGetInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       OSType infoType;
-       void * info;
-#ifndef SCGetInfo
-       PyMac_PRECHECK(SCGetInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&s",
-                             CmpInstObj_Convert, &ci,
-                             PyMac_GetOSType, &infoType,
-                             &info))
-               return NULL;
-       _rv = SCGetInfo(ci,
-                       infoType,
-                       info);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCSetInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       OSType infoType;
-       void * info;
-#ifndef SCSetInfo
-       PyMac_PRECHECK(SCSetInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&s",
-                             CmpInstObj_Convert, &ci,
-                             PyMac_GetOSType, &infoType,
-                             &info))
-               return NULL;
-       _rv = SCSetInfo(ci,
-                       infoType,
-                       info);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCSetCompressFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       long flags;
-#ifndef SCSetCompressFlags
-       PyMac_PRECHECK(SCSetCompressFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &ci,
-                             &flags))
-               return NULL;
-       _rv = SCSetCompressFlags(ci,
-                                flags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SCGetCompressFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       long flags;
-#ifndef SCGetCompressFlags
-       PyMac_PRECHECK(SCGetCompressFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &ci))
-               return NULL;
-       _rv = SCGetCompressFlags(ci,
-                                &flags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            flags);
-       return _res;
-}
-
-static PyObject *Qt_SCGetSettingsAsText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-       Handle text;
-#ifndef SCGetSettingsAsText
-       PyMac_PRECHECK(SCGetSettingsAsText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &ci))
-               return NULL;
-       _rv = SCGetSettingsAsText(ci,
-                                 &text);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, text);
-       return _res;
-}
-
-static PyObject *Qt_SCAsyncIdle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance ci;
-#ifndef SCAsyncIdle
-       PyMac_PRECHECK(SCAsyncIdle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &ci))
-               return NULL;
-       _rv = SCAsyncIdle(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TweenerReset(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TweenerComponent tc;
-#ifndef TweenerReset
-       PyMac_PRECHECK(TweenerReset);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &tc))
-               return NULL;
-       _rv = TweenerReset(tc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TCGetSourceRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       HandlerError _rv;
-       MediaHandler mh;
-       TimeCodeDescriptionHandle tcdH;
-       UserData srefH;
-#ifndef TCGetSourceRef
-       PyMac_PRECHECK(TCGetSourceRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &tcdH))
-               return NULL;
-       _rv = TCGetSourceRef(mh,
-                            tcdH,
-                            &srefH);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            UserDataObj_New, srefH);
-       return _res;
-}
-
-static PyObject *Qt_TCSetSourceRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       HandlerError _rv;
-       MediaHandler mh;
-       TimeCodeDescriptionHandle tcdH;
-       UserData srefH;
-#ifndef TCSetSourceRef
-       PyMac_PRECHECK(TCSetSourceRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &tcdH,
-                             UserDataObj_Convert, &srefH))
-               return NULL;
-       _rv = TCSetSourceRef(mh,
-                            tcdH,
-                            srefH);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TCSetTimeCodeFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       HandlerError _rv;
-       MediaHandler mh;
-       long flags;
-       long flagsMask;
-#ifndef TCSetTimeCodeFlags
-       PyMac_PRECHECK(TCSetTimeCodeFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mh,
-                             &flags,
-                             &flagsMask))
-               return NULL;
-       _rv = TCSetTimeCodeFlags(mh,
-                                flags,
-                                flagsMask);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TCGetTimeCodeFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       HandlerError _rv;
-       MediaHandler mh;
-       long flags;
-#ifndef TCGetTimeCodeFlags
-       PyMac_PRECHECK(TCGetTimeCodeFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = TCGetTimeCodeFlags(mh,
-                                &flags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            flags);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       Handle dataH;
-       Movie theMovie;
-       Track targetTrack;
-       Track usedTrack;
-       TimeValue atTime;
-       TimeValue addedDuration;
-       long inFlags;
-       long outFlags;
-#ifndef MovieImportHandle
-       PyMac_PRECHECK(MovieImportHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataH,
-                             MovieObj_Convert, &theMovie,
-                             TrackObj_Convert, &targetTrack,
-                             &atTime,
-                             &inFlags))
-               return NULL;
-       _rv = MovieImportHandle(ci,
-                               dataH,
-                               theMovie,
-                               targetTrack,
-                               &usedTrack,
-                               atTime,
-                               &addedDuration,
-                               inFlags,
-                               &outFlags);
-       _res = Py_BuildValue("lO&ll",
-                            _rv,
-                            TrackObj_New, usedTrack,
-                            addedDuration,
-                            outFlags);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       FSSpec theFile;
-       Movie theMovie;
-       Track targetTrack;
-       Track usedTrack;
-       TimeValue atTime;
-       TimeValue addedDuration;
-       long inFlags;
-       long outFlags;
-#ifndef MovieImportFile
-       PyMac_PRECHECK(MovieImportFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile,
-                             MovieObj_Convert, &theMovie,
-                             TrackObj_Convert, &targetTrack,
-                             &atTime,
-                             &inFlags))
-               return NULL;
-       _rv = MovieImportFile(ci,
-                             &theFile,
-                             theMovie,
-                             targetTrack,
-                             &usedTrack,
-                             atTime,
-                             &addedDuration,
-                             inFlags,
-                             &outFlags);
-       _res = Py_BuildValue("lO&ll",
-                            _rv,
-                            TrackObj_New, usedTrack,
-                            addedDuration,
-                            outFlags);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetSampleDuration(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       TimeValue duration;
-       TimeScale scale;
-#ifndef MovieImportSetSampleDuration
-       PyMac_PRECHECK(MovieImportSetSampleDuration);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpObj_Convert, &ci,
-                             &duration,
-                             &scale))
-               return NULL;
-       _rv = MovieImportSetSampleDuration(ci,
-                                          duration,
-                                          scale);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetSampleDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       SampleDescriptionHandle desc;
-       OSType mediaType;
-#ifndef MovieImportSetSampleDescription
-       PyMac_PRECHECK(MovieImportSetSampleDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &desc,
-                             PyMac_GetOSType, &mediaType))
-               return NULL;
-       _rv = MovieImportSetSampleDescription(ci,
-                                             desc,
-                                             mediaType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetMediaFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       AliasHandle alias;
-#ifndef MovieImportSetMediaFile
-       PyMac_PRECHECK(MovieImportSetMediaFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &alias))
-               return NULL;
-       _rv = MovieImportSetMediaFile(ci,
-                                     alias);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetDimensions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       Fixed width;
-       Fixed height;
-#ifndef MovieImportSetDimensions
-       PyMac_PRECHECK(MovieImportSetDimensions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFixed, &width,
-                             PyMac_GetFixed, &height))
-               return NULL;
-       _rv = MovieImportSetDimensions(ci,
-                                      width,
-                                      height);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetChunkSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       long chunkSize;
-#ifndef MovieImportSetChunkSize
-       PyMac_PRECHECK(MovieImportSetChunkSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &chunkSize))
-               return NULL;
-       _rv = MovieImportSetChunkSize(ci,
-                                     chunkSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetAuxiliaryData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       Handle data;
-       OSType handleType;
-#ifndef MovieImportSetAuxiliaryData
-       PyMac_PRECHECK(MovieImportSetAuxiliaryData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &data,
-                             PyMac_GetOSType, &handleType))
-               return NULL;
-       _rv = MovieImportSetAuxiliaryData(ci,
-                                         data,
-                                         handleType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetFromScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       Boolean fromScrap;
-#ifndef MovieImportSetFromScrap
-       PyMac_PRECHECK(MovieImportSetFromScrap);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpObj_Convert, &ci,
-                             &fromScrap))
-               return NULL;
-       _rv = MovieImportSetFromScrap(ci,
-                                     fromScrap);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportDoUserDialog(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       FSSpec theFile;
-       Handle theData;
-       Boolean canceled;
-#ifndef MovieImportDoUserDialog
-       PyMac_PRECHECK(MovieImportDoUserDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile,
-                             ResObj_Convert, &theData))
-               return NULL;
-       _rv = MovieImportDoUserDialog(ci,
-                                     &theFile,
-                                     theData,
-                                     &canceled);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            canceled);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetDuration(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       TimeValue duration;
-#ifndef MovieImportSetDuration
-       PyMac_PRECHECK(MovieImportSetDuration);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &duration))
-               return NULL;
-       _rv = MovieImportSetDuration(ci,
-                                    duration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportGetAuxiliaryDataType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       OSType auxType;
-#ifndef MovieImportGetAuxiliaryDataType
-       PyMac_PRECHECK(MovieImportGetAuxiliaryDataType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieImportGetAuxiliaryDataType(ci,
-                                             &auxType);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, auxType);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportValidate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       FSSpec theFile;
-       Handle theData;
-       Boolean valid;
-#ifndef MovieImportValidate
-       PyMac_PRECHECK(MovieImportValidate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile,
-                             ResObj_Convert, &theData))
-               return NULL;
-       _rv = MovieImportValidate(ci,
-                                 &theFile,
-                                 theData,
-                                 &valid);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            valid);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportGetFileType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       OSType fileType;
-#ifndef MovieImportGetFileType
-       PyMac_PRECHECK(MovieImportGetFileType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieImportGetFileType(ci,
-                                    &fileType);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, fileType);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       Handle dataRef;
-       OSType dataRefType;
-       Movie theMovie;
-       Track targetTrack;
-       Track usedTrack;
-       TimeValue atTime;
-       TimeValue addedDuration;
-       long inFlags;
-       long outFlags;
-#ifndef MovieImportDataRef
-       PyMac_PRECHECK(MovieImportDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&O&ll",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             MovieObj_Convert, &theMovie,
-                             TrackObj_Convert, &targetTrack,
-                             &atTime,
-                             &inFlags))
-               return NULL;
-       _rv = MovieImportDataRef(ci,
-                                dataRef,
-                                dataRefType,
-                                theMovie,
-                                targetTrack,
-                                &usedTrack,
-                                atTime,
-                                &addedDuration,
-                                inFlags,
-                                &outFlags);
-       _res = Py_BuildValue("lO&ll",
-                            _rv,
-                            TrackObj_New, usedTrack,
-                            addedDuration,
-                            outFlags);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportGetSampleDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       SampleDescriptionHandle desc;
-       OSType mediaType;
-#ifndef MovieImportGetSampleDescription
-       PyMac_PRECHECK(MovieImportGetSampleDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieImportGetSampleDescription(ci,
-                                             &desc,
-                                             &mediaType);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, desc,
-                            PyMac_BuildOSType, mediaType);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetOffsetAndLimit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       unsigned long offset;
-       unsigned long limit;
-#ifndef MovieImportSetOffsetAndLimit
-       PyMac_PRECHECK(MovieImportSetOffsetAndLimit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpObj_Convert, &ci,
-                             &offset,
-                             &limit))
-               return NULL;
-       _rv = MovieImportSetOffsetAndLimit(ci,
-                                          offset,
-                                          limit);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetOffsetAndLimit64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       wide offset;
-       wide limit;
-#ifndef MovieImportSetOffsetAndLimit64
-       PyMac_PRECHECK(MovieImportSetOffsetAndLimit64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_Getwide, &offset,
-                             PyMac_Getwide, &limit))
-               return NULL;
-       _rv = MovieImportSetOffsetAndLimit64(ci,
-                                            &offset,
-                                            &limit);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportIdle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       long inFlags;
-       long outFlags;
-#ifndef MovieImportIdle
-       PyMac_PRECHECK(MovieImportIdle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &inFlags))
-               return NULL;
-       _rv = MovieImportIdle(ci,
-                             inFlags,
-                             &outFlags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            outFlags);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportValidateDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       Handle dataRef;
-       OSType dataRefType;
-       UInt8 valid;
-#ifndef MovieImportValidateDataRef
-       PyMac_PRECHECK(MovieImportValidateDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _rv = MovieImportValidateDataRef(ci,
-                                        dataRef,
-                                        dataRefType,
-                                        &valid);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            valid);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportGetLoadState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       long importerLoadState;
-#ifndef MovieImportGetLoadState
-       PyMac_PRECHECK(MovieImportGetLoadState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieImportGetLoadState(ci,
-                                     &importerLoadState);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            importerLoadState);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportGetMaxLoadedTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       TimeValue time;
-#ifndef MovieImportGetMaxLoadedTime
-       PyMac_PRECHECK(MovieImportGetMaxLoadedTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieImportGetMaxLoadedTime(ci,
-                                         &time);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            time);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportEstimateCompletionTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       TimeRecord time;
-#ifndef MovieImportEstimateCompletionTime
-       PyMac_PRECHECK(MovieImportEstimateCompletionTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieImportEstimateCompletionTime(ci,
-                                               &time);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QtTimeRecord_New, &time);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetDontBlock(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       Boolean dontBlock;
-#ifndef MovieImportSetDontBlock
-       PyMac_PRECHECK(MovieImportSetDontBlock);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpObj_Convert, &ci,
-                             &dontBlock))
-               return NULL;
-       _rv = MovieImportSetDontBlock(ci,
-                                     dontBlock);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportGetDontBlock(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       Boolean willBlock;
-#ifndef MovieImportGetDontBlock
-       PyMac_PRECHECK(MovieImportGetDontBlock);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieImportGetDontBlock(ci,
-                                     &willBlock);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            willBlock);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetIdleManager(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       IdleManager im;
-#ifndef MovieImportSetIdleManager
-       PyMac_PRECHECK(MovieImportSetIdleManager);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             IdleManagerObj_Convert, &im))
-               return NULL;
-       _rv = MovieImportSetIdleManager(ci,
-                                       im);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportSetNewMovieFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       long newMovieFlags;
-#ifndef MovieImportSetNewMovieFlags
-       PyMac_PRECHECK(MovieImportSetNewMovieFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &newMovieFlags))
-               return NULL;
-       _rv = MovieImportSetNewMovieFlags(ci,
-                                         newMovieFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieImportGetDestinationMediaType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieImportComponent ci;
-       OSType mediaType;
-#ifndef MovieImportGetDestinationMediaType
-       PyMac_PRECHECK(MovieImportGetDestinationMediaType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieImportGetDestinationMediaType(ci,
-                                                &mediaType);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, mediaType);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportToHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       Handle dataH;
-       Movie theMovie;
-       Track onlyThisTrack;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef MovieExportToHandle
-       PyMac_PRECHECK(MovieExportToHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataH,
-                             MovieObj_Convert, &theMovie,
-                             TrackObj_Convert, &onlyThisTrack,
-                             &startTime,
-                             &duration))
-               return NULL;
-       _rv = MovieExportToHandle(ci,
-                                 dataH,
-                                 theMovie,
-                                 onlyThisTrack,
-                                 startTime,
-                                 duration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportToFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       FSSpec theFile;
-       Movie theMovie;
-       Track onlyThisTrack;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef MovieExportToFile
-       PyMac_PRECHECK(MovieExportToFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFSSpec, &theFile,
-                             MovieObj_Convert, &theMovie,
-                             TrackObj_Convert, &onlyThisTrack,
-                             &startTime,
-                             &duration))
-               return NULL;
-       _rv = MovieExportToFile(ci,
-                               &theFile,
-                               theMovie,
-                               onlyThisTrack,
-                               startTime,
-                               duration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportGetAuxiliaryData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       Handle dataH;
-       OSType handleType;
-#ifndef MovieExportGetAuxiliaryData
-       PyMac_PRECHECK(MovieExportGetAuxiliaryData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataH))
-               return NULL;
-       _rv = MovieExportGetAuxiliaryData(ci,
-                                         dataH,
-                                         &handleType);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, handleType);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportSetSampleDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       SampleDescriptionHandle desc;
-       OSType mediaType;
-#ifndef MovieExportSetSampleDescription
-       PyMac_PRECHECK(MovieExportSetSampleDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &desc,
-                             PyMac_GetOSType, &mediaType))
-               return NULL;
-       _rv = MovieExportSetSampleDescription(ci,
-                                             desc,
-                                             mediaType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportDoUserDialog(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       Movie theMovie;
-       Track onlyThisTrack;
-       TimeValue startTime;
-       TimeValue duration;
-       Boolean canceled;
-#ifndef MovieExportDoUserDialog
-       PyMac_PRECHECK(MovieExportDoUserDialog);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&ll",
-                             CmpObj_Convert, &ci,
-                             MovieObj_Convert, &theMovie,
-                             TrackObj_Convert, &onlyThisTrack,
-                             &startTime,
-                             &duration))
-               return NULL;
-       _rv = MovieExportDoUserDialog(ci,
-                                     theMovie,
-                                     onlyThisTrack,
-                                     startTime,
-                                     duration,
-                                     &canceled);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            canceled);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportGetCreatorType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       OSType creator;
-#ifndef MovieExportGetCreatorType
-       PyMac_PRECHECK(MovieExportGetCreatorType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieExportGetCreatorType(ci,
-                                       &creator);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, creator);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportToDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       Handle dataRef;
-       OSType dataRefType;
-       Movie theMovie;
-       Track onlyThisTrack;
-       TimeValue startTime;
-       TimeValue duration;
-#ifndef MovieExportToDataRef
-       PyMac_PRECHECK(MovieExportToDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&O&ll",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             MovieObj_Convert, &theMovie,
-                             TrackObj_Convert, &onlyThisTrack,
-                             &startTime,
-                             &duration))
-               return NULL;
-       _rv = MovieExportToDataRef(ci,
-                                  dataRef,
-                                  dataRefType,
-                                  theMovie,
-                                  onlyThisTrack,
-                                  startTime,
-                                  duration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportFromProceduresToDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef MovieExportFromProceduresToDataRef
-       PyMac_PRECHECK(MovieExportFromProceduresToDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _rv = MovieExportFromProceduresToDataRef(ci,
-                                                dataRef,
-                                                dataRefType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportValidate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       Movie theMovie;
-       Track onlyThisTrack;
-       Boolean valid;
-#ifndef MovieExportValidate
-       PyMac_PRECHECK(MovieExportValidate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &ci,
-                             MovieObj_Convert, &theMovie,
-                             TrackObj_Convert, &onlyThisTrack))
-               return NULL;
-       _rv = MovieExportValidate(ci,
-                                 theMovie,
-                                 onlyThisTrack,
-                                 &valid);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            valid);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportGetFileNameExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       OSType extension;
-#ifndef MovieExportGetFileNameExtension
-       PyMac_PRECHECK(MovieExportGetFileNameExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieExportGetFileNameExtension(ci,
-                                             &extension);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, extension);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportGetShortFileTypeString(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       Str255 typeString;
-#ifndef MovieExportGetShortFileTypeString
-       PyMac_PRECHECK(MovieExportGetShortFileTypeString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetStr255, typeString))
-               return NULL;
-       _rv = MovieExportGetShortFileTypeString(ci,
-                                               typeString);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MovieExportGetSourceMediaType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MovieExportComponent ci;
-       OSType mediaType;
-#ifndef MovieExportGetSourceMediaType
-       PyMac_PRECHECK(MovieExportGetSourceMediaType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MovieExportGetSourceMediaType(ci,
-                                           &mediaType);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, mediaType);
-       return _res;
-}
-
-static PyObject *Qt_TextExportGetTimeFraction(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TextExportComponent ci;
-       long movieTimeFraction;
-#ifndef TextExportGetTimeFraction
-       PyMac_PRECHECK(TextExportGetTimeFraction);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = TextExportGetTimeFraction(ci,
-                                       &movieTimeFraction);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            movieTimeFraction);
-       return _res;
-}
-
-static PyObject *Qt_TextExportSetTimeFraction(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TextExportComponent ci;
-       long movieTimeFraction;
-#ifndef TextExportSetTimeFraction
-       PyMac_PRECHECK(TextExportSetTimeFraction);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &movieTimeFraction))
-               return NULL;
-       _rv = TextExportSetTimeFraction(ci,
-                                       movieTimeFraction);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TextExportGetSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TextExportComponent ci;
-       long setting;
-#ifndef TextExportGetSettings
-       PyMac_PRECHECK(TextExportGetSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = TextExportGetSettings(ci,
-                                   &setting);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            setting);
-       return _res;
-}
-
-static PyObject *Qt_TextExportSetSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TextExportComponent ci;
-       long setting;
-#ifndef TextExportSetSettings
-       PyMac_PRECHECK(TextExportSetSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &setting))
-               return NULL;
-       _rv = TextExportSetSettings(ci,
-                                   setting);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MIDIImportGetSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TextExportComponent ci;
-       long setting;
-#ifndef MIDIImportGetSettings
-       PyMac_PRECHECK(MIDIImportGetSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = MIDIImportGetSettings(ci,
-                                   &setting);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            setting);
-       return _res;
-}
-
-static PyObject *Qt_MIDIImportSetSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TextExportComponent ci;
-       long setting;
-#ifndef MIDIImportSetSettings
-       PyMac_PRECHECK(MIDIImportSetSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &setting))
-               return NULL;
-       _rv = MIDIImportSetSettings(ci,
-                                   setting);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImageImportSetSequenceEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicImageMovieImportComponent ci;
-       Boolean enable;
-#ifndef GraphicsImageImportSetSequenceEnabled
-       PyMac_PRECHECK(GraphicsImageImportSetSequenceEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpObj_Convert, &ci,
-                             &enable))
-               return NULL;
-       _rv = GraphicsImageImportSetSequenceEnabled(ci,
-                                                   enable);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_GraphicsImageImportGetSequenceEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       GraphicImageMovieImportComponent ci;
-       Boolean enable;
-#ifndef GraphicsImageImportGetSequenceEnabled
-       PyMac_PRECHECK(GraphicsImageImportGetSequenceEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = GraphicsImageImportGetSequenceEnabled(ci,
-                                                   &enable);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            enable);
-       return _res;
-}
-
-static PyObject *Qt_PreviewShowData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       pnotComponent p;
-       OSType dataType;
-       Handle data;
-       Rect inHere;
-#ifndef PreviewShowData
-       PyMac_PRECHECK(PreviewShowData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CmpObj_Convert, &p,
-                             PyMac_GetOSType, &dataType,
-                             ResObj_Convert, &data,
-                             PyMac_GetRect, &inHere))
-               return NULL;
-       _rv = PreviewShowData(p,
-                             dataType,
-                             data,
-                             &inHere);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_PreviewMakePreviewReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       pnotComponent p;
-       OSType previewType;
-       short resID;
-       FSSpec sourceFile;
-#ifndef PreviewMakePreviewReference
-       PyMac_PRECHECK(PreviewMakePreviewReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &p,
-                             PyMac_GetFSSpec, &sourceFile))
-               return NULL;
-       _rv = PreviewMakePreviewReference(p,
-                                         &previewType,
-                                         &resID,
-                                         &sourceFile);
-       _res = Py_BuildValue("lO&h",
-                            _rv,
-                            PyMac_BuildOSType, previewType,
-                            resID);
-       return _res;
-}
-
-static PyObject *Qt_PreviewEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       pnotComponent p;
-       EventRecord e;
-       Boolean handledEvent;
-#ifndef PreviewEvent
-       PyMac_PRECHECK(PreviewEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &p))
-               return NULL;
-       _rv = PreviewEvent(p,
-                          &e,
-                          &handledEvent);
-       _res = Py_BuildValue("lO&b",
-                            _rv,
-                            PyMac_BuildEventRecord, &e,
-                            handledEvent);
-       return _res;
-}
-
-static PyObject *Qt_DataCodecDecompress(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataCodecComponent dc;
-       void * srcData;
-       UInt32 srcSize;
-       void * dstData;
-       UInt32 dstBufferSize;
-#ifndef DataCodecDecompress
-       PyMac_PRECHECK(DataCodecDecompress);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&slsl",
-                             CmpObj_Convert, &dc,
-                             &srcData,
-                             &srcSize,
-                             &dstData,
-                             &dstBufferSize))
-               return NULL;
-       _rv = DataCodecDecompress(dc,
-                                 srcData,
-                                 srcSize,
-                                 dstData,
-                                 dstBufferSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataCodecGetCompressBufferSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataCodecComponent dc;
-       UInt32 srcSize;
-       UInt32 dstSize;
-#ifndef DataCodecGetCompressBufferSize
-       PyMac_PRECHECK(DataCodecGetCompressBufferSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &dc,
-                             &srcSize))
-               return NULL;
-       _rv = DataCodecGetCompressBufferSize(dc,
-                                            srcSize,
-                                            &dstSize);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            dstSize);
-       return _res;
-}
-
-static PyObject *Qt_DataCodecCompress(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataCodecComponent dc;
-       void * srcData;
-       UInt32 srcSize;
-       void * dstData;
-       UInt32 dstBufferSize;
-       UInt32 actualDstSize;
-       UInt32 decompressSlop;
-#ifndef DataCodecCompress
-       PyMac_PRECHECK(DataCodecCompress);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&slsl",
-                             CmpObj_Convert, &dc,
-                             &srcData,
-                             &srcSize,
-                             &dstData,
-                             &dstBufferSize))
-               return NULL;
-       _rv = DataCodecCompress(dc,
-                               srcData,
-                               srcSize,
-                               dstData,
-                               dstBufferSize,
-                               &actualDstSize,
-                               &decompressSlop);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            actualDstSize,
-                            decompressSlop);
-       return _res;
-}
-
-static PyObject *Qt_DataCodecBeginInterruptSafe(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataCodecComponent dc;
-       unsigned long maxSrcSize;
-#ifndef DataCodecBeginInterruptSafe
-       PyMac_PRECHECK(DataCodecBeginInterruptSafe);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &dc,
-                             &maxSrcSize))
-               return NULL;
-       _rv = DataCodecBeginInterruptSafe(dc,
-                                         maxSrcSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataCodecEndInterruptSafe(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataCodecComponent dc;
-#ifndef DataCodecEndInterruptSafe
-       PyMac_PRECHECK(DataCodecEndInterruptSafe);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &dc))
-               return NULL;
-       _rv = DataCodecEndInterruptSafe(dc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle h;
-       long hOffset;
-       long offset;
-       long size;
-#ifndef DataHGetData
-       PyMac_PRECHECK(DataHGetData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&lll",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &h,
-                             &hOffset,
-                             &offset,
-                             &size))
-               return NULL;
-       _rv = DataHGetData(dh,
-                          h,
-                          hOffset,
-                          offset,
-                          size);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHPutData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle h;
-       long hOffset;
-       long offset;
-       long size;
-#ifndef DataHPutData
-       PyMac_PRECHECK(DataHPutData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&ll",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &h,
-                             &hOffset,
-                             &size))
-               return NULL;
-       _rv = DataHPutData(dh,
-                          h,
-                          hOffset,
-                          &offset,
-                          size);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            offset);
-       return _res;
-}
-
-static PyObject *Qt_DataHFlushData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-#ifndef DataHFlushData
-       PyMac_PRECHECK(DataHFlushData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHFlushData(dh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHOpenForWrite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-#ifndef DataHOpenForWrite
-       PyMac_PRECHECK(DataHOpenForWrite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHOpenForWrite(dh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHCloseForWrite(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-#ifndef DataHCloseForWrite
-       PyMac_PRECHECK(DataHCloseForWrite);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHCloseForWrite(dh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHOpenForRead(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-#ifndef DataHOpenForRead
-       PyMac_PRECHECK(DataHOpenForRead);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHOpenForRead(dh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHCloseForRead(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-#ifndef DataHCloseForRead
-       PyMac_PRECHECK(DataHCloseForRead);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHCloseForRead(dh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle dataRef;
-#ifndef DataHSetDataRef
-       PyMac_PRECHECK(DataHSetDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &dataRef))
-               return NULL;
-       _rv = DataHSetDataRef(dh,
-                             dataRef);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle dataRef;
-#ifndef DataHGetDataRef
-       PyMac_PRECHECK(DataHGetDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetDataRef(dh,
-                             &dataRef);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, dataRef);
-       return _res;
-}
-
-static PyObject *Qt_DataHCompareDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle dataRef;
-       Boolean equal;
-#ifndef DataHCompareDataRef
-       PyMac_PRECHECK(DataHCompareDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &dataRef))
-               return NULL;
-       _rv = DataHCompareDataRef(dh,
-                                 dataRef,
-                                 &equal);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            equal);
-       return _res;
-}
-
-static PyObject *Qt_DataHTask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-#ifndef DataHTask
-       PyMac_PRECHECK(DataHTask);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHTask(dh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHFinishData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Ptr PlaceToPutDataPtr;
-       Boolean Cancel;
-#ifndef DataHFinishData
-       PyMac_PRECHECK(DataHFinishData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&sb",
-                             CmpInstObj_Convert, &dh,
-                             &PlaceToPutDataPtr,
-                             &Cancel))
-               return NULL;
-       _rv = DataHFinishData(dh,
-                             PlaceToPutDataPtr,
-                             Cancel);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHFlushCache(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-#ifndef DataHFlushCache
-       PyMac_PRECHECK(DataHFlushCache);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHFlushCache(dh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHResolveDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle theDataRef;
-       Boolean wasChanged;
-       Boolean userInterfaceAllowed;
-#ifndef DataHResolveDataRef
-       PyMac_PRECHECK(DataHResolveDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&b",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &theDataRef,
-                             &userInterfaceAllowed))
-               return NULL;
-       _rv = DataHResolveDataRef(dh,
-                                 theDataRef,
-                                 &wasChanged,
-                                 userInterfaceAllowed);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            wasChanged);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetFileSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long fileSize;
-#ifndef DataHGetFileSize
-       PyMac_PRECHECK(DataHGetFileSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetFileSize(dh,
-                              &fileSize);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            fileSize);
-       return _res;
-}
-
-static PyObject *Qt_DataHCanUseDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle dataRef;
-       long useFlags;
-#ifndef DataHCanUseDataRef
-       PyMac_PRECHECK(DataHCanUseDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &dataRef))
-               return NULL;
-       _rv = DataHCanUseDataRef(dh,
-                                dataRef,
-                                &useFlags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            useFlags);
-       return _res;
-}
-
-static PyObject *Qt_DataHPreextend(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       unsigned long maxToAdd;
-       unsigned long spaceAdded;
-#ifndef DataHPreextend
-       PyMac_PRECHECK(DataHPreextend);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &dh,
-                             &maxToAdd))
-               return NULL;
-       _rv = DataHPreextend(dh,
-                            maxToAdd,
-                            &spaceAdded);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            spaceAdded);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetFileSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long fileSize;
-#ifndef DataHSetFileSize
-       PyMac_PRECHECK(DataHSetFileSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &dh,
-                             &fileSize))
-               return NULL;
-       _rv = DataHSetFileSize(dh,
-                              fileSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetFreeSpace(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       unsigned long freeSize;
-#ifndef DataHGetFreeSpace
-       PyMac_PRECHECK(DataHGetFreeSpace);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetFreeSpace(dh,
-                               &freeSize);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            freeSize);
-       return _res;
-}
-
-static PyObject *Qt_DataHCreateFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       OSType creator;
-       Boolean deleteExisting;
-#ifndef DataHCreateFile
-       PyMac_PRECHECK(DataHCreateFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&b",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_GetOSType, &creator,
-                             &deleteExisting))
-               return NULL;
-       _rv = DataHCreateFile(dh,
-                             creator,
-                             deleteExisting);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetPreferredBlockSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long blockSize;
-#ifndef DataHGetPreferredBlockSize
-       PyMac_PRECHECK(DataHGetPreferredBlockSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetPreferredBlockSize(dh,
-                                        &blockSize);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            blockSize);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetDeviceIndex(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long deviceIndex;
-#ifndef DataHGetDeviceIndex
-       PyMac_PRECHECK(DataHGetDeviceIndex);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetDeviceIndex(dh,
-                                 &deviceIndex);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            deviceIndex);
-       return _res;
-}
-
-static PyObject *Qt_DataHIsStreamingDataHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Boolean yes;
-#ifndef DataHIsStreamingDataHandler
-       PyMac_PRECHECK(DataHIsStreamingDataHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHIsStreamingDataHandler(dh,
-                                         &yes);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            yes);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetDataInBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long startOffset;
-       long size;
-#ifndef DataHGetDataInBuffer
-       PyMac_PRECHECK(DataHGetDataInBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &dh,
-                             &startOffset))
-               return NULL;
-       _rv = DataHGetDataInBuffer(dh,
-                                  startOffset,
-                                  &size);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            size);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetScheduleAheadTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long millisecs;
-#ifndef DataHGetScheduleAheadTime
-       PyMac_PRECHECK(DataHGetScheduleAheadTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetScheduleAheadTime(dh,
-                                       &millisecs);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            millisecs);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetCacheSizeLimit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Size cacheSizeLimit;
-#ifndef DataHSetCacheSizeLimit
-       PyMac_PRECHECK(DataHSetCacheSizeLimit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &dh,
-                             &cacheSizeLimit))
-               return NULL;
-       _rv = DataHSetCacheSizeLimit(dh,
-                                    cacheSizeLimit);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetCacheSizeLimit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Size cacheSizeLimit;
-#ifndef DataHGetCacheSizeLimit
-       PyMac_PRECHECK(DataHGetCacheSizeLimit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetCacheSizeLimit(dh,
-                                    &cacheSizeLimit);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            cacheSizeLimit);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetMovie(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Movie theMovie;
-       short id;
-#ifndef DataHGetMovie
-       PyMac_PRECHECK(DataHGetMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetMovie(dh,
-                           &theMovie,
-                           &id);
-       _res = Py_BuildValue("lO&h",
-                            _rv,
-                            MovieObj_New, theMovie,
-                            id);
-       return _res;
-}
-
-static PyObject *Qt_DataHAddMovie(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Movie theMovie;
-       short id;
-#ifndef DataHAddMovie
-       PyMac_PRECHECK(DataHAddMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             MovieObj_Convert, &theMovie))
-               return NULL;
-       _rv = DataHAddMovie(dh,
-                           theMovie,
-                           &id);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            id);
-       return _res;
-}
-
-static PyObject *Qt_DataHUpdateMovie(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Movie theMovie;
-       short id;
-#ifndef DataHUpdateMovie
-       PyMac_PRECHECK(DataHUpdateMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpInstObj_Convert, &dh,
-                             MovieObj_Convert, &theMovie,
-                             &id))
-               return NULL;
-       _rv = DataHUpdateMovie(dh,
-                              theMovie,
-                              id);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHDoesBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Boolean buffersReads;
-       Boolean buffersWrites;
-#ifndef DataHDoesBuffer
-       PyMac_PRECHECK(DataHDoesBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHDoesBuffer(dh,
-                             &buffersReads,
-                             &buffersWrites);
-       _res = Py_BuildValue("lbb",
-                            _rv,
-                            buffersReads,
-                            buffersWrites);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetFileName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Str255 str;
-#ifndef DataHGetFileName
-       PyMac_PRECHECK(DataHGetFileName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_GetStr255, str))
-               return NULL;
-       _rv = DataHGetFileName(dh,
-                              str);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetAvailableFileSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long fileSize;
-#ifndef DataHGetAvailableFileSize
-       PyMac_PRECHECK(DataHGetAvailableFileSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetAvailableFileSize(dh,
-                                       &fileSize);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            fileSize);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetMacOSFileType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       OSType fileType;
-#ifndef DataHGetMacOSFileType
-       PyMac_PRECHECK(DataHGetMacOSFileType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetMacOSFileType(dh,
-                                   &fileType);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, fileType);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetMIMEType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Str255 mimeType;
-#ifndef DataHGetMIMEType
-       PyMac_PRECHECK(DataHGetMIMEType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_GetStr255, mimeType))
-               return NULL;
-       _rv = DataHGetMIMEType(dh,
-                              mimeType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetDataRefWithAnchor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle anchorDataRef;
-       OSType dataRefType;
-       Handle dataRef;
-#ifndef DataHSetDataRefWithAnchor
-       PyMac_PRECHECK(DataHSetDataRefWithAnchor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &anchorDataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             ResObj_Convert, &dataRef))
-               return NULL;
-       _rv = DataHSetDataRefWithAnchor(dh,
-                                       anchorDataRef,
-                                       dataRefType,
-                                       dataRef);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetDataRefWithAnchor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle anchorDataRef;
-       OSType dataRefType;
-       Handle dataRef;
-#ifndef DataHGetDataRefWithAnchor
-       PyMac_PRECHECK(DataHGetDataRefWithAnchor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &anchorDataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _rv = DataHGetDataRefWithAnchor(dh,
-                                       anchorDataRef,
-                                       dataRefType,
-                                       &dataRef);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, dataRef);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetMacOSFileType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       OSType fileType;
-#ifndef DataHSetMacOSFileType
-       PyMac_PRECHECK(DataHSetMacOSFileType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_GetOSType, &fileType))
-               return NULL;
-       _rv = DataHSetMacOSFileType(dh,
-                                   fileType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetTimeBase(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       TimeBase tb;
-#ifndef DataHSetTimeBase
-       PyMac_PRECHECK(DataHSetTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             TimeBaseObj_Convert, &tb))
-               return NULL;
-       _rv = DataHSetTimeBase(dh,
-                              tb);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetInfoFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       UInt32 flags;
-#ifndef DataHGetInfoFlags
-       PyMac_PRECHECK(DataHGetInfoFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetInfoFlags(dh,
-                               &flags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            flags);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetFileSize64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       wide fileSize;
-#ifndef DataHGetFileSize64
-       PyMac_PRECHECK(DataHGetFileSize64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetFileSize64(dh,
-                                &fileSize);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_Buildwide, fileSize);
-       return _res;
-}
-
-static PyObject *Qt_DataHPreextend64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       wide maxToAdd;
-       wide spaceAdded;
-#ifndef DataHPreextend64
-       PyMac_PRECHECK(DataHPreextend64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_Getwide, &maxToAdd))
-               return NULL;
-       _rv = DataHPreextend64(dh,
-                              &maxToAdd,
-                              &spaceAdded);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_Buildwide, spaceAdded);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetFileSize64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       wide fileSize;
-#ifndef DataHSetFileSize64
-       PyMac_PRECHECK(DataHSetFileSize64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_Getwide, &fileSize))
-               return NULL;
-       _rv = DataHSetFileSize64(dh,
-                                &fileSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetFreeSpace64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       wide freeSize;
-#ifndef DataHGetFreeSpace64
-       PyMac_PRECHECK(DataHGetFreeSpace64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetFreeSpace64(dh,
-                                 &freeSize);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_Buildwide, freeSize);
-       return _res;
-}
-
-static PyObject *Qt_DataHAppend64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       void * data;
-       wide fileOffset;
-       unsigned long size;
-#ifndef DataHAppend64
-       PyMac_PRECHECK(DataHAppend64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&sl",
-                             CmpInstObj_Convert, &dh,
-                             &data,
-                             &size))
-               return NULL;
-       _rv = DataHAppend64(dh,
-                           data,
-                           &fileOffset,
-                           size);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_Buildwide, fileOffset);
-       return _res;
-}
-
-static PyObject *Qt_DataHPollRead(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       void * dataPtr;
-       UInt32 dataSizeSoFar;
-#ifndef DataHPollRead
-       PyMac_PRECHECK(DataHPollRead);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &dh,
-                             &dataPtr))
-               return NULL;
-       _rv = DataHPollRead(dh,
-                           dataPtr,
-                           &dataSizeSoFar);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            dataSizeSoFar);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetDataAvailability(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long offset;
-       long len;
-       long missing_offset;
-       long missing_len;
-#ifndef DataHGetDataAvailability
-       PyMac_PRECHECK(DataHGetDataAvailability);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &dh,
-                             &offset,
-                             &len))
-               return NULL;
-       _rv = DataHGetDataAvailability(dh,
-                                      offset,
-                                      len,
-                                      &missing_offset,
-                                      &missing_len);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            missing_offset,
-                            missing_len);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetDataRefAsType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       OSType requestedType;
-       Handle dataRef;
-#ifndef DataHGetDataRefAsType
-       PyMac_PRECHECK(DataHGetDataRefAsType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_GetOSType, &requestedType))
-               return NULL;
-       _rv = DataHGetDataRefAsType(dh,
-                                   requestedType,
-                                   &dataRef);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, dataRef);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetDataRefExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle extension;
-       OSType idType;
-#ifndef DataHSetDataRefExtension
-       PyMac_PRECHECK(DataHSetDataRefExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &extension,
-                             PyMac_GetOSType, &idType))
-               return NULL;
-       _rv = DataHSetDataRefExtension(dh,
-                                      extension,
-                                      idType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetDataRefExtension(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle extension;
-       OSType idType;
-#ifndef DataHGetDataRefExtension
-       PyMac_PRECHECK(DataHGetDataRefExtension);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_GetOSType, &idType))
-               return NULL;
-       _rv = DataHGetDataRefExtension(dh,
-                                      &extension,
-                                      idType);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, extension);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetMovieWithFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Movie theMovie;
-       short id;
-       short flags;
-#ifndef DataHGetMovieWithFlags
-       PyMac_PRECHECK(DataHGetMovieWithFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &dh,
-                             &flags))
-               return NULL;
-       _rv = DataHGetMovieWithFlags(dh,
-                                    &theMovie,
-                                    &id,
-                                    flags);
-       _res = Py_BuildValue("lO&h",
-                            _rv,
-                            MovieObj_New, theMovie,
-                            id);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetFileTypeOrdering(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       DataHFileTypeOrderingHandle orderingListHandle;
-#ifndef DataHGetFileTypeOrdering
-       PyMac_PRECHECK(DataHGetFileTypeOrdering);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetFileTypeOrdering(dh,
-                                      &orderingListHandle);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, orderingListHandle);
-       return _res;
-}
-
-static PyObject *Qt_DataHCreateFileWithFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       OSType creator;
-       Boolean deleteExisting;
-       UInt32 flags;
-#ifndef DataHCreateFileWithFlags
-       PyMac_PRECHECK(DataHCreateFileWithFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&bl",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_GetOSType, &creator,
-                             &deleteExisting,
-                             &flags))
-               return NULL;
-       _rv = DataHCreateFileWithFlags(dh,
-                                      creator,
-                                      deleteExisting,
-                                      flags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       OSType what;
-       void * info;
-#ifndef DataHGetInfo
-       PyMac_PRECHECK(DataHGetInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&s",
-                             CmpInstObj_Convert, &dh,
-                             PyMac_GetOSType, &what,
-                             &info))
-               return NULL;
-       _rv = DataHGetInfo(dh,
-                          what,
-                          info);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetIdleManager(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       IdleManager im;
-#ifndef DataHSetIdleManager
-       PyMac_PRECHECK(DataHSetIdleManager);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             IdleManagerObj_Convert, &im))
-               return NULL;
-       _rv = DataHSetIdleManager(dh,
-                                 im);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHDeleteFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-#ifndef DataHDeleteFile
-       PyMac_PRECHECK(DataHDeleteFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHDeleteFile(dh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetMovieUsageFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long flags;
-#ifndef DataHSetMovieUsageFlags
-       PyMac_PRECHECK(DataHSetMovieUsageFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &dh,
-                             &flags))
-               return NULL;
-       _rv = DataHSetMovieUsageFlags(dh,
-                                     flags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHUseTemporaryDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long inFlags;
-#ifndef DataHUseTemporaryDataRef
-       PyMac_PRECHECK(DataHUseTemporaryDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &dh,
-                             &inFlags))
-               return NULL;
-       _rv = DataHUseTemporaryDataRef(dh,
-                                      inFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetTemporaryDataRefCapabilities(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long outUnderstoodFlags;
-#ifndef DataHGetTemporaryDataRefCapabilities
-       PyMac_PRECHECK(DataHGetTemporaryDataRefCapabilities);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &dh))
-               return NULL;
-       _rv = DataHGetTemporaryDataRefCapabilities(dh,
-                                                  &outUnderstoodFlags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            outUnderstoodFlags);
-       return _res;
-}
-
-static PyObject *Qt_DataHRenameFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       Handle newDataRef;
-#ifndef DataHRenameFile
-       PyMac_PRECHECK(DataHRenameFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &dh,
-                             ResObj_Convert, &newDataRef))
-               return NULL;
-       _rv = DataHRenameFile(dh,
-                             newDataRef);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHPlaybackHints(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long flags;
-       unsigned long minFileOffset;
-       unsigned long maxFileOffset;
-       long bytesPerSecond;
-#ifndef DataHPlaybackHints
-       PyMac_PRECHECK(DataHPlaybackHints);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llll",
-                             CmpInstObj_Convert, &dh,
-                             &flags,
-                             &minFileOffset,
-                             &maxFileOffset,
-                             &bytesPerSecond))
-               return NULL;
-       _rv = DataHPlaybackHints(dh,
-                                flags,
-                                minFileOffset,
-                                maxFileOffset,
-                                bytesPerSecond);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHPlaybackHints64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long flags;
-       wide minFileOffset;
-       wide maxFileOffset;
-       long bytesPerSecond;
-#ifndef DataHPlaybackHints64
-       PyMac_PRECHECK(DataHPlaybackHints64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&O&l",
-                             CmpInstObj_Convert, &dh,
-                             &flags,
-                             PyMac_Getwide, &minFileOffset,
-                             PyMac_Getwide, &maxFileOffset,
-                             &bytesPerSecond))
-               return NULL;
-       _rv = DataHPlaybackHints64(dh,
-                                  flags,
-                                  &minFileOffset,
-                                  &maxFileOffset,
-                                  bytesPerSecond);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_DataHGetDataRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long flags;
-       long bytesPerSecond;
-#ifndef DataHGetDataRate
-       PyMac_PRECHECK(DataHGetDataRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &dh,
-                             &flags))
-               return NULL;
-       _rv = DataHGetDataRate(dh,
-                              flags,
-                              &bytesPerSecond);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            bytesPerSecond);
-       return _res;
-}
-
-static PyObject *Qt_DataHSetTimeHints(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       DataHandler dh;
-       long flags;
-       long bandwidthPriority;
-       TimeScale scale;
-       TimeValue minTime;
-       TimeValue maxTime;
-#ifndef DataHSetTimeHints
-       PyMac_PRECHECK(DataHSetTimeHints);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lllll",
-                             CmpInstObj_Convert, &dh,
-                             &flags,
-                             &bandwidthPriority,
-                             &scale,
-                             &minTime,
-                             &maxTime))
-               return NULL;
-       _rv = DataHSetTimeHints(dh,
-                               flags,
-                               bandwidthPriority,
-                               scale,
-                               minTime,
-                               maxTime);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetMaxSrcRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short inputStd;
-       Rect maxSrcRect;
-#ifndef VDGetMaxSrcRect
-       PyMac_PRECHECK(VDGetMaxSrcRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &inputStd))
-               return NULL;
-       _rv = VDGetMaxSrcRect(ci,
-                             inputStd,
-                             &maxSrcRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &maxSrcRect);
-       return _res;
-}
-
-static PyObject *Qt_VDGetActiveSrcRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short inputStd;
-       Rect activeSrcRect;
-#ifndef VDGetActiveSrcRect
-       PyMac_PRECHECK(VDGetActiveSrcRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &inputStd))
-               return NULL;
-       _rv = VDGetActiveSrcRect(ci,
-                                inputStd,
-                                &activeSrcRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &activeSrcRect);
-       return _res;
-}
-
-static PyObject *Qt_VDSetDigitizerRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       Rect digitizerRect;
-#ifndef VDSetDigitizerRect
-       PyMac_PRECHECK(VDSetDigitizerRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetDigitizerRect(ci,
-                                &digitizerRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &digitizerRect);
-       return _res;
-}
-
-static PyObject *Qt_VDGetDigitizerRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       Rect digitizerRect;
-#ifndef VDGetDigitizerRect
-       PyMac_PRECHECK(VDGetDigitizerRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetDigitizerRect(ci,
-                                &digitizerRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &digitizerRect);
-       return _res;
-}
-
-static PyObject *Qt_VDGetVBlankRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short inputStd;
-       Rect vBlankRect;
-#ifndef VDGetVBlankRect
-       PyMac_PRECHECK(VDGetVBlankRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &inputStd))
-               return NULL;
-       _rv = VDGetVBlankRect(ci,
-                             inputStd,
-                             &vBlankRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &vBlankRect);
-       return _res;
-}
-
-static PyObject *Qt_VDGetMaskPixMap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       PixMapHandle maskPixMap;
-#ifndef VDGetMaskPixMap
-       PyMac_PRECHECK(VDGetMaskPixMap);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &maskPixMap))
-               return NULL;
-       _rv = VDGetMaskPixMap(ci,
-                             maskPixMap);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDUseThisCLUT(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       CTabHandle colorTableHandle;
-#ifndef VDUseThisCLUT
-       PyMac_PRECHECK(VDUseThisCLUT);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &colorTableHandle))
-               return NULL;
-       _rv = VDUseThisCLUT(ci,
-                           colorTableHandle);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetInputGammaValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       Fixed channel1;
-       Fixed channel2;
-       Fixed channel3;
-#ifndef VDSetInputGammaValue
-       PyMac_PRECHECK(VDSetInputGammaValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFixed, &channel1,
-                             PyMac_GetFixed, &channel2,
-                             PyMac_GetFixed, &channel3))
-               return NULL;
-       _rv = VDSetInputGammaValue(ci,
-                                  channel1,
-                                  channel2,
-                                  channel3);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetInputGammaValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       Fixed channel1;
-       Fixed channel2;
-       Fixed channel3;
-#ifndef VDGetInputGammaValue
-       PyMac_PRECHECK(VDGetInputGammaValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetInputGammaValue(ci,
-                                  &channel1,
-                                  &channel2,
-                                  &channel3);
-       _res = Py_BuildValue("lO&O&O&",
-                            _rv,
-                            PyMac_BuildFixed, channel1,
-                            PyMac_BuildFixed, channel2,
-                            PyMac_BuildFixed, channel3);
-       return _res;
-}
-
-static PyObject *Qt_VDSetBrightness(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short brightness;
-#ifndef VDSetBrightness
-       PyMac_PRECHECK(VDSetBrightness);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetBrightness(ci,
-                             &brightness);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            brightness);
-       return _res;
-}
-
-static PyObject *Qt_VDGetBrightness(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short brightness;
-#ifndef VDGetBrightness
-       PyMac_PRECHECK(VDGetBrightness);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetBrightness(ci,
-                             &brightness);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            brightness);
-       return _res;
-}
-
-static PyObject *Qt_VDSetContrast(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short contrast;
-#ifndef VDSetContrast
-       PyMac_PRECHECK(VDSetContrast);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetContrast(ci,
-                           &contrast);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            contrast);
-       return _res;
-}
-
-static PyObject *Qt_VDSetHue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short hue;
-#ifndef VDSetHue
-       PyMac_PRECHECK(VDSetHue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetHue(ci,
-                      &hue);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            hue);
-       return _res;
-}
-
-static PyObject *Qt_VDSetSharpness(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short sharpness;
-#ifndef VDSetSharpness
-       PyMac_PRECHECK(VDSetSharpness);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetSharpness(ci,
-                            &sharpness);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            sharpness);
-       return _res;
-}
-
-static PyObject *Qt_VDSetSaturation(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short saturation;
-#ifndef VDSetSaturation
-       PyMac_PRECHECK(VDSetSaturation);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetSaturation(ci,
-                             &saturation);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            saturation);
-       return _res;
-}
-
-static PyObject *Qt_VDGetContrast(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short contrast;
-#ifndef VDGetContrast
-       PyMac_PRECHECK(VDGetContrast);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetContrast(ci,
-                           &contrast);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            contrast);
-       return _res;
-}
-
-static PyObject *Qt_VDGetHue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short hue;
-#ifndef VDGetHue
-       PyMac_PRECHECK(VDGetHue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetHue(ci,
-                      &hue);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            hue);
-       return _res;
-}
-
-static PyObject *Qt_VDGetSharpness(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short sharpness;
-#ifndef VDGetSharpness
-       PyMac_PRECHECK(VDGetSharpness);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetSharpness(ci,
-                            &sharpness);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            sharpness);
-       return _res;
-}
-
-static PyObject *Qt_VDGetSaturation(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short saturation;
-#ifndef VDGetSaturation
-       PyMac_PRECHECK(VDGetSaturation);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetSaturation(ci,
-                             &saturation);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            saturation);
-       return _res;
-}
-
-static PyObject *Qt_VDGrabOneFrame(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-#ifndef VDGrabOneFrame
-       PyMac_PRECHECK(VDGrabOneFrame);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGrabOneFrame(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetMaxAuxBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       PixMapHandle pm;
-       Rect r;
-#ifndef VDGetMaxAuxBuffer
-       PyMac_PRECHECK(VDGetMaxAuxBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetMaxAuxBuffer(ci,
-                               &pm,
-                               &r);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, pm,
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qt_VDGetCurrentFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long inputCurrentFlag;
-       long outputCurrentFlag;
-#ifndef VDGetCurrentFlags
-       PyMac_PRECHECK(VDGetCurrentFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetCurrentFlags(ci,
-                               &inputCurrentFlag,
-                               &outputCurrentFlag);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            inputCurrentFlag,
-                            outputCurrentFlag);
-       return _res;
-}
-
-static PyObject *Qt_VDSetKeyColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long index;
-#ifndef VDSetKeyColor
-       PyMac_PRECHECK(VDSetKeyColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &index))
-               return NULL;
-       _rv = VDSetKeyColor(ci,
-                           index);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetKeyColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long index;
-#ifndef VDGetKeyColor
-       PyMac_PRECHECK(VDGetKeyColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetKeyColor(ci,
-                           &index);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            index);
-       return _res;
-}
-
-static PyObject *Qt_VDAddKeyColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long index;
-#ifndef VDAddKeyColor
-       PyMac_PRECHECK(VDAddKeyColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDAddKeyColor(ci,
-                           &index);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            index);
-       return _res;
-}
-
-static PyObject *Qt_VDGetNextKeyColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long index;
-#ifndef VDGetNextKeyColor
-       PyMac_PRECHECK(VDGetNextKeyColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &index))
-               return NULL;
-       _rv = VDGetNextKeyColor(ci,
-                               index);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetKeyColorRange(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       RGBColor minRGB;
-       RGBColor maxRGB;
-#ifndef VDSetKeyColorRange
-       PyMac_PRECHECK(VDSetKeyColorRange);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetKeyColorRange(ci,
-                                &minRGB,
-                                &maxRGB);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            QdRGB_New, &minRGB,
-                            QdRGB_New, &maxRGB);
-       return _res;
-}
-
-static PyObject *Qt_VDGetKeyColorRange(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       RGBColor minRGB;
-       RGBColor maxRGB;
-#ifndef VDGetKeyColorRange
-       PyMac_PRECHECK(VDGetKeyColorRange);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetKeyColorRange(ci,
-                                &minRGB,
-                                &maxRGB);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            QdRGB_New, &minRGB,
-                            QdRGB_New, &maxRGB);
-       return _res;
-}
-
-static PyObject *Qt_VDSetInputColorSpaceMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short colorSpaceMode;
-#ifndef VDSetInputColorSpaceMode
-       PyMac_PRECHECK(VDSetInputColorSpaceMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &colorSpaceMode))
-               return NULL;
-       _rv = VDSetInputColorSpaceMode(ci,
-                                      colorSpaceMode);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetInputColorSpaceMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short colorSpaceMode;
-#ifndef VDGetInputColorSpaceMode
-       PyMac_PRECHECK(VDGetInputColorSpaceMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetInputColorSpaceMode(ci,
-                                      &colorSpaceMode);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            colorSpaceMode);
-       return _res;
-}
-
-static PyObject *Qt_VDSetClipState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short clipEnable;
-#ifndef VDSetClipState
-       PyMac_PRECHECK(VDSetClipState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &clipEnable))
-               return NULL;
-       _rv = VDSetClipState(ci,
-                            clipEnable);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetClipState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short clipEnable;
-#ifndef VDGetClipState
-       PyMac_PRECHECK(VDGetClipState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetClipState(ci,
-                            &clipEnable);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            clipEnable);
-       return _res;
-}
-
-static PyObject *Qt_VDSetClipRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       RgnHandle clipRegion;
-#ifndef VDSetClipRgn
-       PyMac_PRECHECK(VDSetClipRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &clipRegion))
-               return NULL;
-       _rv = VDSetClipRgn(ci,
-                          clipRegion);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDClearClipRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       RgnHandle clipRegion;
-#ifndef VDClearClipRgn
-       PyMac_PRECHECK(VDClearClipRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &clipRegion))
-               return NULL;
-       _rv = VDClearClipRgn(ci,
-                            clipRegion);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetCLUTInUse(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       CTabHandle colorTableHandle;
-#ifndef VDGetCLUTInUse
-       PyMac_PRECHECK(VDGetCLUTInUse);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetCLUTInUse(ci,
-                            &colorTableHandle);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, colorTableHandle);
-       return _res;
-}
-
-static PyObject *Qt_VDSetPLLFilterType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short pllType;
-#ifndef VDSetPLLFilterType
-       PyMac_PRECHECK(VDSetPLLFilterType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &pllType))
-               return NULL;
-       _rv = VDSetPLLFilterType(ci,
-                                pllType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetPLLFilterType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short pllType;
-#ifndef VDGetPLLFilterType
-       PyMac_PRECHECK(VDGetPLLFilterType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetPLLFilterType(ci,
-                                &pllType);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            pllType);
-       return _res;
-}
-
-static PyObject *Qt_VDGetMaskandValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short blendLevel;
-       long mask;
-       long value;
-#ifndef VDGetMaskandValue
-       PyMac_PRECHECK(VDGetMaskandValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&H",
-                             CmpObj_Convert, &ci,
-                             &blendLevel))
-               return NULL;
-       _rv = VDGetMaskandValue(ci,
-                               blendLevel,
-                               &mask,
-                               &value);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            mask,
-                            value);
-       return _res;
-}
-
-static PyObject *Qt_VDSetMasterBlendLevel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short blendLevel;
-#ifndef VDSetMasterBlendLevel
-       PyMac_PRECHECK(VDSetMasterBlendLevel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetMasterBlendLevel(ci,
-                                   &blendLevel);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            blendLevel);
-       return _res;
-}
-
-static PyObject *Qt_VDSetPlayThruOnOff(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short state;
-#ifndef VDSetPlayThruOnOff
-       PyMac_PRECHECK(VDSetPlayThruOnOff);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &state))
-               return NULL;
-       _rv = VDSetPlayThruOnOff(ci,
-                                state);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetFieldPreference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short fieldFlag;
-#ifndef VDSetFieldPreference
-       PyMac_PRECHECK(VDSetFieldPreference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &fieldFlag))
-               return NULL;
-       _rv = VDSetFieldPreference(ci,
-                                  fieldFlag);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetFieldPreference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short fieldFlag;
-#ifndef VDGetFieldPreference
-       PyMac_PRECHECK(VDGetFieldPreference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetFieldPreference(ci,
-                                  &fieldFlag);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            fieldFlag);
-       return _res;
-}
-
-static PyObject *Qt_VDPreflightGlobalRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       GrafPtr theWindow;
-       Rect globalRect;
-#ifndef VDPreflightGlobalRect
-       PyMac_PRECHECK(VDPreflightGlobalRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             GrafObj_Convert, &theWindow))
-               return NULL;
-       _rv = VDPreflightGlobalRect(ci,
-                                   theWindow,
-                                   &globalRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &globalRect);
-       return _res;
-}
-
-static PyObject *Qt_VDSetPlayThruGlobalRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       GrafPtr theWindow;
-       Rect globalRect;
-#ifndef VDSetPlayThruGlobalRect
-       PyMac_PRECHECK(VDSetPlayThruGlobalRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             GrafObj_Convert, &theWindow))
-               return NULL;
-       _rv = VDSetPlayThruGlobalRect(ci,
-                                     theWindow,
-                                     &globalRect);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &globalRect);
-       return _res;
-}
-
-static PyObject *Qt_VDSetBlackLevelValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short blackLevel;
-#ifndef VDSetBlackLevelValue
-       PyMac_PRECHECK(VDSetBlackLevelValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetBlackLevelValue(ci,
-                                  &blackLevel);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            blackLevel);
-       return _res;
-}
-
-static PyObject *Qt_VDGetBlackLevelValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short blackLevel;
-#ifndef VDGetBlackLevelValue
-       PyMac_PRECHECK(VDGetBlackLevelValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetBlackLevelValue(ci,
-                                  &blackLevel);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            blackLevel);
-       return _res;
-}
-
-static PyObject *Qt_VDSetWhiteLevelValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short whiteLevel;
-#ifndef VDSetWhiteLevelValue
-       PyMac_PRECHECK(VDSetWhiteLevelValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDSetWhiteLevelValue(ci,
-                                  &whiteLevel);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            whiteLevel);
-       return _res;
-}
-
-static PyObject *Qt_VDGetWhiteLevelValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short whiteLevel;
-#ifndef VDGetWhiteLevelValue
-       PyMac_PRECHECK(VDGetWhiteLevelValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetWhiteLevelValue(ci,
-                                  &whiteLevel);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            whiteLevel);
-       return _res;
-}
-
-static PyObject *Qt_VDGetVideoDefaults(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       unsigned short blackLevel;
-       unsigned short whiteLevel;
-       unsigned short brightness;
-       unsigned short hue;
-       unsigned short saturation;
-       unsigned short contrast;
-       unsigned short sharpness;
-#ifndef VDGetVideoDefaults
-       PyMac_PRECHECK(VDGetVideoDefaults);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetVideoDefaults(ci,
-                                &blackLevel,
-                                &whiteLevel,
-                                &brightness,
-                                &hue,
-                                &saturation,
-                                &contrast,
-                                &sharpness);
-       _res = Py_BuildValue("lHHHHHHH",
-                            _rv,
-                            blackLevel,
-                            whiteLevel,
-                            brightness,
-                            hue,
-                            saturation,
-                            contrast,
-                            sharpness);
-       return _res;
-}
-
-static PyObject *Qt_VDGetNumberOfInputs(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short inputs;
-#ifndef VDGetNumberOfInputs
-       PyMac_PRECHECK(VDGetNumberOfInputs);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetNumberOfInputs(ci,
-                                 &inputs);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            inputs);
-       return _res;
-}
-
-static PyObject *Qt_VDGetInputFormat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short input;
-       short format;
-#ifndef VDGetInputFormat
-       PyMac_PRECHECK(VDGetInputFormat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &input))
-               return NULL;
-       _rv = VDGetInputFormat(ci,
-                              input,
-                              &format);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            format);
-       return _res;
-}
-
-static PyObject *Qt_VDSetInput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short input;
-#ifndef VDSetInput
-       PyMac_PRECHECK(VDSetInput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &input))
-               return NULL;
-       _rv = VDSetInput(ci,
-                        input);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetInput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short input;
-#ifndef VDGetInput
-       PyMac_PRECHECK(VDGetInput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetInput(ci,
-                        &input);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            input);
-       return _res;
-}
-
-static PyObject *Qt_VDSetInputStandard(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short inputStandard;
-#ifndef VDSetInputStandard
-       PyMac_PRECHECK(VDSetInputStandard);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &inputStandard))
-               return NULL;
-       _rv = VDSetInputStandard(ci,
-                                inputStandard);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetupBuffers(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       VdigBufferRecListHandle bufferList;
-#ifndef VDSetupBuffers
-       PyMac_PRECHECK(VDSetupBuffers);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &bufferList))
-               return NULL;
-       _rv = VDSetupBuffers(ci,
-                            bufferList);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGrabOneFrameAsync(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short buffer;
-#ifndef VDGrabOneFrameAsync
-       PyMac_PRECHECK(VDGrabOneFrameAsync);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &buffer))
-               return NULL;
-       _rv = VDGrabOneFrameAsync(ci,
-                                 buffer);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDDone(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       short buffer;
-#ifndef VDDone
-       PyMac_PRECHECK(VDDone);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &ci,
-                             &buffer))
-               return NULL;
-       _rv = VDDone(ci,
-                    buffer);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetCompression(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       OSType compressType;
-       short depth;
-       Rect bounds;
-       CodecQ spatialQuality;
-       CodecQ temporalQuality;
-       long keyFrameRate;
-#ifndef VDSetCompression
-       PyMac_PRECHECK(VDSetCompression);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hlll",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetOSType, &compressType,
-                             &depth,
-                             &spatialQuality,
-                             &temporalQuality,
-                             &keyFrameRate))
-               return NULL;
-       _rv = VDSetCompression(ci,
-                              compressType,
-                              depth,
-                              &bounds,
-                              spatialQuality,
-                              temporalQuality,
-                              keyFrameRate);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *Qt_VDCompressOneFrameAsync(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-#ifndef VDCompressOneFrameAsync
-       PyMac_PRECHECK(VDCompressOneFrameAsync);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDCompressOneFrameAsync(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetImageDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       ImageDescriptionHandle desc;
-#ifndef VDGetImageDescription
-       PyMac_PRECHECK(VDGetImageDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &desc))
-               return NULL;
-       _rv = VDGetImageDescription(ci,
-                                   desc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDResetCompressSequence(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-#ifndef VDResetCompressSequence
-       PyMac_PRECHECK(VDResetCompressSequence);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDResetCompressSequence(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetCompressionOnOff(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       Boolean state;
-#ifndef VDSetCompressionOnOff
-       PyMac_PRECHECK(VDSetCompressionOnOff);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpObj_Convert, &ci,
-                             &state))
-               return NULL;
-       _rv = VDSetCompressionOnOff(ci,
-                                   state);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetCompressionTypes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       VDCompressionListHandle h;
-#ifndef VDGetCompressionTypes
-       PyMac_PRECHECK(VDGetCompressionTypes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             ResObj_Convert, &h))
-               return NULL;
-       _rv = VDGetCompressionTypes(ci,
-                                   h);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetTimeBase(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       TimeBase t;
-#ifndef VDSetTimeBase
-       PyMac_PRECHECK(VDSetTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             TimeBaseObj_Convert, &t))
-               return NULL;
-       _rv = VDSetTimeBase(ci,
-                           t);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetFrameRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       Fixed framesPerSecond;
-#ifndef VDSetFrameRate
-       PyMac_PRECHECK(VDSetFrameRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetFixed, &framesPerSecond))
-               return NULL;
-       _rv = VDSetFrameRate(ci,
-                            framesPerSecond);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetDataRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long milliSecPerFrame;
-       Fixed framesPerSecond;
-       long bytesPerSecond;
-#ifndef VDGetDataRate
-       PyMac_PRECHECK(VDGetDataRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetDataRate(ci,
-                           &milliSecPerFrame,
-                           &framesPerSecond,
-                           &bytesPerSecond);
-       _res = Py_BuildValue("llO&l",
-                            _rv,
-                            milliSecPerFrame,
-                            PyMac_BuildFixed, framesPerSecond,
-                            bytesPerSecond);
-       return _res;
-}
-
-static PyObject *Qt_VDGetSoundInputDriver(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       Str255 soundDriverName;
-#ifndef VDGetSoundInputDriver
-       PyMac_PRECHECK(VDGetSoundInputDriver);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetStr255, soundDriverName))
-               return NULL;
-       _rv = VDGetSoundInputDriver(ci,
-                                   soundDriverName);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetDMADepths(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long depthArray;
-       long preferredDepth;
-#ifndef VDGetDMADepths
-       PyMac_PRECHECK(VDGetDMADepths);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetDMADepths(ci,
-                            &depthArray,
-                            &preferredDepth);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            depthArray,
-                            preferredDepth);
-       return _res;
-}
-
-static PyObject *Qt_VDGetPreferredTimeScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       TimeScale preferred;
-#ifndef VDGetPreferredTimeScale
-       PyMac_PRECHECK(VDGetPreferredTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetPreferredTimeScale(ci,
-                                     &preferred);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            preferred);
-       return _res;
-}
-
-static PyObject *Qt_VDReleaseAsyncBuffers(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-#ifndef VDReleaseAsyncBuffers
-       PyMac_PRECHECK(VDReleaseAsyncBuffers);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDReleaseAsyncBuffers(ci);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetDataRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long bytesPerSecond;
-#ifndef VDSetDataRate
-       PyMac_PRECHECK(VDSetDataRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &bytesPerSecond))
-               return NULL;
-       _rv = VDSetDataRate(ci,
-                           bytesPerSecond);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetTimeCode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       TimeRecord atTime;
-       void * timeCodeFormat;
-       void * timeCodeTime;
-#ifndef VDGetTimeCode
-       PyMac_PRECHECK(VDGetTimeCode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ss",
-                             CmpObj_Convert, &ci,
-                             &timeCodeFormat,
-                             &timeCodeTime))
-               return NULL;
-       _rv = VDGetTimeCode(ci,
-                           &atTime,
-                           timeCodeFormat,
-                           timeCodeTime);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QtTimeRecord_New, &atTime);
-       return _res;
-}
-
-static PyObject *Qt_VDUseSafeBuffers(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       Boolean useSafeBuffers;
-#ifndef VDUseSafeBuffers
-       PyMac_PRECHECK(VDUseSafeBuffers);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpObj_Convert, &ci,
-                             &useSafeBuffers))
-               return NULL;
-       _rv = VDUseSafeBuffers(ci,
-                              useSafeBuffers);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetSoundInputSource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long videoInput;
-       long soundInput;
-#ifndef VDGetSoundInputSource
-       PyMac_PRECHECK(VDGetSoundInputSource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &videoInput))
-               return NULL;
-       _rv = VDGetSoundInputSource(ci,
-                                   videoInput,
-                                   &soundInput);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            soundInput);
-       return _res;
-}
-
-static PyObject *Qt_VDGetCompressionTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       OSType compressionType;
-       short depth;
-       Rect srcRect;
-       CodecQ spatialQuality;
-       CodecQ temporalQuality;
-       unsigned long compressTime;
-#ifndef VDGetCompressionTime
-       PyMac_PRECHECK(VDGetCompressionTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetOSType, &compressionType,
-                             &depth))
-               return NULL;
-       _rv = VDGetCompressionTime(ci,
-                                  compressionType,
-                                  depth,
-                                  &srcRect,
-                                  &spatialQuality,
-                                  &temporalQuality,
-                                  &compressTime);
-       _res = Py_BuildValue("lO&lll",
-                            _rv,
-                            PyMac_BuildRect, &srcRect,
-                            spatialQuality,
-                            temporalQuality,
-                            compressTime);
-       return _res;
-}
-
-static PyObject *Qt_VDSetPreferredPacketSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long preferredPacketSizeInBytes;
-#ifndef VDSetPreferredPacketSize
-       PyMac_PRECHECK(VDSetPreferredPacketSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &preferredPacketSizeInBytes))
-               return NULL;
-       _rv = VDSetPreferredPacketSize(ci,
-                                      preferredPacketSizeInBytes);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetPreferredImageDimensions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long width;
-       long height;
-#ifndef VDSetPreferredImageDimensions
-       PyMac_PRECHECK(VDSetPreferredImageDimensions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpObj_Convert, &ci,
-                             &width,
-                             &height))
-               return NULL;
-       _rv = VDSetPreferredImageDimensions(ci,
-                                           width,
-                                           height);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetPreferredImageDimensions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long width;
-       long height;
-#ifndef VDGetPreferredImageDimensions
-       PyMac_PRECHECK(VDGetPreferredImageDimensions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &ci))
-               return NULL;
-       _rv = VDGetPreferredImageDimensions(ci,
-                                           &width,
-                                           &height);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            width,
-                            height);
-       return _res;
-}
-
-static PyObject *Qt_VDGetInputName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       long videoInput;
-       Str255 name;
-#ifndef VDGetInputName
-       PyMac_PRECHECK(VDGetInputName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpObj_Convert, &ci,
-                             &videoInput,
-                             PyMac_GetStr255, name))
-               return NULL;
-       _rv = VDGetInputName(ci,
-                            videoInput,
-                            name);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDSetDestinationPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       CGrafPtr destPort;
-#ifndef VDSetDestinationPort
-       PyMac_PRECHECK(VDSetDestinationPort);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             GrafObj_Convert, &destPort))
-               return NULL;
-       _rv = VDSetDestinationPort(ci,
-                                  destPort);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_VDGetDeviceNameAndFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       Str255 outName;
-       UInt32 outNameFlags;
-#ifndef VDGetDeviceNameAndFlags
-       PyMac_PRECHECK(VDGetDeviceNameAndFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &ci,
-                             PyMac_GetStr255, outName))
-               return NULL;
-       _rv = VDGetDeviceNameAndFlags(ci,
-                                     outName,
-                                     &outNameFlags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            outNameFlags);
-       return _res;
-}
-
-static PyObject *Qt_VDCaptureStateChanging(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       VideoDigitizerComponent ci;
-       UInt32 inStateFlags;
-#ifndef VDCaptureStateChanging
-       PyMac_PRECHECK(VDCaptureStateChanging);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &ci,
-                             &inStateFlags))
-               return NULL;
-       _rv = VDCaptureStateChanging(ci,
-                                    inStateFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_XMLParseGetDetailedParseError(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aParser;
-       long errorLine;
-       StringPtr errDesc;
-#ifndef XMLParseGetDetailedParseError
-       PyMac_PRECHECK(XMLParseGetDetailedParseError);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &aParser,
-                             &errDesc))
-               return NULL;
-       _rv = XMLParseGetDetailedParseError(aParser,
-                                           &errorLine,
-                                           errDesc);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            errorLine);
-       return _res;
-}
-
-static PyObject *Qt_XMLParseAddElement(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aParser;
-       char elementName;
-       UInt32 nameSpaceID;
-       UInt32 elementID;
-       long elementFlags;
-#ifndef XMLParseAddElement
-       PyMac_PRECHECK(XMLParseAddElement);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &aParser,
-                             &nameSpaceID,
-                             &elementFlags))
-               return NULL;
-       _rv = XMLParseAddElement(aParser,
-                                &elementName,
-                                nameSpaceID,
-                                &elementID,
-                                elementFlags);
-       _res = Py_BuildValue("lcl",
-                            _rv,
-                            elementName,
-                            elementID);
-       return _res;
-}
-
-static PyObject *Qt_XMLParseAddAttribute(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aParser;
-       UInt32 elementID;
-       UInt32 nameSpaceID;
-       char attributeName;
-       UInt32 attributeID;
-#ifndef XMLParseAddAttribute
-       PyMac_PRECHECK(XMLParseAddAttribute);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &aParser,
-                             &elementID,
-                             &nameSpaceID))
-               return NULL;
-       _rv = XMLParseAddAttribute(aParser,
-                                  elementID,
-                                  nameSpaceID,
-                                  &attributeName,
-                                  &attributeID);
-       _res = Py_BuildValue("lcl",
-                            _rv,
-                            attributeName,
-                            attributeID);
-       return _res;
-}
-
-static PyObject *Qt_XMLParseAddMultipleAttributes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aParser;
-       UInt32 elementID;
-       UInt32 nameSpaceIDs;
-       char attributeNames;
-       UInt32 attributeIDs;
-#ifndef XMLParseAddMultipleAttributes
-       PyMac_PRECHECK(XMLParseAddMultipleAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &aParser,
-                             &elementID))
-               return NULL;
-       _rv = XMLParseAddMultipleAttributes(aParser,
-                                           elementID,
-                                           &nameSpaceIDs,
-                                           &attributeNames,
-                                           &attributeIDs);
-       _res = Py_BuildValue("llcl",
-                            _rv,
-                            nameSpaceIDs,
-                            attributeNames,
-                            attributeIDs);
-       return _res;
-}
-
-static PyObject *Qt_XMLParseAddAttributeAndValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aParser;
-       UInt32 elementID;
-       UInt32 nameSpaceID;
-       char attributeName;
-       UInt32 attributeID;
-       UInt32 attributeValueKind;
-       void * attributeValueKindInfo;
-#ifndef XMLParseAddAttributeAndValue
-       PyMac_PRECHECK(XMLParseAddAttributeAndValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llls",
-                             CmpInstObj_Convert, &aParser,
-                             &elementID,
-                             &nameSpaceID,
-                             &attributeValueKind,
-                             &attributeValueKindInfo))
-               return NULL;
-       _rv = XMLParseAddAttributeAndValue(aParser,
-                                          elementID,
-                                          nameSpaceID,
-                                          &attributeName,
-                                          &attributeID,
-                                          attributeValueKind,
-                                          attributeValueKindInfo);
-       _res = Py_BuildValue("lcl",
-                            _rv,
-                            attributeName,
-                            attributeID);
-       return _res;
-}
-
-static PyObject *Qt_XMLParseAddAttributeValueKind(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aParser;
-       UInt32 elementID;
-       UInt32 attributeID;
-       UInt32 attributeValueKind;
-       void * attributeValueKindInfo;
-#ifndef XMLParseAddAttributeValueKind
-       PyMac_PRECHECK(XMLParseAddAttributeValueKind);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llls",
-                             CmpInstObj_Convert, &aParser,
-                             &elementID,
-                             &attributeID,
-                             &attributeValueKind,
-                             &attributeValueKindInfo))
-               return NULL;
-       _rv = XMLParseAddAttributeValueKind(aParser,
-                                           elementID,
-                                           attributeID,
-                                           attributeValueKind,
-                                           attributeValueKindInfo);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_XMLParseAddNameSpace(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aParser;
-       char nameSpaceURL;
-       UInt32 nameSpaceID;
-#ifndef XMLParseAddNameSpace
-       PyMac_PRECHECK(XMLParseAddNameSpace);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &aParser))
-               return NULL;
-       _rv = XMLParseAddNameSpace(aParser,
-                                  &nameSpaceURL,
-                                  &nameSpaceID);
-       _res = Py_BuildValue("lcl",
-                            _rv,
-                            nameSpaceURL,
-                            nameSpaceID);
-       return _res;
-}
-
-static PyObject *Qt_XMLParseSetOffsetAndLimit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aParser;
-       UInt32 offset;
-       UInt32 limit;
-#ifndef XMLParseSetOffsetAndLimit
-       PyMac_PRECHECK(XMLParseSetOffsetAndLimit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &aParser,
-                             &offset,
-                             &limit))
-               return NULL;
-       _rv = XMLParseSetOffsetAndLimit(aParser,
-                                       offset,
-                                       limit);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_XMLParseSetEventParseRefCon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       ComponentInstance aParser;
-       long refcon;
-#ifndef XMLParseSetEventParseRefCon
-       PyMac_PRECHECK(XMLParseSetEventParseRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &aParser,
-                             &refcon))
-               return NULL;
-       _rv = XMLParseSetEventParseRefCon(aParser,
-                                         refcon);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGInitialize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-#ifndef SGInitialize
-       PyMac_PRECHECK(SGInitialize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGInitialize(s);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetDataOutput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       FSSpec movieFile;
-       long whereFlags;
-#ifndef SGSetDataOutput
-       PyMac_PRECHECK(SGSetDataOutput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CmpObj_Convert, &s,
-                             PyMac_GetFSSpec, &movieFile,
-                             &whereFlags))
-               return NULL;
-       _rv = SGSetDataOutput(s,
-                             &movieFile,
-                             whereFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetDataOutput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       FSSpec movieFile;
-       long whereFlags;
-#ifndef SGGetDataOutput
-       PyMac_PRECHECK(SGGetDataOutput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             PyMac_GetFSSpec, &movieFile))
-               return NULL;
-       _rv = SGGetDataOutput(s,
-                             &movieFile,
-                             &whereFlags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            whereFlags);
-       return _res;
-}
-
-static PyObject *Qt_SGSetGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       CGrafPtr gp;
-       GDHandle gd;
-#ifndef SGSetGWorld
-       PyMac_PRECHECK(SGSetGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &s,
-                             GrafObj_Convert, &gp,
-                             OptResObj_Convert, &gd))
-               return NULL;
-       _rv = SGSetGWorld(s,
-                         gp,
-                         gd);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       CGrafPtr gp;
-       GDHandle gd;
-#ifndef SGGetGWorld
-       PyMac_PRECHECK(SGGetGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetGWorld(s,
-                         &gp,
-                         &gd);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            GrafObj_New, gp,
-                            OptResObj_New, gd);
-       return _res;
-}
-
-static PyObject *Qt_SGNewChannel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       OSType channelType;
-       SGChannel ref;
-#ifndef SGNewChannel
-       PyMac_PRECHECK(SGNewChannel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             PyMac_GetOSType, &channelType))
-               return NULL;
-       _rv = SGNewChannel(s,
-                          channelType,
-                          &ref);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CmpInstObj_New, ref);
-       return _res;
-}
-
-static PyObject *Qt_SGDisposeChannel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-#ifndef SGDisposeChannel
-       PyMac_PRECHECK(SGDisposeChannel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGDisposeChannel(s,
-                              c);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGStartPreview(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-#ifndef SGStartPreview
-       PyMac_PRECHECK(SGStartPreview);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGStartPreview(s);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGStartRecord(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-#ifndef SGStartRecord
-       PyMac_PRECHECK(SGStartRecord);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGStartRecord(s);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGIdle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-#ifndef SGIdle
-       PyMac_PRECHECK(SGIdle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGIdle(s);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGStop(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-#ifndef SGStop
-       PyMac_PRECHECK(SGStop);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGStop(s);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPause(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Boolean pause;
-#ifndef SGPause
-       PyMac_PRECHECK(SGPause);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpObj_Convert, &s,
-                             &pause))
-               return NULL;
-       _rv = SGPause(s,
-                     pause);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPrepare(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Boolean prepareForPreview;
-       Boolean prepareForRecord;
-#ifndef SGPrepare
-       PyMac_PRECHECK(SGPrepare);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&bb",
-                             CmpObj_Convert, &s,
-                             &prepareForPreview,
-                             &prepareForRecord))
-               return NULL;
-       _rv = SGPrepare(s,
-                       prepareForPreview,
-                       prepareForRecord);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGRelease(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-#ifndef SGRelease
-       PyMac_PRECHECK(SGRelease);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGRelease(s);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetMovie(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Movie _rv;
-       SeqGrabComponent s;
-#ifndef SGGetMovie
-       PyMac_PRECHECK(SGGetMovie);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetMovie(s);
-       _res = Py_BuildValue("O&",
-                            MovieObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetMaximumRecordTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       unsigned long ticks;
-#ifndef SGSetMaximumRecordTime
-       PyMac_PRECHECK(SGSetMaximumRecordTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &s,
-                             &ticks))
-               return NULL;
-       _rv = SGSetMaximumRecordTime(s,
-                                    ticks);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetMaximumRecordTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       unsigned long ticks;
-#ifndef SGGetMaximumRecordTime
-       PyMac_PRECHECK(SGGetMaximumRecordTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetMaximumRecordTime(s,
-                                    &ticks);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            ticks);
-       return _res;
-}
-
-static PyObject *Qt_SGGetStorageSpaceRemaining(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       unsigned long bytes;
-#ifndef SGGetStorageSpaceRemaining
-       PyMac_PRECHECK(SGGetStorageSpaceRemaining);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetStorageSpaceRemaining(s,
-                                        &bytes);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            bytes);
-       return _res;
-}
-
-static PyObject *Qt_SGGetTimeRemaining(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       long ticksLeft;
-#ifndef SGGetTimeRemaining
-       PyMac_PRECHECK(SGGetTimeRemaining);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetTimeRemaining(s,
-                                &ticksLeft);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            ticksLeft);
-       return _res;
-}
-
-static PyObject *Qt_SGGrabPict(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       PicHandle p;
-       Rect bounds;
-       short offscreenDepth;
-       long grabPictFlags;
-#ifndef SGGrabPict
-       PyMac_PRECHECK(SGGrabPict);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&hl",
-                             CmpObj_Convert, &s,
-                             PyMac_GetRect, &bounds,
-                             &offscreenDepth,
-                             &grabPictFlags))
-               return NULL;
-       _rv = SGGrabPict(s,
-                        &p,
-                        &bounds,
-                        offscreenDepth,
-                        grabPictFlags);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, p);
-       return _res;
-}
-
-static PyObject *Qt_SGGetLastMovieResID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       short resID;
-#ifndef SGGetLastMovieResID
-       PyMac_PRECHECK(SGGetLastMovieResID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetLastMovieResID(s,
-                                 &resID);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            resID);
-       return _res;
-}
-
-static PyObject *Qt_SGSetFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       long sgFlags;
-#ifndef SGSetFlags
-       PyMac_PRECHECK(SGSetFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &s,
-                             &sgFlags))
-               return NULL;
-       _rv = SGSetFlags(s,
-                        sgFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       long sgFlags;
-#ifndef SGGetFlags
-       PyMac_PRECHECK(SGGetFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetFlags(s,
-                        &sgFlags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            sgFlags);
-       return _res;
-}
-
-static PyObject *Qt_SGNewChannelFromComponent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel newChannel;
-       Component sgChannelComponent;
-#ifndef SGNewChannelFromComponent
-       PyMac_PRECHECK(SGNewChannelFromComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             CmpObj_Convert, &sgChannelComponent))
-               return NULL;
-       _rv = SGNewChannelFromComponent(s,
-                                       &newChannel,
-                                       sgChannelComponent);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CmpInstObj_New, newChannel);
-       return _res;
-}
-
-static PyObject *Qt_SGSetSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       UserData ud;
-       long flags;
-#ifndef SGSetSettings
-       PyMac_PRECHECK(SGSetSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CmpObj_Convert, &s,
-                             UserDataObj_Convert, &ud,
-                             &flags))
-               return NULL;
-       _rv = SGSetSettings(s,
-                           ud,
-                           flags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       UserData ud;
-       long flags;
-#ifndef SGGetSettings
-       PyMac_PRECHECK(SGGetSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &s,
-                             &flags))
-               return NULL;
-       _rv = SGGetSettings(s,
-                           &ud,
-                           flags);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            UserDataObj_New, ud);
-       return _res;
-}
-
-static PyObject *Qt_SGGetIndChannel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       short index;
-       SGChannel ref;
-       OSType chanType;
-#ifndef SGGetIndChannel
-       PyMac_PRECHECK(SGGetIndChannel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &s,
-                             &index))
-               return NULL;
-       _rv = SGGetIndChannel(s,
-                             index,
-                             &ref,
-                             &chanType);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            CmpInstObj_New, ref,
-                            PyMac_BuildOSType, chanType);
-       return _res;
-}
-
-static PyObject *Qt_SGUpdate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       RgnHandle updateRgn;
-#ifndef SGUpdate
-       PyMac_PRECHECK(SGUpdate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             ResObj_Convert, &updateRgn))
-               return NULL;
-       _rv = SGUpdate(s,
-                      updateRgn);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetPause(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Boolean paused;
-#ifndef SGGetPause
-       PyMac_PRECHECK(SGGetPause);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetPause(s,
-                        &paused);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            paused);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       UserData ud;
-       long flags;
-#ifndef SGSetChannelSettings
-       PyMac_PRECHECK(SGSetChannelSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&l",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             UserDataObj_Convert, &ud,
-                             &flags))
-               return NULL;
-       _rv = SGSetChannelSettings(s,
-                                  c,
-                                  ud,
-                                  flags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       UserData ud;
-       long flags;
-#ifndef SGGetChannelSettings
-       PyMac_PRECHECK(SGGetChannelSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             &flags))
-               return NULL;
-       _rv = SGGetChannelSettings(s,
-                                  c,
-                                  &ud,
-                                  flags);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            UserDataObj_New, ud);
-       return _res;
-}
-
-static PyObject *Qt_SGGetMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Boolean previewMode;
-       Boolean recordMode;
-#ifndef SGGetMode
-       PyMac_PRECHECK(SGGetMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetMode(s,
-                       &previewMode,
-                       &recordMode);
-       _res = Py_BuildValue("lbb",
-                            _rv,
-                            previewMode,
-                            recordMode);
-       return _res;
-}
-
-static PyObject *Qt_SGSetDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Handle dataRef;
-       OSType dataRefType;
-       long whereFlags;
-#ifndef SGSetDataRef
-       PyMac_PRECHECK(SGSetDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&l",
-                             CmpObj_Convert, &s,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             &whereFlags))
-               return NULL;
-       _rv = SGSetDataRef(s,
-                          dataRef,
-                          dataRefType,
-                          whereFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetDataRef(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Handle dataRef;
-       OSType dataRefType;
-       long whereFlags;
-#ifndef SGGetDataRef
-       PyMac_PRECHECK(SGGetDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetDataRef(s,
-                          &dataRef,
-                          &dataRefType,
-                          &whereFlags);
-       _res = Py_BuildValue("lO&O&l",
-                            _rv,
-                            ResObj_New, dataRef,
-                            PyMac_BuildOSType, dataRefType,
-                            whereFlags);
-       return _res;
-}
-
-static PyObject *Qt_SGNewOutput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Handle dataRef;
-       OSType dataRefType;
-       long whereFlags;
-       SGOutput sgOut;
-#ifndef SGNewOutput
-       PyMac_PRECHECK(SGNewOutput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&l",
-                             CmpObj_Convert, &s,
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType,
-                             &whereFlags))
-               return NULL;
-       _rv = SGNewOutput(s,
-                         dataRef,
-                         dataRefType,
-                         whereFlags,
-                         &sgOut);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            SGOutputObj_New, sgOut);
-       return _res;
-}
-
-static PyObject *Qt_SGDisposeOutput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-#ifndef SGDisposeOutput
-       PyMac_PRECHECK(SGDisposeOutput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut))
-               return NULL;
-       _rv = SGDisposeOutput(s,
-                             sgOut);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetOutputFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-       long whereFlags;
-#ifndef SGSetOutputFlags
-       PyMac_PRECHECK(SGSetOutputFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut,
-                             &whereFlags))
-               return NULL;
-       _rv = SGSetOutputFlags(s,
-                              sgOut,
-                              whereFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelOutput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       SGOutput sgOut;
-#ifndef SGSetChannelOutput
-       PyMac_PRECHECK(SGSetChannelOutput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             SGOutputObj_Convert, &sgOut))
-               return NULL;
-       _rv = SGSetChannelOutput(s,
-                                c,
-                                sgOut);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetDataOutputStorageSpaceRemaining(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-       unsigned long space;
-#ifndef SGGetDataOutputStorageSpaceRemaining
-       PyMac_PRECHECK(SGGetDataOutputStorageSpaceRemaining);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut))
-               return NULL;
-       _rv = SGGetDataOutputStorageSpaceRemaining(s,
-                                                  sgOut,
-                                                  &space);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            space);
-       return _res;
-}
-
-static PyObject *Qt_SGHandleUpdateEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       EventRecord event;
-       Boolean handled;
-#ifndef SGHandleUpdateEvent
-       PyMac_PRECHECK(SGHandleUpdateEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             PyMac_GetEventRecord, &event))
-               return NULL;
-       _rv = SGHandleUpdateEvent(s,
-                                 &event,
-                                 &handled);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            handled);
-       return _res;
-}
-
-static PyObject *Qt_SGSetOutputNextOutput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-       SGOutput nextOut;
-#ifndef SGSetOutputNextOutput
-       PyMac_PRECHECK(SGSetOutputNextOutput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut,
-                             SGOutputObj_Convert, &nextOut))
-               return NULL;
-       _rv = SGSetOutputNextOutput(s,
-                                   sgOut,
-                                   nextOut);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetOutputNextOutput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-       SGOutput nextOut;
-#ifndef SGGetOutputNextOutput
-       PyMac_PRECHECK(SGGetOutputNextOutput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut))
-               return NULL;
-       _rv = SGGetOutputNextOutput(s,
-                                   sgOut,
-                                   &nextOut);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            SGOutputObj_New, nextOut);
-       return _res;
-}
-
-static PyObject *Qt_SGSetOutputMaximumOffset(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-       wide maxOffset;
-#ifndef SGSetOutputMaximumOffset
-       PyMac_PRECHECK(SGSetOutputMaximumOffset);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut,
-                             PyMac_Getwide, &maxOffset))
-               return NULL;
-       _rv = SGSetOutputMaximumOffset(s,
-                                      sgOut,
-                                      &maxOffset);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetOutputMaximumOffset(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-       wide maxOffset;
-#ifndef SGGetOutputMaximumOffset
-       PyMac_PRECHECK(SGGetOutputMaximumOffset);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut))
-               return NULL;
-       _rv = SGGetOutputMaximumOffset(s,
-                                      sgOut,
-                                      &maxOffset);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_Buildwide, maxOffset);
-       return _res;
-}
-
-static PyObject *Qt_SGGetOutputDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef SGGetOutputDataReference
-       PyMac_PRECHECK(SGGetOutputDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut))
-               return NULL;
-       _rv = SGGetOutputDataReference(s,
-                                      sgOut,
-                                      &dataRef,
-                                      &dataRefType);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, dataRef,
-                            PyMac_BuildOSType, dataRefType);
-       return _res;
-}
-
-static PyObject *Qt_SGWriteExtendedMovieData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       Ptr p;
-       long len;
-       wide offset;
-       SGOutput sgOut;
-#ifndef SGWriteExtendedMovieData
-       PyMac_PRECHECK(SGWriteExtendedMovieData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&sl",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             &p,
-                             &len))
-               return NULL;
-       _rv = SGWriteExtendedMovieData(s,
-                                      c,
-                                      p,
-                                      len,
-                                      &offset,
-                                      &sgOut);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            PyMac_Buildwide, offset,
-                            SGOutputObj_New, sgOut);
-       return _res;
-}
-
-static PyObject *Qt_SGGetStorageSpaceRemaining64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       wide bytes;
-#ifndef SGGetStorageSpaceRemaining64
-       PyMac_PRECHECK(SGGetStorageSpaceRemaining64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetStorageSpaceRemaining64(s,
-                                          &bytes);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_Buildwide, bytes);
-       return _res;
-}
-
-static PyObject *Qt_SGGetDataOutputStorageSpaceRemaining64(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-       wide space;
-#ifndef SGGetDataOutputStorageSpaceRemaining64
-       PyMac_PRECHECK(SGGetDataOutputStorageSpaceRemaining64);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut))
-               return NULL;
-       _rv = SGGetDataOutputStorageSpaceRemaining64(s,
-                                                    sgOut,
-                                                    &space);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_Buildwide, space);
-       return _res;
-}
-
-static PyObject *Qt_SGWriteMovieData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       Ptr p;
-       long len;
-       long offset;
-#ifndef SGWriteMovieData
-       PyMac_PRECHECK(SGWriteMovieData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&sl",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             &p,
-                             &len))
-               return NULL;
-       _rv = SGWriteMovieData(s,
-                              c,
-                              p,
-                              len,
-                              &offset);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            offset);
-       return _res;
-}
-
-static PyObject *Qt_SGGetTimeBase(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       TimeBase tb;
-#ifndef SGGetTimeBase
-       PyMac_PRECHECK(SGGetTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGGetTimeBase(s,
-                           &tb);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            TimeBaseObj_New, tb);
-       return _res;
-}
-
-static PyObject *Qt_SGAddMovieData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       Ptr p;
-       long len;
-       long offset;
-       long chRefCon;
-       TimeValue time;
-       short writeType;
-#ifndef SGAddMovieData
-       PyMac_PRECHECK(SGAddMovieData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&slllh",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             &p,
-                             &len,
-                             &chRefCon,
-                             &time,
-                             &writeType))
-               return NULL;
-       _rv = SGAddMovieData(s,
-                            c,
-                            p,
-                            len,
-                            &offset,
-                            chRefCon,
-                            time,
-                            writeType);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            offset);
-       return _res;
-}
-
-static PyObject *Qt_SGChangedSource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-#ifndef SGChangedSource
-       PyMac_PRECHECK(SGChangedSource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGChangedSource(s,
-                             c);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGAddExtendedMovieData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       Ptr p;
-       long len;
-       wide offset;
-       long chRefCon;
-       TimeValue time;
-       short writeType;
-       SGOutput whichOutput;
-#ifndef SGAddExtendedMovieData
-       PyMac_PRECHECK(SGAddExtendedMovieData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&slllh",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             &p,
-                             &len,
-                             &chRefCon,
-                             &time,
-                             &writeType))
-               return NULL;
-       _rv = SGAddExtendedMovieData(s,
-                                    c,
-                                    p,
-                                    len,
-                                    &offset,
-                                    chRefCon,
-                                    time,
-                                    writeType,
-                                    &whichOutput);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            PyMac_Buildwide, offset,
-                            SGOutputObj_New, whichOutput);
-       return _res;
-}
-
-static PyObject *Qt_SGAddOutputDataRefToMedia(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGOutput sgOut;
-       Media theMedia;
-       SampleDescriptionHandle desc;
-#ifndef SGAddOutputDataRefToMedia
-       PyMac_PRECHECK(SGAddOutputDataRefToMedia);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
-                             CmpObj_Convert, &s,
-                             SGOutputObj_Convert, &sgOut,
-                             MediaObj_Convert, &theMedia,
-                             ResObj_Convert, &desc))
-               return NULL;
-       _rv = SGAddOutputDataRefToMedia(s,
-                                       sgOut,
-                                       theMedia,
-                                       desc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetSettingsSummary(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Handle summaryText;
-#ifndef SGSetSettingsSummary
-       PyMac_PRECHECK(SGSetSettingsSummary);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             ResObj_Convert, &summaryText))
-               return NULL;
-       _rv = SGSetSettingsSummary(s,
-                                  summaryText);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelUsage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long usage;
-#ifndef SGSetChannelUsage
-       PyMac_PRECHECK(SGSetChannelUsage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &c,
-                             &usage))
-               return NULL;
-       _rv = SGSetChannelUsage(c,
-                               usage);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelUsage(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long usage;
-#ifndef SGGetChannelUsage
-       PyMac_PRECHECK(SGGetChannelUsage);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelUsage(c,
-                               &usage);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            usage);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Rect bounds;
-#ifndef SGSetChannelBounds
-       PyMac_PRECHECK(SGSetChannelBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             PyMac_GetRect, &bounds))
-               return NULL;
-       _rv = SGSetChannelBounds(c,
-                                &bounds);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Rect bounds;
-#ifndef SGGetChannelBounds
-       PyMac_PRECHECK(SGGetChannelBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelBounds(c,
-                                &bounds);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short volume;
-#ifndef SGSetChannelVolume
-       PyMac_PRECHECK(SGSetChannelVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &c,
-                             &volume))
-               return NULL;
-       _rv = SGSetChannelVolume(c,
-                                volume);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short volume;
-#ifndef SGGetChannelVolume
-       PyMac_PRECHECK(SGGetChannelVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelVolume(c,
-                                &volume);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            volume);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long channelInfo;
-#ifndef SGGetChannelInfo
-       PyMac_PRECHECK(SGGetChannelInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelInfo(c,
-                              &channelInfo);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            channelInfo);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelPlayFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long playFlags;
-#ifndef SGSetChannelPlayFlags
-       PyMac_PRECHECK(SGSetChannelPlayFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &c,
-                             &playFlags))
-               return NULL;
-       _rv = SGSetChannelPlayFlags(c,
-                                   playFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelPlayFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long playFlags;
-#ifndef SGGetChannelPlayFlags
-       PyMac_PRECHECK(SGGetChannelPlayFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelPlayFlags(c,
-                                   &playFlags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            playFlags);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelMaxFrames(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long frameCount;
-#ifndef SGSetChannelMaxFrames
-       PyMac_PRECHECK(SGSetChannelMaxFrames);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &c,
-                             &frameCount))
-               return NULL;
-       _rv = SGSetChannelMaxFrames(c,
-                                   frameCount);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelMaxFrames(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long frameCount;
-#ifndef SGGetChannelMaxFrames
-       PyMac_PRECHECK(SGGetChannelMaxFrames);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelMaxFrames(c,
-                                   &frameCount);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            frameCount);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelRefCon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long refCon;
-#ifndef SGSetChannelRefCon
-       PyMac_PRECHECK(SGSetChannelRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &c,
-                             &refCon))
-               return NULL;
-       _rv = SGSetChannelRefCon(c,
-                                refCon);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelClip(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       RgnHandle theClip;
-#ifndef SGSetChannelClip
-       PyMac_PRECHECK(SGSetChannelClip);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             ResObj_Convert, &theClip))
-               return NULL;
-       _rv = SGSetChannelClip(c,
-                              theClip);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelClip(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       RgnHandle theClip;
-#ifndef SGGetChannelClip
-       PyMac_PRECHECK(SGGetChannelClip);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelClip(c,
-                              &theClip);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, theClip);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelSampleDescription(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Handle sampleDesc;
-#ifndef SGGetChannelSampleDescription
-       PyMac_PRECHECK(SGGetChannelSampleDescription);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             ResObj_Convert, &sampleDesc))
-               return NULL;
-       _rv = SGGetChannelSampleDescription(c,
-                                           sampleDesc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       StringPtr name;
-#ifndef SGSetChannelDevice
-       PyMac_PRECHECK(SGSetChannelDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &c,
-                             &name))
-               return NULL;
-       _rv = SGSetChannelDevice(c,
-                                name);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelTimeScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       TimeScale scale;
-#ifndef SGGetChannelTimeScale
-       PyMac_PRECHECK(SGGetChannelTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelTimeScale(c,
-                                   &scale);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            scale);
-       return _res;
-}
-
-static PyObject *Qt_SGChannelPutPicture(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-#ifndef SGChannelPutPicture
-       PyMac_PRECHECK(SGChannelPutPicture);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGChannelPutPicture(c);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGChannelSetRequestedDataRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long bytesPerSecond;
-#ifndef SGChannelSetRequestedDataRate
-       PyMac_PRECHECK(SGChannelSetRequestedDataRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &c,
-                             &bytesPerSecond))
-               return NULL;
-       _rv = SGChannelSetRequestedDataRate(c,
-                                           bytesPerSecond);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGChannelGetRequestedDataRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long bytesPerSecond;
-#ifndef SGChannelGetRequestedDataRate
-       PyMac_PRECHECK(SGChannelGetRequestedDataRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGChannelGetRequestedDataRate(c,
-                                           &bytesPerSecond);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            bytesPerSecond);
-       return _res;
-}
-
-static PyObject *Qt_SGChannelSetDataSourceName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Str255 name;
-       ScriptCode scriptTag;
-#ifndef SGChannelSetDataSourceName
-       PyMac_PRECHECK(SGChannelSetDataSourceName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             CmpInstObj_Convert, &c,
-                             PyMac_GetStr255, name,
-                             &scriptTag))
-               return NULL;
-       _rv = SGChannelSetDataSourceName(c,
-                                        name,
-                                        scriptTag);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGChannelGetDataSourceName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Str255 name;
-       ScriptCode scriptTag;
-#ifndef SGChannelGetDataSourceName
-       PyMac_PRECHECK(SGChannelGetDataSourceName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             PyMac_GetStr255, name))
-               return NULL;
-       _rv = SGChannelGetDataSourceName(c,
-                                        name,
-                                        &scriptTag);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            scriptTag);
-       return _res;
-}
-
-static PyObject *Qt_SGChannelSetCodecSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Handle settings;
-#ifndef SGChannelSetCodecSettings
-       PyMac_PRECHECK(SGChannelSetCodecSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             ResObj_Convert, &settings))
-               return NULL;
-       _rv = SGChannelSetCodecSettings(c,
-                                       settings);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGChannelGetCodecSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Handle settings;
-#ifndef SGChannelGetCodecSettings
-       PyMac_PRECHECK(SGChannelGetCodecSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGChannelGetCodecSettings(c,
-                                       &settings);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, settings);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelTimeBase(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       TimeBase tb;
-#ifndef SGGetChannelTimeBase
-       PyMac_PRECHECK(SGGetChannelTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelTimeBase(c,
-                                  &tb);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            TimeBaseObj_New, tb);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelRefCon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long refCon;
-#ifndef SGGetChannelRefCon
-       PyMac_PRECHECK(SGGetChannelRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetChannelRefCon(c,
-                                &refCon);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            refCon);
-       return _res;
-}
-
-static PyObject *Qt_SGGetChannelDeviceAndInputNames(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Str255 outDeviceName;
-       Str255 outInputName;
-       short outInputNumber;
-#ifndef SGGetChannelDeviceAndInputNames
-       PyMac_PRECHECK(SGGetChannelDeviceAndInputNames);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &c,
-                             PyMac_GetStr255, outDeviceName,
-                             PyMac_GetStr255, outInputName))
-               return NULL;
-       _rv = SGGetChannelDeviceAndInputNames(c,
-                                             outDeviceName,
-                                             outInputName,
-                                             &outInputNumber);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            outInputNumber);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelDeviceInput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short inInputNumber;
-#ifndef SGSetChannelDeviceInput
-       PyMac_PRECHECK(SGSetChannelDeviceInput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &c,
-                             &inInputNumber))
-               return NULL;
-       _rv = SGSetChannelDeviceInput(c,
-                                     inInputNumber);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetChannelSettingsStateChanging(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       UInt32 inFlags;
-#ifndef SGSetChannelSettingsStateChanging
-       PyMac_PRECHECK(SGSetChannelSettingsStateChanging);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &c,
-                             &inFlags))
-               return NULL;
-       _rv = SGSetChannelSettingsStateChanging(c,
-                                               inFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGInitChannel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       SeqGrabComponent owner;
-#ifndef SGInitChannel
-       PyMac_PRECHECK(SGInitChannel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             CmpObj_Convert, &owner))
-               return NULL;
-       _rv = SGInitChannel(c,
-                           owner);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGWriteSamples(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Movie m;
-       AliasHandle theFile;
-#ifndef SGWriteSamples
-       PyMac_PRECHECK(SGWriteSamples);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &c,
-                             MovieObj_Convert, &m,
-                             ResObj_Convert, &theFile))
-               return NULL;
-       _rv = SGWriteSamples(c,
-                            m,
-                            theFile);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetDataRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long bytesPerSecond;
-#ifndef SGGetDataRate
-       PyMac_PRECHECK(SGGetDataRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetDataRate(c,
-                           &bytesPerSecond);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            bytesPerSecond);
-       return _res;
-}
-
-static PyObject *Qt_SGAlignChannelRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Rect r;
-#ifndef SGAlignChannelRect
-       PyMac_PRECHECK(SGAlignChannelRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGAlignChannelRect(c,
-                                &r);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelGetDitl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Handle ditl;
-#ifndef SGPanelGetDitl
-       PyMac_PRECHECK(SGPanelGetDitl);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGPanelGetDitl(s,
-                            &ditl);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, ditl);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelGetTitle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Str255 title;
-#ifndef SGPanelGetTitle
-       PyMac_PRECHECK(SGPanelGetTitle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             PyMac_GetStr255, title))
-               return NULL;
-       _rv = SGPanelGetTitle(s,
-                             title);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelCanRun(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-#ifndef SGPanelCanRun
-       PyMac_PRECHECK(SGPanelCanRun);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGPanelCanRun(s,
-                           c);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelInstall(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       DialogPtr d;
-       short itemOffset;
-#ifndef SGPanelInstall
-       PyMac_PRECHECK(SGPanelInstall);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&h",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             DlgObj_Convert, &d,
-                             &itemOffset))
-               return NULL;
-       _rv = SGPanelInstall(s,
-                            c,
-                            d,
-                            itemOffset);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       DialogPtr d;
-       short itemOffset;
-       EventRecord theEvent;
-       short itemHit;
-       Boolean handled;
-#ifndef SGPanelEvent
-       PyMac_PRECHECK(SGPanelEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&hO&",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             DlgObj_Convert, &d,
-                             &itemOffset,
-                             PyMac_GetEventRecord, &theEvent))
-               return NULL;
-       _rv = SGPanelEvent(s,
-                          c,
-                          d,
-                          itemOffset,
-                          &theEvent,
-                          &itemHit,
-                          &handled);
-       _res = Py_BuildValue("lhb",
-                            _rv,
-                            itemHit,
-                            handled);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelItem(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       DialogPtr d;
-       short itemOffset;
-       short itemNum;
-#ifndef SGPanelItem
-       PyMac_PRECHECK(SGPanelItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&hh",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             DlgObj_Convert, &d,
-                             &itemOffset,
-                             &itemNum))
-               return NULL;
-       _rv = SGPanelItem(s,
-                         c,
-                         d,
-                         itemOffset,
-                         itemNum);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelRemove(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       DialogPtr d;
-       short itemOffset;
-#ifndef SGPanelRemove
-       PyMac_PRECHECK(SGPanelRemove);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&h",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             DlgObj_Convert, &d,
-                             &itemOffset))
-               return NULL;
-       _rv = SGPanelRemove(s,
-                           c,
-                           d,
-                           itemOffset);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelSetGrabber(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SeqGrabComponent sg;
-#ifndef SGPanelSetGrabber
-       PyMac_PRECHECK(SGPanelSetGrabber);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &s,
-                             CmpObj_Convert, &sg))
-               return NULL;
-       _rv = SGPanelSetGrabber(s,
-                               sg);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelSetResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       short resRef;
-#ifndef SGPanelSetResFile
-       PyMac_PRECHECK(SGPanelSetResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpObj_Convert, &s,
-                             &resRef))
-               return NULL;
-       _rv = SGPanelSetResFile(s,
-                               resRef);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelGetSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       UserData ud;
-       long flags;
-#ifndef SGPanelGetSettings
-       PyMac_PRECHECK(SGPanelGetSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             &flags))
-               return NULL;
-       _rv = SGPanelGetSettings(s,
-                                c,
-                                &ud,
-                                flags);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            UserDataObj_New, ud);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelSetSettings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       SGChannel c;
-       UserData ud;
-       long flags;
-#ifndef SGPanelSetSettings
-       PyMac_PRECHECK(SGPanelSetSettings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&l",
-                             CmpObj_Convert, &s,
-                             CmpInstObj_Convert, &c,
-                             UserDataObj_Convert, &ud,
-                             &flags))
-               return NULL;
-       _rv = SGPanelSetSettings(s,
-                                c,
-                                ud,
-                                flags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelValidateInput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Boolean ok;
-#ifndef SGPanelValidateInput
-       PyMac_PRECHECK(SGPanelValidateInput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGPanelValidateInput(s,
-                                  &ok);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            ok);
-       return _res;
-}
-
-static PyObject *Qt_SGPanelGetDITLForSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SeqGrabComponent s;
-       Handle ditl;
-       Point requestedSize;
-#ifndef SGPanelGetDITLForSize
-       PyMac_PRECHECK(SGPanelGetDITLForSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &s))
-               return NULL;
-       _rv = SGPanelGetDITLForSize(s,
-                                   &ditl,
-                                   &requestedSize);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, ditl,
-                            PyMac_BuildPoint, requestedSize);
-       return _res;
-}
-
-static PyObject *Qt_SGGetSrcVideoBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Rect r;
-#ifndef SGGetSrcVideoBounds
-       PyMac_PRECHECK(SGGetSrcVideoBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetSrcVideoBounds(c,
-                                 &r);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qt_SGSetVideoRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Rect r;
-#ifndef SGSetVideoRect
-       PyMac_PRECHECK(SGSetVideoRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             PyMac_GetRect, &r))
-               return NULL;
-       _rv = SGSetVideoRect(c,
-                            &r);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetVideoRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Rect r;
-#ifndef SGGetVideoRect
-       PyMac_PRECHECK(SGGetVideoRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetVideoRect(c,
-                            &r);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &r);
-       return _res;
-}
-
-static PyObject *Qt_SGGetVideoCompressorType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       OSType compressorType;
-#ifndef SGGetVideoCompressorType
-       PyMac_PRECHECK(SGGetVideoCompressorType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetVideoCompressorType(c,
-                                      &compressorType);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildOSType, compressorType);
-       return _res;
-}
-
-static PyObject *Qt_SGSetVideoCompressorType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       OSType compressorType;
-#ifndef SGSetVideoCompressorType
-       PyMac_PRECHECK(SGSetVideoCompressorType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             PyMac_GetOSType, &compressorType))
-               return NULL;
-       _rv = SGSetVideoCompressorType(c,
-                                      compressorType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetVideoCompressor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short depth;
-       CompressorComponent compressor;
-       CodecQ spatialQuality;
-       CodecQ temporalQuality;
-       long keyFrameRate;
-#ifndef SGSetVideoCompressor
-       PyMac_PRECHECK(SGSetVideoCompressor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hO&lll",
-                             CmpInstObj_Convert, &c,
-                             &depth,
-                             CmpObj_Convert, &compressor,
-                             &spatialQuality,
-                             &temporalQuality,
-                             &keyFrameRate))
-               return NULL;
-       _rv = SGSetVideoCompressor(c,
-                                  depth,
-                                  compressor,
-                                  spatialQuality,
-                                  temporalQuality,
-                                  keyFrameRate);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetVideoCompressor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short depth;
-       CompressorComponent compressor;
-       CodecQ spatialQuality;
-       CodecQ temporalQuality;
-       long keyFrameRate;
-#ifndef SGGetVideoCompressor
-       PyMac_PRECHECK(SGGetVideoCompressor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetVideoCompressor(c,
-                                  &depth,
-                                  &compressor,
-                                  &spatialQuality,
-                                  &temporalQuality,
-                                  &keyFrameRate);
-       _res = Py_BuildValue("lhO&lll",
-                            _rv,
-                            depth,
-                            CmpObj_New, compressor,
-                            spatialQuality,
-                            temporalQuality,
-                            keyFrameRate);
-       return _res;
-}
-
-static PyObject *Qt_SGGetVideoDigitizerComponent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentInstance _rv;
-       SGChannel c;
-#ifndef SGGetVideoDigitizerComponent
-       PyMac_PRECHECK(SGGetVideoDigitizerComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetVideoDigitizerComponent(c);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetVideoDigitizerComponent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       ComponentInstance vdig;
-#ifndef SGSetVideoDigitizerComponent
-       PyMac_PRECHECK(SGSetVideoDigitizerComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             CmpInstObj_Convert, &vdig))
-               return NULL;
-       _rv = SGSetVideoDigitizerComponent(c,
-                                          vdig);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGVideoDigitizerChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-#ifndef SGVideoDigitizerChanged
-       PyMac_PRECHECK(SGVideoDigitizerChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGVideoDigitizerChanged(c);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGrabFrame(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short bufferNum;
-#ifndef SGGrabFrame
-       PyMac_PRECHECK(SGGrabFrame);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &c,
-                             &bufferNum))
-               return NULL;
-       _rv = SGGrabFrame(c,
-                         bufferNum);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGrabFrameComplete(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short bufferNum;
-       Boolean done;
-#ifndef SGGrabFrameComplete
-       PyMac_PRECHECK(SGGrabFrameComplete);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &c,
-                             &bufferNum))
-               return NULL;
-       _rv = SGGrabFrameComplete(c,
-                                 bufferNum,
-                                 &done);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            done);
-       return _res;
-}
-
-static PyObject *Qt_SGCompressFrame(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short bufferNum;
-#ifndef SGCompressFrame
-       PyMac_PRECHECK(SGCompressFrame);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &c,
-                             &bufferNum))
-               return NULL;
-       _rv = SGCompressFrame(c,
-                             bufferNum);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetCompressBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short depth;
-       Rect compressSize;
-#ifndef SGSetCompressBuffer
-       PyMac_PRECHECK(SGSetCompressBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hO&",
-                             CmpInstObj_Convert, &c,
-                             &depth,
-                             PyMac_GetRect, &compressSize))
-               return NULL;
-       _rv = SGSetCompressBuffer(c,
-                                 depth,
-                                 &compressSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetCompressBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short depth;
-       Rect compressSize;
-#ifndef SGGetCompressBuffer
-       PyMac_PRECHECK(SGGetCompressBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetCompressBuffer(c,
-                                 &depth,
-                                 &compressSize);
-       _res = Py_BuildValue("lhO&",
-                            _rv,
-                            depth,
-                            PyMac_BuildRect, &compressSize);
-       return _res;
-}
-
-static PyObject *Qt_SGGetBufferInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short bufferNum;
-       PixMapHandle bufferPM;
-       Rect bufferRect;
-       GWorldPtr compressBuffer;
-       Rect compressBufferRect;
-#ifndef SGGetBufferInfo
-       PyMac_PRECHECK(SGGetBufferInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &c,
-                             &bufferNum))
-               return NULL;
-       _rv = SGGetBufferInfo(c,
-                             bufferNum,
-                             &bufferPM,
-                             &bufferRect,
-                             &compressBuffer,
-                             &compressBufferRect);
-       _res = Py_BuildValue("lO&O&O&O&",
-                            _rv,
-                            ResObj_New, bufferPM,
-                            PyMac_BuildRect, &bufferRect,
-                            GWorldObj_New, compressBuffer,
-                            PyMac_BuildRect, &compressBufferRect);
-       return _res;
-}
-
-static PyObject *Qt_SGSetUseScreenBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Boolean useScreenBuffer;
-#ifndef SGSetUseScreenBuffer
-       PyMac_PRECHECK(SGSetUseScreenBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpInstObj_Convert, &c,
-                             &useScreenBuffer))
-               return NULL;
-       _rv = SGSetUseScreenBuffer(c,
-                                  useScreenBuffer);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetUseScreenBuffer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Boolean useScreenBuffer;
-#ifndef SGGetUseScreenBuffer
-       PyMac_PRECHECK(SGGetUseScreenBuffer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetUseScreenBuffer(c,
-                                  &useScreenBuffer);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            useScreenBuffer);
-       return _res;
-}
-
-static PyObject *Qt_SGSetFrameRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Fixed frameRate;
-#ifndef SGSetFrameRate
-       PyMac_PRECHECK(SGSetFrameRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             PyMac_GetFixed, &frameRate))
-               return NULL;
-       _rv = SGSetFrameRate(c,
-                            frameRate);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetFrameRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Fixed frameRate;
-#ifndef SGGetFrameRate
-       PyMac_PRECHECK(SGGetFrameRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetFrameRate(c,
-                            &frameRate);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildFixed, frameRate);
-       return _res;
-}
-
-static PyObject *Qt_SGSetPreferredPacketSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long preferredPacketSizeInBytes;
-#ifndef SGSetPreferredPacketSize
-       PyMac_PRECHECK(SGSetPreferredPacketSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &c,
-                             &preferredPacketSizeInBytes))
-               return NULL;
-       _rv = SGSetPreferredPacketSize(c,
-                                      preferredPacketSizeInBytes);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetPreferredPacketSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long preferredPacketSizeInBytes;
-#ifndef SGGetPreferredPacketSize
-       PyMac_PRECHECK(SGGetPreferredPacketSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetPreferredPacketSize(c,
-                                      &preferredPacketSizeInBytes);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            preferredPacketSizeInBytes);
-       return _res;
-}
-
-static PyObject *Qt_SGSetUserVideoCompressorList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Handle compressorTypes;
-#ifndef SGSetUserVideoCompressorList
-       PyMac_PRECHECK(SGSetUserVideoCompressorList);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             ResObj_Convert, &compressorTypes))
-               return NULL;
-       _rv = SGSetUserVideoCompressorList(c,
-                                          compressorTypes);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetUserVideoCompressorList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Handle compressorTypes;
-#ifndef SGGetUserVideoCompressorList
-       PyMac_PRECHECK(SGGetUserVideoCompressorList);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetUserVideoCompressorList(c,
-                                          &compressorTypes);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, compressorTypes);
-       return _res;
-}
-
-static PyObject *Qt_SGSetSoundInputDriver(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Str255 driverName;
-#ifndef SGSetSoundInputDriver
-       PyMac_PRECHECK(SGSetSoundInputDriver);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             PyMac_GetStr255, driverName))
-               return NULL;
-       _rv = SGSetSoundInputDriver(c,
-                                   driverName);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetSoundInputDriver(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       SGChannel c;
-#ifndef SGGetSoundInputDriver
-       PyMac_PRECHECK(SGGetSoundInputDriver);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetSoundInputDriver(c);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSoundInputDriverChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-#ifndef SGSoundInputDriverChanged
-       PyMac_PRECHECK(SGSoundInputDriverChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGSoundInputDriverChanged(c);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetSoundRecordChunkSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       long seconds;
-#ifndef SGSetSoundRecordChunkSize
-       PyMac_PRECHECK(SGSetSoundRecordChunkSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &c,
-                             &seconds))
-               return NULL;
-       _rv = SGSetSoundRecordChunkSize(c,
-                                       seconds);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetSoundRecordChunkSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       SGChannel c;
-#ifndef SGGetSoundRecordChunkSize
-       PyMac_PRECHECK(SGGetSoundRecordChunkSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetSoundRecordChunkSize(c);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetSoundInputRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Fixed rate;
-#ifndef SGSetSoundInputRate
-       PyMac_PRECHECK(SGSetSoundInputRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       _rv = SGSetSoundInputRate(c,
-                                 rate);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetSoundInputRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Fixed _rv;
-       SGChannel c;
-#ifndef SGGetSoundInputRate
-       PyMac_PRECHECK(SGGetSoundInputRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetSoundInputRate(c);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFixed, _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetSoundInputParameters(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short sampleSize;
-       short numChannels;
-       OSType compressionType;
-#ifndef SGSetSoundInputParameters
-       PyMac_PRECHECK(SGSetSoundInputParameters);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhO&",
-                             CmpInstObj_Convert, &c,
-                             &sampleSize,
-                             &numChannels,
-                             PyMac_GetOSType, &compressionType))
-               return NULL;
-       _rv = SGSetSoundInputParameters(c,
-                                       sampleSize,
-                                       numChannels,
-                                       compressionType);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetSoundInputParameters(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short sampleSize;
-       short numChannels;
-       OSType compressionType;
-#ifndef SGGetSoundInputParameters
-       PyMac_PRECHECK(SGGetSoundInputParameters);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetSoundInputParameters(c,
-                                       &sampleSize,
-                                       &numChannels,
-                                       &compressionType);
-       _res = Py_BuildValue("lhhO&",
-                            _rv,
-                            sampleSize,
-                            numChannels,
-                            PyMac_BuildOSType, compressionType);
-       return _res;
-}
-
-static PyObject *Qt_SGSetAdditionalSoundRates(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Handle rates;
-#ifndef SGSetAdditionalSoundRates
-       PyMac_PRECHECK(SGSetAdditionalSoundRates);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &c,
-                             ResObj_Convert, &rates))
-               return NULL;
-       _rv = SGSetAdditionalSoundRates(c,
-                                       rates);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetAdditionalSoundRates(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       Handle rates;
-#ifndef SGGetAdditionalSoundRates
-       PyMac_PRECHECK(SGGetAdditionalSoundRates);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetAdditionalSoundRates(c,
-                                       &rates);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, rates);
-       return _res;
-}
-
-static PyObject *Qt_SGSetFontName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       StringPtr pstr;
-#ifndef SGSetFontName
-       PyMac_PRECHECK(SGSetFontName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &c,
-                             &pstr))
-               return NULL;
-       _rv = SGSetFontName(c,
-                           pstr);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetFontSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short fontSize;
-#ifndef SGSetFontSize
-       PyMac_PRECHECK(SGSetFontSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &c,
-                             &fontSize))
-               return NULL;
-       _rv = SGSetFontSize(c,
-                           fontSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGSetTextForeColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       RGBColor theColor;
-#ifndef SGSetTextForeColor
-       PyMac_PRECHECK(SGSetTextForeColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGSetTextForeColor(c,
-                                &theColor);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QdRGB_New, &theColor);
-       return _res;
-}
-
-static PyObject *Qt_SGSetTextBackColor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       RGBColor theColor;
-#ifndef SGSetTextBackColor
-       PyMac_PRECHECK(SGSetTextBackColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGSetTextBackColor(c,
-                                &theColor);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            QdRGB_New, &theColor);
-       return _res;
-}
-
-static PyObject *Qt_SGSetJustification(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short just;
-#ifndef SGSetJustification
-       PyMac_PRECHECK(SGSetJustification);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &c,
-                             &just))
-               return NULL;
-       _rv = SGSetJustification(c,
-                                just);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_SGGetTextReturnToSpaceValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short rettospace;
-#ifndef SGGetTextReturnToSpaceValue
-       PyMac_PRECHECK(SGGetTextReturnToSpaceValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &c))
-               return NULL;
-       _rv = SGGetTextReturnToSpaceValue(c,
-                                         &rettospace);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            rettospace);
-       return _res;
-}
-
-static PyObject *Qt_SGSetTextReturnToSpaceValue(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       SGChannel c;
-       short rettospace;
-#ifndef SGSetTextReturnToSpaceValue
-       PyMac_PRECHECK(SGSetTextReturnToSpaceValue);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &c,
-                             &rettospace))
-               return NULL;
-       _rv = SGSetTextReturnToSpaceValue(c,
-                                         rettospace);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputGetCurrentClientName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       Str255 str;
-#ifndef QTVideoOutputGetCurrentClientName
-       PyMac_PRECHECK(QTVideoOutputGetCurrentClientName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &vo,
-                             PyMac_GetStr255, str))
-               return NULL;
-       _rv = QTVideoOutputGetCurrentClientName(vo,
-                                               str);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputSetClientName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       Str255 str;
-#ifndef QTVideoOutputSetClientName
-       PyMac_PRECHECK(QTVideoOutputSetClientName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &vo,
-                             PyMac_GetStr255, str))
-               return NULL;
-       _rv = QTVideoOutputSetClientName(vo,
-                                        str);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputGetClientName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       Str255 str;
-#ifndef QTVideoOutputGetClientName
-       PyMac_PRECHECK(QTVideoOutputGetClientName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &vo,
-                             PyMac_GetStr255, str))
-               return NULL;
-       _rv = QTVideoOutputGetClientName(vo,
-                                        str);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputBegin(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-#ifndef QTVideoOutputBegin
-       PyMac_PRECHECK(QTVideoOutputBegin);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &vo))
-               return NULL;
-       _rv = QTVideoOutputBegin(vo);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputEnd(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-#ifndef QTVideoOutputEnd
-       PyMac_PRECHECK(QTVideoOutputEnd);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &vo))
-               return NULL;
-       _rv = QTVideoOutputEnd(vo);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputSetDisplayMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       long displayModeID;
-#ifndef QTVideoOutputSetDisplayMode
-       PyMac_PRECHECK(QTVideoOutputSetDisplayMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &vo,
-                             &displayModeID))
-               return NULL;
-       _rv = QTVideoOutputSetDisplayMode(vo,
-                                         displayModeID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputGetDisplayMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       long displayModeID;
-#ifndef QTVideoOutputGetDisplayMode
-       PyMac_PRECHECK(QTVideoOutputGetDisplayMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &vo))
-               return NULL;
-       _rv = QTVideoOutputGetDisplayMode(vo,
-                                         &displayModeID);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            displayModeID);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputGetGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       GWorldPtr gw;
-#ifndef QTVideoOutputGetGWorld
-       PyMac_PRECHECK(QTVideoOutputGetGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &vo))
-               return NULL;
-       _rv = QTVideoOutputGetGWorld(vo,
-                                    &gw);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            GWorldObj_New, gw);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputGetIndSoundOutput(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       long index;
-       Component outputComponent;
-#ifndef QTVideoOutputGetIndSoundOutput
-       PyMac_PRECHECK(QTVideoOutputGetIndSoundOutput);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &vo,
-                             &index))
-               return NULL;
-       _rv = QTVideoOutputGetIndSoundOutput(vo,
-                                            index,
-                                            &outputComponent);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CmpObj_New, outputComponent);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputGetClock(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       ComponentInstance clock;
-#ifndef QTVideoOutputGetClock
-       PyMac_PRECHECK(QTVideoOutputGetClock);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpObj_Convert, &vo))
-               return NULL;
-       _rv = QTVideoOutputGetClock(vo,
-                                   &clock);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CmpInstObj_New, clock);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputSetEchoPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       CGrafPtr echoPort;
-#ifndef QTVideoOutputSetEchoPort
-       PyMac_PRECHECK(QTVideoOutputSetEchoPort);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &vo,
-                             GrafObj_Convert, &echoPort))
-               return NULL;
-       _rv = QTVideoOutputSetEchoPort(vo,
-                                      echoPort);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputGetIndImageDecompressor(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       long index;
-       Component codec;
-#ifndef QTVideoOutputGetIndImageDecompressor
-       PyMac_PRECHECK(QTVideoOutputGetIndImageDecompressor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpObj_Convert, &vo,
-                             &index))
-               return NULL;
-       _rv = QTVideoOutputGetIndImageDecompressor(vo,
-                                                  index,
-                                                  &codec);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CmpObj_New, codec);
-       return _res;
-}
-
-static PyObject *Qt_QTVideoOutputBaseSetEchoPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTVideoOutputComponent vo;
-       CGrafPtr echoPort;
-#ifndef QTVideoOutputBaseSetEchoPort
-       PyMac_PRECHECK(QTVideoOutputBaseSetEchoPort);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpObj_Convert, &vo,
-                             GrafObj_Convert, &echoPort))
-               return NULL;
-       _rv = QTVideoOutputBaseSetEchoPort(vo,
-                                          echoPort);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetChunkManagementFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       UInt32 flags;
-       UInt32 flagsMask;
-#ifndef MediaSetChunkManagementFlags
-       PyMac_PRECHECK(MediaSetChunkManagementFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mh,
-                             &flags,
-                             &flagsMask))
-               return NULL;
-       _rv = MediaSetChunkManagementFlags(mh,
-                                          flags,
-                                          flagsMask);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetChunkManagementFlags(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       UInt32 flags;
-#ifndef MediaGetChunkManagementFlags
-       PyMac_PRECHECK(MediaGetChunkManagementFlags);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetChunkManagementFlags(mh,
-                                          &flags);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            flags);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetPurgeableChunkMemoryAllowance(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Size allowance;
-#ifndef MediaSetPurgeableChunkMemoryAllowance
-       PyMac_PRECHECK(MediaSetPurgeableChunkMemoryAllowance);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &allowance))
-               return NULL;
-       _rv = MediaSetPurgeableChunkMemoryAllowance(mh,
-                                                   allowance);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetPurgeableChunkMemoryAllowance(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Size allowance;
-#ifndef MediaGetPurgeableChunkMemoryAllowance
-       PyMac_PRECHECK(MediaGetPurgeableChunkMemoryAllowance);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetPurgeableChunkMemoryAllowance(mh,
-                                                   &allowance);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            allowance);
-       return _res;
-}
-
-static PyObject *Qt_MediaEmptyAllPurgeableChunks(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-#ifndef MediaEmptyAllPurgeableChunks
-       PyMac_PRECHECK(MediaEmptyAllPurgeableChunks);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaEmptyAllPurgeableChunks(mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetHandlerCapabilities(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long flags;
-       long flagsMask;
-#ifndef MediaSetHandlerCapabilities
-       PyMac_PRECHECK(MediaSetHandlerCapabilities);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mh,
-                             &flags,
-                             &flagsMask))
-               return NULL;
-       _rv = MediaSetHandlerCapabilities(mh,
-                                         flags,
-                                         flagsMask);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaIdle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TimeValue atMediaTime;
-       long flagsIn;
-       long flagsOut;
-       TimeRecord movieTime;
-#ifndef MediaIdle
-       PyMac_PRECHECK(MediaIdle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llO&",
-                             CmpInstObj_Convert, &mh,
-                             &atMediaTime,
-                             &flagsIn,
-                             QtTimeRecord_Convert, &movieTime))
-               return NULL;
-       _rv = MediaIdle(mh,
-                       atMediaTime,
-                       flagsIn,
-                       &flagsOut,
-                       &movieTime);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            flagsOut);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetMediaInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Handle h;
-#ifndef MediaGetMediaInfo
-       PyMac_PRECHECK(MediaGetMediaInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &h))
-               return NULL;
-       _rv = MediaGetMediaInfo(mh,
-                               h);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaPutMediaInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Handle h;
-#ifndef MediaPutMediaInfo
-       PyMac_PRECHECK(MediaPutMediaInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &h))
-               return NULL;
-       _rv = MediaPutMediaInfo(mh,
-                               h);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetActive(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Boolean enableMedia;
-#ifndef MediaSetActive
-       PyMac_PRECHECK(MediaSetActive);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpInstObj_Convert, &mh,
-                             &enableMedia))
-               return NULL;
-       _rv = MediaSetActive(mh,
-                            enableMedia);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetRate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Fixed rate;
-#ifndef MediaSetRate
-       PyMac_PRECHECK(MediaSetRate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       _rv = MediaSetRate(mh,
-                          rate);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGGetStatus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       ComponentResult statusErr;
-#ifndef MediaGGetStatus
-       PyMac_PRECHECK(MediaGGetStatus);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGGetStatus(mh,
-                             &statusErr);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            statusErr);
-       return _res;
-}
-
-static PyObject *Qt_MediaTrackEdited(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-#ifndef MediaTrackEdited
-       PyMac_PRECHECK(MediaTrackEdited);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaTrackEdited(mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetMediaTimeScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TimeScale newTimeScale;
-#ifndef MediaSetMediaTimeScale
-       PyMac_PRECHECK(MediaSetMediaTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &newTimeScale))
-               return NULL;
-       _rv = MediaSetMediaTimeScale(mh,
-                                    newTimeScale);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetMovieTimeScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TimeScale newTimeScale;
-#ifndef MediaSetMovieTimeScale
-       PyMac_PRECHECK(MediaSetMovieTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &newTimeScale))
-               return NULL;
-       _rv = MediaSetMovieTimeScale(mh,
-                                    newTimeScale);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetGWorld(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       CGrafPtr aPort;
-       GDHandle aGD;
-#ifndef MediaSetGWorld
-       PyMac_PRECHECK(MediaSetGWorld);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &mh,
-                             GrafObj_Convert, &aPort,
-                             OptResObj_Convert, &aGD))
-               return NULL;
-       _rv = MediaSetGWorld(mh,
-                            aPort,
-                            aGD);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetDimensions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Fixed width;
-       Fixed height;
-#ifndef MediaSetDimensions
-       PyMac_PRECHECK(MediaSetDimensions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetFixed, &width,
-                             PyMac_GetFixed, &height))
-               return NULL;
-       _rv = MediaSetDimensions(mh,
-                                width,
-                                height);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetClip(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       RgnHandle theClip;
-#ifndef MediaSetClip
-       PyMac_PRECHECK(MediaSetClip);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &theClip))
-               return NULL;
-       _rv = MediaSetClip(mh,
-                          theClip);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetTrackOpaque(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Boolean trackIsOpaque;
-#ifndef MediaGetTrackOpaque
-       PyMac_PRECHECK(MediaGetTrackOpaque);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetTrackOpaque(mh,
-                                 &trackIsOpaque);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            trackIsOpaque);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetGraphicsMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long mode;
-       RGBColor opColor;
-#ifndef MediaSetGraphicsMode
-       PyMac_PRECHECK(MediaSetGraphicsMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &mh,
-                             &mode,
-                             QdRGB_Convert, &opColor))
-               return NULL;
-       _rv = MediaSetGraphicsMode(mh,
-                                  mode,
-                                  &opColor);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetGraphicsMode(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long mode;
-       RGBColor opColor;
-#ifndef MediaGetGraphicsMode
-       PyMac_PRECHECK(MediaGetGraphicsMode);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetGraphicsMode(mh,
-                                  &mode,
-                                  &opColor);
-       _res = Py_BuildValue("llO&",
-                            _rv,
-                            mode,
-                            QdRGB_New, &opColor);
-       return _res;
-}
-
-static PyObject *Qt_MediaGSetVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short volume;
-#ifndef MediaGSetVolume
-       PyMac_PRECHECK(MediaGSetVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &mh,
-                             &volume))
-               return NULL;
-       _rv = MediaGSetVolume(mh,
-                             volume);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetSoundBalance(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short balance;
-#ifndef MediaSetSoundBalance
-       PyMac_PRECHECK(MediaSetSoundBalance);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &mh,
-                             &balance))
-               return NULL;
-       _rv = MediaSetSoundBalance(mh,
-                                  balance);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetSoundBalance(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short balance;
-#ifndef MediaGetSoundBalance
-       PyMac_PRECHECK(MediaGetSoundBalance);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetSoundBalance(mh,
-                                  &balance);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            balance);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetNextBoundsChange(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TimeValue when;
-#ifndef MediaGetNextBoundsChange
-       PyMac_PRECHECK(MediaGetNextBoundsChange);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetNextBoundsChange(mh,
-                                      &when);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            when);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetSrcRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       RgnHandle rgn;
-       TimeValue atMediaTime;
-#ifndef MediaGetSrcRgn
-       PyMac_PRECHECK(MediaGetSrcRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &rgn,
-                             &atMediaTime))
-               return NULL;
-       _rv = MediaGetSrcRgn(mh,
-                            rgn,
-                            atMediaTime);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaPreroll(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TimeValue time;
-       Fixed rate;
-#ifndef MediaPreroll
-       PyMac_PRECHECK(MediaPreroll);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &mh,
-                             &time,
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       _rv = MediaPreroll(mh,
-                          time,
-                          rate);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSampleDescriptionChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long index;
-#ifndef MediaSampleDescriptionChanged
-       PyMac_PRECHECK(MediaSampleDescriptionChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &index))
-               return NULL;
-       _rv = MediaSampleDescriptionChanged(mh,
-                                           index);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaHasCharacteristic(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       OSType characteristic;
-       Boolean hasIt;
-#ifndef MediaHasCharacteristic
-       PyMac_PRECHECK(MediaHasCharacteristic);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetOSType, &characteristic))
-               return NULL;
-       _rv = MediaHasCharacteristic(mh,
-                                    characteristic,
-                                    &hasIt);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            hasIt);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetOffscreenBufferSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Rect bounds;
-       short depth;
-       CTabHandle ctab;
-#ifndef MediaGetOffscreenBufferSize
-       PyMac_PRECHECK(MediaGetOffscreenBufferSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hO&",
-                             CmpInstObj_Convert, &mh,
-                             &depth,
-                             ResObj_Convert, &ctab))
-               return NULL;
-       _rv = MediaGetOffscreenBufferSize(mh,
-                                         &bounds,
-                                         depth,
-                                         ctab);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetHints(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long hints;
-#ifndef MediaSetHints
-       PyMac_PRECHECK(MediaSetHints);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &hints))
-               return NULL;
-       _rv = MediaSetHints(mh,
-                           hints);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Str255 name;
-       long requestedLanguage;
-       long actualLanguage;
-#ifndef MediaGetName
-       PyMac_PRECHECK(MediaGetName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&l",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetStr255, name,
-                             &requestedLanguage))
-               return NULL;
-       _rv = MediaGetName(mh,
-                          name,
-                          requestedLanguage,
-                          &actualLanguage);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            actualLanguage);
-       return _res;
-}
-
-static PyObject *Qt_MediaForceUpdate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long forceUpdateFlags;
-#ifndef MediaForceUpdate
-       PyMac_PRECHECK(MediaForceUpdate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &forceUpdateFlags))
-               return NULL;
-       _rv = MediaForceUpdate(mh,
-                              forceUpdateFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetDrawingRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       RgnHandle partialRgn;
-#ifndef MediaGetDrawingRgn
-       PyMac_PRECHECK(MediaGetDrawingRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetDrawingRgn(mh,
-                                &partialRgn);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, partialRgn);
-       return _res;
-}
-
-static PyObject *Qt_MediaGSetActiveSegment(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       TimeValue activeStart;
-       TimeValue activeDuration;
-#ifndef MediaGSetActiveSegment
-       PyMac_PRECHECK(MediaGSetActiveSegment);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mh,
-                             &activeStart,
-                             &activeDuration))
-               return NULL;
-       _rv = MediaGSetActiveSegment(mh,
-                                    activeStart,
-                                    activeDuration);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaInvalidateRegion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       RgnHandle invalRgn;
-#ifndef MediaInvalidateRegion
-       PyMac_PRECHECK(MediaInvalidateRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &invalRgn))
-               return NULL;
-       _rv = MediaInvalidateRegion(mh,
-                                   invalRgn);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetNextStepTime(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short flags;
-       TimeValue mediaTimeIn;
-       TimeValue mediaTimeOut;
-       Fixed rate;
-#ifndef MediaGetNextStepTime
-       PyMac_PRECHECK(MediaGetNextStepTime);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hlO&",
-                             CmpInstObj_Convert, &mh,
-                             &flags,
-                             &mediaTimeIn,
-                             PyMac_GetFixed, &rate))
-               return NULL;
-       _rv = MediaGetNextStepTime(mh,
-                                  flags,
-                                  mediaTimeIn,
-                                  &mediaTimeOut,
-                                  rate);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            mediaTimeOut);
-       return _res;
-}
-
-static PyObject *Qt_MediaChangedNonPrimarySource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long inputIndex;
-#ifndef MediaChangedNonPrimarySource
-       PyMac_PRECHECK(MediaChangedNonPrimarySource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &inputIndex))
-               return NULL;
-       _rv = MediaChangedNonPrimarySource(mh,
-                                          inputIndex);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaTrackReferencesChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-#ifndef MediaTrackReferencesChanged
-       PyMac_PRECHECK(MediaTrackReferencesChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaTrackReferencesChanged(mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaReleaseSampleDataPointer(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long sampleNum;
-#ifndef MediaReleaseSampleDataPointer
-       PyMac_PRECHECK(MediaReleaseSampleDataPointer);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &sampleNum))
-               return NULL;
-       _rv = MediaReleaseSampleDataPointer(mh,
-                                           sampleNum);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaTrackPropertyAtomChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-#ifndef MediaTrackPropertyAtomChanged
-       PyMac_PRECHECK(MediaTrackPropertyAtomChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaTrackPropertyAtomChanged(mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetVideoParam(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long whichParam;
-       unsigned short value;
-#ifndef MediaSetVideoParam
-       PyMac_PRECHECK(MediaSetVideoParam);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &whichParam))
-               return NULL;
-       _rv = MediaSetVideoParam(mh,
-                                whichParam,
-                                &value);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            value);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetVideoParam(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long whichParam;
-       unsigned short value;
-#ifndef MediaGetVideoParam
-       PyMac_PRECHECK(MediaGetVideoParam);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &whichParam))
-               return NULL;
-       _rv = MediaGetVideoParam(mh,
-                                whichParam,
-                                &value);
-       _res = Py_BuildValue("lH",
-                            _rv,
-                            value);
-       return _res;
-}
-
-static PyObject *Qt_MediaCompare(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Boolean isOK;
-       Media srcMedia;
-       ComponentInstance srcMediaComponent;
-#ifndef MediaCompare
-       PyMac_PRECHECK(MediaCompare);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             CmpInstObj_Convert, &mh,
-                             MediaObj_Convert, &srcMedia,
-                             CmpInstObj_Convert, &srcMediaComponent))
-               return NULL;
-       _rv = MediaCompare(mh,
-                          &isOK,
-                          srcMedia,
-                          srcMediaComponent);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            isOK);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetClock(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       ComponentInstance clock;
-#ifndef MediaGetClock
-       PyMac_PRECHECK(MediaGetClock);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetClock(mh,
-                           &clock);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CmpInstObj_New, clock);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetSoundOutputComponent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Component outputComponent;
-#ifndef MediaSetSoundOutputComponent
-       PyMac_PRECHECK(MediaSetSoundOutputComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             CmpObj_Convert, &outputComponent))
-               return NULL;
-       _rv = MediaSetSoundOutputComponent(mh,
-                                          outputComponent);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetSoundOutputComponent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Component outputComponent;
-#ifndef MediaGetSoundOutputComponent
-       PyMac_PRECHECK(MediaGetSoundOutputComponent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetSoundOutputComponent(mh,
-                                          &outputComponent);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            CmpObj_New, outputComponent);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetSoundLocalizationData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Handle data;
-#ifndef MediaSetSoundLocalizationData
-       PyMac_PRECHECK(MediaSetSoundLocalizationData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &data))
-               return NULL;
-       _rv = MediaSetSoundLocalizationData(mh,
-                                           data);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetInvalidRegion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       RgnHandle rgn;
-#ifndef MediaGetInvalidRegion
-       PyMac_PRECHECK(MediaGetInvalidRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &rgn))
-               return NULL;
-       _rv = MediaGetInvalidRegion(mh,
-                                   rgn);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSampleDescriptionB2N(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       SampleDescriptionHandle sampleDescriptionH;
-#ifndef MediaSampleDescriptionB2N
-       PyMac_PRECHECK(MediaSampleDescriptionB2N);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &sampleDescriptionH))
-               return NULL;
-       _rv = MediaSampleDescriptionB2N(mh,
-                                       sampleDescriptionH);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSampleDescriptionN2B(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       SampleDescriptionHandle sampleDescriptionH;
-#ifndef MediaSampleDescriptionN2B
-       PyMac_PRECHECK(MediaSampleDescriptionN2B);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             ResObj_Convert, &sampleDescriptionH))
-               return NULL;
-       _rv = MediaSampleDescriptionN2B(mh,
-                                       sampleDescriptionH);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaFlushNonPrimarySourceData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long inputIndex;
-#ifndef MediaFlushNonPrimarySourceData
-       PyMac_PRECHECK(MediaFlushNonPrimarySourceData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &inputIndex))
-               return NULL;
-       _rv = MediaFlushNonPrimarySourceData(mh,
-                                            inputIndex);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetURLLink(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Point displayWhere;
-       Handle urlLink;
-#ifndef MediaGetURLLink
-       PyMac_PRECHECK(MediaGetURLLink);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetPoint, &displayWhere))
-               return NULL;
-       _rv = MediaGetURLLink(mh,
-                             displayWhere,
-                             &urlLink);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, urlLink);
-       return _res;
-}
-
-static PyObject *Qt_MediaHitTestForTargetRefCon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long flags;
-       Point loc;
-       long targetRefCon;
-#ifndef MediaHitTestForTargetRefCon
-       PyMac_PRECHECK(MediaHitTestForTargetRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &mh,
-                             &flags,
-                             PyMac_GetPoint, &loc))
-               return NULL;
-       _rv = MediaHitTestForTargetRefCon(mh,
-                                         flags,
-                                         loc,
-                                         &targetRefCon);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            targetRefCon);
-       return _res;
-}
-
-static PyObject *Qt_MediaHitTestTargetRefCon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long targetRefCon;
-       long flags;
-       Point loc;
-       Boolean wasHit;
-#ifndef MediaHitTestTargetRefCon
-       PyMac_PRECHECK(MediaHitTestTargetRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llO&",
-                             CmpInstObj_Convert, &mh,
-                             &targetRefCon,
-                             &flags,
-                             PyMac_GetPoint, &loc))
-               return NULL;
-       _rv = MediaHitTestTargetRefCon(mh,
-                                      targetRefCon,
-                                      flags,
-                                      loc,
-                                      &wasHit);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            wasHit);
-       return _res;
-}
-
-static PyObject *Qt_MediaDisposeTargetRefCon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long targetRefCon;
-#ifndef MediaDisposeTargetRefCon
-       PyMac_PRECHECK(MediaDisposeTargetRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &targetRefCon))
-               return NULL;
-       _rv = MediaDisposeTargetRefCon(mh,
-                                      targetRefCon);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaTargetRefConsEqual(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long firstRefCon;
-       long secondRefCon;
-       Boolean equal;
-#ifndef MediaTargetRefConsEqual
-       PyMac_PRECHECK(MediaTargetRefConsEqual);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mh,
-                             &firstRefCon,
-                             &secondRefCon))
-               return NULL;
-       _rv = MediaTargetRefConsEqual(mh,
-                                     firstRefCon,
-                                     secondRefCon,
-                                     &equal);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            equal);
-       return _res;
-}
-
-static PyObject *Qt_MediaPrePrerollCancel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       void * refcon;
-#ifndef MediaPrePrerollCancel
-       PyMac_PRECHECK(MediaPrePrerollCancel);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &mh,
-                             &refcon))
-               return NULL;
-       _rv = MediaPrePrerollCancel(mh,
-                                   refcon);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaEnterEmptyEdit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-#ifndef MediaEnterEmptyEdit
-       PyMac_PRECHECK(MediaEnterEmptyEdit);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaEnterEmptyEdit(mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaCurrentMediaQueuedData(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long milliSecs;
-#ifndef MediaCurrentMediaQueuedData
-       PyMac_PRECHECK(MediaCurrentMediaQueuedData);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaCurrentMediaQueuedData(mh,
-                                         &milliSecs);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            milliSecs);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetEffectiveVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short volume;
-#ifndef MediaGetEffectiveVolume
-       PyMac_PRECHECK(MediaGetEffectiveVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetEffectiveVolume(mh,
-                                     &volume);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            volume);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetSoundLevelMeteringEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Boolean enabled;
-#ifndef MediaGetSoundLevelMeteringEnabled
-       PyMac_PRECHECK(MediaGetSoundLevelMeteringEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetSoundLevelMeteringEnabled(mh,
-                                               &enabled);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            enabled);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetSoundLevelMeteringEnabled(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Boolean enable;
-#ifndef MediaSetSoundLevelMeteringEnabled
-       PyMac_PRECHECK(MediaSetSoundLevelMeteringEnabled);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpInstObj_Convert, &mh,
-                             &enable))
-               return NULL;
-       _rv = MediaSetSoundLevelMeteringEnabled(mh,
-                                               enable);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetEffectiveSoundBalance(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short balance;
-#ifndef MediaGetEffectiveSoundBalance
-       PyMac_PRECHECK(MediaGetEffectiveSoundBalance);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetEffectiveSoundBalance(mh,
-                                           &balance);
-       _res = Py_BuildValue("lh",
-                            _rv,
-                            balance);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetScreenLock(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       Boolean lockIt;
-#ifndef MediaSetScreenLock
-       PyMac_PRECHECK(MediaSetScreenLock);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             CmpInstObj_Convert, &mh,
-                             &lockIt))
-               return NULL;
-       _rv = MediaSetScreenLock(mh,
-                                lockIt);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetErrorString(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       ComponentResult theError;
-       Str255 errorString;
-#ifndef MediaGetErrorString
-       PyMac_PRECHECK(MediaGetErrorString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &mh,
-                             &theError,
-                             PyMac_GetStr255, errorString))
-               return NULL;
-       _rv = MediaGetErrorString(mh,
-                                 theError,
-                                 errorString);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetSoundEqualizerBandLevels(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       UInt8 bandLevels;
-#ifndef MediaGetSoundEqualizerBandLevels
-       PyMac_PRECHECK(MediaGetSoundEqualizerBandLevels);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetSoundEqualizerBandLevels(mh,
-                                              &bandLevels);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            bandLevels);
-       return _res;
-}
-
-static PyObject *Qt_MediaDoIdleActions(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-#ifndef MediaDoIdleActions
-       PyMac_PRECHECK(MediaDoIdleActions);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaDoIdleActions(mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetSoundBassAndTreble(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short bass;
-       short treble;
-#ifndef MediaSetSoundBassAndTreble
-       PyMac_PRECHECK(MediaSetSoundBassAndTreble);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             CmpInstObj_Convert, &mh,
-                             &bass,
-                             &treble))
-               return NULL;
-       _rv = MediaSetSoundBassAndTreble(mh,
-                                        bass,
-                                        treble);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetSoundBassAndTreble(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short bass;
-       short treble;
-#ifndef MediaGetSoundBassAndTreble
-       PyMac_PRECHECK(MediaGetSoundBassAndTreble);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetSoundBassAndTreble(mh,
-                                        &bass,
-                                        &treble);
-       _res = Py_BuildValue("lhh",
-                            _rv,
-                            bass,
-                            treble);
-       return _res;
-}
-
-static PyObject *Qt_MediaTimeBaseChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-#ifndef MediaTimeBaseChanged
-       PyMac_PRECHECK(MediaTimeBaseChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaTimeBaseChanged(mh);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaMCIsPlayerEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       EventRecord e;
-       Boolean handledIt;
-#ifndef MediaMCIsPlayerEvent
-       PyMac_PRECHECK(MediaMCIsPlayerEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetEventRecord, &e))
-               return NULL;
-       _rv = MediaMCIsPlayerEvent(mh,
-                                  &e,
-                                  &handledIt);
-       _res = Py_BuildValue("lb",
-                            _rv,
-                            handledIt);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetMediaLoadState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long mediaLoadState;
-#ifndef MediaGetMediaLoadState
-       PyMac_PRECHECK(MediaGetMediaLoadState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGetMediaLoadState(mh,
-                                    &mediaLoadState);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            mediaLoadState);
-       return _res;
-}
-
-static PyObject *Qt_MediaVideoOutputChanged(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       ComponentInstance vout;
-#ifndef MediaVideoOutputChanged
-       PyMac_PRECHECK(MediaVideoOutputChanged);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             CmpInstObj_Convert, &vout))
-               return NULL;
-       _rv = MediaVideoOutputChanged(mh,
-                                     vout);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaEmptySampleCache(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long sampleNum;
-       long sampleCount;
-#ifndef MediaEmptySampleCache
-       PyMac_PRECHECK(MediaEmptySampleCache);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mh,
-                             &sampleNum,
-                             &sampleCount))
-               return NULL;
-       _rv = MediaEmptySampleCache(mh,
-                                   sampleNum,
-                                   sampleCount);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaGetPublicInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       OSType infoSelector;
-       void * infoDataPtr;
-       Size ioDataSize;
-#ifndef MediaGetPublicInfo
-       PyMac_PRECHECK(MediaGetPublicInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&s",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetOSType, &infoSelector,
-                             &infoDataPtr))
-               return NULL;
-       _rv = MediaGetPublicInfo(mh,
-                                infoSelector,
-                                infoDataPtr,
-                                &ioDataSize);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            ioDataSize);
-       return _res;
-}
-
-static PyObject *Qt_MediaSetPublicInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       OSType infoSelector;
-       void * infoDataPtr;
-       Size dataSize;
-#ifndef MediaSetPublicInfo
-       PyMac_PRECHECK(MediaSetPublicInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&sl",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetOSType, &infoSelector,
-                             &infoDataPtr,
-                             &dataSize))
-               return NULL;
-       _rv = MediaSetPublicInfo(mh,
-                                infoSelector,
-                                infoDataPtr,
-                                dataSize);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaRefConSetProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long refCon;
-       long propertyType;
-       void * propertyValue;
-#ifndef MediaRefConSetProperty
-       PyMac_PRECHECK(MediaRefConSetProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lls",
-                             CmpInstObj_Convert, &mh,
-                             &refCon,
-                             &propertyType,
-                             &propertyValue))
-               return NULL;
-       _rv = MediaRefConSetProperty(mh,
-                                    refCon,
-                                    propertyType,
-                                    propertyValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaRefConGetProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long refCon;
-       long propertyType;
-       void * propertyValue;
-#ifndef MediaRefConGetProperty
-       PyMac_PRECHECK(MediaRefConGetProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lls",
-                             CmpInstObj_Convert, &mh,
-                             &refCon,
-                             &propertyType,
-                             &propertyValue))
-               return NULL;
-       _rv = MediaRefConGetProperty(mh,
-                                    refCon,
-                                    propertyType,
-                                    propertyValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MediaNavigateTargetRefCon(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long navigation;
-       long refCon;
-#ifndef MediaNavigateTargetRefCon
-       PyMac_PRECHECK(MediaNavigateTargetRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &navigation))
-               return NULL;
-       _rv = MediaNavigateTargetRefCon(mh,
-                                       navigation,
-                                       &refCon);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            refCon);
-       return _res;
-}
-
-static PyObject *Qt_MediaGGetIdleManager(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       IdleManager pim;
-#ifndef MediaGGetIdleManager
-       PyMac_PRECHECK(MediaGGetIdleManager);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mh))
-               return NULL;
-       _rv = MediaGGetIdleManager(mh,
-                                  &pim);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            IdleManagerObj_New, pim);
-       return _res;
-}
-
-static PyObject *Qt_MediaGSetIdleManager(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       IdleManager im;
-#ifndef MediaGSetIdleManager
-       PyMac_PRECHECK(MediaGSetIdleManager);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mh,
-                             IdleManagerObj_Convert, &im))
-               return NULL;
-       _rv = MediaGSetIdleManager(mh,
-                                  im);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTMIDIGetMIDIPorts(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTMIDIComponent ci;
-       QTMIDIPortListHandle inputPorts;
-       QTMIDIPortListHandle outputPorts;
-#ifndef QTMIDIGetMIDIPorts
-       PyMac_PRECHECK(QTMIDIGetMIDIPorts);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &ci))
-               return NULL;
-       _rv = QTMIDIGetMIDIPorts(ci,
-                                &inputPorts,
-                                &outputPorts);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, inputPorts,
-                            ResObj_New, outputPorts);
-       return _res;
-}
-
-static PyObject *Qt_QTMIDIUseSendPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTMIDIComponent ci;
-       long portIndex;
-       long inUse;
-#ifndef QTMIDIUseSendPort
-       PyMac_PRECHECK(QTMIDIUseSendPort);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &ci,
-                             &portIndex,
-                             &inUse))
-               return NULL;
-       _rv = QTMIDIUseSendPort(ci,
-                               portIndex,
-                               inUse);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_QTMIDISendMIDI(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       QTMIDIComponent ci;
-       long portIndex;
-       MusicMIDIPacket mp;
-#ifndef QTMIDISendMIDI
-       PyMac_PRECHECK(QTMIDISendMIDI);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &ci,
-                             &portIndex,
-                             QtMusicMIDIPacket_Convert, &mp))
-               return NULL;
-       _rv = QTMIDISendMIDI(ci,
-                            portIndex,
-                            &mp);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetPart(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       long midiChannel;
-       long polyphony;
-#ifndef MusicGetPart
-       PyMac_PRECHECK(MusicGetPart);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &part))
-               return NULL;
-       _rv = MusicGetPart(mc,
-                          part,
-                          &midiChannel,
-                          &polyphony);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            midiChannel,
-                            polyphony);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetPart(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       long midiChannel;
-       long polyphony;
-#ifndef MusicSetPart
-       PyMac_PRECHECK(MusicSetPart);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &midiChannel,
-                             &polyphony))
-               return NULL;
-       _rv = MusicSetPart(mc,
-                          part,
-                          midiChannel,
-                          polyphony);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetPartInstrumentNumber(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       long instrumentNumber;
-#ifndef MusicSetPartInstrumentNumber
-       PyMac_PRECHECK(MusicSetPartInstrumentNumber);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &instrumentNumber))
-               return NULL;
-       _rv = MusicSetPartInstrumentNumber(mc,
-                                          part,
-                                          instrumentNumber);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetPartInstrumentNumber(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-#ifndef MusicGetPartInstrumentNumber
-       PyMac_PRECHECK(MusicGetPartInstrumentNumber);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &part))
-               return NULL;
-       _rv = MusicGetPartInstrumentNumber(mc,
-                                          part);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicStorePartInstrument(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       long instrumentNumber;
-#ifndef MusicStorePartInstrument
-       PyMac_PRECHECK(MusicStorePartInstrument);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &instrumentNumber))
-               return NULL;
-       _rv = MusicStorePartInstrument(mc,
-                                      part,
-                                      instrumentNumber);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetPartAtomicInstrument(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       AtomicInstrument ai;
-       long flags;
-#ifndef MusicGetPartAtomicInstrument
-       PyMac_PRECHECK(MusicGetPartAtomicInstrument);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &flags))
-               return NULL;
-       _rv = MusicGetPartAtomicInstrument(mc,
-                                          part,
-                                          &ai,
-                                          flags);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, ai);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetPartAtomicInstrument(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       AtomicInstrumentPtr aiP;
-       long flags;
-#ifndef MusicSetPartAtomicInstrument
-       PyMac_PRECHECK(MusicSetPartAtomicInstrument);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lsl",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &aiP,
-                             &flags))
-               return NULL;
-       _rv = MusicSetPartAtomicInstrument(mc,
-                                          part,
-                                          aiP,
-                                          flags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetPartKnob(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       long knobID;
-#ifndef MusicGetPartKnob
-       PyMac_PRECHECK(MusicGetPartKnob);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &knobID))
-               return NULL;
-       _rv = MusicGetPartKnob(mc,
-                              part,
-                              knobID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetPartKnob(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       long knobID;
-       long knobValue;
-#ifndef MusicSetPartKnob
-       PyMac_PRECHECK(MusicSetPartKnob);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &knobID,
-                             &knobValue))
-               return NULL;
-       _rv = MusicSetPartKnob(mc,
-                              part,
-                              knobID,
-                              knobValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetKnob(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long knobID;
-#ifndef MusicGetKnob
-       PyMac_PRECHECK(MusicGetKnob);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &knobID))
-               return NULL;
-       _rv = MusicGetKnob(mc,
-                          knobID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetKnob(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long knobID;
-       long knobValue;
-#ifndef MusicSetKnob
-       PyMac_PRECHECK(MusicSetKnob);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mc,
-                             &knobID,
-                             &knobValue))
-               return NULL;
-       _rv = MusicSetKnob(mc,
-                          knobID,
-                          knobValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetPartName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       StringPtr name;
-#ifndef MusicGetPartName
-       PyMac_PRECHECK(MusicGetPartName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ls",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &name))
-               return NULL;
-       _rv = MusicGetPartName(mc,
-                              part,
-                              name);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetPartName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       StringPtr name;
-#ifndef MusicSetPartName
-       PyMac_PRECHECK(MusicSetPartName);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ls",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &name))
-               return NULL;
-       _rv = MusicSetPartName(mc,
-                              part,
-                              name);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicPlayNote(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       long pitch;
-       long velocity;
-#ifndef MusicPlayNote
-       PyMac_PRECHECK(MusicPlayNote);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &pitch,
-                             &velocity))
-               return NULL;
-       _rv = MusicPlayNote(mc,
-                           part,
-                           pitch,
-                           velocity);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicResetPart(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-#ifndef MusicResetPart
-       PyMac_PRECHECK(MusicResetPart);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &part))
-               return NULL;
-       _rv = MusicResetPart(mc,
-                            part);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetPartController(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       MusicController controllerNumber;
-       long controllerValue;
-#ifndef MusicSetPartController
-       PyMac_PRECHECK(MusicSetPartController);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &controllerNumber,
-                             &controllerValue))
-               return NULL;
-       _rv = MusicSetPartController(mc,
-                                    part,
-                                    controllerNumber,
-                                    controllerValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetPartController(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       MusicController controllerNumber;
-#ifndef MusicGetPartController
-       PyMac_PRECHECK(MusicGetPartController);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &controllerNumber))
-               return NULL;
-       _rv = MusicGetPartController(mc,
-                                    part,
-                                    controllerNumber);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetInstrumentNames(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long modifiableInstruments;
-       Handle instrumentNames;
-       Handle instrumentCategoryLasts;
-       Handle instrumentCategoryNames;
-#ifndef MusicGetInstrumentNames
-       PyMac_PRECHECK(MusicGetInstrumentNames);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &modifiableInstruments))
-               return NULL;
-       _rv = MusicGetInstrumentNames(mc,
-                                     modifiableInstruments,
-                                     &instrumentNames,
-                                     &instrumentCategoryLasts,
-                                     &instrumentCategoryNames);
-       _res = Py_BuildValue("lO&O&O&",
-                            _rv,
-                            ResObj_New, instrumentNames,
-                            ResObj_New, instrumentCategoryLasts,
-                            ResObj_New, instrumentCategoryNames);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetDrumNames(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long modifiableInstruments;
-       Handle instrumentNumbers;
-       Handle instrumentNames;
-#ifndef MusicGetDrumNames
-       PyMac_PRECHECK(MusicGetDrumNames);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &modifiableInstruments))
-               return NULL;
-       _rv = MusicGetDrumNames(mc,
-                               modifiableInstruments,
-                               &instrumentNumbers,
-                               &instrumentNames);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, instrumentNumbers,
-                            ResObj_New, instrumentNames);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetMasterTune(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-#ifndef MusicGetMasterTune
-       PyMac_PRECHECK(MusicGetMasterTune);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mc))
-               return NULL;
-       _rv = MusicGetMasterTune(mc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetMasterTune(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long masterTune;
-#ifndef MusicSetMasterTune
-       PyMac_PRECHECK(MusicSetMasterTune);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &masterTune))
-               return NULL;
-       _rv = MusicSetMasterTune(mc,
-                                masterTune);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetDeviceConnection(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long index;
-       long id1;
-       long id2;
-#ifndef MusicGetDeviceConnection
-       PyMac_PRECHECK(MusicGetDeviceConnection);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &index))
-               return NULL;
-       _rv = MusicGetDeviceConnection(mc,
-                                      index,
-                                      &id1,
-                                      &id2);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            id1,
-                            id2);
-       return _res;
-}
-
-static PyObject *Qt_MusicUseDeviceConnection(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long id1;
-       long id2;
-#ifndef MusicUseDeviceConnection
-       PyMac_PRECHECK(MusicUseDeviceConnection);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mc,
-                             &id1,
-                             &id2))
-               return NULL;
-       _rv = MusicUseDeviceConnection(mc,
-                                      id1,
-                                      id2);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetKnobSettingStrings(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long knobIndex;
-       long isGlobal;
-       Handle settingsNames;
-       Handle settingsCategoryLasts;
-       Handle settingsCategoryNames;
-#ifndef MusicGetKnobSettingStrings
-       PyMac_PRECHECK(MusicGetKnobSettingStrings);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mc,
-                             &knobIndex,
-                             &isGlobal))
-               return NULL;
-       _rv = MusicGetKnobSettingStrings(mc,
-                                        knobIndex,
-                                        isGlobal,
-                                        &settingsNames,
-                                        &settingsCategoryLasts,
-                                        &settingsCategoryNames);
-       _res = Py_BuildValue("lO&O&O&",
-                            _rv,
-                            ResObj_New, settingsNames,
-                            ResObj_New, settingsCategoryLasts,
-                            ResObj_New, settingsCategoryNames);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetMIDIPorts(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long inputPortCount;
-       long outputPortCount;
-#ifndef MusicGetMIDIPorts
-       PyMac_PRECHECK(MusicGetMIDIPorts);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mc))
-               return NULL;
-       _rv = MusicGetMIDIPorts(mc,
-                               &inputPortCount,
-                               &outputPortCount);
-       _res = Py_BuildValue("lll",
-                            _rv,
-                            inputPortCount,
-                            outputPortCount);
-       return _res;
-}
-
-static PyObject *Qt_MusicSendMIDI(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long portIndex;
-       MusicMIDIPacket mp;
-#ifndef MusicSendMIDI
-       PyMac_PRECHECK(MusicSendMIDI);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &mc,
-                             &portIndex,
-                             QtMusicMIDIPacket_Convert, &mp))
-               return NULL;
-       _rv = MusicSendMIDI(mc,
-                           portIndex,
-                           &mp);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetOfflineTimeTo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long newTimeStamp;
-#ifndef MusicSetOfflineTimeTo
-       PyMac_PRECHECK(MusicSetOfflineTimeTo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &newTimeStamp))
-               return NULL;
-       _rv = MusicSetOfflineTimeTo(mc,
-                                   newTimeStamp);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetInfoText(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long selector;
-       Handle textH;
-       Handle styleH;
-#ifndef MusicGetInfoText
-       PyMac_PRECHECK(MusicGetInfoText);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &selector))
-               return NULL;
-       _rv = MusicGetInfoText(mc,
-                              selector,
-                              &textH,
-                              &styleH);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, textH,
-                            ResObj_New, styleH);
-       return _res;
-}
-
-static PyObject *Qt_MusicGetInstrumentInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long getInstrumentInfoFlags;
-       InstrumentInfoListHandle infoListH;
-#ifndef MusicGetInstrumentInfo
-       PyMac_PRECHECK(MusicGetInstrumentInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &getInstrumentInfoFlags))
-               return NULL;
-       _rv = MusicGetInstrumentInfo(mc,
-                                    getInstrumentInfoFlags,
-                                    &infoListH);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, infoListH);
-       return _res;
-}
-
-static PyObject *Qt_MusicTask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-#ifndef MusicTask
-       PyMac_PRECHECK(MusicTask);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mc))
-               return NULL;
-       _rv = MusicTask(mc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetPartInstrumentNumberInterruptSafe(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       long instrumentNumber;
-#ifndef MusicSetPartInstrumentNumberInterruptSafe
-       PyMac_PRECHECK(MusicSetPartInstrumentNumberInterruptSafe);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&ll",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             &instrumentNumber))
-               return NULL;
-       _rv = MusicSetPartInstrumentNumberInterruptSafe(mc,
-                                                       part,
-                                                       instrumentNumber);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicSetPartSoundLocalization(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long part;
-       Handle data;
-#ifndef MusicSetPartSoundLocalization
-       PyMac_PRECHECK(MusicSetPartSoundLocalization);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&",
-                             CmpInstObj_Convert, &mc,
-                             &part,
-                             ResObj_Convert, &data))
-               return NULL;
-       _rv = MusicSetPartSoundLocalization(mc,
-                                           part,
-                                           data);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGenericConfigure(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long mode;
-       long flags;
-       long baseResID;
-#ifndef MusicGenericConfigure
-       PyMac_PRECHECK(MusicGenericConfigure);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lll",
-                             CmpInstObj_Convert, &mc,
-                             &mode,
-                             &flags,
-                             &baseResID))
-               return NULL;
-       _rv = MusicGenericConfigure(mc,
-                                   mode,
-                                   flags,
-                                   baseResID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicGenericGetKnobList(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       long knobType;
-       GenericKnobDescriptionListHandle gkdlH;
-#ifndef MusicGenericGetKnobList
-       PyMac_PRECHECK(MusicGenericGetKnobList);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mc,
-                             &knobType))
-               return NULL;
-       _rv = MusicGenericGetKnobList(mc,
-                                     knobType,
-                                     &gkdlH);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            ResObj_New, gkdlH);
-       return _res;
-}
-
-static PyObject *Qt_MusicGenericSetResourceNumbers(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       Handle resourceIDH;
-#ifndef MusicGenericSetResourceNumbers
-       PyMac_PRECHECK(MusicGenericSetResourceNumbers);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mc,
-                             ResObj_Convert, &resourceIDH))
-               return NULL;
-       _rv = MusicGenericSetResourceNumbers(mc,
-                                            resourceIDH);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicDerivedMIDISend(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       MusicMIDIPacket packet;
-#ifndef MusicDerivedMIDISend
-       PyMac_PRECHECK(MusicDerivedMIDISend);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &mc,
-                             QtMusicMIDIPacket_Convert, &packet))
-               return NULL;
-       _rv = MusicDerivedMIDISend(mc,
-                                  &packet);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicDerivedOpenResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-#ifndef MusicDerivedOpenResFile
-       PyMac_PRECHECK(MusicDerivedOpenResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &mc))
-               return NULL;
-       _rv = MusicDerivedOpenResFile(mc);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_MusicDerivedCloseResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MusicComponent mc;
-       short resRefNum;
-#ifndef MusicDerivedCloseResFile
-       PyMac_PRECHECK(MusicDerivedCloseResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             CmpInstObj_Convert, &mc,
-                             &resRefNum))
-               return NULL;
-       _rv = MusicDerivedCloseResFile(mc,
-                                      resRefNum);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_NAUnregisterMusicDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       NoteAllocator na;
-       long index;
-#ifndef NAUnregisterMusicDevice
-       PyMac_PRECHECK(NAUnregisterMusicDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &na,
-                             &index))
-               return NULL;
-       _rv = NAUnregisterMusicDevice(na,
-                                     index);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_NASaveMusicConfiguration(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       NoteAllocator na;
-#ifndef NASaveMusicConfiguration
-       PyMac_PRECHECK(NASaveMusicConfiguration);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &na))
-               return NULL;
-       _rv = NASaveMusicConfiguration(na);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_NAGetMIDIPorts(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       NoteAllocator na;
-       QTMIDIPortListHandle inputPorts;
-       QTMIDIPortListHandle outputPorts;
-#ifndef NAGetMIDIPorts
-       PyMac_PRECHECK(NAGetMIDIPorts);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &na))
-               return NULL;
-       _rv = NAGetMIDIPorts(na,
-                            &inputPorts,
-                            &outputPorts);
-       _res = Py_BuildValue("lO&O&",
-                            _rv,
-                            ResObj_New, inputPorts,
-                            ResObj_New, outputPorts);
-       return _res;
-}
-
-static PyObject *Qt_NATask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       NoteAllocator na;
-#ifndef NATask
-       PyMac_PRECHECK(NATask);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &na))
-               return NULL;
-       _rv = NATask(na);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneSetHeader(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       unsigned long * header;
-#ifndef TuneSetHeader
-       PyMac_PRECHECK(TuneSetHeader);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &tp,
-                             &header))
-               return NULL;
-       _rv = TuneSetHeader(tp,
-                           header);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneGetTimeBase(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       TimeBase tb;
-#ifndef TuneGetTimeBase
-       PyMac_PRECHECK(TuneGetTimeBase);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &tp))
-               return NULL;
-       _rv = TuneGetTimeBase(tp,
-                             &tb);
-       _res = Py_BuildValue("lO&",
-                            _rv,
-                            TimeBaseObj_New, tb);
-       return _res;
-}
-
-static PyObject *Qt_TuneSetTimeScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       TimeScale scale;
-#ifndef TuneSetTimeScale
-       PyMac_PRECHECK(TuneSetTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &tp,
-                             &scale))
-               return NULL;
-       _rv = TuneSetTimeScale(tp,
-                              scale);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneGetTimeScale(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       TimeScale scale;
-#ifndef TuneGetTimeScale
-       PyMac_PRECHECK(TuneGetTimeScale);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &tp))
-               return NULL;
-       _rv = TuneGetTimeScale(tp,
-                              &scale);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            scale);
-       return _res;
-}
-
-static PyObject *Qt_TuneInstant(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       unsigned long tune;
-       unsigned long tunePosition;
-#ifndef TuneInstant
-       PyMac_PRECHECK(TuneInstant);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &tp,
-                             &tunePosition))
-               return NULL;
-       _rv = TuneInstant(tp,
-                         &tune,
-                         tunePosition);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            tune);
-       return _res;
-}
-
-static PyObject *Qt_TuneStop(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       long stopFlags;
-#ifndef TuneStop
-       PyMac_PRECHECK(TuneStop);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &tp,
-                             &stopFlags))
-               return NULL;
-       _rv = TuneStop(tp,
-                      stopFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneSetVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       Fixed volume;
-#ifndef TuneSetVolume
-       PyMac_PRECHECK(TuneSetVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &tp,
-                             PyMac_GetFixed, &volume))
-               return NULL;
-       _rv = TuneSetVolume(tp,
-                           volume);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneGetVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-#ifndef TuneGetVolume
-       PyMac_PRECHECK(TuneGetVolume);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &tp))
-               return NULL;
-       _rv = TuneGetVolume(tp);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TunePreroll(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-#ifndef TunePreroll
-       PyMac_PRECHECK(TunePreroll);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &tp))
-               return NULL;
-       _rv = TunePreroll(tp);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneUnroll(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-#ifndef TuneUnroll
-       PyMac_PRECHECK(TuneUnroll);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &tp))
-               return NULL;
-       _rv = TuneUnroll(tp);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneSetPartTranspose(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       unsigned long part;
-       long transpose;
-       long velocityShift;
-#ifndef TuneSetPartTranspose
-       PyMac_PRECHECK(TuneSetPartTranspose);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lll",
-                             CmpInstObj_Convert, &tp,
-                             &part,
-                             &transpose,
-                             &velocityShift))
-               return NULL;
-       _rv = TuneSetPartTranspose(tp,
-                                  part,
-                                  transpose,
-                                  velocityShift);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneGetNoteAllocator(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       NoteAllocator _rv;
-       TunePlayer tp;
-#ifndef TuneGetNoteAllocator
-       PyMac_PRECHECK(TuneGetNoteAllocator);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &tp))
-               return NULL;
-       _rv = TuneGetNoteAllocator(tp);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneSetSofter(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       long softer;
-#ifndef TuneSetSofter
-       PyMac_PRECHECK(TuneSetSofter);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &tp,
-                             &softer))
-               return NULL;
-       _rv = TuneSetSofter(tp,
-                           softer);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneTask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-#ifndef TuneTask
-       PyMac_PRECHECK(TuneTask);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CmpInstObj_Convert, &tp))
-               return NULL;
-       _rv = TuneTask(tp);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneSetBalance(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       long balance;
-#ifndef TuneSetBalance
-       PyMac_PRECHECK(TuneSetBalance);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &tp,
-                             &balance))
-               return NULL;
-       _rv = TuneSetBalance(tp,
-                            balance);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneSetSoundLocalization(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       Handle data;
-#ifndef TuneSetSoundLocalization
-       PyMac_PRECHECK(TuneSetSoundLocalization);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             CmpInstObj_Convert, &tp,
-                             ResObj_Convert, &data))
-               return NULL;
-       _rv = TuneSetSoundLocalization(tp,
-                                      data);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneSetHeaderWithSize(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       unsigned long * header;
-       unsigned long size;
-#ifndef TuneSetHeaderWithSize
-       PyMac_PRECHECK(TuneSetHeaderWithSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&sl",
-                             CmpInstObj_Convert, &tp,
-                             &header,
-                             &size))
-               return NULL;
-       _rv = TuneSetHeaderWithSize(tp,
-                                   header,
-                                   size);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneSetPartMix(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       unsigned long partNumber;
-       long volume;
-       long balance;
-       long mixFlags;
-#ifndef TuneSetPartMix
-       PyMac_PRECHECK(TuneSetPartMix);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llll",
-                             CmpInstObj_Convert, &tp,
-                             &partNumber,
-                             &volume,
-                             &balance,
-                             &mixFlags))
-               return NULL;
-       _rv = TuneSetPartMix(tp,
-                            partNumber,
-                            volume,
-                            balance,
-                            mixFlags);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Qt_TuneGetPartMix(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       TunePlayer tp;
-       unsigned long partNumber;
-       long volumeOut;
-       long balanceOut;
-       long mixFlagsOut;
-#ifndef TuneGetPartMix
-       PyMac_PRECHECK(TuneGetPartMix);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &tp,
-                             &partNumber))
-               return NULL;
-       _rv = TuneGetPartMix(tp,
-                            partNumber,
-                            &volumeOut,
-                            &balanceOut,
-                            &mixFlagsOut);
-       _res = Py_BuildValue("llll",
-                            _rv,
-                            volumeOut,
-                            balanceOut,
-                            mixFlagsOut);
-       return _res;
-}
-
-static PyObject *Qt_AlignWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr wp;
-       Boolean front;
-#ifndef AlignWindow
-       PyMac_PRECHECK(AlignWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             WinObj_Convert, &wp,
-                             &front))
-               return NULL;
-       AlignWindow(wp,
-                   front,
-                   (Rect *)0,
-                   (ICMAlignmentProcRecordPtr)0);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_DragAlignedWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr wp;
-       Point startPt;
-       Rect boundsRect;
-#ifndef DragAlignedWindow
-       PyMac_PRECHECK(DragAlignedWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             WinObj_Convert, &wp,
-                             PyMac_GetPoint, &startPt,
-                             PyMac_GetRect, &boundsRect))
-               return NULL;
-       DragAlignedWindow(wp,
-                         startPt,
-                         &boundsRect,
-                         (Rect *)0,
-                         (ICMAlignmentProcRecordPtr)0);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Qt_MoviesTask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long maxMilliSecToUse;
-#ifndef MoviesTask
-       PyMac_PRECHECK(MoviesTask);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &maxMilliSecToUse))
-               return NULL;
-       MoviesTask((Movie)0,
-                  maxMilliSecToUse);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef Qt_methods[] = {
-       {"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
-        PyDoc_STR("() -> None")},
-       {"ExitMovies", (PyCFunction)Qt_ExitMovies, 1,
-        PyDoc_STR("() -> None")},
-       {"GetMoviesError", (PyCFunction)Qt_GetMoviesError, 1,
-        PyDoc_STR("() -> None")},
-       {"ClearMoviesStickyError", (PyCFunction)Qt_ClearMoviesStickyError, 1,
-        PyDoc_STR("() -> None")},
-       {"GetMoviesStickyError", (PyCFunction)Qt_GetMoviesStickyError, 1,
-        PyDoc_STR("() -> None")},
-       {"QTGetWallClockTimeBase", (PyCFunction)Qt_QTGetWallClockTimeBase, 1,
-        PyDoc_STR("() -> (TimeBase wallClockTimeBase)")},
-       {"QTIdleManagerOpen", (PyCFunction)Qt_QTIdleManagerOpen, 1,
-        PyDoc_STR("() -> (IdleManager _rv)")},
-       {"CreateMovieControl", (PyCFunction)Qt_CreateMovieControl, 1,
-        PyDoc_STR("(WindowPtr theWindow, Movie theMovie, UInt32 options) -> (Rect localRect, ControlHandle returnedControl)")},
-       {"DisposeMatte", (PyCFunction)Qt_DisposeMatte, 1,
-        PyDoc_STR("(PixMapHandle theMatte) -> None")},
-       {"NewMovie", (PyCFunction)Qt_NewMovie, 1,
-        PyDoc_STR("(long flags) -> (Movie _rv)")},
-       {"QTGetTimeUntilNextTask", (PyCFunction)Qt_QTGetTimeUntilNextTask, 1,
-        PyDoc_STR("(long scale) -> (long duration)")},
-       {"GetDataHandler", (PyCFunction)Qt_GetDataHandler, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)")},
-       {"PasteHandleIntoMovie", (PyCFunction)Qt_PasteHandleIntoMovie, 1,
-        PyDoc_STR("(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None")},
-       {"GetMovieImporterForDataRef", (PyCFunction)Qt_GetMovieImporterForDataRef, 1,
-        PyDoc_STR("(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)")},
-       {"QTGetMIMETypeInfo", (PyCFunction)Qt_QTGetMIMETypeInfo, 1,
-        PyDoc_STR("(char* mimeStringStart, short mimeStringLength, OSType infoSelector, void * infoDataPtr) -> (long infoDataSize)")},
-       {"TrackTimeToMediaTime", (PyCFunction)Qt_TrackTimeToMediaTime, 1,
-        PyDoc_STR("(TimeValue value, Track theTrack) -> (TimeValue _rv)")},
-       {"NewUserData", (PyCFunction)Qt_NewUserData, 1,
-        PyDoc_STR("() -> (UserData theUserData)")},
-       {"NewUserDataFromHandle", (PyCFunction)Qt_NewUserDataFromHandle, 1,
-        PyDoc_STR("(Handle h) -> (UserData theUserData)")},
-       {"CreateMovieFile", (PyCFunction)Qt_CreateMovieFile, 1,
-        PyDoc_STR("(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (short resRefNum, Movie newmovie)")},
-       {"OpenMovieFile", (PyCFunction)Qt_OpenMovieFile, 1,
-        PyDoc_STR("(FSSpec fileSpec, SInt8 permission) -> (short resRefNum)")},
-       {"CloseMovieFile", (PyCFunction)Qt_CloseMovieFile, 1,
-        PyDoc_STR("(short resRefNum) -> None")},
-       {"DeleteMovieFile", (PyCFunction)Qt_DeleteMovieFile, 1,
-        PyDoc_STR("(FSSpec fileSpec) -> None")},
-       {"NewMovieFromFile", (PyCFunction)Qt_NewMovieFromFile, 1,
-        PyDoc_STR("(short resRefNum, short resId, short newMovieFlags) -> (Movie theMovie, short resId, Boolean dataRefWasChanged)")},
-       {"NewMovieFromHandle", (PyCFunction)Qt_NewMovieFromHandle, 1,
-        PyDoc_STR("(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
-       {"NewMovieFromDataFork", (PyCFunction)Qt_NewMovieFromDataFork, 1,
-        PyDoc_STR("(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
-       {"NewMovieFromDataFork64", (PyCFunction)Qt_NewMovieFromDataFork64, 1,
-        PyDoc_STR("(long fRefNum, wide fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
-       {"NewMovieFromDataRef", (PyCFunction)Qt_NewMovieFromDataRef, 1,
-        PyDoc_STR("(short flags, Handle dataRef, OSType dtaRefType) -> (Movie m, short id)")},
-       {"NewMovieFromStorageOffset", (PyCFunction)Qt_NewMovieFromStorageOffset, 1,
-        PyDoc_STR("(DataHandler dh, wide fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasCataRefType)")},
-       {"NewMovieForDataRefFromHandle", (PyCFunction)Qt_NewMovieForDataRefFromHandle, 1,
-        PyDoc_STR("(Handle h, short newMovieFlags, Handle dataRef, OSType dataRefType) -> (Movie theMovie, Boolean dataRefWasChanged)")},
-       {"RemoveMovieResource", (PyCFunction)Qt_RemoveMovieResource, 1,
-        PyDoc_STR("(short resRefNum, short resId) -> None")},
-       {"CreateMovieStorage", (PyCFunction)Qt_CreateMovieStorage, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (DataHandler outDataHandler, Movie newmovie)")},
-       {"OpenMovieStorage", (PyCFunction)Qt_OpenMovieStorage, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType, long flags) -> (DataHandler outDataHandler)")},
-       {"CloseMovieStorage", (PyCFunction)Qt_CloseMovieStorage, 1,
-        PyDoc_STR("(DataHandler dh) -> None")},
-       {"DeleteMovieStorage", (PyCFunction)Qt_DeleteMovieStorage, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
-       {"CreateShortcutMovieFile", (PyCFunction)Qt_CreateShortcutMovieFile, 1,
-        PyDoc_STR("(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Handle targetDataRef, OSType targetDataRefType) -> None")},
-       {"CanQuickTimeOpenFile", (PyCFunction)Qt_CanQuickTimeOpenFile, 1,
-        PyDoc_STR("(FSSpec fileSpec, OSType fileType, OSType fileNameExtension, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)")},
-       {"CanQuickTimeOpenDataRef", (PyCFunction)Qt_CanQuickTimeOpenDataRef, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)")},
-       {"NewMovieFromScrap", (PyCFunction)Qt_NewMovieFromScrap, 1,
-        PyDoc_STR("(long newMovieFlags) -> (Movie _rv)")},
-       {"QTNewAlias", (PyCFunction)Qt_QTNewAlias, 1,
-        PyDoc_STR("(FSSpec fss, Boolean minimal) -> (AliasHandle alias)")},
-       {"EndFullScreen", (PyCFunction)Qt_EndFullScreen, 1,
-        PyDoc_STR("(Ptr fullState, long flags) -> None")},
-       {"AddSoundDescriptionExtension", (PyCFunction)Qt_AddSoundDescriptionExtension, 1,
-        PyDoc_STR("(SoundDescriptionHandle desc, Handle extension, OSType idType) -> None")},
-       {"GetSoundDescriptionExtension", (PyCFunction)Qt_GetSoundDescriptionExtension, 1,
-        PyDoc_STR("(SoundDescriptionHandle desc, OSType idType) -> (Handle extension)")},
-       {"RemoveSoundDescriptionExtension", (PyCFunction)Qt_RemoveSoundDescriptionExtension, 1,
-        PyDoc_STR("(SoundDescriptionHandle desc, OSType idType) -> None")},
-       {"QTIsStandardParameterDialogEvent", (PyCFunction)Qt_QTIsStandardParameterDialogEvent, 1,
-        PyDoc_STR("(QTParameterDialog createdDialog) -> (EventRecord pEvent)")},
-       {"QTDismissStandardParameterDialog", (PyCFunction)Qt_QTDismissStandardParameterDialog, 1,
-        PyDoc_STR("(QTParameterDialog createdDialog) -> None")},
-       {"QTStandardParameterDialogDoAction", (PyCFunction)Qt_QTStandardParameterDialogDoAction, 1,
-        PyDoc_STR("(QTParameterDialog createdDialog, long action, void * params) -> None")},
-       {"QTRegisterAccessKey", (PyCFunction)Qt_QTRegisterAccessKey, 1,
-        PyDoc_STR("(Str255 accessKeyType, long flags, Handle accessKey) -> None")},
-       {"QTUnregisterAccessKey", (PyCFunction)Qt_QTUnregisterAccessKey, 1,
-        PyDoc_STR("(Str255 accessKeyType, long flags, Handle accessKey) -> None")},
-       {"QTGetSupportedRestrictions", (PyCFunction)Qt_QTGetSupportedRestrictions, 1,
-        PyDoc_STR("(OSType inRestrictionClass) -> (UInt32 outRestrictionIDs)")},
-       {"QTTextToNativeText", (PyCFunction)Qt_QTTextToNativeText, 1,
-        PyDoc_STR("(Handle theText, long encoding, long flags) -> None")},
-       {"VideoMediaResetStatistics", (PyCFunction)Qt_VideoMediaResetStatistics, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
-       {"VideoMediaGetStatistics", (PyCFunction)Qt_VideoMediaGetStatistics, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
-       {"VideoMediaGetStallCount", (PyCFunction)Qt_VideoMediaGetStallCount, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, unsigned long stalls)")},
-       {"VideoMediaSetCodecParameter", (PyCFunction)Qt_VideoMediaSetCodecParameter, 1,
-        PyDoc_STR("(MediaHandler mh, CodecType cType, OSType parameterID, long parameterChangeSeed, void * dataPtr, long dataSize) -> (ComponentResult _rv)")},
-       {"VideoMediaGetCodecParameter", (PyCFunction)Qt_VideoMediaGetCodecParameter, 1,
-        PyDoc_STR("(MediaHandler mh, CodecType cType, OSType parameterID, Handle outParameterData) -> (ComponentResult _rv)")},
-       {"TextMediaAddTextSample", (PyCFunction)Qt_TextMediaAddTextSample, 1,
-        PyDoc_STR("(MediaHandler mh, Ptr text, unsigned long size, short fontNumber, short fontSize, Style textFace, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor textColor, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
-       {"TextMediaAddTESample", (PyCFunction)Qt_TextMediaAddTESample, 1,
-        PyDoc_STR("(MediaHandler mh, TEHandle hTE, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
-       {"TextMediaAddHiliteSample", (PyCFunction)Qt_TextMediaAddHiliteSample, 1,
-        PyDoc_STR("(MediaHandler mh, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
-       {"TextMediaDrawRaw", (PyCFunction)Qt_TextMediaDrawRaw, 1,
-        PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh) -> (ComponentResult _rv)")},
-       {"TextMediaSetTextProperty", (PyCFunction)Qt_TextMediaSetTextProperty, 1,
-        PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)")},
-       {"TextMediaRawSetup", (PyCFunction)Qt_TextMediaRawSetup, 1,
-        PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh, TimeValue sampleDuration) -> (ComponentResult _rv)")},
-       {"TextMediaRawIdle", (PyCFunction)Qt_TextMediaRawIdle, 1,
-        PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, TimeValue sampleTime, long flagsIn) -> (ComponentResult _rv, long flagsOut)")},
-       {"TextMediaGetTextProperty", (PyCFunction)Qt_TextMediaGetTextProperty, 1,
-        PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)")},
-       {"TextMediaFindNextText", (PyCFunction)Qt_TextMediaFindNextText, 1,
-        PyDoc_STR("(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)")},
-       {"TextMediaHiliteTextSample", (PyCFunction)Qt_TextMediaHiliteTextSample, 1,
-        PyDoc_STR("(MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd) -> (ComponentResult _rv, RGBColor rgbHiliteColor)")},
-       {"TextMediaSetTextSampleData", (PyCFunction)Qt_TextMediaSetTextSampleData, 1,
-        PyDoc_STR("(MediaHandler mh, void * data, OSType dataType) -> (ComponentResult _rv)")},
-       {"SpriteMediaSetProperty", (PyCFunction)Qt_SpriteMediaSetProperty, 1,
-        PyDoc_STR("(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
-       {"SpriteMediaGetProperty", (PyCFunction)Qt_SpriteMediaGetProperty, 1,
-        PyDoc_STR("(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
-       {"SpriteMediaHitTestSprites", (PyCFunction)Qt_SpriteMediaHitTestSprites, 1,
-        PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, short spriteHitIndex)")},
-       {"SpriteMediaCountSprites", (PyCFunction)Qt_SpriteMediaCountSprites, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short numSprites)")},
-       {"SpriteMediaCountImages", (PyCFunction)Qt_SpriteMediaCountImages, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short numImages)")},
-       {"SpriteMediaGetIndImageDescription", (PyCFunction)Qt_SpriteMediaGetIndImageDescription, 1,
-        PyDoc_STR("(MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription) -> (ComponentResult _rv)")},
-       {"SpriteMediaGetDisplayedSampleNumber", (PyCFunction)Qt_SpriteMediaGetDisplayedSampleNumber, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long sampleNum)")},
-       {"SpriteMediaGetSpriteName", (PyCFunction)Qt_SpriteMediaGetSpriteName, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, Str255 spriteName) -> (ComponentResult _rv)")},
-       {"SpriteMediaGetImageName", (PyCFunction)Qt_SpriteMediaGetImageName, 1,
-        PyDoc_STR("(MediaHandler mh, short imageIndex, Str255 imageName) -> (ComponentResult _rv)")},
-       {"SpriteMediaSetSpriteProperty", (PyCFunction)Qt_SpriteMediaSetSpriteProperty, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
-       {"SpriteMediaGetSpriteProperty", (PyCFunction)Qt_SpriteMediaGetSpriteProperty, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
-       {"SpriteMediaHitTestAllSprites", (PyCFunction)Qt_SpriteMediaHitTestAllSprites, 1,
-        PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, QTAtomID spriteHitID)")},
-       {"SpriteMediaHitTestOneSprite", (PyCFunction)Qt_SpriteMediaHitTestOneSprite, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)")},
-       {"SpriteMediaSpriteIndexToID", (PyCFunction)Qt_SpriteMediaSpriteIndexToID, 1,
-        PyDoc_STR("(MediaHandler mh, short spriteIndex) -> (ComponentResult _rv, QTAtomID spriteID)")},
-       {"SpriteMediaSpriteIDToIndex", (PyCFunction)Qt_SpriteMediaSpriteIDToIndex, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv, short spriteIndex)")},
-       {"SpriteMediaSetActionVariable", (PyCFunction)Qt_SpriteMediaSetActionVariable, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)")},
-       {"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)")},
-       {"SpriteMediaDisposeSprite", (PyCFunction)Qt_SpriteMediaDisposeSprite, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv)")},
-       {"SpriteMediaSetActionVariableToString", (PyCFunction)Qt_SpriteMediaSetActionVariableToString, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID variableID, Ptr theCString) -> (ComponentResult _rv)")},
-       {"SpriteMediaGetActionVariableAsString", (PyCFunction)Qt_SpriteMediaGetActionVariableAsString, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, Handle theCString)")},
-       {"SpriteMediaNewImage", (PyCFunction)Qt_SpriteMediaNewImage, 1,
-        PyDoc_STR("(MediaHandler mh, Handle dataRef, OSType dataRefType, QTAtomID desiredID) -> (ComponentResult _rv)")},
-       {"SpriteMediaDisposeImage", (PyCFunction)Qt_SpriteMediaDisposeImage, 1,
-        PyDoc_STR("(MediaHandler mh, short imageIndex) -> (ComponentResult _rv)")},
-       {"SpriteMediaImageIndexToID", (PyCFunction)Qt_SpriteMediaImageIndexToID, 1,
-        PyDoc_STR("(MediaHandler mh, short imageIndex) -> (ComponentResult _rv, QTAtomID imageID)")},
-       {"SpriteMediaImageIDToIndex", (PyCFunction)Qt_SpriteMediaImageIDToIndex, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID imageID) -> (ComponentResult _rv, short imageIndex)")},
-       {"FlashMediaSetPan", (PyCFunction)Qt_FlashMediaSetPan, 1,
-        PyDoc_STR("(MediaHandler mh, short xPercent, short yPercent) -> (ComponentResult _rv)")},
-       {"FlashMediaSetZoom", (PyCFunction)Qt_FlashMediaSetZoom, 1,
-        PyDoc_STR("(MediaHandler mh, short factor) -> (ComponentResult _rv)")},
-       {"FlashMediaSetZoomRect", (PyCFunction)Qt_FlashMediaSetZoomRect, 1,
-        PyDoc_STR("(MediaHandler mh, long left, long top, long right, long bottom) -> (ComponentResult _rv)")},
-       {"FlashMediaGetRefConBounds", (PyCFunction)Qt_FlashMediaGetRefConBounds, 1,
-        PyDoc_STR("(MediaHandler mh, long refCon) -> (ComponentResult _rv, long left, long top, long right, long bottom)")},
-       {"FlashMediaGetRefConID", (PyCFunction)Qt_FlashMediaGetRefConID, 1,
-        PyDoc_STR("(MediaHandler mh, long refCon) -> (ComponentResult _rv, long refConID)")},
-       {"FlashMediaIDToRefCon", (PyCFunction)Qt_FlashMediaIDToRefCon, 1,
-        PyDoc_STR("(MediaHandler mh, long refConID) -> (ComponentResult _rv, long refCon)")},
-       {"FlashMediaGetDisplayedFrameNumber", (PyCFunction)Qt_FlashMediaGetDisplayedFrameNumber, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long flashFrameNumber)")},
-       {"FlashMediaFrameNumberToMovieTime", (PyCFunction)Qt_FlashMediaFrameNumberToMovieTime, 1,
-        PyDoc_STR("(MediaHandler mh, long flashFrameNumber) -> (ComponentResult _rv, TimeValue movieTime)")},
-       {"FlashMediaFrameLabelToMovieTime", (PyCFunction)Qt_FlashMediaFrameLabelToMovieTime, 1,
-        PyDoc_STR("(MediaHandler mh, Ptr theLabel) -> (ComponentResult _rv, TimeValue movieTime)")},
-       {"FlashMediaGetFlashVariable", (PyCFunction)Qt_FlashMediaGetFlashVariable, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, char path, char name, Handle theVariableCStringOut)")},
-       {"FlashMediaSetFlashVariable", (PyCFunction)Qt_FlashMediaSetFlashVariable, 1,
-        PyDoc_STR("(MediaHandler mh, Boolean updateFocus) -> (ComponentResult _rv, char path, char name, char value)")},
-       {"FlashMediaDoButtonActions", (PyCFunction)Qt_FlashMediaDoButtonActions, 1,
-        PyDoc_STR("(MediaHandler mh, long buttonID, long transition) -> (ComponentResult _rv, char path)")},
-       {"FlashMediaGetSupportedSwfVersion", (PyCFunction)Qt_FlashMediaGetSupportedSwfVersion, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt8 swfVersion)")},
-       {"Media3DGetCurrentGroup", (PyCFunction)Qt_Media3DGetCurrentGroup, 1,
-        PyDoc_STR("(MediaHandler mh, void * group) -> (ComponentResult _rv)")},
-       {"Media3DTranslateNamedObjectTo", (PyCFunction)Qt_Media3DTranslateNamedObjectTo, 1,
-        PyDoc_STR("(MediaHandler mh, Fixed x, Fixed y, Fixed z) -> (ComponentResult _rv, char objectName)")},
-       {"Media3DScaleNamedObjectTo", (PyCFunction)Qt_Media3DScaleNamedObjectTo, 1,
-        PyDoc_STR("(MediaHandler mh, Fixed xScale, Fixed yScale, Fixed zScale) -> (ComponentResult _rv, char objectName)")},
-       {"Media3DRotateNamedObjectTo", (PyCFunction)Qt_Media3DRotateNamedObjectTo, 1,
-        PyDoc_STR("(MediaHandler mh, Fixed xDegrees, Fixed yDegrees, Fixed zDegrees) -> (ComponentResult _rv, char objectName)")},
-       {"Media3DSetCameraData", (PyCFunction)Qt_Media3DSetCameraData, 1,
-        PyDoc_STR("(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)")},
-       {"Media3DGetCameraData", (PyCFunction)Qt_Media3DGetCameraData, 1,
-        PyDoc_STR("(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)")},
-       {"Media3DSetCameraAngleAspect", (PyCFunction)Qt_Media3DSetCameraAngleAspect, 1,
-        PyDoc_STR("(MediaHandler mh, QTFloatSingle fov, QTFloatSingle aspectRatioXToY) -> (ComponentResult _rv)")},
-       {"Media3DGetCameraAngleAspect", (PyCFunction)Qt_Media3DGetCameraAngleAspect, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, QTFloatSingle fov, QTFloatSingle aspectRatioXToY)")},
-       {"Media3DSetCameraRange", (PyCFunction)Qt_Media3DSetCameraRange, 1,
-        PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
-       {"Media3DGetCameraRange", (PyCFunction)Qt_Media3DGetCameraRange, 1,
-        PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
-       {"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
-        PyDoc_STR("() -> (TimeBase _rv)")},
-       {"ConvertTime", (PyCFunction)Qt_ConvertTime, 1,
-        PyDoc_STR("(TimeRecord theTime, TimeBase newBase) -> (TimeRecord theTime)")},
-       {"ConvertTimeScale", (PyCFunction)Qt_ConvertTimeScale, 1,
-        PyDoc_STR("(TimeRecord theTime, TimeScale newScale) -> (TimeRecord theTime)")},
-       {"AddTime", (PyCFunction)Qt_AddTime, 1,
-        PyDoc_STR("(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)")},
-       {"SubtractTime", (PyCFunction)Qt_SubtractTime, 1,
-        PyDoc_STR("(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)")},
-       {"MusicMediaGetIndexedTunePlayer", (PyCFunction)Qt_MusicMediaGetIndexedTunePlayer, 1,
-        PyDoc_STR("(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)")},
-       {"CodecManagerVersion", (PyCFunction)Qt_CodecManagerVersion, 1,
-        PyDoc_STR("() -> (long version)")},
-       {"GetMaxCompressionSize", (PyCFunction)Qt_GetMaxCompressionSize, 1,
-        PyDoc_STR("(PixMapHandle src, Rect srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec) -> (long size)")},
-       {"GetCompressionTime", (PyCFunction)Qt_GetCompressionTime, 1,
-        PyDoc_STR("(PixMapHandle src, Rect srcRect, short colorDepth, CodecType cType, CompressorComponent codec) -> (CodecQ spatialQuality, CodecQ temporalQuality, unsigned long compressTime)")},
-       {"CompressImage", (PyCFunction)Qt_CompressImage, 1,
-        PyDoc_STR("(PixMapHandle src, Rect srcRect, CodecQ quality, CodecType cType, ImageDescriptionHandle desc, Ptr data) -> None")},
-       {"DecompressImage", (PyCFunction)Qt_DecompressImage, 1,
-        PyDoc_STR("(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, Rect srcRect, Rect dstRect, short mode, RgnHandle mask) -> None")},
-       {"GetSimilarity", (PyCFunction)Qt_GetSimilarity, 1,
-        PyDoc_STR("(PixMapHandle src, Rect srcRect, ImageDescriptionHandle desc, Ptr data) -> (Fixed similarity)")},
-       {"GetImageDescriptionCTable", (PyCFunction)Qt_GetImageDescriptionCTable, 1,
-        PyDoc_STR("(ImageDescriptionHandle desc) -> (CTabHandle ctable)")},
-       {"SetImageDescriptionCTable", (PyCFunction)Qt_SetImageDescriptionCTable, 1,
-        PyDoc_STR("(ImageDescriptionHandle desc, CTabHandle ctable) -> None")},
-       {"GetImageDescriptionExtension", (PyCFunction)Qt_GetImageDescriptionExtension, 1,
-        PyDoc_STR("(ImageDescriptionHandle desc, long idType, long index) -> (Handle extension)")},
-       {"AddImageDescriptionExtension", (PyCFunction)Qt_AddImageDescriptionExtension, 1,
-        PyDoc_STR("(ImageDescriptionHandle desc, Handle extension, long idType) -> None")},
-       {"RemoveImageDescriptionExtension", (PyCFunction)Qt_RemoveImageDescriptionExtension, 1,
-        PyDoc_STR("(ImageDescriptionHandle desc, long idType, long index) -> None")},
-       {"CountImageDescriptionExtensionType", (PyCFunction)Qt_CountImageDescriptionExtensionType, 1,
-        PyDoc_STR("(ImageDescriptionHandle desc, long idType) -> (long count)")},
-       {"GetNextImageDescriptionExtensionType", (PyCFunction)Qt_GetNextImageDescriptionExtensionType, 1,
-        PyDoc_STR("(ImageDescriptionHandle desc) -> (long idType)")},
-       {"FindCodec", (PyCFunction)Qt_FindCodec, 1,
-        PyDoc_STR("(CodecType cType, CodecComponent specCodec) -> (CompressorComponent compressor, DecompressorComponent decompressor)")},
-       {"CompressPicture", (PyCFunction)Qt_CompressPicture, 1,
-        PyDoc_STR("(PicHandle srcPicture, PicHandle dstPicture, CodecQ quality, CodecType cType) -> None")},
-       {"CompressPictureFile", (PyCFunction)Qt_CompressPictureFile, 1,
-        PyDoc_STR("(short srcRefNum, short dstRefNum, CodecQ quality, CodecType cType) -> None")},
-       {"ConvertImage", (PyCFunction)Qt_ConvertImage, 1,
-        PyDoc_STR("(ImageDescriptionHandle srcDD, Ptr srcData, short colorDepth, CTabHandle ctable, CodecQ accuracy, CodecQ quality, CodecType cType, CodecComponent codec, ImageDescriptionHandle dstDD, Ptr dstData) -> None")},
-       {"AddFilePreview", (PyCFunction)Qt_AddFilePreview, 1,
-        PyDoc_STR("(short resRefNum, OSType previewType, Handle previewData) -> None")},
-       {"GetBestDeviceRect", (PyCFunction)Qt_GetBestDeviceRect, 1,
-        PyDoc_STR("() -> (GDHandle gdh, Rect rp)")},
-       {"GDHasScale", (PyCFunction)Qt_GDHasScale, 1,
-        PyDoc_STR("(GDHandle gdh, short depth) -> (Fixed scale)")},
-       {"GDGetScale", (PyCFunction)Qt_GDGetScale, 1,
-        PyDoc_STR("(GDHandle gdh) -> (Fixed scale, short flags)")},
-       {"GDSetScale", (PyCFunction)Qt_GDSetScale, 1,
-        PyDoc_STR("(GDHandle gdh, Fixed scale, short flags) -> None")},
-       {"GetGraphicsImporterForFile", (PyCFunction)Qt_GetGraphicsImporterForFile, 1,
-        PyDoc_STR("(FSSpec theFile) -> (ComponentInstance gi)")},
-       {"GetGraphicsImporterForDataRef", (PyCFunction)Qt_GetGraphicsImporterForDataRef, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType) -> (ComponentInstance gi)")},
-       {"GetGraphicsImporterForFileWithFlags", (PyCFunction)Qt_GetGraphicsImporterForFileWithFlags, 1,
-        PyDoc_STR("(FSSpec theFile, long flags) -> (ComponentInstance gi)")},
-       {"GetGraphicsImporterForDataRefWithFlags", (PyCFunction)Qt_GetGraphicsImporterForDataRefWithFlags, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType, long flags) -> (ComponentInstance gi)")},
-       {"MakeImageDescriptionForPixMap", (PyCFunction)Qt_MakeImageDescriptionForPixMap, 1,
-        PyDoc_STR("(PixMapHandle pixmap) -> (ImageDescriptionHandle idh)")},
-       {"MakeImageDescriptionForEffect", (PyCFunction)Qt_MakeImageDescriptionForEffect, 1,
-        PyDoc_STR("(OSType effectType) -> (ImageDescriptionHandle idh)")},
-       {"QTGetPixelSize", (PyCFunction)Qt_QTGetPixelSize, 1,
-        PyDoc_STR("(OSType PixelFormat) -> (short _rv)")},
-       {"QTGetPixelFormatDepthForImageDescription", (PyCFunction)Qt_QTGetPixelFormatDepthForImageDescription, 1,
-        PyDoc_STR("(OSType PixelFormat) -> (short _rv)")},
-       {"QTGetPixMapHandleRowBytes", (PyCFunction)Qt_QTGetPixMapHandleRowBytes, 1,
-        PyDoc_STR("(PixMapHandle pm) -> (long _rv)")},
-       {"QTSetPixMapHandleRowBytes", (PyCFunction)Qt_QTSetPixMapHandleRowBytes, 1,
-        PyDoc_STR("(PixMapHandle pm, long rowBytes) -> None")},
-       {"QTGetPixMapHandleGammaLevel", (PyCFunction)Qt_QTGetPixMapHandleGammaLevel, 1,
-        PyDoc_STR("(PixMapHandle pm) -> (Fixed _rv)")},
-       {"QTSetPixMapHandleGammaLevel", (PyCFunction)Qt_QTSetPixMapHandleGammaLevel, 1,
-        PyDoc_STR("(PixMapHandle pm, Fixed gammaLevel) -> None")},
-       {"QTGetPixMapHandleRequestedGammaLevel", (PyCFunction)Qt_QTGetPixMapHandleRequestedGammaLevel, 1,
-        PyDoc_STR("(PixMapHandle pm) -> (Fixed _rv)")},
-       {"QTSetPixMapHandleRequestedGammaLevel", (PyCFunction)Qt_QTSetPixMapHandleRequestedGammaLevel, 1,
-        PyDoc_STR("(PixMapHandle pm, Fixed requestedGammaLevel) -> None")},
-       {"CompAdd", (PyCFunction)Qt_CompAdd, 1,
-        PyDoc_STR("() -> (wide src, wide dst)")},
-       {"CompSub", (PyCFunction)Qt_CompSub, 1,
-        PyDoc_STR("() -> (wide src, wide dst)")},
-       {"CompNeg", (PyCFunction)Qt_CompNeg, 1,
-        PyDoc_STR("() -> (wide dst)")},
-       {"CompShift", (PyCFunction)Qt_CompShift, 1,
-        PyDoc_STR("(short shift) -> (wide src)")},
-       {"CompMul", (PyCFunction)Qt_CompMul, 1,
-        PyDoc_STR("(long src1, long src2) -> (wide dst)")},
-       {"CompDiv", (PyCFunction)Qt_CompDiv, 1,
-        PyDoc_STR("(long denominator) -> (long _rv, wide numerator, long remainder)")},
-       {"CompFixMul", (PyCFunction)Qt_CompFixMul, 1,
-        PyDoc_STR("(Fixed fixSrc) -> (wide compSrc, wide compDst)")},
-       {"CompMulDiv", (PyCFunction)Qt_CompMulDiv, 1,
-        PyDoc_STR("(long mul, long divisor) -> (wide co)")},
-       {"CompMulDivTrunc", (PyCFunction)Qt_CompMulDivTrunc, 1,
-        PyDoc_STR("(long mul, long divisor) -> (wide co, long remainder)")},
-       {"CompCompare", (PyCFunction)Qt_CompCompare, 1,
-        PyDoc_STR("(wide a, wide minusb) -> (long _rv)")},
-       {"CompSquareRoot", (PyCFunction)Qt_CompSquareRoot, 1,
-        PyDoc_STR("(wide src) -> (unsigned long _rv)")},
-       {"FixMulDiv", (PyCFunction)Qt_FixMulDiv, 1,
-        PyDoc_STR("(Fixed src, Fixed mul, Fixed divisor) -> (Fixed _rv)")},
-       {"UnsignedFixMulDiv", (PyCFunction)Qt_UnsignedFixMulDiv, 1,
-        PyDoc_STR("(Fixed src, Fixed mul, Fixed divisor) -> (Fixed _rv)")},
-       {"FixExp2", (PyCFunction)Qt_FixExp2, 1,
-        PyDoc_STR("(Fixed src) -> (Fixed _rv)")},
-       {"FixLog2", (PyCFunction)Qt_FixLog2, 1,
-        PyDoc_STR("(Fixed src) -> (Fixed _rv)")},
-       {"FixPow", (PyCFunction)Qt_FixPow, 1,
-        PyDoc_STR("(Fixed base, Fixed exp) -> (Fixed _rv)")},
-       {"GraphicsImportSetDataReference", (PyCFunction)Qt_GraphicsImportSetDataReference, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, Handle dataRef, OSType dataReType) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetDataReference", (PyCFunction)Qt_GraphicsImportGetDataReference, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataReType)")},
-       {"GraphicsImportSetDataFile", (PyCFunction)Qt_GraphicsImportSetDataFile, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetDataFile", (PyCFunction)Qt_GraphicsImportGetDataFile, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
-       {"GraphicsImportSetDataHandle", (PyCFunction)Qt_GraphicsImportSetDataHandle, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, Handle h) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetDataHandle", (PyCFunction)Qt_GraphicsImportGetDataHandle, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle h)")},
-       {"GraphicsImportGetImageDescription", (PyCFunction)Qt_GraphicsImportGetImageDescription, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, ImageDescriptionHandle desc)")},
-       {"GraphicsImportGetDataOffsetAndSize", (PyCFunction)Qt_GraphicsImportGetDataOffsetAndSize, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long size)")},
-       {"GraphicsImportReadData", (PyCFunction)Qt_GraphicsImportReadData, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, void * dataPtr, unsigned long dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
-       {"GraphicsImportSetClip", (PyCFunction)Qt_GraphicsImportSetClip, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, RgnHandle clipRgn) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetClip", (PyCFunction)Qt_GraphicsImportGetClip, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, RgnHandle clipRgn)")},
-       {"GraphicsImportSetSourceRect", (PyCFunction)Qt_GraphicsImportSetSourceRect, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, Rect sourceRect) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetSourceRect", (PyCFunction)Qt_GraphicsImportGetSourceRect, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect sourceRect)")},
-       {"GraphicsImportGetNaturalBounds", (PyCFunction)Qt_GraphicsImportGetNaturalBounds, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect naturalBounds)")},
-       {"GraphicsImportDraw", (PyCFunction)Qt_GraphicsImportDraw, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv)")},
-       {"GraphicsImportSetGWorld", (PyCFunction)Qt_GraphicsImportSetGWorld, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, CGrafPtr port, GDHandle gd) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetGWorld", (PyCFunction)Qt_GraphicsImportGetGWorld, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, CGrafPtr port, GDHandle gd)")},
-       {"GraphicsImportSetBoundsRect", (PyCFunction)Qt_GraphicsImportSetBoundsRect, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, Rect bounds) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetBoundsRect", (PyCFunction)Qt_GraphicsImportGetBoundsRect, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect bounds)")},
-       {"GraphicsImportSaveAsPicture", (PyCFunction)Qt_GraphicsImportSaveAsPicture, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, FSSpec fss, ScriptCode scriptTag) -> (ComponentResult _rv)")},
-       {"GraphicsImportSetGraphicsMode", (PyCFunction)Qt_GraphicsImportSetGraphicsMode, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, long graphicsMode, RGBColor opColor) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetGraphicsMode", (PyCFunction)Qt_GraphicsImportGetGraphicsMode, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, long graphicsMode, RGBColor opColor)")},
-       {"GraphicsImportSetQuality", (PyCFunction)Qt_GraphicsImportSetQuality, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, CodecQ quality) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetQuality", (PyCFunction)Qt_GraphicsImportGetQuality, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, CodecQ quality)")},
-       {"GraphicsImportSaveAsQuickTimeImageFile", (PyCFunction)Qt_GraphicsImportSaveAsQuickTimeImageFile, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, FSSpec fss, ScriptCode scriptTag) -> (ComponentResult _rv)")},
-       {"GraphicsImportSetDataReferenceOffsetAndLimit", (PyCFunction)Qt_GraphicsImportSetDataReferenceOffsetAndLimit, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, unsigned long offset, unsigned long limit) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetDataReferenceOffsetAndLimit", (PyCFunction)Qt_GraphicsImportGetDataReferenceOffsetAndLimit, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long limit)")},
-       {"GraphicsImportGetAliasedDataReference", (PyCFunction)Qt_GraphicsImportGetAliasedDataReference, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
-       {"GraphicsImportValidate", (PyCFunction)Qt_GraphicsImportValidate, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Boolean valid)")},
-       {"GraphicsImportGetMetaData", (PyCFunction)Qt_GraphicsImportGetMetaData, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, void * userData) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetMIMETypeList", (PyCFunction)Qt_GraphicsImportGetMIMETypeList, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
-       {"GraphicsImportDoesDrawAllPixels", (PyCFunction)Qt_GraphicsImportDoesDrawAllPixels, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, short drawsAllPixels)")},
-       {"GraphicsImportGetAsPicture", (PyCFunction)Qt_GraphicsImportGetAsPicture, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, PicHandle picture)")},
-       {"GraphicsImportExportImageFile", (PyCFunction)Qt_GraphicsImportExportImageFile, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, OSType fileType, OSType fileCreator, FSSpec fss, ScriptCode scriptTag) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetExportImageTypeList", (PyCFunction)Qt_GraphicsImportGetExportImageTypeList, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetExportSettingsAsAtomContainer", (PyCFunction)Qt_GraphicsImportGetExportSettingsAsAtomContainer, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
-       {"GraphicsImportSetExportSettingsFromAtomContainer", (PyCFunction)Qt_GraphicsImportSetExportSettingsFromAtomContainer, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainer) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetImageCount", (PyCFunction)Qt_GraphicsImportGetImageCount, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long imageCount)")},
-       {"GraphicsImportSetImageIndex", (PyCFunction)Qt_GraphicsImportSetImageIndex, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, unsigned long imageIndex) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetImageIndex", (PyCFunction)Qt_GraphicsImportGetImageIndex, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long imageIndex)")},
-       {"GraphicsImportGetDataOffsetAndSize64", (PyCFunction)Qt_GraphicsImportGetDataOffsetAndSize64, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, wide offset, wide size)")},
-       {"GraphicsImportReadData64", (PyCFunction)Qt_GraphicsImportReadData64, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, void * dataPtr, wide dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
-       {"GraphicsImportSetDataReferenceOffsetAndLimit64", (PyCFunction)Qt_GraphicsImportSetDataReferenceOffsetAndLimit64, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, wide offset, wide limit) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetDataReferenceOffsetAndLimit64", (PyCFunction)Qt_GraphicsImportGetDataReferenceOffsetAndLimit64, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, wide offset, wide limit)")},
-       {"GraphicsImportGetDefaultClip", (PyCFunction)Qt_GraphicsImportGetDefaultClip, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, RgnHandle defaultRgn)")},
-       {"GraphicsImportGetDefaultGraphicsMode", (PyCFunction)Qt_GraphicsImportGetDefaultGraphicsMode, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, long defaultGraphicsMode, RGBColor defaultOpColor)")},
-       {"GraphicsImportGetDefaultSourceRect", (PyCFunction)Qt_GraphicsImportGetDefaultSourceRect, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect defaultSourceRect)")},
-       {"GraphicsImportGetColorSyncProfile", (PyCFunction)Qt_GraphicsImportGetColorSyncProfile, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle profile)")},
-       {"GraphicsImportSetDestRect", (PyCFunction)Qt_GraphicsImportSetDestRect, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, Rect destRect) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetDestRect", (PyCFunction)Qt_GraphicsImportGetDestRect, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect destRect)")},
-       {"GraphicsImportSetFlags", (PyCFunction)Qt_GraphicsImportSetFlags, 1,
-        PyDoc_STR("(GraphicsImportComponent ci, long flags) -> (ComponentResult _rv)")},
-       {"GraphicsImportGetFlags", (PyCFunction)Qt_GraphicsImportGetFlags, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, long flags)")},
-       {"GraphicsImportGetBaseDataOffsetAndSize64", (PyCFunction)Qt_GraphicsImportGetBaseDataOffsetAndSize64, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, wide offset, wide size)")},
-       {"GraphicsImportSetImageIndexToThumbnail", (PyCFunction)Qt_GraphicsImportSetImageIndexToThumbnail, 1,
-        PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv)")},
-       {"GraphicsExportDoExport", (PyCFunction)Qt_GraphicsExportDoExport, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long actualSizeWritten)")},
-       {"GraphicsExportCanTranscode", (PyCFunction)Qt_GraphicsExportCanTranscode, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean canTranscode)")},
-       {"GraphicsExportDoTranscode", (PyCFunction)Qt_GraphicsExportDoTranscode, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv)")},
-       {"GraphicsExportCanUseCompressor", (PyCFunction)Qt_GraphicsExportCanUseCompressor, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, void * codecSettingsAtomContainerPtr) -> (ComponentResult _rv, Boolean canUseCompressor)")},
-       {"GraphicsExportDoUseCompressor", (PyCFunction)Qt_GraphicsExportDoUseCompressor, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, void * codecSettingsAtomContainer) -> (ComponentResult _rv, ImageDescriptionHandle outDesc)")},
-       {"GraphicsExportDoStandaloneExport", (PyCFunction)Qt_GraphicsExportDoStandaloneExport, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetDefaultFileTypeAndCreator", (PyCFunction)Qt_GraphicsExportGetDefaultFileTypeAndCreator, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, OSType fileType, OSType fileCreator)")},
-       {"GraphicsExportGetDefaultFileNameExtension", (PyCFunction)Qt_GraphicsExportGetDefaultFileNameExtension, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, OSType fileNameExtension)")},
-       {"GraphicsExportGetMIMETypeList", (PyCFunction)Qt_GraphicsExportGetMIMETypeList, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
-       {"GraphicsExportSetSettingsFromAtomContainer", (PyCFunction)Qt_GraphicsExportSetSettingsFromAtomContainer, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, void * qtAtomContainer) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetSettingsAsAtomContainer", (PyCFunction)Qt_GraphicsExportGetSettingsAsAtomContainer, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetSettingsAsText", (PyCFunction)Qt_GraphicsExportGetSettingsAsText, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle theText)")},
-       {"GraphicsExportSetDontRecompress", (PyCFunction)Qt_GraphicsExportSetDontRecompress, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Boolean dontRecompress) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetDontRecompress", (PyCFunction)Qt_GraphicsExportGetDontRecompress, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean dontRecompress)")},
-       {"GraphicsExportSetInterlaceStyle", (PyCFunction)Qt_GraphicsExportSetInterlaceStyle, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, unsigned long interlaceStyle) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInterlaceStyle", (PyCFunction)Qt_GraphicsExportGetInterlaceStyle, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long interlaceStyle)")},
-       {"GraphicsExportSetMetaData", (PyCFunction)Qt_GraphicsExportSetMetaData, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, void * userData) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetMetaData", (PyCFunction)Qt_GraphicsExportGetMetaData, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, void * userData) -> (ComponentResult _rv)")},
-       {"GraphicsExportSetTargetDataSize", (PyCFunction)Qt_GraphicsExportSetTargetDataSize, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, unsigned long targetDataSize) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetTargetDataSize", (PyCFunction)Qt_GraphicsExportGetTargetDataSize, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long targetDataSize)")},
-       {"GraphicsExportSetCompressionMethod", (PyCFunction)Qt_GraphicsExportSetCompressionMethod, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, long compressionMethod) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetCompressionMethod", (PyCFunction)Qt_GraphicsExportGetCompressionMethod, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, long compressionMethod)")},
-       {"GraphicsExportSetCompressionQuality", (PyCFunction)Qt_GraphicsExportSetCompressionQuality, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, CodecQ spatialQuality) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetCompressionQuality", (PyCFunction)Qt_GraphicsExportGetCompressionQuality, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, CodecQ spatialQuality)")},
-       {"GraphicsExportSetResolution", (PyCFunction)Qt_GraphicsExportSetResolution, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Fixed horizontalResolution, Fixed verticalResolution) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetResolution", (PyCFunction)Qt_GraphicsExportGetResolution, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Fixed horizontalResolution, Fixed verticalResolution)")},
-       {"GraphicsExportSetDepth", (PyCFunction)Qt_GraphicsExportSetDepth, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, long depth) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetDepth", (PyCFunction)Qt_GraphicsExportGetDepth, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, long depth)")},
-       {"GraphicsExportSetColorSyncProfile", (PyCFunction)Qt_GraphicsExportSetColorSyncProfile, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Handle colorSyncProfile) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetColorSyncProfile", (PyCFunction)Qt_GraphicsExportGetColorSyncProfile, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle colorSyncProfile)")},
-       {"GraphicsExportSetInputDataReference", (PyCFunction)Qt_GraphicsExportSetInputDataReference, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Handle dataRef, OSType dataRefType, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInputDataReference", (PyCFunction)Qt_GraphicsExportGetInputDataReference, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
-       {"GraphicsExportSetInputFile", (PyCFunction)Qt_GraphicsExportSetInputFile, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInputFile", (PyCFunction)Qt_GraphicsExportGetInputFile, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
-       {"GraphicsExportSetInputHandle", (PyCFunction)Qt_GraphicsExportSetInputHandle, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Handle h, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInputHandle", (PyCFunction)Qt_GraphicsExportGetInputHandle, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle h)")},
-       {"GraphicsExportSetInputPtr", (PyCFunction)Qt_GraphicsExportSetInputPtr, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Ptr p, unsigned long size, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
-       {"GraphicsExportSetInputGraphicsImporter", (PyCFunction)Qt_GraphicsExportSetInputGraphicsImporter, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, GraphicsImportComponent grip) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInputGraphicsImporter", (PyCFunction)Qt_GraphicsExportGetInputGraphicsImporter, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, GraphicsImportComponent grip)")},
-       {"GraphicsExportSetInputPicture", (PyCFunction)Qt_GraphicsExportSetInputPicture, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, PicHandle picture) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInputPicture", (PyCFunction)Qt_GraphicsExportGetInputPicture, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, PicHandle picture)")},
-       {"GraphicsExportSetInputGWorld", (PyCFunction)Qt_GraphicsExportSetInputGWorld, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, GWorldPtr gworld) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInputGWorld", (PyCFunction)Qt_GraphicsExportGetInputGWorld, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, GWorldPtr gworld)")},
-       {"GraphicsExportSetInputPixmap", (PyCFunction)Qt_GraphicsExportSetInputPixmap, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, PixMapHandle pixmap) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInputPixmap", (PyCFunction)Qt_GraphicsExportGetInputPixmap, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, PixMapHandle pixmap)")},
-       {"GraphicsExportSetInputOffsetAndLimit", (PyCFunction)Qt_GraphicsExportSetInputOffsetAndLimit, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, unsigned long offset, unsigned long limit) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInputOffsetAndLimit", (PyCFunction)Qt_GraphicsExportGetInputOffsetAndLimit, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long limit)")},
-       {"GraphicsExportMayExporterReadInputData", (PyCFunction)Qt_GraphicsExportMayExporterReadInputData, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean mayReadInputData)")},
-       {"GraphicsExportGetInputDataSize", (PyCFunction)Qt_GraphicsExportGetInputDataSize, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long size)")},
-       {"GraphicsExportReadInputData", (PyCFunction)Qt_GraphicsExportReadInputData, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, void * dataPtr, unsigned long dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetInputImageDescription", (PyCFunction)Qt_GraphicsExportGetInputImageDescription, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, ImageDescriptionHandle desc)")},
-       {"GraphicsExportGetInputImageDimensions", (PyCFunction)Qt_GraphicsExportGetInputImageDimensions, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Rect dimensions)")},
-       {"GraphicsExportGetInputImageDepth", (PyCFunction)Qt_GraphicsExportGetInputImageDepth, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, long inputDepth)")},
-       {"GraphicsExportDrawInputImage", (PyCFunction)Qt_GraphicsExportDrawInputImage, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, CGrafPtr gw, GDHandle gd, Rect srcRect, Rect dstRect) -> (ComponentResult _rv)")},
-       {"GraphicsExportSetOutputDataReference", (PyCFunction)Qt_GraphicsExportSetOutputDataReference, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Handle dataRef, OSType dataRefType) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetOutputDataReference", (PyCFunction)Qt_GraphicsExportGetOutputDataReference, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
-       {"GraphicsExportSetOutputFile", (PyCFunction)Qt_GraphicsExportSetOutputFile, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetOutputFile", (PyCFunction)Qt_GraphicsExportGetOutputFile, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
-       {"GraphicsExportSetOutputHandle", (PyCFunction)Qt_GraphicsExportSetOutputHandle, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Handle h) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetOutputHandle", (PyCFunction)Qt_GraphicsExportGetOutputHandle, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle h)")},
-       {"GraphicsExportSetOutputOffsetAndMaxSize", (PyCFunction)Qt_GraphicsExportSetOutputOffsetAndMaxSize, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, unsigned long offset, unsigned long maxSize, Boolean truncateFile) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetOutputOffsetAndMaxSize", (PyCFunction)Qt_GraphicsExportGetOutputOffsetAndMaxSize, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long maxSize, Boolean truncateFile)")},
-       {"GraphicsExportSetOutputFileTypeAndCreator", (PyCFunction)Qt_GraphicsExportSetOutputFileTypeAndCreator, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, OSType fileType, OSType fileCreator) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetOutputFileTypeAndCreator", (PyCFunction)Qt_GraphicsExportGetOutputFileTypeAndCreator, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, OSType fileType, OSType fileCreator)")},
-       {"GraphicsExportSetOutputMark", (PyCFunction)Qt_GraphicsExportSetOutputMark, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, unsigned long mark) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetOutputMark", (PyCFunction)Qt_GraphicsExportGetOutputMark, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long mark)")},
-       {"GraphicsExportReadOutputData", (PyCFunction)Qt_GraphicsExportReadOutputData, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, void * dataPtr, unsigned long dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
-       {"GraphicsExportSetThumbnailEnabled", (PyCFunction)Qt_GraphicsExportSetThumbnailEnabled, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Boolean enableThumbnail, long maxThumbnailWidth, long maxThumbnailHeight) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetThumbnailEnabled", (PyCFunction)Qt_GraphicsExportGetThumbnailEnabled, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean thumbnailEnabled, long maxThumbnailWidth, long maxThumbnailHeight)")},
-       {"GraphicsExportSetExifEnabled", (PyCFunction)Qt_GraphicsExportSetExifEnabled, 1,
-        PyDoc_STR("(GraphicsExportComponent ci, Boolean enableExif) -> (ComponentResult _rv)")},
-       {"GraphicsExportGetExifEnabled", (PyCFunction)Qt_GraphicsExportGetExifEnabled, 1,
-        PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean exifEnabled)")},
-       {"ImageTranscoderBeginSequence", (PyCFunction)Qt_ImageTranscoderBeginSequence, 1,
-        PyDoc_STR("(ImageTranscoderComponent itc, ImageDescriptionHandle srcDesc, void * data, long dataSize) -> (ComponentResult _rv, ImageDescriptionHandle dstDesc)")},
-       {"ImageTranscoderDisposeData", (PyCFunction)Qt_ImageTranscoderDisposeData, 1,
-        PyDoc_STR("(ImageTranscoderComponent itc, void * dstData) -> (ComponentResult _rv)")},
-       {"ImageTranscoderEndSequence", (PyCFunction)Qt_ImageTranscoderEndSequence, 1,
-        PyDoc_STR("(ImageTranscoderComponent itc) -> (ComponentResult _rv)")},
-       {"ClockGetTime", (PyCFunction)Qt_ClockGetTime, 1,
-        PyDoc_STR("(ComponentInstance aClock) -> (ComponentResult _rv, TimeRecord out)")},
-       {"ClockSetTimeBase", (PyCFunction)Qt_ClockSetTimeBase, 1,
-        PyDoc_STR("(ComponentInstance aClock, TimeBase tb) -> (ComponentResult _rv)")},
-       {"ClockGetRate", (PyCFunction)Qt_ClockGetRate, 1,
-        PyDoc_STR("(ComponentInstance aClock) -> (ComponentResult _rv, Fixed rate)")},
-       {"SCPositionRect", (PyCFunction)Qt_SCPositionRect, 1,
-        PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, Rect rp, Point where)")},
-       {"SCPositionDialog", (PyCFunction)Qt_SCPositionDialog, 1,
-        PyDoc_STR("(ComponentInstance ci, short id) -> (ComponentResult _rv, Point where)")},
-       {"SCSetTestImagePictHandle", (PyCFunction)Qt_SCSetTestImagePictHandle, 1,
-        PyDoc_STR("(ComponentInstance ci, PicHandle testPict, short testFlags) -> (ComponentResult _rv, Rect testRect)")},
-       {"SCSetTestImagePictFile", (PyCFunction)Qt_SCSetTestImagePictFile, 1,
-        PyDoc_STR("(ComponentInstance ci, short testFileRef, short testFlags) -> (ComponentResult _rv, Rect testRect)")},
-       {"SCSetTestImagePixMap", (PyCFunction)Qt_SCSetTestImagePixMap, 1,
-        PyDoc_STR("(ComponentInstance ci, PixMapHandle testPixMap, short testFlags) -> (ComponentResult _rv, Rect testRect)")},
-       {"SCGetBestDeviceRect", (PyCFunction)Qt_SCGetBestDeviceRect, 1,
-        PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, Rect r)")},
-       {"SCRequestImageSettings", (PyCFunction)Qt_SCRequestImageSettings, 1,
-        PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
-       {"SCCompressImage", (PyCFunction)Qt_SCCompressImage, 1,
-        PyDoc_STR("(ComponentInstance ci, PixMapHandle src, Rect srcRect) -> (ComponentResult _rv, ImageDescriptionHandle desc, Handle data)")},
-       {"SCCompressPicture", (PyCFunction)Qt_SCCompressPicture, 1,
-        PyDoc_STR("(ComponentInstance ci, PicHandle srcPicture, PicHandle dstPicture) -> (ComponentResult _rv)")},
-       {"SCCompressPictureFile", (PyCFunction)Qt_SCCompressPictureFile, 1,
-        PyDoc_STR("(ComponentInstance ci, short srcRefNum, short dstRefNum) -> (ComponentResult _rv)")},
-       {"SCRequestSequenceSettings", (PyCFunction)Qt_SCRequestSequenceSettings, 1,
-        PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
-       {"SCCompressSequenceBegin", (PyCFunction)Qt_SCCompressSequenceBegin, 1,
-        PyDoc_STR("(ComponentInstance ci, PixMapHandle src, Rect srcRect) -> (ComponentResult _rv, ImageDescriptionHandle desc)")},
-       {"SCCompressSequenceFrame", (PyCFunction)Qt_SCCompressSequenceFrame, 1,
-        PyDoc_STR("(ComponentInstance ci, PixMapHandle src, Rect srcRect) -> (ComponentResult _rv, Handle data, long dataSize, short notSyncFlag)")},
-       {"SCCompressSequenceEnd", (PyCFunction)Qt_SCCompressSequenceEnd, 1,
-        PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
-       {"SCDefaultPictHandleSettings", (PyCFunction)Qt_SCDefaultPictHandleSettings, 1,
-        PyDoc_STR("(ComponentInstance ci, PicHandle srcPicture, short motion) -> (ComponentResult _rv)")},
-       {"SCDefaultPictFileSettings", (PyCFunction)Qt_SCDefaultPictFileSettings, 1,
-        PyDoc_STR("(ComponentInstance ci, short srcRef, short motion) -> (ComponentResult _rv)")},
-       {"SCDefaultPixMapSettings", (PyCFunction)Qt_SCDefaultPixMapSettings, 1,
-        PyDoc_STR("(ComponentInstance ci, PixMapHandle src, short motion) -> (ComponentResult _rv)")},
-       {"SCGetInfo", (PyCFunction)Qt_SCGetInfo, 1,
-        PyDoc_STR("(ComponentInstance ci, OSType infoType, void * info) -> (ComponentResult _rv)")},
-       {"SCSetInfo", (PyCFunction)Qt_SCSetInfo, 1,
-        PyDoc_STR("(ComponentInstance ci, OSType infoType, void * info) -> (ComponentResult _rv)")},
-       {"SCSetCompressFlags", (PyCFunction)Qt_SCSetCompressFlags, 1,
-        PyDoc_STR("(ComponentInstance ci, long flags) -> (ComponentResult _rv)")},
-       {"SCGetCompressFlags", (PyCFunction)Qt_SCGetCompressFlags, 1,
-        PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, long flags)")},
-       {"SCGetSettingsAsText", (PyCFunction)Qt_SCGetSettingsAsText, 1,
-        PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, Handle text)")},
-       {"SCAsyncIdle", (PyCFunction)Qt_SCAsyncIdle, 1,
-        PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
-       {"TweenerReset", (PyCFunction)Qt_TweenerReset, 1,
-        PyDoc_STR("(TweenerComponent tc) -> (ComponentResult _rv)")},
-       {"TCGetSourceRef", (PyCFunction)Qt_TCGetSourceRef, 1,
-        PyDoc_STR("(MediaHandler mh, TimeCodeDescriptionHandle tcdH) -> (HandlerError _rv, UserData srefH)")},
-       {"TCSetSourceRef", (PyCFunction)Qt_TCSetSourceRef, 1,
-        PyDoc_STR("(MediaHandler mh, TimeCodeDescriptionHandle tcdH, UserData srefH) -> (HandlerError _rv)")},
-       {"TCSetTimeCodeFlags", (PyCFunction)Qt_TCSetTimeCodeFlags, 1,
-        PyDoc_STR("(MediaHandler mh, long flags, long flagsMask) -> (HandlerError _rv)")},
-       {"TCGetTimeCodeFlags", (PyCFunction)Qt_TCGetTimeCodeFlags, 1,
-        PyDoc_STR("(MediaHandler mh) -> (HandlerError _rv, long flags)")},
-       {"MovieImportHandle", (PyCFunction)Qt_MovieImportHandle, 1,
-        PyDoc_STR("(MovieImportComponent ci, Handle dataH, Movie theMovie, Track targetTrack, TimeValue atTime, long inFlags) -> (ComponentResult _rv, Track usedTrack, TimeValue addedDuration, long outFlags)")},
-       {"MovieImportFile", (PyCFunction)Qt_MovieImportFile, 1,
-        PyDoc_STR("(MovieImportComponent ci, FSSpec theFile, Movie theMovie, Track targetTrack, TimeValue atTime, long inFlags) -> (ComponentResult _rv, Track usedTrack, TimeValue addedDuration, long outFlags)")},
-       {"MovieImportSetSampleDuration", (PyCFunction)Qt_MovieImportSetSampleDuration, 1,
-        PyDoc_STR("(MovieImportComponent ci, TimeValue duration, TimeScale scale) -> (ComponentResult _rv)")},
-       {"MovieImportSetSampleDescription", (PyCFunction)Qt_MovieImportSetSampleDescription, 1,
-        PyDoc_STR("(MovieImportComponent ci, SampleDescriptionHandle desc, OSType mediaType) -> (ComponentResult _rv)")},
-       {"MovieImportSetMediaFile", (PyCFunction)Qt_MovieImportSetMediaFile, 1,
-        PyDoc_STR("(MovieImportComponent ci, AliasHandle alias) -> (ComponentResult _rv)")},
-       {"MovieImportSetDimensions", (PyCFunction)Qt_MovieImportSetDimensions, 1,
-        PyDoc_STR("(MovieImportComponent ci, Fixed width, Fixed height) -> (ComponentResult _rv)")},
-       {"MovieImportSetChunkSize", (PyCFunction)Qt_MovieImportSetChunkSize, 1,
-        PyDoc_STR("(MovieImportComponent ci, long chunkSize) -> (ComponentResult _rv)")},
-       {"MovieImportSetAuxiliaryData", (PyCFunction)Qt_MovieImportSetAuxiliaryData, 1,
-        PyDoc_STR("(MovieImportComponent ci, Handle data, OSType handleType) -> (ComponentResult _rv)")},
-       {"MovieImportSetFromScrap", (PyCFunction)Qt_MovieImportSetFromScrap, 1,
-        PyDoc_STR("(MovieImportComponent ci, Boolean fromScrap) -> (ComponentResult _rv)")},
-       {"MovieImportDoUserDialog", (PyCFunction)Qt_MovieImportDoUserDialog, 1,
-        PyDoc_STR("(MovieImportComponent ci, FSSpec theFile, Handle theData) -> (ComponentResult _rv, Boolean canceled)")},
-       {"MovieImportSetDuration", (PyCFunction)Qt_MovieImportSetDuration, 1,
-        PyDoc_STR("(MovieImportComponent ci, TimeValue duration) -> (ComponentResult _rv)")},
-       {"MovieImportGetAuxiliaryDataType", (PyCFunction)Qt_MovieImportGetAuxiliaryDataType, 1,
-        PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, OSType auxType)")},
-       {"MovieImportValidate", (PyCFunction)Qt_MovieImportValidate, 1,
-        PyDoc_STR("(MovieImportComponent ci, FSSpec theFile, Handle theData) -> (ComponentResult _rv, Boolean valid)")},
-       {"MovieImportGetFileType", (PyCFunction)Qt_MovieImportGetFileType, 1,
-        PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, OSType fileType)")},
-       {"MovieImportDataRef", (PyCFunction)Qt_MovieImportDataRef, 1,
-        PyDoc_STR("(MovieImportComponent ci, Handle dataRef, OSType dataRefType, Movie theMovie, Track targetTrack, TimeValue atTime, long inFlags) -> (ComponentResult _rv, Track usedTrack, TimeValue addedDuration, long outFlags)")},
-       {"MovieImportGetSampleDescription", (PyCFunction)Qt_MovieImportGetSampleDescription, 1,
-        PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, SampleDescriptionHandle desc, OSType mediaType)")},
-       {"MovieImportSetOffsetAndLimit", (PyCFunction)Qt_MovieImportSetOffsetAndLimit, 1,
-        PyDoc_STR("(MovieImportComponent ci, unsigned long offset, unsigned long limit) -> (ComponentResult _rv)")},
-       {"MovieImportSetOffsetAndLimit64", (PyCFunction)Qt_MovieImportSetOffsetAndLimit64, 1,
-        PyDoc_STR("(MovieImportComponent ci, wide offset, wide limit) -> (ComponentResult _rv)")},
-       {"MovieImportIdle", (PyCFunction)Qt_MovieImportIdle, 1,
-        PyDoc_STR("(MovieImportComponent ci, long inFlags) -> (ComponentResult _rv, long outFlags)")},
-       {"MovieImportValidateDataRef", (PyCFunction)Qt_MovieImportValidateDataRef, 1,
-        PyDoc_STR("(MovieImportComponent ci, Handle dataRef, OSType dataRefType) -> (ComponentResult _rv, UInt8 valid)")},
-       {"MovieImportGetLoadState", (PyCFunction)Qt_MovieImportGetLoadState, 1,
-        PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, long importerLoadState)")},
-       {"MovieImportGetMaxLoadedTime", (PyCFunction)Qt_MovieImportGetMaxLoadedTime, 1,
-        PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, TimeValue time)")},
-       {"MovieImportEstimateCompletionTime", (PyCFunction)Qt_MovieImportEstimateCompletionTime, 1,
-        PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, TimeRecord time)")},
-       {"MovieImportSetDontBlock", (PyCFunction)Qt_MovieImportSetDontBlock, 1,
-        PyDoc_STR("(MovieImportComponent ci, Boolean dontBlock) -> (ComponentResult _rv)")},
-       {"MovieImportGetDontBlock", (PyCFunction)Qt_MovieImportGetDontBlock, 1,
-        PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, Boolean willBlock)")},
-       {"MovieImportSetIdleManager", (PyCFunction)Qt_MovieImportSetIdleManager, 1,
-        PyDoc_STR("(MovieImportComponent ci, IdleManager im) -> (ComponentResult _rv)")},
-       {"MovieImportSetNewMovieFlags", (PyCFunction)Qt_MovieImportSetNewMovieFlags, 1,
-        PyDoc_STR("(MovieImportComponent ci, long newMovieFlags) -> (ComponentResult _rv)")},
-       {"MovieImportGetDestinationMediaType", (PyCFunction)Qt_MovieImportGetDestinationMediaType, 1,
-        PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, OSType mediaType)")},
-       {"MovieExportToHandle", (PyCFunction)Qt_MovieExportToHandle, 1,
-        PyDoc_STR("(MovieExportComponent ci, Handle dataH, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv)")},
-       {"MovieExportToFile", (PyCFunction)Qt_MovieExportToFile, 1,
-        PyDoc_STR("(MovieExportComponent ci, FSSpec theFile, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv)")},
-       {"MovieExportGetAuxiliaryData", (PyCFunction)Qt_MovieExportGetAuxiliaryData, 1,
-        PyDoc_STR("(MovieExportComponent ci, Handle dataH) -> (ComponentResult _rv, OSType handleType)")},
-       {"MovieExportSetSampleDescription", (PyCFunction)Qt_MovieExportSetSampleDescription, 1,
-        PyDoc_STR("(MovieExportComponent ci, SampleDescriptionHandle desc, OSType mediaType) -> (ComponentResult _rv)")},
-       {"MovieExportDoUserDialog", (PyCFunction)Qt_MovieExportDoUserDialog, 1,
-        PyDoc_STR("(MovieExportComponent ci, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv, Boolean canceled)")},
-       {"MovieExportGetCreatorType", (PyCFunction)Qt_MovieExportGetCreatorType, 1,
-        PyDoc_STR("(MovieExportComponent ci) -> (ComponentResult _rv, OSType creator)")},
-       {"MovieExportToDataRef", (PyCFunction)Qt_MovieExportToDataRef, 1,
-        PyDoc_STR("(MovieExportComponent ci, Handle dataRef, OSType dataRefType, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv)")},
-       {"MovieExportFromProceduresToDataRef", (PyCFunction)Qt_MovieExportFromProceduresToDataRef, 1,
-        PyDoc_STR("(MovieExportComponent ci, Handle dataRef, OSType dataRefType) -> (ComponentResult _rv)")},
-       {"MovieExportValidate", (PyCFunction)Qt_MovieExportValidate, 1,
-        PyDoc_STR("(MovieExportComponent ci, Movie theMovie, Track onlyThisTrack) -> (ComponentResult _rv, Boolean valid)")},
-       {"MovieExportGetFileNameExtension", (PyCFunction)Qt_MovieExportGetFileNameExtension, 1,
-        PyDoc_STR("(MovieExportComponent ci) -> (ComponentResult _rv, OSType extension)")},
-       {"MovieExportGetShortFileTypeString", (PyCFunction)Qt_MovieExportGetShortFileTypeString, 1,
-        PyDoc_STR("(MovieExportComponent ci, Str255 typeString) -> (ComponentResult _rv)")},
-       {"MovieExportGetSourceMediaType", (PyCFunction)Qt_MovieExportGetSourceMediaType, 1,
-        PyDoc_STR("(MovieExportComponent ci) -> (ComponentResult _rv, OSType mediaType)")},
-       {"TextExportGetTimeFraction", (PyCFunction)Qt_TextExportGetTimeFraction, 1,
-        PyDoc_STR("(TextExportComponent ci) -> (ComponentResult _rv, long movieTimeFraction)")},
-       {"TextExportSetTimeFraction", (PyCFunction)Qt_TextExportSetTimeFraction, 1,
-        PyDoc_STR("(TextExportComponent ci, long movieTimeFraction) -> (ComponentResult _rv)")},
-       {"TextExportGetSettings", (PyCFunction)Qt_TextExportGetSettings, 1,
-        PyDoc_STR("(TextExportComponent ci) -> (ComponentResult _rv, long setting)")},
-       {"TextExportSetSettings", (PyCFunction)Qt_TextExportSetSettings, 1,
-        PyDoc_STR("(TextExportComponent ci, long setting) -> (ComponentResult _rv)")},
-       {"MIDIImportGetSettings", (PyCFunction)Qt_MIDIImportGetSettings, 1,
-        PyDoc_STR("(TextExportComponent ci) -> (ComponentResult _rv, long setting)")},
-       {"MIDIImportSetSettings", (PyCFunction)Qt_MIDIImportSetSettings, 1,
-        PyDoc_STR("(TextExportComponent ci, long setting) -> (ComponentResult _rv)")},
-       {"GraphicsImageImportSetSequenceEnabled", (PyCFunction)Qt_GraphicsImageImportSetSequenceEnabled, 1,
-        PyDoc_STR("(GraphicImageMovieImportComponent ci, Boolean enable) -> (ComponentResult _rv)")},
-       {"GraphicsImageImportGetSequenceEnabled", (PyCFunction)Qt_GraphicsImageImportGetSequenceEnabled, 1,
-        PyDoc_STR("(GraphicImageMovieImportComponent ci) -> (ComponentResult _rv, Boolean enable)")},
-       {"PreviewShowData", (PyCFunction)Qt_PreviewShowData, 1,
-        PyDoc_STR("(pnotComponent p, OSType dataType, Handle data, Rect inHere) -> (ComponentResult _rv)")},
-       {"PreviewMakePreviewReference", (PyCFunction)Qt_PreviewMakePreviewReference, 1,
-        PyDoc_STR("(pnotComponent p, FSSpec sourceFile) -> (ComponentResult _rv, OSType previewType, short resID)")},
-       {"PreviewEvent", (PyCFunction)Qt_PreviewEvent, 1,
-        PyDoc_STR("(pnotComponent p) -> (ComponentResult _rv, EventRecord e, Boolean handledEvent)")},
-       {"DataCodecDecompress", (PyCFunction)Qt_DataCodecDecompress, 1,
-        PyDoc_STR("(DataCodecComponent dc, void * srcData, UInt32 srcSize, void * dstData, UInt32 dstBufferSize) -> (ComponentResult _rv)")},
-       {"DataCodecGetCompressBufferSize", (PyCFunction)Qt_DataCodecGetCompressBufferSize, 1,
-        PyDoc_STR("(DataCodecComponent dc, UInt32 srcSize) -> (ComponentResult _rv, UInt32 dstSize)")},
-       {"DataCodecCompress", (PyCFunction)Qt_DataCodecCompress, 1,
-        PyDoc_STR("(DataCodecComponent dc, void * srcData, UInt32 srcSize, void * dstData, UInt32 dstBufferSize) -> (ComponentResult _rv, UInt32 actualDstSize, UInt32 decompressSlop)")},
-       {"DataCodecBeginInterruptSafe", (PyCFunction)Qt_DataCodecBeginInterruptSafe, 1,
-        PyDoc_STR("(DataCodecComponent dc, unsigned long maxSrcSize) -> (ComponentResult _rv)")},
-       {"DataCodecEndInterruptSafe", (PyCFunction)Qt_DataCodecEndInterruptSafe, 1,
-        PyDoc_STR("(DataCodecComponent dc) -> (ComponentResult _rv)")},
-       {"DataHGetData", (PyCFunction)Qt_DataHGetData, 1,
-        PyDoc_STR("(DataHandler dh, Handle h, long hOffset, long offset, long size) -> (ComponentResult _rv)")},
-       {"DataHPutData", (PyCFunction)Qt_DataHPutData, 1,
-        PyDoc_STR("(DataHandler dh, Handle h, long hOffset, long size) -> (ComponentResult _rv, long offset)")},
-       {"DataHFlushData", (PyCFunction)Qt_DataHFlushData, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
-       {"DataHOpenForWrite", (PyCFunction)Qt_DataHOpenForWrite, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
-       {"DataHCloseForWrite", (PyCFunction)Qt_DataHCloseForWrite, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
-       {"DataHOpenForRead", (PyCFunction)Qt_DataHOpenForRead, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
-       {"DataHCloseForRead", (PyCFunction)Qt_DataHCloseForRead, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
-       {"DataHSetDataRef", (PyCFunction)Qt_DataHSetDataRef, 1,
-        PyDoc_STR("(DataHandler dh, Handle dataRef) -> (ComponentResult _rv)")},
-       {"DataHGetDataRef", (PyCFunction)Qt_DataHGetDataRef, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Handle dataRef)")},
-       {"DataHCompareDataRef", (PyCFunction)Qt_DataHCompareDataRef, 1,
-        PyDoc_STR("(DataHandler dh, Handle dataRef) -> (ComponentResult _rv, Boolean equal)")},
-       {"DataHTask", (PyCFunction)Qt_DataHTask, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
-       {"DataHFinishData", (PyCFunction)Qt_DataHFinishData, 1,
-        PyDoc_STR("(DataHandler dh, Ptr PlaceToPutDataPtr, Boolean Cancel) -> (ComponentResult _rv)")},
-       {"DataHFlushCache", (PyCFunction)Qt_DataHFlushCache, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
-       {"DataHResolveDataRef", (PyCFunction)Qt_DataHResolveDataRef, 1,
-        PyDoc_STR("(DataHandler dh, Handle theDataRef, Boolean userInterfaceAllowed) -> (ComponentResult _rv, Boolean wasChanged)")},
-       {"DataHGetFileSize", (PyCFunction)Qt_DataHGetFileSize, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long fileSize)")},
-       {"DataHCanUseDataRef", (PyCFunction)Qt_DataHCanUseDataRef, 1,
-        PyDoc_STR("(DataHandler dh, Handle dataRef) -> (ComponentResult _rv, long useFlags)")},
-       {"DataHPreextend", (PyCFunction)Qt_DataHPreextend, 1,
-        PyDoc_STR("(DataHandler dh, unsigned long maxToAdd) -> (ComponentResult _rv, unsigned long spaceAdded)")},
-       {"DataHSetFileSize", (PyCFunction)Qt_DataHSetFileSize, 1,
-        PyDoc_STR("(DataHandler dh, long fileSize) -> (ComponentResult _rv)")},
-       {"DataHGetFreeSpace", (PyCFunction)Qt_DataHGetFreeSpace, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, unsigned long freeSize)")},
-       {"DataHCreateFile", (PyCFunction)Qt_DataHCreateFile, 1,
-        PyDoc_STR("(DataHandler dh, OSType creator, Boolean deleteExisting) -> (ComponentResult _rv)")},
-       {"DataHGetPreferredBlockSize", (PyCFunction)Qt_DataHGetPreferredBlockSize, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long blockSize)")},
-       {"DataHGetDeviceIndex", (PyCFunction)Qt_DataHGetDeviceIndex, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long deviceIndex)")},
-       {"DataHIsStreamingDataHandler", (PyCFunction)Qt_DataHIsStreamingDataHandler, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Boolean yes)")},
-       {"DataHGetDataInBuffer", (PyCFunction)Qt_DataHGetDataInBuffer, 1,
-        PyDoc_STR("(DataHandler dh, long startOffset) -> (ComponentResult _rv, long size)")},
-       {"DataHGetScheduleAheadTime", (PyCFunction)Qt_DataHGetScheduleAheadTime, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long millisecs)")},
-       {"DataHSetCacheSizeLimit", (PyCFunction)Qt_DataHSetCacheSizeLimit, 1,
-        PyDoc_STR("(DataHandler dh, Size cacheSizeLimit) -> (ComponentResult _rv)")},
-       {"DataHGetCacheSizeLimit", (PyCFunction)Qt_DataHGetCacheSizeLimit, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Size cacheSizeLimit)")},
-       {"DataHGetMovie", (PyCFunction)Qt_DataHGetMovie, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Movie theMovie, short id)")},
-       {"DataHAddMovie", (PyCFunction)Qt_DataHAddMovie, 1,
-        PyDoc_STR("(DataHandler dh, Movie theMovie) -> (ComponentResult _rv, short id)")},
-       {"DataHUpdateMovie", (PyCFunction)Qt_DataHUpdateMovie, 1,
-        PyDoc_STR("(DataHandler dh, Movie theMovie, short id) -> (ComponentResult _rv)")},
-       {"DataHDoesBuffer", (PyCFunction)Qt_DataHDoesBuffer, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Boolean buffersReads, Boolean buffersWrites)")},
-       {"DataHGetFileName", (PyCFunction)Qt_DataHGetFileName, 1,
-        PyDoc_STR("(DataHandler dh, Str255 str) -> (ComponentResult _rv)")},
-       {"DataHGetAvailableFileSize", (PyCFunction)Qt_DataHGetAvailableFileSize, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long fileSize)")},
-       {"DataHGetMacOSFileType", (PyCFunction)Qt_DataHGetMacOSFileType, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, OSType fileType)")},
-       {"DataHGetMIMEType", (PyCFunction)Qt_DataHGetMIMEType, 1,
-        PyDoc_STR("(DataHandler dh, Str255 mimeType) -> (ComponentResult _rv)")},
-       {"DataHSetDataRefWithAnchor", (PyCFunction)Qt_DataHSetDataRefWithAnchor, 1,
-        PyDoc_STR("(DataHandler dh, Handle anchorDataRef, OSType dataRefType, Handle dataRef) -> (ComponentResult _rv)")},
-       {"DataHGetDataRefWithAnchor", (PyCFunction)Qt_DataHGetDataRefWithAnchor, 1,
-        PyDoc_STR("(DataHandler dh, Handle anchorDataRef, OSType dataRefType) -> (ComponentResult _rv, Handle dataRef)")},
-       {"DataHSetMacOSFileType", (PyCFunction)Qt_DataHSetMacOSFileType, 1,
-        PyDoc_STR("(DataHandler dh, OSType fileType) -> (ComponentResult _rv)")},
-       {"DataHSetTimeBase", (PyCFunction)Qt_DataHSetTimeBase, 1,
-        PyDoc_STR("(DataHandler dh, TimeBase tb) -> (ComponentResult _rv)")},
-       {"DataHGetInfoFlags", (PyCFunction)Qt_DataHGetInfoFlags, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, UInt32 flags)")},
-       {"DataHGetFileSize64", (PyCFunction)Qt_DataHGetFileSize64, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, wide fileSize)")},
-       {"DataHPreextend64", (PyCFunction)Qt_DataHPreextend64, 1,
-        PyDoc_STR("(DataHandler dh, wide maxToAdd) -> (ComponentResult _rv, wide spaceAdded)")},
-       {"DataHSetFileSize64", (PyCFunction)Qt_DataHSetFileSize64, 1,
-        PyDoc_STR("(DataHandler dh, wide fileSize) -> (ComponentResult _rv)")},
-       {"DataHGetFreeSpace64", (PyCFunction)Qt_DataHGetFreeSpace64, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, wide freeSize)")},
-       {"DataHAppend64", (PyCFunction)Qt_DataHAppend64, 1,
-        PyDoc_STR("(DataHandler dh, void * data, unsigned long size) -> (ComponentResult _rv, wide fileOffset)")},
-       {"DataHPollRead", (PyCFunction)Qt_DataHPollRead, 1,
-        PyDoc_STR("(DataHandler dh, void * dataPtr) -> (ComponentResult _rv, UInt32 dataSizeSoFar)")},
-       {"DataHGetDataAvailability", (PyCFunction)Qt_DataHGetDataAvailability, 1,
-        PyDoc_STR("(DataHandler dh, long offset, long len) -> (ComponentResult _rv, long missing_offset, long missing_len)")},
-       {"DataHGetDataRefAsType", (PyCFunction)Qt_DataHGetDataRefAsType, 1,
-        PyDoc_STR("(DataHandler dh, OSType requestedType) -> (ComponentResult _rv, Handle dataRef)")},
-       {"DataHSetDataRefExtension", (PyCFunction)Qt_DataHSetDataRefExtension, 1,
-        PyDoc_STR("(DataHandler dh, Handle extension, OSType idType) -> (ComponentResult _rv)")},
-       {"DataHGetDataRefExtension", (PyCFunction)Qt_DataHGetDataRefExtension, 1,
-        PyDoc_STR("(DataHandler dh, OSType idType) -> (ComponentResult _rv, Handle extension)")},
-       {"DataHGetMovieWithFlags", (PyCFunction)Qt_DataHGetMovieWithFlags, 1,
-        PyDoc_STR("(DataHandler dh, short flags) -> (ComponentResult _rv, Movie theMovie, short id)")},
-       {"DataHGetFileTypeOrdering", (PyCFunction)Qt_DataHGetFileTypeOrdering, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, DataHFileTypeOrderingHandle orderingListHandle)")},
-       {"DataHCreateFileWithFlags", (PyCFunction)Qt_DataHCreateFileWithFlags, 1,
-        PyDoc_STR("(DataHandler dh, OSType creator, Boolean deleteExisting, UInt32 flags) -> (ComponentResult _rv)")},
-       {"DataHGetInfo", (PyCFunction)Qt_DataHGetInfo, 1,
-        PyDoc_STR("(DataHandler dh, OSType what, void * info) -> (ComponentResult _rv)")},
-       {"DataHSetIdleManager", (PyCFunction)Qt_DataHSetIdleManager, 1,
-        PyDoc_STR("(DataHandler dh, IdleManager im) -> (ComponentResult _rv)")},
-       {"DataHDeleteFile", (PyCFunction)Qt_DataHDeleteFile, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
-       {"DataHSetMovieUsageFlags", (PyCFunction)Qt_DataHSetMovieUsageFlags, 1,
-        PyDoc_STR("(DataHandler dh, long flags) -> (ComponentResult _rv)")},
-       {"DataHUseTemporaryDataRef", (PyCFunction)Qt_DataHUseTemporaryDataRef, 1,
-        PyDoc_STR("(DataHandler dh, long inFlags) -> (ComponentResult _rv)")},
-       {"DataHGetTemporaryDataRefCapabilities", (PyCFunction)Qt_DataHGetTemporaryDataRefCapabilities, 1,
-        PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long outUnderstoodFlags)")},
-       {"DataHRenameFile", (PyCFunction)Qt_DataHRenameFile, 1,
-        PyDoc_STR("(DataHandler dh, Handle newDataRef) -> (ComponentResult _rv)")},
-       {"DataHPlaybackHints", (PyCFunction)Qt_DataHPlaybackHints, 1,
-        PyDoc_STR("(DataHandler dh, long flags, unsigned long minFileOffset, unsigned long maxFileOffset, long bytesPerSecond) -> (ComponentResult _rv)")},
-       {"DataHPlaybackHints64", (PyCFunction)Qt_DataHPlaybackHints64, 1,
-        PyDoc_STR("(DataHandler dh, long flags, wide minFileOffset, wide maxFileOffset, long bytesPerSecond) -> (ComponentResult _rv)")},
-       {"DataHGetDataRate", (PyCFunction)Qt_DataHGetDataRate, 1,
-        PyDoc_STR("(DataHandler dh, long flags) -> (ComponentResult _rv, long bytesPerSecond)")},
-       {"DataHSetTimeHints", (PyCFunction)Qt_DataHSetTimeHints, 1,
-        PyDoc_STR("(DataHandler dh, long flags, long bandwidthPriority, TimeScale scale, TimeValue minTime, TimeValue maxTime) -> (ComponentResult _rv)")},
-       {"VDGetMaxSrcRect", (PyCFunction)Qt_VDGetMaxSrcRect, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short inputStd) -> (ComponentResult _rv, Rect maxSrcRect)")},
-       {"VDGetActiveSrcRect", (PyCFunction)Qt_VDGetActiveSrcRect, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short inputStd) -> (ComponentResult _rv, Rect activeSrcRect)")},
-       {"VDSetDigitizerRect", (PyCFunction)Qt_VDSetDigitizerRect, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, Rect digitizerRect)")},
-       {"VDGetDigitizerRect", (PyCFunction)Qt_VDGetDigitizerRect, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, Rect digitizerRect)")},
-       {"VDGetVBlankRect", (PyCFunction)Qt_VDGetVBlankRect, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short inputStd) -> (ComponentResult _rv, Rect vBlankRect)")},
-       {"VDGetMaskPixMap", (PyCFunction)Qt_VDGetMaskPixMap, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, PixMapHandle maskPixMap) -> (ComponentResult _rv)")},
-       {"VDUseThisCLUT", (PyCFunction)Qt_VDUseThisCLUT, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, CTabHandle colorTableHandle) -> (ComponentResult _rv)")},
-       {"VDSetInputGammaValue", (PyCFunction)Qt_VDSetInputGammaValue, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, Fixed channel1, Fixed channel2, Fixed channel3) -> (ComponentResult _rv)")},
-       {"VDGetInputGammaValue", (PyCFunction)Qt_VDGetInputGammaValue, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, Fixed channel1, Fixed channel2, Fixed channel3)")},
-       {"VDSetBrightness", (PyCFunction)Qt_VDSetBrightness, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short brightness)")},
-       {"VDGetBrightness", (PyCFunction)Qt_VDGetBrightness, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short brightness)")},
-       {"VDSetContrast", (PyCFunction)Qt_VDSetContrast, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short contrast)")},
-       {"VDSetHue", (PyCFunction)Qt_VDSetHue, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short hue)")},
-       {"VDSetSharpness", (PyCFunction)Qt_VDSetSharpness, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short sharpness)")},
-       {"VDSetSaturation", (PyCFunction)Qt_VDSetSaturation, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short saturation)")},
-       {"VDGetContrast", (PyCFunction)Qt_VDGetContrast, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short contrast)")},
-       {"VDGetHue", (PyCFunction)Qt_VDGetHue, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short hue)")},
-       {"VDGetSharpness", (PyCFunction)Qt_VDGetSharpness, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short sharpness)")},
-       {"VDGetSaturation", (PyCFunction)Qt_VDGetSaturation, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short saturation)")},
-       {"VDGrabOneFrame", (PyCFunction)Qt_VDGrabOneFrame, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
-       {"VDGetMaxAuxBuffer", (PyCFunction)Qt_VDGetMaxAuxBuffer, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, PixMapHandle pm, Rect r)")},
-       {"VDGetCurrentFlags", (PyCFunction)Qt_VDGetCurrentFlags, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long inputCurrentFlag, long outputCurrentFlag)")},
-       {"VDSetKeyColor", (PyCFunction)Qt_VDSetKeyColor, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, long index) -> (ComponentResult _rv)")},
-       {"VDGetKeyColor", (PyCFunction)Qt_VDGetKeyColor, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long index)")},
-       {"VDAddKeyColor", (PyCFunction)Qt_VDAddKeyColor, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long index)")},
-       {"VDGetNextKeyColor", (PyCFunction)Qt_VDGetNextKeyColor, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, long index) -> (ComponentResult _rv)")},
-       {"VDSetKeyColorRange", (PyCFunction)Qt_VDSetKeyColorRange, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, RGBColor minRGB, RGBColor maxRGB)")},
-       {"VDGetKeyColorRange", (PyCFunction)Qt_VDGetKeyColorRange, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, RGBColor minRGB, RGBColor maxRGB)")},
-       {"VDSetInputColorSpaceMode", (PyCFunction)Qt_VDSetInputColorSpaceMode, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short colorSpaceMode) -> (ComponentResult _rv)")},
-       {"VDGetInputColorSpaceMode", (PyCFunction)Qt_VDGetInputColorSpaceMode, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short colorSpaceMode)")},
-       {"VDSetClipState", (PyCFunction)Qt_VDSetClipState, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short clipEnable) -> (ComponentResult _rv)")},
-       {"VDGetClipState", (PyCFunction)Qt_VDGetClipState, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short clipEnable)")},
-       {"VDSetClipRgn", (PyCFunction)Qt_VDSetClipRgn, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, RgnHandle clipRegion) -> (ComponentResult _rv)")},
-       {"VDClearClipRgn", (PyCFunction)Qt_VDClearClipRgn, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, RgnHandle clipRegion) -> (ComponentResult _rv)")},
-       {"VDGetCLUTInUse", (PyCFunction)Qt_VDGetCLUTInUse, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, CTabHandle colorTableHandle)")},
-       {"VDSetPLLFilterType", (PyCFunction)Qt_VDSetPLLFilterType, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short pllType) -> (ComponentResult _rv)")},
-       {"VDGetPLLFilterType", (PyCFunction)Qt_VDGetPLLFilterType, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short pllType)")},
-       {"VDGetMaskandValue", (PyCFunction)Qt_VDGetMaskandValue, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, unsigned short blendLevel) -> (ComponentResult _rv, long mask, long value)")},
-       {"VDSetMasterBlendLevel", (PyCFunction)Qt_VDSetMasterBlendLevel, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blendLevel)")},
-       {"VDSetPlayThruOnOff", (PyCFunction)Qt_VDSetPlayThruOnOff, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short state) -> (ComponentResult _rv)")},
-       {"VDSetFieldPreference", (PyCFunction)Qt_VDSetFieldPreference, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short fieldFlag) -> (ComponentResult _rv)")},
-       {"VDGetFieldPreference", (PyCFunction)Qt_VDGetFieldPreference, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short fieldFlag)")},
-       {"VDPreflightGlobalRect", (PyCFunction)Qt_VDPreflightGlobalRect, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, GrafPtr theWindow) -> (ComponentResult _rv, Rect globalRect)")},
-       {"VDSetPlayThruGlobalRect", (PyCFunction)Qt_VDSetPlayThruGlobalRect, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, GrafPtr theWindow) -> (ComponentResult _rv, Rect globalRect)")},
-       {"VDSetBlackLevelValue", (PyCFunction)Qt_VDSetBlackLevelValue, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blackLevel)")},
-       {"VDGetBlackLevelValue", (PyCFunction)Qt_VDGetBlackLevelValue, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blackLevel)")},
-       {"VDSetWhiteLevelValue", (PyCFunction)Qt_VDSetWhiteLevelValue, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short whiteLevel)")},
-       {"VDGetWhiteLevelValue", (PyCFunction)Qt_VDGetWhiteLevelValue, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short whiteLevel)")},
-       {"VDGetVideoDefaults", (PyCFunction)Qt_VDGetVideoDefaults, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blackLevel, unsigned short whiteLevel, unsigned short brightness, unsigned short hue, unsigned short saturation, unsigned short contrast, unsigned short sharpness)")},
-       {"VDGetNumberOfInputs", (PyCFunction)Qt_VDGetNumberOfInputs, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short inputs)")},
-       {"VDGetInputFormat", (PyCFunction)Qt_VDGetInputFormat, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short input) -> (ComponentResult _rv, short format)")},
-       {"VDSetInput", (PyCFunction)Qt_VDSetInput, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short input) -> (ComponentResult _rv)")},
-       {"VDGetInput", (PyCFunction)Qt_VDGetInput, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short input)")},
-       {"VDSetInputStandard", (PyCFunction)Qt_VDSetInputStandard, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short inputStandard) -> (ComponentResult _rv)")},
-       {"VDSetupBuffers", (PyCFunction)Qt_VDSetupBuffers, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, VdigBufferRecListHandle bufferList) -> (ComponentResult _rv)")},
-       {"VDGrabOneFrameAsync", (PyCFunction)Qt_VDGrabOneFrameAsync, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short buffer) -> (ComponentResult _rv)")},
-       {"VDDone", (PyCFunction)Qt_VDDone, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, short buffer) -> (ComponentResult _rv)")},
-       {"VDSetCompression", (PyCFunction)Qt_VDSetCompression, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, OSType compressType, short depth, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate) -> (ComponentResult _rv, Rect bounds)")},
-       {"VDCompressOneFrameAsync", (PyCFunction)Qt_VDCompressOneFrameAsync, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
-       {"VDGetImageDescription", (PyCFunction)Qt_VDGetImageDescription, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
-       {"VDResetCompressSequence", (PyCFunction)Qt_VDResetCompressSequence, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
-       {"VDSetCompressionOnOff", (PyCFunction)Qt_VDSetCompressionOnOff, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, Boolean state) -> (ComponentResult _rv)")},
-       {"VDGetCompressionTypes", (PyCFunction)Qt_VDGetCompressionTypes, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, VDCompressionListHandle h) -> (ComponentResult _rv)")},
-       {"VDSetTimeBase", (PyCFunction)Qt_VDSetTimeBase, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, TimeBase t) -> (ComponentResult _rv)")},
-       {"VDSetFrameRate", (PyCFunction)Qt_VDSetFrameRate, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, Fixed framesPerSecond) -> (ComponentResult _rv)")},
-       {"VDGetDataRate", (PyCFunction)Qt_VDGetDataRate, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long milliSecPerFrame, Fixed framesPerSecond, long bytesPerSecond)")},
-       {"VDGetSoundInputDriver", (PyCFunction)Qt_VDGetSoundInputDriver, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, Str255 soundDriverName) -> (ComponentResult _rv)")},
-       {"VDGetDMADepths", (PyCFunction)Qt_VDGetDMADepths, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long depthArray, long preferredDepth)")},
-       {"VDGetPreferredTimeScale", (PyCFunction)Qt_VDGetPreferredTimeScale, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, TimeScale preferred)")},
-       {"VDReleaseAsyncBuffers", (PyCFunction)Qt_VDReleaseAsyncBuffers, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
-       {"VDSetDataRate", (PyCFunction)Qt_VDSetDataRate, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, long bytesPerSecond) -> (ComponentResult _rv)")},
-       {"VDGetTimeCode", (PyCFunction)Qt_VDGetTimeCode, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, void * timeCodeFormat, void * timeCodeTime) -> (ComponentResult _rv, TimeRecord atTime)")},
-       {"VDUseSafeBuffers", (PyCFunction)Qt_VDUseSafeBuffers, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, Boolean useSafeBuffers) -> (ComponentResult _rv)")},
-       {"VDGetSoundInputSource", (PyCFunction)Qt_VDGetSoundInputSource, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, long videoInput) -> (ComponentResult _rv, long soundInput)")},
-       {"VDGetCompressionTime", (PyCFunction)Qt_VDGetCompressionTime, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, OSType compressionType, short depth) -> (ComponentResult _rv, Rect srcRect, CodecQ spatialQuality, CodecQ temporalQuality, unsigned long compressTime)")},
-       {"VDSetPreferredPacketSize", (PyCFunction)Qt_VDSetPreferredPacketSize, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, long preferredPacketSizeInBytes) -> (ComponentResult _rv)")},
-       {"VDSetPreferredImageDimensions", (PyCFunction)Qt_VDSetPreferredImageDimensions, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, long width, long height) -> (ComponentResult _rv)")},
-       {"VDGetPreferredImageDimensions", (PyCFunction)Qt_VDGetPreferredImageDimensions, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long width, long height)")},
-       {"VDGetInputName", (PyCFunction)Qt_VDGetInputName, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, long videoInput, Str255 name) -> (ComponentResult _rv)")},
-       {"VDSetDestinationPort", (PyCFunction)Qt_VDSetDestinationPort, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, CGrafPtr destPort) -> (ComponentResult _rv)")},
-       {"VDGetDeviceNameAndFlags", (PyCFunction)Qt_VDGetDeviceNameAndFlags, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, Str255 outName) -> (ComponentResult _rv, UInt32 outNameFlags)")},
-       {"VDCaptureStateChanging", (PyCFunction)Qt_VDCaptureStateChanging, 1,
-        PyDoc_STR("(VideoDigitizerComponent ci, UInt32 inStateFlags) -> (ComponentResult _rv)")},
-       {"XMLParseGetDetailedParseError", (PyCFunction)Qt_XMLParseGetDetailedParseError, 1,
-        PyDoc_STR("(ComponentInstance aParser, StringPtr errDesc) -> (ComponentResult _rv, long errorLine)")},
-       {"XMLParseAddElement", (PyCFunction)Qt_XMLParseAddElement, 1,
-        PyDoc_STR("(ComponentInstance aParser, UInt32 nameSpaceID, long elementFlags) -> (ComponentResult _rv, char elementName, UInt32 elementID)")},
-       {"XMLParseAddAttribute", (PyCFunction)Qt_XMLParseAddAttribute, 1,
-        PyDoc_STR("(ComponentInstance aParser, UInt32 elementID, UInt32 nameSpaceID) -> (ComponentResult _rv, char attributeName, UInt32 attributeID)")},
-       {"XMLParseAddMultipleAttributes", (PyCFunction)Qt_XMLParseAddMultipleAttributes, 1,
-        PyDoc_STR("(ComponentInstance aParser, UInt32 elementID) -> (ComponentResult _rv, UInt32 nameSpaceIDs, char attributeNames, UInt32 attributeIDs)")},
-       {"XMLParseAddAttributeAndValue", (PyCFunction)Qt_XMLParseAddAttributeAndValue, 1,
-        PyDoc_STR("(ComponentInstance aParser, UInt32 elementID, UInt32 nameSpaceID, UInt32 attributeValueKind, void * attributeValueKindInfo) -> (ComponentResult _rv, char attributeName, UInt32 attributeID)")},
-       {"XMLParseAddAttributeValueKind", (PyCFunction)Qt_XMLParseAddAttributeValueKind, 1,
-        PyDoc_STR("(ComponentInstance aParser, UInt32 elementID, UInt32 attributeID, UInt32 attributeValueKind, void * attributeValueKindInfo) -> (ComponentResult _rv)")},
-       {"XMLParseAddNameSpace", (PyCFunction)Qt_XMLParseAddNameSpace, 1,
-        PyDoc_STR("(ComponentInstance aParser) -> (ComponentResult _rv, char nameSpaceURL, UInt32 nameSpaceID)")},
-       {"XMLParseSetOffsetAndLimit", (PyCFunction)Qt_XMLParseSetOffsetAndLimit, 1,
-        PyDoc_STR("(ComponentInstance aParser, UInt32 offset, UInt32 limit) -> (ComponentResult _rv)")},
-       {"XMLParseSetEventParseRefCon", (PyCFunction)Qt_XMLParseSetEventParseRefCon, 1,
-        PyDoc_STR("(ComponentInstance aParser, long refcon) -> (ComponentResult _rv)")},
-       {"SGInitialize", (PyCFunction)Qt_SGInitialize, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
-       {"SGSetDataOutput", (PyCFunction)Qt_SGSetDataOutput, 1,
-        PyDoc_STR("(SeqGrabComponent s, FSSpec movieFile, long whereFlags) -> (ComponentResult _rv)")},
-       {"SGGetDataOutput", (PyCFunction)Qt_SGGetDataOutput, 1,
-        PyDoc_STR("(SeqGrabComponent s, FSSpec movieFile) -> (ComponentResult _rv, long whereFlags)")},
-       {"SGSetGWorld", (PyCFunction)Qt_SGSetGWorld, 1,
-        PyDoc_STR("(SeqGrabComponent s, CGrafPtr gp, GDHandle gd) -> (ComponentResult _rv)")},
-       {"SGGetGWorld", (PyCFunction)Qt_SGGetGWorld, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, CGrafPtr gp, GDHandle gd)")},
-       {"SGNewChannel", (PyCFunction)Qt_SGNewChannel, 1,
-        PyDoc_STR("(SeqGrabComponent s, OSType channelType) -> (ComponentResult _rv, SGChannel ref)")},
-       {"SGDisposeChannel", (PyCFunction)Qt_SGDisposeChannel, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c) -> (ComponentResult _rv)")},
-       {"SGStartPreview", (PyCFunction)Qt_SGStartPreview, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
-       {"SGStartRecord", (PyCFunction)Qt_SGStartRecord, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
-       {"SGIdle", (PyCFunction)Qt_SGIdle, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
-       {"SGStop", (PyCFunction)Qt_SGStop, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
-       {"SGPause", (PyCFunction)Qt_SGPause, 1,
-        PyDoc_STR("(SeqGrabComponent s, Boolean pause) -> (ComponentResult _rv)")},
-       {"SGPrepare", (PyCFunction)Qt_SGPrepare, 1,
-        PyDoc_STR("(SeqGrabComponent s, Boolean prepareForPreview, Boolean prepareForRecord) -> (ComponentResult _rv)")},
-       {"SGRelease", (PyCFunction)Qt_SGRelease, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
-       {"SGGetMovie", (PyCFunction)Qt_SGGetMovie, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (Movie _rv)")},
-       {"SGSetMaximumRecordTime", (PyCFunction)Qt_SGSetMaximumRecordTime, 1,
-        PyDoc_STR("(SeqGrabComponent s, unsigned long ticks) -> (ComponentResult _rv)")},
-       {"SGGetMaximumRecordTime", (PyCFunction)Qt_SGGetMaximumRecordTime, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, unsigned long ticks)")},
-       {"SGGetStorageSpaceRemaining", (PyCFunction)Qt_SGGetStorageSpaceRemaining, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, unsigned long bytes)")},
-       {"SGGetTimeRemaining", (PyCFunction)Qt_SGGetTimeRemaining, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, long ticksLeft)")},
-       {"SGGrabPict", (PyCFunction)Qt_SGGrabPict, 1,
-        PyDoc_STR("(SeqGrabComponent s, Rect bounds, short offscreenDepth, long grabPictFlags) -> (ComponentResult _rv, PicHandle p)")},
-       {"SGGetLastMovieResID", (PyCFunction)Qt_SGGetLastMovieResID, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, short resID)")},
-       {"SGSetFlags", (PyCFunction)Qt_SGSetFlags, 1,
-        PyDoc_STR("(SeqGrabComponent s, long sgFlags) -> (ComponentResult _rv)")},
-       {"SGGetFlags", (PyCFunction)Qt_SGGetFlags, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, long sgFlags)")},
-       {"SGNewChannelFromComponent", (PyCFunction)Qt_SGNewChannelFromComponent, 1,
-        PyDoc_STR("(SeqGrabComponent s, Component sgChannelComponent) -> (ComponentResult _rv, SGChannel newChannel)")},
-       {"SGSetSettings", (PyCFunction)Qt_SGSetSettings, 1,
-        PyDoc_STR("(SeqGrabComponent s, UserData ud, long flags) -> (ComponentResult _rv)")},
-       {"SGGetSettings", (PyCFunction)Qt_SGGetSettings, 1,
-        PyDoc_STR("(SeqGrabComponent s, long flags) -> (ComponentResult _rv, UserData ud)")},
-       {"SGGetIndChannel", (PyCFunction)Qt_SGGetIndChannel, 1,
-        PyDoc_STR("(SeqGrabComponent s, short index) -> (ComponentResult _rv, SGChannel ref, OSType chanType)")},
-       {"SGUpdate", (PyCFunction)Qt_SGUpdate, 1,
-        PyDoc_STR("(SeqGrabComponent s, RgnHandle updateRgn) -> (ComponentResult _rv)")},
-       {"SGGetPause", (PyCFunction)Qt_SGGetPause, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Boolean paused)")},
-       {"SGSetChannelSettings", (PyCFunction)Qt_SGSetChannelSettings, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, UserData ud, long flags) -> (ComponentResult _rv)")},
-       {"SGGetChannelSettings", (PyCFunction)Qt_SGGetChannelSettings, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, long flags) -> (ComponentResult _rv, UserData ud)")},
-       {"SGGetMode", (PyCFunction)Qt_SGGetMode, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Boolean previewMode, Boolean recordMode)")},
-       {"SGSetDataRef", (PyCFunction)Qt_SGSetDataRef, 1,
-        PyDoc_STR("(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags) -> (ComponentResult _rv)")},
-       {"SGGetDataRef", (PyCFunction)Qt_SGGetDataRef, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType, long whereFlags)")},
-       {"SGNewOutput", (PyCFunction)Qt_SGNewOutput, 1,
-        PyDoc_STR("(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags) -> (ComponentResult _rv, SGOutput sgOut)")},
-       {"SGDisposeOutput", (PyCFunction)Qt_SGDisposeOutput, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv)")},
-       {"SGSetOutputFlags", (PyCFunction)Qt_SGSetOutputFlags, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, long whereFlags) -> (ComponentResult _rv)")},
-       {"SGSetChannelOutput", (PyCFunction)Qt_SGSetChannelOutput, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, SGOutput sgOut) -> (ComponentResult _rv)")},
-       {"SGGetDataOutputStorageSpaceRemaining", (PyCFunction)Qt_SGGetDataOutputStorageSpaceRemaining, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, unsigned long space)")},
-       {"SGHandleUpdateEvent", (PyCFunction)Qt_SGHandleUpdateEvent, 1,
-        PyDoc_STR("(SeqGrabComponent s, EventRecord event) -> (ComponentResult _rv, Boolean handled)")},
-       {"SGSetOutputNextOutput", (PyCFunction)Qt_SGSetOutputNextOutput, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, SGOutput nextOut) -> (ComponentResult _rv)")},
-       {"SGGetOutputNextOutput", (PyCFunction)Qt_SGGetOutputNextOutput, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, SGOutput nextOut)")},
-       {"SGSetOutputMaximumOffset", (PyCFunction)Qt_SGSetOutputMaximumOffset, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, wide maxOffset) -> (ComponentResult _rv)")},
-       {"SGGetOutputMaximumOffset", (PyCFunction)Qt_SGGetOutputMaximumOffset, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, wide maxOffset)")},
-       {"SGGetOutputDataReference", (PyCFunction)Qt_SGGetOutputDataReference, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
-       {"SGWriteExtendedMovieData", (PyCFunction)Qt_SGWriteExtendedMovieData, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len) -> (ComponentResult _rv, wide offset, SGOutput sgOut)")},
-       {"SGGetStorageSpaceRemaining64", (PyCFunction)Qt_SGGetStorageSpaceRemaining64, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, wide bytes)")},
-       {"SGGetDataOutputStorageSpaceRemaining64", (PyCFunction)Qt_SGGetDataOutputStorageSpaceRemaining64, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, wide space)")},
-       {"SGWriteMovieData", (PyCFunction)Qt_SGWriteMovieData, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len) -> (ComponentResult _rv, long offset)")},
-       {"SGGetTimeBase", (PyCFunction)Qt_SGGetTimeBase, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, TimeBase tb)")},
-       {"SGAddMovieData", (PyCFunction)Qt_SGAddMovieData, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len, long chRefCon, TimeValue time, short writeType) -> (ComponentResult _rv, long offset)")},
-       {"SGChangedSource", (PyCFunction)Qt_SGChangedSource, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c) -> (ComponentResult _rv)")},
-       {"SGAddExtendedMovieData", (PyCFunction)Qt_SGAddExtendedMovieData, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len, long chRefCon, TimeValue time, short writeType) -> (ComponentResult _rv, wide offset, SGOutput whichOutput)")},
-       {"SGAddOutputDataRefToMedia", (PyCFunction)Qt_SGAddOutputDataRefToMedia, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, Media theMedia, SampleDescriptionHandle desc) -> (ComponentResult _rv)")},
-       {"SGSetSettingsSummary", (PyCFunction)Qt_SGSetSettingsSummary, 1,
-        PyDoc_STR("(SeqGrabComponent s, Handle summaryText) -> (ComponentResult _rv)")},
-       {"SGSetChannelUsage", (PyCFunction)Qt_SGSetChannelUsage, 1,
-        PyDoc_STR("(SGChannel c, long usage) -> (ComponentResult _rv)")},
-       {"SGGetChannelUsage", (PyCFunction)Qt_SGGetChannelUsage, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long usage)")},
-       {"SGSetChannelBounds", (PyCFunction)Qt_SGSetChannelBounds, 1,
-        PyDoc_STR("(SGChannel c, Rect bounds) -> (ComponentResult _rv)")},
-       {"SGGetChannelBounds", (PyCFunction)Qt_SGGetChannelBounds, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect bounds)")},
-       {"SGSetChannelVolume", (PyCFunction)Qt_SGSetChannelVolume, 1,
-        PyDoc_STR("(SGChannel c, short volume) -> (ComponentResult _rv)")},
-       {"SGGetChannelVolume", (PyCFunction)Qt_SGGetChannelVolume, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short volume)")},
-       {"SGGetChannelInfo", (PyCFunction)Qt_SGGetChannelInfo, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long channelInfo)")},
-       {"SGSetChannelPlayFlags", (PyCFunction)Qt_SGSetChannelPlayFlags, 1,
-        PyDoc_STR("(SGChannel c, long playFlags) -> (ComponentResult _rv)")},
-       {"SGGetChannelPlayFlags", (PyCFunction)Qt_SGGetChannelPlayFlags, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long playFlags)")},
-       {"SGSetChannelMaxFrames", (PyCFunction)Qt_SGSetChannelMaxFrames, 1,
-        PyDoc_STR("(SGChannel c, long frameCount) -> (ComponentResult _rv)")},
-       {"SGGetChannelMaxFrames", (PyCFunction)Qt_SGGetChannelMaxFrames, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long frameCount)")},
-       {"SGSetChannelRefCon", (PyCFunction)Qt_SGSetChannelRefCon, 1,
-        PyDoc_STR("(SGChannel c, long refCon) -> (ComponentResult _rv)")},
-       {"SGSetChannelClip", (PyCFunction)Qt_SGSetChannelClip, 1,
-        PyDoc_STR("(SGChannel c, RgnHandle theClip) -> (ComponentResult _rv)")},
-       {"SGGetChannelClip", (PyCFunction)Qt_SGGetChannelClip, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, RgnHandle theClip)")},
-       {"SGGetChannelSampleDescription", (PyCFunction)Qt_SGGetChannelSampleDescription, 1,
-        PyDoc_STR("(SGChannel c, Handle sampleDesc) -> (ComponentResult _rv)")},
-       {"SGSetChannelDevice", (PyCFunction)Qt_SGSetChannelDevice, 1,
-        PyDoc_STR("(SGChannel c, StringPtr name) -> (ComponentResult _rv)")},
-       {"SGGetChannelTimeScale", (PyCFunction)Qt_SGGetChannelTimeScale, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, TimeScale scale)")},
-       {"SGChannelPutPicture", (PyCFunction)Qt_SGChannelPutPicture, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv)")},
-       {"SGChannelSetRequestedDataRate", (PyCFunction)Qt_SGChannelSetRequestedDataRate, 1,
-        PyDoc_STR("(SGChannel c, long bytesPerSecond) -> (ComponentResult _rv)")},
-       {"SGChannelGetRequestedDataRate", (PyCFunction)Qt_SGChannelGetRequestedDataRate, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long bytesPerSecond)")},
-       {"SGChannelSetDataSourceName", (PyCFunction)Qt_SGChannelSetDataSourceName, 1,
-        PyDoc_STR("(SGChannel c, Str255 name, ScriptCode scriptTag) -> (ComponentResult _rv)")},
-       {"SGChannelGetDataSourceName", (PyCFunction)Qt_SGChannelGetDataSourceName, 1,
-        PyDoc_STR("(SGChannel c, Str255 name) -> (ComponentResult _rv, ScriptCode scriptTag)")},
-       {"SGChannelSetCodecSettings", (PyCFunction)Qt_SGChannelSetCodecSettings, 1,
-        PyDoc_STR("(SGChannel c, Handle settings) -> (ComponentResult _rv)")},
-       {"SGChannelGetCodecSettings", (PyCFunction)Qt_SGChannelGetCodecSettings, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Handle settings)")},
-       {"SGGetChannelTimeBase", (PyCFunction)Qt_SGGetChannelTimeBase, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, TimeBase tb)")},
-       {"SGGetChannelRefCon", (PyCFunction)Qt_SGGetChannelRefCon, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long refCon)")},
-       {"SGGetChannelDeviceAndInputNames", (PyCFunction)Qt_SGGetChannelDeviceAndInputNames, 1,
-        PyDoc_STR("(SGChannel c, Str255 outDeviceName, Str255 outInputName) -> (ComponentResult _rv, short outInputNumber)")},
-       {"SGSetChannelDeviceInput", (PyCFunction)Qt_SGSetChannelDeviceInput, 1,
-        PyDoc_STR("(SGChannel c, short inInputNumber) -> (ComponentResult _rv)")},
-       {"SGSetChannelSettingsStateChanging", (PyCFunction)Qt_SGSetChannelSettingsStateChanging, 1,
-        PyDoc_STR("(SGChannel c, UInt32 inFlags) -> (ComponentResult _rv)")},
-       {"SGInitChannel", (PyCFunction)Qt_SGInitChannel, 1,
-        PyDoc_STR("(SGChannel c, SeqGrabComponent owner) -> (ComponentResult _rv)")},
-       {"SGWriteSamples", (PyCFunction)Qt_SGWriteSamples, 1,
-        PyDoc_STR("(SGChannel c, Movie m, AliasHandle theFile) -> (ComponentResult _rv)")},
-       {"SGGetDataRate", (PyCFunction)Qt_SGGetDataRate, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long bytesPerSecond)")},
-       {"SGAlignChannelRect", (PyCFunction)Qt_SGAlignChannelRect, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect r)")},
-       {"SGPanelGetDitl", (PyCFunction)Qt_SGPanelGetDitl, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Handle ditl)")},
-       {"SGPanelGetTitle", (PyCFunction)Qt_SGPanelGetTitle, 1,
-        PyDoc_STR("(SeqGrabComponent s, Str255 title) -> (ComponentResult _rv)")},
-       {"SGPanelCanRun", (PyCFunction)Qt_SGPanelCanRun, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c) -> (ComponentResult _rv)")},
-       {"SGPanelInstall", (PyCFunction)Qt_SGPanelInstall, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset) -> (ComponentResult _rv)")},
-       {"SGPanelEvent", (PyCFunction)Qt_SGPanelEvent, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, EventRecord theEvent) -> (ComponentResult _rv, short itemHit, Boolean handled)")},
-       {"SGPanelItem", (PyCFunction)Qt_SGPanelItem, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, short itemNum) -> (ComponentResult _rv)")},
-       {"SGPanelRemove", (PyCFunction)Qt_SGPanelRemove, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset) -> (ComponentResult _rv)")},
-       {"SGPanelSetGrabber", (PyCFunction)Qt_SGPanelSetGrabber, 1,
-        PyDoc_STR("(SeqGrabComponent s, SeqGrabComponent sg) -> (ComponentResult _rv)")},
-       {"SGPanelSetResFile", (PyCFunction)Qt_SGPanelSetResFile, 1,
-        PyDoc_STR("(SeqGrabComponent s, short resRef) -> (ComponentResult _rv)")},
-       {"SGPanelGetSettings", (PyCFunction)Qt_SGPanelGetSettings, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, long flags) -> (ComponentResult _rv, UserData ud)")},
-       {"SGPanelSetSettings", (PyCFunction)Qt_SGPanelSetSettings, 1,
-        PyDoc_STR("(SeqGrabComponent s, SGChannel c, UserData ud, long flags) -> (ComponentResult _rv)")},
-       {"SGPanelValidateInput", (PyCFunction)Qt_SGPanelValidateInput, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Boolean ok)")},
-       {"SGPanelGetDITLForSize", (PyCFunction)Qt_SGPanelGetDITLForSize, 1,
-        PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Handle ditl, Point requestedSize)")},
-       {"SGGetSrcVideoBounds", (PyCFunction)Qt_SGGetSrcVideoBounds, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect r)")},
-       {"SGSetVideoRect", (PyCFunction)Qt_SGSetVideoRect, 1,
-        PyDoc_STR("(SGChannel c, Rect r) -> (ComponentResult _rv)")},
-       {"SGGetVideoRect", (PyCFunction)Qt_SGGetVideoRect, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect r)")},
-       {"SGGetVideoCompressorType", (PyCFunction)Qt_SGGetVideoCompressorType, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, OSType compressorType)")},
-       {"SGSetVideoCompressorType", (PyCFunction)Qt_SGSetVideoCompressorType, 1,
-        PyDoc_STR("(SGChannel c, OSType compressorType) -> (ComponentResult _rv)")},
-       {"SGSetVideoCompressor", (PyCFunction)Qt_SGSetVideoCompressor, 1,
-        PyDoc_STR("(SGChannel c, short depth, CompressorComponent compressor, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate) -> (ComponentResult _rv)")},
-       {"SGGetVideoCompressor", (PyCFunction)Qt_SGGetVideoCompressor, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short depth, CompressorComponent compressor, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate)")},
-       {"SGGetVideoDigitizerComponent", (PyCFunction)Qt_SGGetVideoDigitizerComponent, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentInstance _rv)")},
-       {"SGSetVideoDigitizerComponent", (PyCFunction)Qt_SGSetVideoDigitizerComponent, 1,
-        PyDoc_STR("(SGChannel c, ComponentInstance vdig) -> (ComponentResult _rv)")},
-       {"SGVideoDigitizerChanged", (PyCFunction)Qt_SGVideoDigitizerChanged, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv)")},
-       {"SGGrabFrame", (PyCFunction)Qt_SGGrabFrame, 1,
-        PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv)")},
-       {"SGGrabFrameComplete", (PyCFunction)Qt_SGGrabFrameComplete, 1,
-        PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv, Boolean done)")},
-       {"SGCompressFrame", (PyCFunction)Qt_SGCompressFrame, 1,
-        PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv)")},
-       {"SGSetCompressBuffer", (PyCFunction)Qt_SGSetCompressBuffer, 1,
-        PyDoc_STR("(SGChannel c, short depth, Rect compressSize) -> (ComponentResult _rv)")},
-       {"SGGetCompressBuffer", (PyCFunction)Qt_SGGetCompressBuffer, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short depth, Rect compressSize)")},
-       {"SGGetBufferInfo", (PyCFunction)Qt_SGGetBufferInfo, 1,
-        PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv, PixMapHandle bufferPM, Rect bufferRect, GWorldPtr compressBuffer, Rect compressBufferRect)")},
-       {"SGSetUseScreenBuffer", (PyCFunction)Qt_SGSetUseScreenBuffer, 1,
-        PyDoc_STR("(SGChannel c, Boolean useScreenBuffer) -> (ComponentResult _rv)")},
-       {"SGGetUseScreenBuffer", (PyCFunction)Qt_SGGetUseScreenBuffer, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Boolean useScreenBuffer)")},
-       {"SGSetFrameRate", (PyCFunction)Qt_SGSetFrameRate, 1,
-        PyDoc_STR("(SGChannel c, Fixed frameRate) -> (ComponentResult _rv)")},
-       {"SGGetFrameRate", (PyCFunction)Qt_SGGetFrameRate, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Fixed frameRate)")},
-       {"SGSetPreferredPacketSize", (PyCFunction)Qt_SGSetPreferredPacketSize, 1,
-        PyDoc_STR("(SGChannel c, long preferredPacketSizeInBytes) -> (ComponentResult _rv)")},
-       {"SGGetPreferredPacketSize", (PyCFunction)Qt_SGGetPreferredPacketSize, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long preferredPacketSizeInBytes)")},
-       {"SGSetUserVideoCompressorList", (PyCFunction)Qt_SGSetUserVideoCompressorList, 1,
-        PyDoc_STR("(SGChannel c, Handle compressorTypes) -> (ComponentResult _rv)")},
-       {"SGGetUserVideoCompressorList", (PyCFunction)Qt_SGGetUserVideoCompressorList, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Handle compressorTypes)")},
-       {"SGSetSoundInputDriver", (PyCFunction)Qt_SGSetSoundInputDriver, 1,
-        PyDoc_STR("(SGChannel c, Str255 driverName) -> (ComponentResult _rv)")},
-       {"SGGetSoundInputDriver", (PyCFunction)Qt_SGGetSoundInputDriver, 1,
-        PyDoc_STR("(SGChannel c) -> (long _rv)")},
-       {"SGSoundInputDriverChanged", (PyCFunction)Qt_SGSoundInputDriverChanged, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv)")},
-       {"SGSetSoundRecordChunkSize", (PyCFunction)Qt_SGSetSoundRecordChunkSize, 1,
-        PyDoc_STR("(SGChannel c, long seconds) -> (ComponentResult _rv)")},
-       {"SGGetSoundRecordChunkSize", (PyCFunction)Qt_SGGetSoundRecordChunkSize, 1,
-        PyDoc_STR("(SGChannel c) -> (long _rv)")},
-       {"SGSetSoundInputRate", (PyCFunction)Qt_SGSetSoundInputRate, 1,
-        PyDoc_STR("(SGChannel c, Fixed rate) -> (ComponentResult _rv)")},
-       {"SGGetSoundInputRate", (PyCFunction)Qt_SGGetSoundInputRate, 1,
-        PyDoc_STR("(SGChannel c) -> (Fixed _rv)")},
-       {"SGSetSoundInputParameters", (PyCFunction)Qt_SGSetSoundInputParameters, 1,
-        PyDoc_STR("(SGChannel c, short sampleSize, short numChannels, OSType compressionType) -> (ComponentResult _rv)")},
-       {"SGGetSoundInputParameters", (PyCFunction)Qt_SGGetSoundInputParameters, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short sampleSize, short numChannels, OSType compressionType)")},
-       {"SGSetAdditionalSoundRates", (PyCFunction)Qt_SGSetAdditionalSoundRates, 1,
-        PyDoc_STR("(SGChannel c, Handle rates) -> (ComponentResult _rv)")},
-       {"SGGetAdditionalSoundRates", (PyCFunction)Qt_SGGetAdditionalSoundRates, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Handle rates)")},
-       {"SGSetFontName", (PyCFunction)Qt_SGSetFontName, 1,
-        PyDoc_STR("(SGChannel c, StringPtr pstr) -> (ComponentResult _rv)")},
-       {"SGSetFontSize", (PyCFunction)Qt_SGSetFontSize, 1,
-        PyDoc_STR("(SGChannel c, short fontSize) -> (ComponentResult _rv)")},
-       {"SGSetTextForeColor", (PyCFunction)Qt_SGSetTextForeColor, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, RGBColor theColor)")},
-       {"SGSetTextBackColor", (PyCFunction)Qt_SGSetTextBackColor, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, RGBColor theColor)")},
-       {"SGSetJustification", (PyCFunction)Qt_SGSetJustification, 1,
-        PyDoc_STR("(SGChannel c, short just) -> (ComponentResult _rv)")},
-       {"SGGetTextReturnToSpaceValue", (PyCFunction)Qt_SGGetTextReturnToSpaceValue, 1,
-        PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short rettospace)")},
-       {"SGSetTextReturnToSpaceValue", (PyCFunction)Qt_SGSetTextReturnToSpaceValue, 1,
-        PyDoc_STR("(SGChannel c, short rettospace) -> (ComponentResult _rv)")},
-       {"QTVideoOutputGetCurrentClientName", (PyCFunction)Qt_QTVideoOutputGetCurrentClientName, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo, Str255 str) -> (ComponentResult _rv)")},
-       {"QTVideoOutputSetClientName", (PyCFunction)Qt_QTVideoOutputSetClientName, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo, Str255 str) -> (ComponentResult _rv)")},
-       {"QTVideoOutputGetClientName", (PyCFunction)Qt_QTVideoOutputGetClientName, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo, Str255 str) -> (ComponentResult _rv)")},
-       {"QTVideoOutputBegin", (PyCFunction)Qt_QTVideoOutputBegin, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv)")},
-       {"QTVideoOutputEnd", (PyCFunction)Qt_QTVideoOutputEnd, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv)")},
-       {"QTVideoOutputSetDisplayMode", (PyCFunction)Qt_QTVideoOutputSetDisplayMode, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo, long displayModeID) -> (ComponentResult _rv)")},
-       {"QTVideoOutputGetDisplayMode", (PyCFunction)Qt_QTVideoOutputGetDisplayMode, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv, long displayModeID)")},
-       {"QTVideoOutputGetGWorld", (PyCFunction)Qt_QTVideoOutputGetGWorld, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv, GWorldPtr gw)")},
-       {"QTVideoOutputGetIndSoundOutput", (PyCFunction)Qt_QTVideoOutputGetIndSoundOutput, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo, long index) -> (ComponentResult _rv, Component outputComponent)")},
-       {"QTVideoOutputGetClock", (PyCFunction)Qt_QTVideoOutputGetClock, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv, ComponentInstance clock)")},
-       {"QTVideoOutputSetEchoPort", (PyCFunction)Qt_QTVideoOutputSetEchoPort, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo, CGrafPtr echoPort) -> (ComponentResult _rv)")},
-       {"QTVideoOutputGetIndImageDecompressor", (PyCFunction)Qt_QTVideoOutputGetIndImageDecompressor, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo, long index) -> (ComponentResult _rv, Component codec)")},
-       {"QTVideoOutputBaseSetEchoPort", (PyCFunction)Qt_QTVideoOutputBaseSetEchoPort, 1,
-        PyDoc_STR("(QTVideoOutputComponent vo, CGrafPtr echoPort) -> (ComponentResult _rv)")},
-       {"MediaSetChunkManagementFlags", (PyCFunction)Qt_MediaSetChunkManagementFlags, 1,
-        PyDoc_STR("(MediaHandler mh, UInt32 flags, UInt32 flagsMask) -> (ComponentResult _rv)")},
-       {"MediaGetChunkManagementFlags", (PyCFunction)Qt_MediaGetChunkManagementFlags, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt32 flags)")},
-       {"MediaSetPurgeableChunkMemoryAllowance", (PyCFunction)Qt_MediaSetPurgeableChunkMemoryAllowance, 1,
-        PyDoc_STR("(MediaHandler mh, Size allowance) -> (ComponentResult _rv)")},
-       {"MediaGetPurgeableChunkMemoryAllowance", (PyCFunction)Qt_MediaGetPurgeableChunkMemoryAllowance, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Size allowance)")},
-       {"MediaEmptyAllPurgeableChunks", (PyCFunction)Qt_MediaEmptyAllPurgeableChunks, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
-       {"MediaSetHandlerCapabilities", (PyCFunction)Qt_MediaSetHandlerCapabilities, 1,
-        PyDoc_STR("(MediaHandler mh, long flags, long flagsMask) -> (ComponentResult _rv)")},
-       {"MediaIdle", (PyCFunction)Qt_MediaIdle, 1,
-        PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long flagsIn, TimeRecord movieTime) -> (ComponentResult _rv, long flagsOut)")},
-       {"MediaGetMediaInfo", (PyCFunction)Qt_MediaGetMediaInfo, 1,
-        PyDoc_STR("(MediaHandler mh, Handle h) -> (ComponentResult _rv)")},
-       {"MediaPutMediaInfo", (PyCFunction)Qt_MediaPutMediaInfo, 1,
-        PyDoc_STR("(MediaHandler mh, Handle h) -> (ComponentResult _rv)")},
-       {"MediaSetActive", (PyCFunction)Qt_MediaSetActive, 1,
-        PyDoc_STR("(MediaHandler mh, Boolean enableMedia) -> (ComponentResult _rv)")},
-       {"MediaSetRate", (PyCFunction)Qt_MediaSetRate, 1,
-        PyDoc_STR("(MediaHandler mh, Fixed rate) -> (ComponentResult _rv)")},
-       {"MediaGGetStatus", (PyCFunction)Qt_MediaGGetStatus, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, ComponentResult statusErr)")},
-       {"MediaTrackEdited", (PyCFunction)Qt_MediaTrackEdited, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
-       {"MediaSetMediaTimeScale", (PyCFunction)Qt_MediaSetMediaTimeScale, 1,
-        PyDoc_STR("(MediaHandler mh, TimeScale newTimeScale) -> (ComponentResult _rv)")},
-       {"MediaSetMovieTimeScale", (PyCFunction)Qt_MediaSetMovieTimeScale, 1,
-        PyDoc_STR("(MediaHandler mh, TimeScale newTimeScale) -> (ComponentResult _rv)")},
-       {"MediaSetGWorld", (PyCFunction)Qt_MediaSetGWorld, 1,
-        PyDoc_STR("(MediaHandler mh, CGrafPtr aPort, GDHandle aGD) -> (ComponentResult _rv)")},
-       {"MediaSetDimensions", (PyCFunction)Qt_MediaSetDimensions, 1,
-        PyDoc_STR("(MediaHandler mh, Fixed width, Fixed height) -> (ComponentResult _rv)")},
-       {"MediaSetClip", (PyCFunction)Qt_MediaSetClip, 1,
-        PyDoc_STR("(MediaHandler mh, RgnHandle theClip) -> (ComponentResult _rv)")},
-       {"MediaGetTrackOpaque", (PyCFunction)Qt_MediaGetTrackOpaque, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Boolean trackIsOpaque)")},
-       {"MediaSetGraphicsMode", (PyCFunction)Qt_MediaSetGraphicsMode, 1,
-        PyDoc_STR("(MediaHandler mh, long mode, RGBColor opColor) -> (ComponentResult _rv)")},
-       {"MediaGetGraphicsMode", (PyCFunction)Qt_MediaGetGraphicsMode, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long mode, RGBColor opColor)")},
-       {"MediaGSetVolume", (PyCFunction)Qt_MediaGSetVolume, 1,
-        PyDoc_STR("(MediaHandler mh, short volume) -> (ComponentResult _rv)")},
-       {"MediaSetSoundBalance", (PyCFunction)Qt_MediaSetSoundBalance, 1,
-        PyDoc_STR("(MediaHandler mh, short balance) -> (ComponentResult _rv)")},
-       {"MediaGetSoundBalance", (PyCFunction)Qt_MediaGetSoundBalance, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short balance)")},
-       {"MediaGetNextBoundsChange", (PyCFunction)Qt_MediaGetNextBoundsChange, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, TimeValue when)")},
-       {"MediaGetSrcRgn", (PyCFunction)Qt_MediaGetSrcRgn, 1,
-        PyDoc_STR("(MediaHandler mh, RgnHandle rgn, TimeValue atMediaTime) -> (ComponentResult _rv)")},
-       {"MediaPreroll", (PyCFunction)Qt_MediaPreroll, 1,
-        PyDoc_STR("(MediaHandler mh, TimeValue time, Fixed rate) -> (ComponentResult _rv)")},
-       {"MediaSampleDescriptionChanged", (PyCFunction)Qt_MediaSampleDescriptionChanged, 1,
-        PyDoc_STR("(MediaHandler mh, long index) -> (ComponentResult _rv)")},
-       {"MediaHasCharacteristic", (PyCFunction)Qt_MediaHasCharacteristic, 1,
-        PyDoc_STR("(MediaHandler mh, OSType characteristic) -> (ComponentResult _rv, Boolean hasIt)")},
-       {"MediaGetOffscreenBufferSize", (PyCFunction)Qt_MediaGetOffscreenBufferSize, 1,
-        PyDoc_STR("(MediaHandler mh, short depth, CTabHandle ctab) -> (ComponentResult _rv, Rect bounds)")},
-       {"MediaSetHints", (PyCFunction)Qt_MediaSetHints, 1,
-        PyDoc_STR("(MediaHandler mh, long hints) -> (ComponentResult _rv)")},
-       {"MediaGetName", (PyCFunction)Qt_MediaGetName, 1,
-        PyDoc_STR("(MediaHandler mh, Str255 name, long requestedLanguage) -> (ComponentResult _rv, long actualLanguage)")},
-       {"MediaForceUpdate", (PyCFunction)Qt_MediaForceUpdate, 1,
-        PyDoc_STR("(MediaHandler mh, long forceUpdateFlags) -> (ComponentResult _rv)")},
-       {"MediaGetDrawingRgn", (PyCFunction)Qt_MediaGetDrawingRgn, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, RgnHandle partialRgn)")},
-       {"MediaGSetActiveSegment", (PyCFunction)Qt_MediaGSetActiveSegment, 1,
-        PyDoc_STR("(MediaHandler mh, TimeValue activeStart, TimeValue activeDuration) -> (ComponentResult _rv)")},
-       {"MediaInvalidateRegion", (PyCFunction)Qt_MediaInvalidateRegion, 1,
-        PyDoc_STR("(MediaHandler mh, RgnHandle invalRgn) -> (ComponentResult _rv)")},
-       {"MediaGetNextStepTime", (PyCFunction)Qt_MediaGetNextStepTime, 1,
-        PyDoc_STR("(MediaHandler mh, short flags, TimeValue mediaTimeIn, Fixed rate) -> (ComponentResult _rv, TimeValue mediaTimeOut)")},
-       {"MediaChangedNonPrimarySource", (PyCFunction)Qt_MediaChangedNonPrimarySource, 1,
-        PyDoc_STR("(MediaHandler mh, long inputIndex) -> (ComponentResult _rv)")},
-       {"MediaTrackReferencesChanged", (PyCFunction)Qt_MediaTrackReferencesChanged, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
-       {"MediaReleaseSampleDataPointer", (PyCFunction)Qt_MediaReleaseSampleDataPointer, 1,
-        PyDoc_STR("(MediaHandler mh, long sampleNum) -> (ComponentResult _rv)")},
-       {"MediaTrackPropertyAtomChanged", (PyCFunction)Qt_MediaTrackPropertyAtomChanged, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
-       {"MediaSetVideoParam", (PyCFunction)Qt_MediaSetVideoParam, 1,
-        PyDoc_STR("(MediaHandler mh, long whichParam) -> (ComponentResult _rv, unsigned short value)")},
-       {"MediaGetVideoParam", (PyCFunction)Qt_MediaGetVideoParam, 1,
-        PyDoc_STR("(MediaHandler mh, long whichParam) -> (ComponentResult _rv, unsigned short value)")},
-       {"MediaCompare", (PyCFunction)Qt_MediaCompare, 1,
-        PyDoc_STR("(MediaHandler mh, Media srcMedia, ComponentInstance srcMediaComponent) -> (ComponentResult _rv, Boolean isOK)")},
-       {"MediaGetClock", (PyCFunction)Qt_MediaGetClock, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, ComponentInstance clock)")},
-       {"MediaSetSoundOutputComponent", (PyCFunction)Qt_MediaSetSoundOutputComponent, 1,
-        PyDoc_STR("(MediaHandler mh, Component outputComponent) -> (ComponentResult _rv)")},
-       {"MediaGetSoundOutputComponent", (PyCFunction)Qt_MediaGetSoundOutputComponent, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Component outputComponent)")},
-       {"MediaSetSoundLocalizationData", (PyCFunction)Qt_MediaSetSoundLocalizationData, 1,
-        PyDoc_STR("(MediaHandler mh, Handle data) -> (ComponentResult _rv)")},
-       {"MediaGetInvalidRegion", (PyCFunction)Qt_MediaGetInvalidRegion, 1,
-        PyDoc_STR("(MediaHandler mh, RgnHandle rgn) -> (ComponentResult _rv)")},
-       {"MediaSampleDescriptionB2N", (PyCFunction)Qt_MediaSampleDescriptionB2N, 1,
-        PyDoc_STR("(MediaHandler mh, SampleDescriptionHandle sampleDescriptionH) -> (ComponentResult _rv)")},
-       {"MediaSampleDescriptionN2B", (PyCFunction)Qt_MediaSampleDescriptionN2B, 1,
-        PyDoc_STR("(MediaHandler mh, SampleDescriptionHandle sampleDescriptionH) -> (ComponentResult _rv)")},
-       {"MediaFlushNonPrimarySourceData", (PyCFunction)Qt_MediaFlushNonPrimarySourceData, 1,
-        PyDoc_STR("(MediaHandler mh, long inputIndex) -> (ComponentResult _rv)")},
-       {"MediaGetURLLink", (PyCFunction)Qt_MediaGetURLLink, 1,
-        PyDoc_STR("(MediaHandler mh, Point displayWhere) -> (ComponentResult _rv, Handle urlLink)")},
-       {"MediaHitTestForTargetRefCon", (PyCFunction)Qt_MediaHitTestForTargetRefCon, 1,
-        PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, long targetRefCon)")},
-       {"MediaHitTestTargetRefCon", (PyCFunction)Qt_MediaHitTestTargetRefCon, 1,
-        PyDoc_STR("(MediaHandler mh, long targetRefCon, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)")},
-       {"MediaDisposeTargetRefCon", (PyCFunction)Qt_MediaDisposeTargetRefCon, 1,
-        PyDoc_STR("(MediaHandler mh, long targetRefCon) -> (ComponentResult _rv)")},
-       {"MediaTargetRefConsEqual", (PyCFunction)Qt_MediaTargetRefConsEqual, 1,
-        PyDoc_STR("(MediaHandler mh, long firstRefCon, long secondRefCon) -> (ComponentResult _rv, Boolean equal)")},
-       {"MediaPrePrerollCancel", (PyCFunction)Qt_MediaPrePrerollCancel, 1,
-        PyDoc_STR("(MediaHandler mh, void * refcon) -> (ComponentResult _rv)")},
-       {"MediaEnterEmptyEdit", (PyCFunction)Qt_MediaEnterEmptyEdit, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
-       {"MediaCurrentMediaQueuedData", (PyCFunction)Qt_MediaCurrentMediaQueuedData, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long milliSecs)")},
-       {"MediaGetEffectiveVolume", (PyCFunction)Qt_MediaGetEffectiveVolume, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short volume)")},
-       {"MediaGetSoundLevelMeteringEnabled", (PyCFunction)Qt_MediaGetSoundLevelMeteringEnabled, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Boolean enabled)")},
-       {"MediaSetSoundLevelMeteringEnabled", (PyCFunction)Qt_MediaSetSoundLevelMeteringEnabled, 1,
-        PyDoc_STR("(MediaHandler mh, Boolean enable) -> (ComponentResult _rv)")},
-       {"MediaGetEffectiveSoundBalance", (PyCFunction)Qt_MediaGetEffectiveSoundBalance, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short balance)")},
-       {"MediaSetScreenLock", (PyCFunction)Qt_MediaSetScreenLock, 1,
-        PyDoc_STR("(MediaHandler mh, Boolean lockIt) -> (ComponentResult _rv)")},
-       {"MediaGetErrorString", (PyCFunction)Qt_MediaGetErrorString, 1,
-        PyDoc_STR("(MediaHandler mh, ComponentResult theError, Str255 errorString) -> (ComponentResult _rv)")},
-       {"MediaGetSoundEqualizerBandLevels", (PyCFunction)Qt_MediaGetSoundEqualizerBandLevels, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt8 bandLevels)")},
-       {"MediaDoIdleActions", (PyCFunction)Qt_MediaDoIdleActions, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
-       {"MediaSetSoundBassAndTreble", (PyCFunction)Qt_MediaSetSoundBassAndTreble, 1,
-        PyDoc_STR("(MediaHandler mh, short bass, short treble) -> (ComponentResult _rv)")},
-       {"MediaGetSoundBassAndTreble", (PyCFunction)Qt_MediaGetSoundBassAndTreble, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short bass, short treble)")},
-       {"MediaTimeBaseChanged", (PyCFunction)Qt_MediaTimeBaseChanged, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
-       {"MediaMCIsPlayerEvent", (PyCFunction)Qt_MediaMCIsPlayerEvent, 1,
-        PyDoc_STR("(MediaHandler mh, EventRecord e) -> (ComponentResult _rv, Boolean handledIt)")},
-       {"MediaGetMediaLoadState", (PyCFunction)Qt_MediaGetMediaLoadState, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long mediaLoadState)")},
-       {"MediaVideoOutputChanged", (PyCFunction)Qt_MediaVideoOutputChanged, 1,
-        PyDoc_STR("(MediaHandler mh, ComponentInstance vout) -> (ComponentResult _rv)")},
-       {"MediaEmptySampleCache", (PyCFunction)Qt_MediaEmptySampleCache, 1,
-        PyDoc_STR("(MediaHandler mh, long sampleNum, long sampleCount) -> (ComponentResult _rv)")},
-       {"MediaGetPublicInfo", (PyCFunction)Qt_MediaGetPublicInfo, 1,
-        PyDoc_STR("(MediaHandler mh, OSType infoSelector, void * infoDataPtr) -> (ComponentResult _rv, Size ioDataSize)")},
-       {"MediaSetPublicInfo", (PyCFunction)Qt_MediaSetPublicInfo, 1,
-        PyDoc_STR("(MediaHandler mh, OSType infoSelector, void * infoDataPtr, Size dataSize) -> (ComponentResult _rv)")},
-       {"MediaRefConSetProperty", (PyCFunction)Qt_MediaRefConSetProperty, 1,
-        PyDoc_STR("(MediaHandler mh, long refCon, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
-       {"MediaRefConGetProperty", (PyCFunction)Qt_MediaRefConGetProperty, 1,
-        PyDoc_STR("(MediaHandler mh, long refCon, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
-       {"MediaNavigateTargetRefCon", (PyCFunction)Qt_MediaNavigateTargetRefCon, 1,
-        PyDoc_STR("(MediaHandler mh, long navigation) -> (ComponentResult _rv, long refCon)")},
-       {"MediaGGetIdleManager", (PyCFunction)Qt_MediaGGetIdleManager, 1,
-        PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, IdleManager pim)")},
-       {"MediaGSetIdleManager", (PyCFunction)Qt_MediaGSetIdleManager, 1,
-        PyDoc_STR("(MediaHandler mh, IdleManager im) -> (ComponentResult _rv)")},
-       {"QTMIDIGetMIDIPorts", (PyCFunction)Qt_QTMIDIGetMIDIPorts, 1,
-        PyDoc_STR("(QTMIDIComponent ci) -> (ComponentResult _rv, QTMIDIPortListHandle inputPorts, QTMIDIPortListHandle outputPorts)")},
-       {"QTMIDIUseSendPort", (PyCFunction)Qt_QTMIDIUseSendPort, 1,
-        PyDoc_STR("(QTMIDIComponent ci, long portIndex, long inUse) -> (ComponentResult _rv)")},
-       {"QTMIDISendMIDI", (PyCFunction)Qt_QTMIDISendMIDI, 1,
-        PyDoc_STR("(QTMIDIComponent ci, long portIndex, MusicMIDIPacket mp) -> (ComponentResult _rv)")},
-       {"MusicGetPart", (PyCFunction)Qt_MusicGetPart, 1,
-        PyDoc_STR("(MusicComponent mc, long part) -> (ComponentResult _rv, long midiChannel, long polyphony)")},
-       {"MusicSetPart", (PyCFunction)Qt_MusicSetPart, 1,
-        PyDoc_STR("(MusicComponent mc, long part, long midiChannel, long polyphony) -> (ComponentResult _rv)")},
-       {"MusicSetPartInstrumentNumber", (PyCFunction)Qt_MusicSetPartInstrumentNumber, 1,
-        PyDoc_STR("(MusicComponent mc, long part, long instrumentNumber) -> (ComponentResult _rv)")},
-       {"MusicGetPartInstrumentNumber", (PyCFunction)Qt_MusicGetPartInstrumentNumber, 1,
-        PyDoc_STR("(MusicComponent mc, long part) -> (ComponentResult _rv)")},
-       {"MusicStorePartInstrument", (PyCFunction)Qt_MusicStorePartInstrument, 1,
-        PyDoc_STR("(MusicComponent mc, long part, long instrumentNumber) -> (ComponentResult _rv)")},
-       {"MusicGetPartAtomicInstrument", (PyCFunction)Qt_MusicGetPartAtomicInstrument, 1,
-        PyDoc_STR("(MusicComponent mc, long part, long flags) -> (ComponentResult _rv, AtomicInstrument ai)")},
-       {"MusicSetPartAtomicInstrument", (PyCFunction)Qt_MusicSetPartAtomicInstrument, 1,
-        PyDoc_STR("(MusicComponent mc, long part, AtomicInstrumentPtr aiP, long flags) -> (ComponentResult _rv)")},
-       {"MusicGetPartKnob", (PyCFunction)Qt_MusicGetPartKnob, 1,
-        PyDoc_STR("(MusicComponent mc, long part, long knobID) -> (ComponentResult _rv)")},
-       {"MusicSetPartKnob", (PyCFunction)Qt_MusicSetPartKnob, 1,
-        PyDoc_STR("(MusicComponent mc, long part, long knobID, long knobValue) -> (ComponentResult _rv)")},
-       {"MusicGetKnob", (PyCFunction)Qt_MusicGetKnob, 1,
-        PyDoc_STR("(MusicComponent mc, long knobID) -> (ComponentResult _rv)")},
-       {"MusicSetKnob", (PyCFunction)Qt_MusicSetKnob, 1,
-        PyDoc_STR("(MusicComponent mc, long knobID, long knobValue) -> (ComponentResult _rv)")},
-       {"MusicGetPartName", (PyCFunction)Qt_MusicGetPartName, 1,
-        PyDoc_STR("(MusicComponent mc, long part, StringPtr name) -> (ComponentResult _rv)")},
-       {"MusicSetPartName", (PyCFunction)Qt_MusicSetPartName, 1,
-        PyDoc_STR("(MusicComponent mc, long part, StringPtr name) -> (ComponentResult _rv)")},
-       {"MusicPlayNote", (PyCFunction)Qt_MusicPlayNote, 1,
-        PyDoc_STR("(MusicComponent mc, long part, long pitch, long velocity) -> (ComponentResult _rv)")},
-       {"MusicResetPart", (PyCFunction)Qt_MusicResetPart, 1,
-        PyDoc_STR("(MusicComponent mc, long part) -> (ComponentResult _rv)")},
-       {"MusicSetPartController", (PyCFunction)Qt_MusicSetPartController, 1,
-        PyDoc_STR("(MusicComponent mc, long part, MusicController controllerNumber, long controllerValue) -> (ComponentResult _rv)")},
-       {"MusicGetPartController", (PyCFunction)Qt_MusicGetPartController, 1,
-        PyDoc_STR("(MusicComponent mc, long part, MusicController controllerNumber) -> (ComponentResult _rv)")},
-       {"MusicGetInstrumentNames", (PyCFunction)Qt_MusicGetInstrumentNames, 1,
-        PyDoc_STR("(MusicComponent mc, long modifiableInstruments) -> (ComponentResult _rv, Handle instrumentNames, Handle instrumentCategoryLasts, Handle instrumentCategoryNames)")},
-       {"MusicGetDrumNames", (PyCFunction)Qt_MusicGetDrumNames, 1,
-        PyDoc_STR("(MusicComponent mc, long modifiableInstruments) -> (ComponentResult _rv, Handle instrumentNumbers, Handle instrumentNames)")},
-       {"MusicGetMasterTune", (PyCFunction)Qt_MusicGetMasterTune, 1,
-        PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv)")},
-       {"MusicSetMasterTune", (PyCFunction)Qt_MusicSetMasterTune, 1,
-        PyDoc_STR("(MusicComponent mc, long masterTune) -> (ComponentResult _rv)")},
-       {"MusicGetDeviceConnection", (PyCFunction)Qt_MusicGetDeviceConnection, 1,
-        PyDoc_STR("(MusicComponent mc, long index) -> (ComponentResult _rv, long id1, long id2)")},
-       {"MusicUseDeviceConnection", (PyCFunction)Qt_MusicUseDeviceConnection, 1,
-        PyDoc_STR("(MusicComponent mc, long id1, long id2) -> (ComponentResult _rv)")},
-       {"MusicGetKnobSettingStrings", (PyCFunction)Qt_MusicGetKnobSettingStrings, 1,
-        PyDoc_STR("(MusicComponent mc, long knobIndex, long isGlobal) -> (ComponentResult _rv, Handle settingsNames, Handle settingsCategoryLasts, Handle settingsCategoryNames)")},
-       {"MusicGetMIDIPorts", (PyCFunction)Qt_MusicGetMIDIPorts, 1,
-        PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv, long inputPortCount, long outputPortCount)")},
-       {"MusicSendMIDI", (PyCFunction)Qt_MusicSendMIDI, 1,
-        PyDoc_STR("(MusicComponent mc, long portIndex, MusicMIDIPacket mp) -> (ComponentResult _rv)")},
-       {"MusicSetOfflineTimeTo", (PyCFunction)Qt_MusicSetOfflineTimeTo, 1,
-        PyDoc_STR("(MusicComponent mc, long newTimeStamp) -> (ComponentResult _rv)")},
-       {"MusicGetInfoText", (PyCFunction)Qt_MusicGetInfoText, 1,
-        PyDoc_STR("(MusicComponent mc, long selector) -> (ComponentResult _rv, Handle textH, Handle styleH)")},
-       {"MusicGetInstrumentInfo", (PyCFunction)Qt_MusicGetInstrumentInfo, 1,
-        PyDoc_STR("(MusicComponent mc, long getInstrumentInfoFlags) -> (ComponentResult _rv, InstrumentInfoListHandle infoListH)")},
-       {"MusicTask", (PyCFunction)Qt_MusicTask, 1,
-        PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv)")},
-       {"MusicSetPartInstrumentNumberInterruptSafe", (PyCFunction)Qt_MusicSetPartInstrumentNumberInterruptSafe, 1,
-        PyDoc_STR("(MusicComponent mc, long part, long instrumentNumber) -> (ComponentResult _rv)")},
-       {"MusicSetPartSoundLocalization", (PyCFunction)Qt_MusicSetPartSoundLocalization, 1,
-        PyDoc_STR("(MusicComponent mc, long part, Handle data) -> (ComponentResult _rv)")},
-       {"MusicGenericConfigure", (PyCFunction)Qt_MusicGenericConfigure, 1,
-        PyDoc_STR("(MusicComponent mc, long mode, long flags, long baseResID) -> (ComponentResult _rv)")},
-       {"MusicGenericGetKnobList", (PyCFunction)Qt_MusicGenericGetKnobList, 1,
-        PyDoc_STR("(MusicComponent mc, long knobType) -> (ComponentResult _rv, GenericKnobDescriptionListHandle gkdlH)")},
-       {"MusicGenericSetResourceNumbers", (PyCFunction)Qt_MusicGenericSetResourceNumbers, 1,
-        PyDoc_STR("(MusicComponent mc, Handle resourceIDH) -> (ComponentResult _rv)")},
-       {"MusicDerivedMIDISend", (PyCFunction)Qt_MusicDerivedMIDISend, 1,
-        PyDoc_STR("(MusicComponent mc, MusicMIDIPacket packet) -> (ComponentResult _rv)")},
-       {"MusicDerivedOpenResFile", (PyCFunction)Qt_MusicDerivedOpenResFile, 1,
-        PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv)")},
-       {"MusicDerivedCloseResFile", (PyCFunction)Qt_MusicDerivedCloseResFile, 1,
-        PyDoc_STR("(MusicComponent mc, short resRefNum) -> (ComponentResult _rv)")},
-       {"NAUnregisterMusicDevice", (PyCFunction)Qt_NAUnregisterMusicDevice, 1,
-        PyDoc_STR("(NoteAllocator na, long index) -> (ComponentResult _rv)")},
-       {"NASaveMusicConfiguration", (PyCFunction)Qt_NASaveMusicConfiguration, 1,
-        PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv)")},
-       {"NAGetMIDIPorts", (PyCFunction)Qt_NAGetMIDIPorts, 1,
-        PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv, QTMIDIPortListHandle inputPorts, QTMIDIPortListHandle outputPorts)")},
-       {"NATask", (PyCFunction)Qt_NATask, 1,
-        PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv)")},
-       {"TuneSetHeader", (PyCFunction)Qt_TuneSetHeader, 1,
-        PyDoc_STR("(TunePlayer tp, unsigned long * header) -> (ComponentResult _rv)")},
-       {"TuneGetTimeBase", (PyCFunction)Qt_TuneGetTimeBase, 1,
-        PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv, TimeBase tb)")},
-       {"TuneSetTimeScale", (PyCFunction)Qt_TuneSetTimeScale, 1,
-        PyDoc_STR("(TunePlayer tp, TimeScale scale) -> (ComponentResult _rv)")},
-       {"TuneGetTimeScale", (PyCFunction)Qt_TuneGetTimeScale, 1,
-        PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv, TimeScale scale)")},
-       {"TuneInstant", (PyCFunction)Qt_TuneInstant, 1,
-        PyDoc_STR("(TunePlayer tp, unsigned long tunePosition) -> (ComponentResult _rv, unsigned long tune)")},
-       {"TuneStop", (PyCFunction)Qt_TuneStop, 1,
-        PyDoc_STR("(TunePlayer tp, long stopFlags) -> (ComponentResult _rv)")},
-       {"TuneSetVolume", (PyCFunction)Qt_TuneSetVolume, 1,
-        PyDoc_STR("(TunePlayer tp, Fixed volume) -> (ComponentResult _rv)")},
-       {"TuneGetVolume", (PyCFunction)Qt_TuneGetVolume, 1,
-        PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
-       {"TunePreroll", (PyCFunction)Qt_TunePreroll, 1,
-        PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
-       {"TuneUnroll", (PyCFunction)Qt_TuneUnroll, 1,
-        PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
-       {"TuneSetPartTranspose", (PyCFunction)Qt_TuneSetPartTranspose, 1,
-        PyDoc_STR("(TunePlayer tp, unsigned long part, long transpose, long velocityShift) -> (ComponentResult _rv)")},
-       {"TuneGetNoteAllocator", (PyCFunction)Qt_TuneGetNoteAllocator, 1,
-        PyDoc_STR("(TunePlayer tp) -> (NoteAllocator _rv)")},
-       {"TuneSetSofter", (PyCFunction)Qt_TuneSetSofter, 1,
-        PyDoc_STR("(TunePlayer tp, long softer) -> (ComponentResult _rv)")},
-       {"TuneTask", (PyCFunction)Qt_TuneTask, 1,
-        PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
-       {"TuneSetBalance", (PyCFunction)Qt_TuneSetBalance, 1,
-        PyDoc_STR("(TunePlayer tp, long balance) -> (ComponentResult _rv)")},
-       {"TuneSetSoundLocalization", (PyCFunction)Qt_TuneSetSoundLocalization, 1,
-        PyDoc_STR("(TunePlayer tp, Handle data) -> (ComponentResult _rv)")},
-       {"TuneSetHeaderWithSize", (PyCFunction)Qt_TuneSetHeaderWithSize, 1,
-        PyDoc_STR("(TunePlayer tp, unsigned long * header, unsigned long size) -> (ComponentResult _rv)")},
-       {"TuneSetPartMix", (PyCFunction)Qt_TuneSetPartMix, 1,
-        PyDoc_STR("(TunePlayer tp, unsigned long partNumber, long volume, long balance, long mixFlags) -> (ComponentResult _rv)")},
-       {"TuneGetPartMix", (PyCFunction)Qt_TuneGetPartMix, 1,
-        PyDoc_STR("(TunePlayer tp, unsigned long partNumber) -> (ComponentResult _rv, long volumeOut, long balanceOut, long mixFlagsOut)")},
-       {"AlignWindow", (PyCFunction)Qt_AlignWindow, 1,
-        PyDoc_STR("(WindowPtr wp, Boolean front) -> None")},
-       {"DragAlignedWindow", (PyCFunction)Qt_DragAlignedWindow, 1,
-        PyDoc_STR("(WindowPtr wp, Point startPt, Rect boundsRect) -> None")},
-       {"MoviesTask", (PyCFunction)Qt_MoviesTask, 1,
-        PyDoc_STR("(long maxMilliSecToUse) -> None")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Qt(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(Track, TrackObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Track, TrackObj_Convert);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(Movie, MovieObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Movie, MovieObj_Convert);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieController, MovieCtlObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieController, MovieCtlObj_Convert);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBase, TimeBaseObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBase, TimeBaseObj_Convert);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(UserData, UserDataObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserData, UserDataObj_Convert);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(Media, MediaObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Media, MediaObj_Convert);
-
-
-       m = Py_InitModule("_Qt", Qt_methods);
-       d = PyModule_GetDict(m);
-       Qt_Error = PyMac_GetOSErrException();
-       if (Qt_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Qt_Error) != 0)
-               return;
-       Py_TYPE(&IdleManager_Type) = &PyType_Type;
-       if (PyType_Ready(&IdleManager_Type) < 0) return;
-       Py_INCREF(&IdleManager_Type);
-       PyModule_AddObject(m, "IdleManager", (PyObject *)&IdleManager_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&IdleManager_Type);
-       PyModule_AddObject(m, "IdleManagerType", (PyObject *)&IdleManager_Type);
-       Py_TYPE(&MovieController_Type) = &PyType_Type;
-       if (PyType_Ready(&MovieController_Type) < 0) return;
-       Py_INCREF(&MovieController_Type);
-       PyModule_AddObject(m, "MovieController", (PyObject *)&MovieController_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&MovieController_Type);
-       PyModule_AddObject(m, "MovieControllerType", (PyObject *)&MovieController_Type);
-       Py_TYPE(&TimeBase_Type) = &PyType_Type;
-       if (PyType_Ready(&TimeBase_Type) < 0) return;
-       Py_INCREF(&TimeBase_Type);
-       PyModule_AddObject(m, "TimeBase", (PyObject *)&TimeBase_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&TimeBase_Type);
-       PyModule_AddObject(m, "TimeBaseType", (PyObject *)&TimeBase_Type);
-       Py_TYPE(&UserData_Type) = &PyType_Type;
-       if (PyType_Ready(&UserData_Type) < 0) return;
-       Py_INCREF(&UserData_Type);
-       PyModule_AddObject(m, "UserData", (PyObject *)&UserData_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&UserData_Type);
-       PyModule_AddObject(m, "UserDataType", (PyObject *)&UserData_Type);
-       Py_TYPE(&Media_Type) = &PyType_Type;
-       if (PyType_Ready(&Media_Type) < 0) return;
-       Py_INCREF(&Media_Type);
-       PyModule_AddObject(m, "Media", (PyObject *)&Media_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Media_Type);
-       PyModule_AddObject(m, "MediaType", (PyObject *)&Media_Type);
-       Py_TYPE(&Track_Type) = &PyType_Type;
-       if (PyType_Ready(&Track_Type) < 0) return;
-       Py_INCREF(&Track_Type);
-       PyModule_AddObject(m, "Track", (PyObject *)&Track_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Track_Type);
-       PyModule_AddObject(m, "TrackType", (PyObject *)&Track_Type);
-       Py_TYPE(&Movie_Type) = &PyType_Type;
-       if (PyType_Ready(&Movie_Type) < 0) return;
-       Py_INCREF(&Movie_Type);
-       PyModule_AddObject(m, "Movie", (PyObject *)&Movie_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Movie_Type);
-       PyModule_AddObject(m, "MovieType", (PyObject *)&Movie_Type);
-       Py_TYPE(&SGOutput_Type) = &PyType_Type;
-       if (PyType_Ready(&SGOutput_Type) < 0) return;
-       Py_INCREF(&SGOutput_Type);
-       PyModule_AddObject(m, "SGOutput", (PyObject *)&SGOutput_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&SGOutput_Type);
-       PyModule_AddObject(m, "SGOutputType", (PyObject *)&SGOutput_Type);
-}
-
-/* ========================= End module _Qt ========================= */
-
diff --git a/Mac/Modules/qt/qtscan.py b/Mac/Modules/qt/qtscan.py
deleted file mode 100644 (file)
index 0809e28..0000000
+++ /dev/null
@@ -1,318 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "QuickTime"
-SHORT = "qt"
-HEADERFILES= (
-#       "Components.h"  -- In Carbon.Cm
-        "Movies.h",
-        "ImageCompression.h",
-        "QuickTimeComponents.h",
-#       "ImageCodec.h"  -- seems not too useful, and difficult.
-#       "IsochronousDataHandlers.h" -- Is this useful?
-        "MediaHandlers.h",
-#       "QTML.h", -- Windows only, needs separate module
-#       "QuickTimeStreaming.h", -- Difficult
-#       "QTStreamingComponents.h", -- Needs QTStreaming
-        "QuickTimeMusic.h",
-#       "QuickTimeVR.h", -- Not done yet
-#       "Sound.h", -- In Carbon.Snd
-        )
-OBJECTS = ("Movie", "Track", "Media", "UserData", "TimeBase", "MovieController",
-        "IdleManager", "SGOutput")
-
-def main():
-    input = HEADERFILES
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    scanner.gentypetest(SHORT+"typetest.py")
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in OBJECTS and m == "InMode":
-                classname = "Method"
-                listname = t + "_methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("xmlIdentifierUnrecognized = -1\n")
-        self.defsfile.write("kControllerMinimum = -0xf777\n")
-        self.defsfile.write("notImplementedMusicOSErr      = -2071\n")
-        self.defsfile.write("cantSendToSynthesizerOSErr    = -2072\n")
-        self.defsfile.write("cantReceiveFromSynthesizerOSErr = -2073\n")
-        self.defsfile.write("illegalVoiceAllocationOSErr   = -2074\n")
-        self.defsfile.write("illegalPartOSErr              = -2075\n")
-        self.defsfile.write("illegalChannelOSErr           = -2076\n")
-        self.defsfile.write("illegalKnobOSErr              = -2077\n")
-        self.defsfile.write("illegalKnobValueOSErr         = -2078\n")
-        self.defsfile.write("illegalInstrumentOSErr        = -2079\n")
-        self.defsfile.write("illegalControllerOSErr        = -2080\n")
-        self.defsfile.write("midiManagerAbsentOSErr        = -2081\n")
-        self.defsfile.write("synthesizerNotRespondingOSErr = -2082\n")
-        self.defsfile.write("synthesizerOSErr              = -2083\n")
-        self.defsfile.write("illegalNoteChannelOSErr       = -2084\n")
-        self.defsfile.write("noteChannelNotAllocatedOSErr  = -2085\n")
-        self.defsfile.write("tunePlayerFullOSErr           = -2086\n")
-        self.defsfile.write("tuneParseOSErr                = -2087\n")
-
-    def makeblacklistnames(self):
-        return [
-                "xmlIdentifierUnrecognized", # const with incompatible definition
-                "DisposeMovie",         # Done on python-object disposal
-                "DisposeMovieTrack",    # ditto
-                "DisposeTrackMedia",    # ditto
-                "DisposeUserData",              # ditto
-#                       "DisposeTimeBase",              # ditto
-                "DisposeMovieController", # ditto
-
-                # The following 4 use 'void *' in an uncontrolled way
-                # TBD when I've read the manual...
-                "GetUserDataItem",
-                "SetUserDataItem",
-                "SetTextSampleData",
-                "BeginFullScreen",
-                # bgen gets the argument in/out wrong..
-                "AddTextSample",
-                "AddTESample",
-                "AddHiliteSample",
-                "HiliteTextSample",
-
-                "MakeTrackTimeTable", # Uses long * return?
-                "MakeMediaTimeTable", # ditto
-##                      "VideoMediaGetStallCount", # Undefined in CW Pro 3 library
-                # OS8 only:
-                'SpriteMediaGetIndImageProperty',       # XXXX Why isn't this in carbon?
-                'CheckQuickTimeRegistration',
-                'SetMovieAnchorDataRef',
-                'GetMovieAnchorDataRef',
-                'GetMovieLoadState',
-                'OpenADataHandler',
-                'MovieMediaGetCurrentMovieProperty',
-                'MovieMediaGetCurrentTrackProperty',
-                'MovieMediaGetChildMovieDataReference',
-                'MovieMediaSetChildMovieDataReference',
-                'MovieMediaLoadChildMovieFromDataReference',
-                'Media3DGetViewObject',
-
-    # these are ImageCompression blacklists
-                "GraphicsExportGetInputPtr",
-
-                # QuickTimeComponents
-                # These two need some help: the first returns a point to a databuffer that
-                # the second disposes. Generate manually?
-                "VDCompressDone",
-                "VDReleaseCompressBuffer",
-                "QTVideoOutputGetGWorldParameters", # How useful is this?
-
-                # MediaHandlers
-                "MediaMakeMediaTimeTable", # just lazy
-                "MediaGetSampleDataPointer", # funny output pointer
-
-                # QuickTimeMusic
-                "kControllerMinimum",
-                # These are artefacts of a macro definition
-                "ulen",
-                "_ext",
-                "x",
-                "w1",
-                "w2",
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                # I don't think we want to do these
-                "QTSyncTaskPtr",
-                # We dont do callbacks yet, so no need for these
-                "QTCallBack",
-                # Skipped for now, due to laziness
-                "TrackEditState",
-                "MovieEditState",
-                "MatrixRecord",
-                "MatrixRecord_ptr",
-                "SampleReferencePtr",
-                "QTTweener",
-                "QTErrorReplacementPtr",
-                "QTRestrictionSet",
-                "QTUUID",
-                "QTUUID_ptr",
-
-                # Routine pointers, not yet.
-                "MoviesErrorUPP",
-                "MoviePreviewCallOutUPP",
-                "MovieDrawingCompleteUPP",
-                "QTCallBackUPP",
-                "TextMediaUPP",
-                "MovieProgressUPP",
-                "MovieRgnCoverUPP",
-                "MCActionFilterUPP",
-                "MCActionFilterWithRefConUPP",
-                "GetMovieUPP",
-                "ModalFilterUPP",
-                "TrackTransferUPP",
-                "MoviePrePrerollCompleteUPP",
-                "MovieExecuteWiredActionsUPP",
-                "QTBandwidthNotificationUPP",
-                "DoMCActionUPP",
-                "QTNextTaskNeededSoonerCallbackUPP",
-
-                "SampleReference64Ptr", # Don't know what this does, yet
-                "QTRuntimeSpriteDescPtr",
-                "QTBandwidthReference",
-                "QTScheduledBandwidthReference",
-                "QTAtomContainer",
-                "SpriteWorld",
-                "Sprite",
-
-    # these are ImageCompression blacklists
-    "ICMDataUPP",
-    "ICMFlushUPP",
-    "ICMCompletionUPP",
-    "ICMProgressUPP",
-    "StdPixUPP",
-    "QDPixUPP",
-    "ICMAlignmentUPP",
-    "ICMCursorShieldedUPP",
-    "ICMMemoryDisposedUPP",
-    "ICMConvertDataFormatUPP",
-    "ModalFilterYDUPP",
-                "FileFilterUPP",
-
-    "CodecNameSpecListPtr",
-    "CodecInfo",
-     "ImageSequence",
-    "MatrixRecordPtr",
-    "ICMDataProcRecordPtr",
-    "OpenCPicParams",
-    "ICMProgressProcRecordPtr",
-    "ICMAlignmentProcRecordPtr",
-    "ICMPixelFormatInfoPtr",
-    "ImageSequenceDataSource",
-    "ConstStrFileNameParam",
-    "ImageTranscodeSequence",
-    "ImageFieldSequence",
-    "Fract",
-    "PixMapPtr",
-    "GWorldFlags",
-    "void_ptr",   # XXX Being lazy, this one is doable.
-
-    # These are from QuickTimeComponents
-    "CDataHandlerUPP",
-    "CharDataHandlerUPP",
-    "CommentHandlerUPP",
-    "DataHCompletionUPP",
-    "'MovieExportGetDataUPP",
-    "MovieExportGetPropertyUPP",
-    "PreprocessInstructionHandlerUPP",
-    "SGModalFilterUPP",
-    "StartDocumentHandlerUPP",
-    "StartElementHandlerUPP",
-    "VdigIntUPP",
-    "SGDataUPP",
-    "EndDocumentHandlerUPP",
-    "EndElementHandlerUPP",
-    "VideoBottles", # Record full of UPPs
-
-    "SCParams",
-    "ICMCompletionProcRecordPtr",
-    "DataHVolumeList",
-    "DigitizerInfo",
-    "SGCompressInfo",
-    "SeqGrabExtendedFrameInfoPtr",
-    "SeqGrabFrameInfoPtr",
-    "TCTextOptionsPtr",
-    "SGCompressInfo_ptr",
-    "SGDeviceList",
-    "TextDisplayData",
-    "TimeCodeDef",
-    "TimeCodeRecord",
-    "TweenRecord",
-    "VDGamRecPtr",
-    "ToneDescription",  # XXXX Just lazy: this one is easy.
-    "XMLDoc",
-    "UInt64",   # XXXX lazy
-    "UInt64_ptr", # XXXX lazy
-
-    # From MediaHandlers
-    "ActionsUPP",
-    "PrePrerollCompleteUPP",
-    "CodecComponentHandle", # Difficult: handle containing list of components.
-    "GetMovieCompleteParams", # Immense struct
-    "LevelMeterInfoPtr", # Lazy. Also: can be an output parameter!!
-    "MediaEQSpectrumBandsRecordPtr", # ditto
-
-    # From QuickTimeMusic
-    "MusicMIDISendUPP",
-    "MusicOfflineDataUPP",
-    "TuneCallBackUPP",
-    "TunePlayCallBackUPP",
-    "GCPart", # Struct with lots of fields
-    "GCPart_ptr",
-    "GenericKnobDescription", # Struct with lots of fields
-    "KnobDescription",  # Struct with lots of fields
-    "InstrumentAboutInfo", # Struct, not too difficult
-    "NoteChannel", # XXXX Lazy. Could be opaque, I think
-    "NoteRequest", # XXXX Lazy. Not-too-difficult struct
-    "SynthesizerConnections", # Struct with lots of fields
-    "SynthesizerDescription", # Struct with lots of fields
-    "TuneStatus", # Struct with lots of fields
-
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([('FSSpec', '*', 'OutMode')], [('FSSpec_ptr', '*', 'InMode')]),
-
-                # Movie controller creation
-                ([('ComponentInstance', 'NewMovieController', 'ReturnMode')],
-                 [('MovieController', '*', 'ReturnMode')]),
-
-                # NewMovieFromFile
-                ([('short', 'resId', 'OutMode'), ('StringPtr', 'resName', 'InMode')],
-                 [('short', 'resId', 'InOutMode'), ('dummyStringPtr', 'resName', 'InMode')]),
-
-                # MCDoAction and more
-                ([('void', '*', 'OutMode')], [('mcactionparams', '*', 'InMode')]),
-
-                # SetTimeBaseZero. Does not handle NULLs, unfortunately
-                ([('TimeRecord', 'zero', 'OutMode')], [('TimeRecord', 'zero', 'InMode')]),
-
-                # ConvertTime and ConvertTimeScale
-                ([('TimeRecord', 'inout', 'OutMode')], [('TimeRecord', 'inout', 'InOutMode')]),
-                ([('TimeRecord', 'theTime', 'OutMode')], [('TimeRecord', 'theTime', 'InOutMode')]),
-
-                # AddTime and SubtractTime
-                ([('TimeRecord', 'dst', 'OutMode')], [('TimeRecord', 'dst', 'InOutMode')]),
-
-                # Funny definitions
-                ([('char_ptr', '*', 'InMode')], [('stringptr', '*', 'InMode')]),
-                ([('FSSpecPtr', '*', 'InMode')], [('FSSpec_ptr', '*', 'InMode')]),
-                ([('unsigned_char', 'swfVersion', 'OutMode')], [('UInt8', 'swfVersion', 'OutMode')]),
-
-                # It seems MusicMIDIPacket if never flagged with const but always used
-                # for sending only. If that ever changes this needs to be fixed.
-                ([('MusicMIDIPacket', '*', 'OutMode')], [('MusicMIDIPacket_ptr', '*', 'InMode')]),
-
-                # QTMusic const-less input parameters
-                ([('unsigned_long', 'header', 'OutMode')], [('UnsignedLongPtr', 'header', 'InMode')]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/qt/qtsupport.py b/Mac/Modules/qt/qtsupport.py
deleted file mode 100644 (file)
index 4d7988f..0000000
+++ /dev/null
@@ -1,379 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-#error missing SetActionFilter
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Movies.h'              # The Apple header file
-MODNAME = '_Qt'                         # The name of the module
-OBJECTNAME = 'Movie'                    # The basic name of the objects used here
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Qt'                        # The prefix for module-wide routines
-OBJECTTYPE = "Movie"            # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-includestuff = includestuff + """
-#include <QuickTime/QuickTime.h>
-
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_TrackObj_New(Track);
-extern int _TrackObj_Convert(PyObject *, Track *);
-extern PyObject *_MovieObj_New(Movie);
-extern int _MovieObj_Convert(PyObject *, Movie *);
-extern PyObject *_MovieCtlObj_New(MovieController);
-extern int _MovieCtlObj_Convert(PyObject *, MovieController *);
-extern PyObject *_TimeBaseObj_New(TimeBase);
-extern int _TimeBaseObj_Convert(PyObject *, TimeBase *);
-extern PyObject *_UserDataObj_New(UserData);
-extern int _UserDataObj_Convert(PyObject *, UserData *);
-extern PyObject *_MediaObj_New(Media);
-extern int _MediaObj_Convert(PyObject *, Media *);
-
-#define TrackObj_New _TrackObj_New
-#define TrackObj_Convert _TrackObj_Convert
-#define MovieObj_New _MovieObj_New
-#define MovieObj_Convert _MovieObj_Convert
-#define MovieCtlObj_New _MovieCtlObj_New
-#define MovieCtlObj_Convert _MovieCtlObj_Convert
-#define TimeBaseObj_New _TimeBaseObj_New
-#define TimeBaseObj_Convert _TimeBaseObj_Convert
-#define UserDataObj_New _UserDataObj_New
-#define UserDataObj_Convert _UserDataObj_Convert
-#define MediaObj_New _MediaObj_New
-#define MediaObj_Convert _MediaObj_Convert
-#endif
-
-/* Macro to allow us to GetNextInterestingTime without duration */
-#define GetMediaNextInterestingTimeOnly(media, flags, time, rate, rv) \
-                        GetMediaNextInterestingTime(media, flags, time, rate, rv, NULL)
-
-/*
-** Parse/generate time records
-*/
-static PyObject *
-QtTimeRecord_New(TimeRecord *itself)
-{
-        if (itself->base)
-                return Py_BuildValue("O&lO&", PyMac_Buildwide, &itself->value, itself->scale,
-                        TimeBaseObj_New, itself->base);
-        else
-                return  Py_BuildValue("O&lO", PyMac_Buildwide, &itself->value, itself->scale,
-                        Py_None);
-}
-
-static int
-QtTimeRecord_Convert(PyObject *v, TimeRecord *p_itself)
-{
-        PyObject *base = NULL;
-        if( !PyArg_ParseTuple(v, "O&l|O", PyMac_Getwide, &p_itself->value, &p_itself->scale,
-                        &base) )
-                return 0;
-        if ( base == NULL || base == Py_None )
-                p_itself->base = NULL;
-        else
-                if ( !TimeBaseObj_Convert(base, &p_itself->base) )
-                        return 0;
-        return 1;
-}
-
-static int
-QtMusicMIDIPacket_Convert(PyObject *v, MusicMIDIPacket *p_itself)
-{
-        int dummy;
-
-        if( !PyArg_ParseTuple(v, "hls#", &p_itself->length, &p_itself->reserved, p_itself->data, dummy) )
-                return 0;
-        return 1;
-}
-
-
-
-"""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(Track, TrackObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Track, TrackObj_Convert);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(Movie, MovieObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Movie, MovieObj_Convert);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieController, MovieCtlObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieController, MovieCtlObj_Convert);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBase, TimeBaseObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBase, TimeBaseObj_Convert);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(UserData, UserDataObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserData, UserDataObj_Convert);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(Media, MediaObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Media, MediaObj_Convert);
-"""
-
-# Our (opaque) objects
-Movie = OpaqueByValueType('Movie', 'MovieObj')
-NullMovie = FakeType("(Movie)0")
-Track = OpaqueByValueType('Track', 'TrackObj')
-Media = OpaqueByValueType('Media', 'MediaObj')
-UserData = OpaqueByValueType('UserData', 'UserDataObj')
-TimeBase = OpaqueByValueType('TimeBase', 'TimeBaseObj')
-MovieController = OpaqueByValueType('MovieController', 'MovieCtlObj')
-IdleManager = OpaqueByValueType('IdleManager', 'IdleManagerObj')
-SGOutput = OpaqueByValueType('SGOutput', 'SGOutputObj')
-
-# Other opaque objects
-Component = OpaqueByValueType('Component', 'CmpObj')
-MediaHandlerComponent = OpaqueByValueType('MediaHandlerComponent', 'CmpObj')
-DataHandlerComponent = OpaqueByValueType('DataHandlerComponent', 'CmpObj')
-CompressorComponent = OpaqueByValueType('CompressorComponent', 'CmpObj')
-DecompressorComponent = OpaqueByValueType('DecompressorComponent', 'CmpObj')
-CodecComponent = OpaqueByValueType('CodecComponent', 'CmpObj')
-GraphicsImportComponent = OpaqueByValueType('GraphicsImportComponent', 'CmpObj')
-GraphicsExportComponent = OpaqueByValueType('GraphicsExportComponent', 'CmpObj')
-ImageTranscoderComponent = OpaqueByValueType('ImageTranscoderComponent', 'CmpObj')
-DataCodecComponent = OpaqueByValueType('DataCodecComponent', 'CmpObj')
-GraphicImageMovieImportComponent = OpaqueByValueType('GraphicImageMovieImportComponent', 'CmpObj')
-MovieExportComponent = OpaqueByValueType('MovieExportComponent', 'CmpObj')
-MovieImportComponent = OpaqueByValueType('MovieImportComponent', 'CmpObj')
-QTVideoOutputComponent = OpaqueByValueType('QTVideoOutputComponent', 'CmpObj')
-SeqGrabComponent = OpaqueByValueType('SeqGrabComponent', 'CmpObj')
-TextExportComponent = OpaqueByValueType('TextExportComponent', 'CmpObj')
-TweenerComponent = OpaqueByValueType('TweenerComponent', 'CmpObj')
-pnotComponent = OpaqueByValueType('pnotComponent', 'CmpObj')
-VideoDigitizerComponent = OpaqueByValueType('VideoDigitizerComponent', 'CmpObj')
-
-ComponentInstance = OpaqueByValueType('ComponentInstance', 'CmpInstObj')
-MediaHandler = OpaqueByValueType('MediaHandler', 'CmpInstObj')
-DataHandler = OpaqueByValueType('DataHandler', 'CmpInstObj')
-SGChannel = OpaqueByValueType('SGChannel', 'CmpInstObj')
-TunePlayer = OpaqueByValueType('TunePlayer', 'CmpInstObj')
-MusicComponent = OpaqueByValueType('MusicComponent', 'CmpInstObj')
-NoteAllocator = OpaqueByValueType('NoteAllocator', 'CmpInstObj')
-QTMIDIComponent = OpaqueByValueType('QTMIDIComponent', 'CmpInstObj')
-
-ConstFSSpecPtr = FSSpec_ptr
-GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
-Byte = Boolean # XXXX For GetPaused and SetPaused
-
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-PicHandle = OpaqueByValueType("PicHandle", "ResObj")
-CTabHandle = OpaqueByValueType("CTabHandle", "ResObj")
-PixMapHandle = OpaqueByValueType("PixMapHandle", "ResObj")
-SampleDescriptionHandle = OpaqueByValueType("SampleDescriptionHandle", "ResObj")
-ImageDescriptionHandle = OpaqueByValueType("ImageDescriptionHandle", "ResObj")
-TextDescriptionHandle = OpaqueByValueType("TextDescriptionHandle", "ResObj")
-TEHandle = OpaqueByValueType("TEHandle", "ResObj")
-CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
-GDHandle = OpaqueByValueType("GDHandle", "OptResObj")
-AliasHandle = OpaqueByValueType("AliasHandle", "ResObj")
-SoundDescriptionHandle = OpaqueByValueType("SoundDescriptionHandle", "ResObj")
-VdigBufferRecListHandle = OpaqueByValueType("VdigBufferRecListHandle", "ResObj")
-VDCompressionListHandle = OpaqueByValueType("VDCompressionListHandle", "ResObj")
-TimeCodeDescriptionHandle = OpaqueByValueType("TimeCodeDescriptionHandle", "ResObj")
-DataHFileTypeOrderingHandle = OpaqueByValueType("DataHFileTypeOrderingHandle", "ResObj")
-QTMIDIPortListHandle = OpaqueByValueType("QTMIDIPortListHandle", "ResObj")
-GenericKnobDescriptionListHandle =  OpaqueByValueType("GenericKnobDescriptionListHandle", "ResObj")
-InstrumentInfoListHandle = OpaqueByValueType("InstrumentInfoListHandle", "ResObj")
-# Silly Apple, passing an OStype by reference...
-OSType_ptr = OpaqueType("OSType", "PyMac_BuildOSType", "PyMac_GetOSType")
-# And even sillier: passing floats by address
-float_ptr = ByAddressType("float", "f")
-
-RGBColor = OpaqueType("RGBColor", "QdRGB")
-RGBColor_ptr = RGBColor
-TimeRecord = OpaqueType("TimeRecord", "QtTimeRecord")
-TimeRecord_ptr = TimeRecord
-MusicMIDIPacket = OpaqueType("MusicMIDIPacket", "QtMusicMIDIPacket")
-MusicMIDIPacket_ptr = MusicMIDIPacket
-
-# Non-opaque types, mostly integer-ish
-TimeValue = Type("TimeValue", "l")
-TimeScale = Type("TimeScale", "l")
-TimeBaseFlags = Type("TimeBaseFlags", "l")
-QTCallBackFlags = Type("QTCallBackFlags", "H")
-TimeBaseStatus = Type("TimeBaseStatus", "l")
-QTCallBackType = Type("QTCallBackType", "H")
-nextTimeFlagsEnum = Type("nextTimeFlagsEnum", "H")
-createMovieFileFlagsEnum = Type("createMovieFileFlagsEnum", "l")
-movieFlattenFlagsEnum = Type("movieFlattenFlagsEnum", "l")
-dataRefAttributesFlags = Type("dataRefAttributesFlags", "l")
-playHintsEnum = Type("playHintsEnum", "l")
-mediaHandlerFlagsEnum = Type("mediaHandlerFlagsEnum", "l")
-ComponentResult = Type("ComponentResult", "l")
-VideoDigitizerError = Type("ComponentResult", "l")
-HandlerError = Type("HandlerError", "l")
-Ptr = InputOnlyType("Ptr", "s")
-StringPtr = Type("StringPtr", "s")
-UnsignedLongPtr = Type("unsigned long *", "s")
-mcactionparams = InputOnlyType("void *", "s")
-QTParameterDialog = Type("QTParameterDialog", "l")
-QTAtomID = Type("QTAtomID", "l")
-MCInterfaceElement = Type("MCInterfaceElement", "l")
-CodecType = OSTypeType("CodecType")
-GWorldPtr = OpaqueByValueType("GWorldPtr", "GWorldObj")
-QTFloatSingle = Type("QTFloatSingle", "f")
-CodecQ = Type("CodecQ", "l")
-MusicController = Type("MusicController", "l")
-
-# Could-not-be-bothered-types (NewMovieFromFile)
-dummyshortptr = FakeType('(short *)0')
-dummyStringPtr = FakeType('(StringPtr)0')
-
-# Not-quite-sure-this-is-okay types
-AtomicInstrument = OpaqueByValueType("AtomicInstrument", "ResObj")
-AtomicInstrumentPtr = InputOnlyType("AtomicInstrumentPtr", "s")
-
-# XXXX Need to override output_tp_newBody() to allow for None initializer.
-class QtGlobalObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        # We don't allow NULL pointers to be returned by QuickTime API calls,
-        # in stead we raise an exception
-        Output("""if (itself == NULL) {
-                                PyErr_SetString(Qt_Error,"Cannot create %s from NULL pointer");
-                                return NULL;
-                        }""", self.name)
-
-    def outputCheckConvertArg(self):
-        # But what we do allow is passing None whereever a quicktime object is
-        # expected, and pass this as NULL to the API routines. Note you can
-        # call methods too by creating an object with None as the initializer.
-        Output("if (v == Py_None)")
-        OutLbrace()
-        Output("*p_itself = NULL;")
-        Output("return 1;")
-        OutRbrace()
-
-class MovieObjectDefinition(QtGlobalObjectDefinition):
-    def outputFreeIt(self, itselfname):
-        Output("if (%s) DisposeMovie(%s);", itselfname, itselfname)
-
-class TrackObjectDefinition(QtGlobalObjectDefinition):
-    def outputFreeIt(self, itselfname):
-        Output("if (%s) DisposeMovieTrack(%s);", itselfname, itselfname)
-
-class MediaObjectDefinition(QtGlobalObjectDefinition):
-    def outputFreeIt(self, itselfname):
-        Output("if (%s) DisposeTrackMedia(%s);", itselfname, itselfname)
-
-class UserDataObjectDefinition(QtGlobalObjectDefinition):
-    def outputFreeIt(self, itselfname):
-        Output("if (%s) DisposeUserData(%s);", itselfname, itselfname)
-
-class TimeBaseObjectDefinition(QtGlobalObjectDefinition):
-    pass
-
-class MovieCtlObjectDefinition(QtGlobalObjectDefinition):
-    def outputFreeIt(self, itselfname):
-        Output("if (%s) DisposeMovieController(%s);", itselfname, itselfname)
-
-class IdleManagerObjectDefinition(QtGlobalObjectDefinition):
-    pass
-
-class SGOutputObjectDefinition(QtGlobalObjectDefinition):
-    # XXXX I'm not sure I fully understand how SGOutput works. It seems it's always tied
-    # to a specific SeqGrabComponent, but I'm not 100% sure. Also, I'm not sure all the
-    # routines that return an SGOutput actually return a *new* SGOutput. Need to read up on
-    # this.
-    pass
-
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-Movie_object = MovieObjectDefinition('Movie', 'MovieObj', 'Movie')
-Track_object = TrackObjectDefinition('Track', 'TrackObj', 'Track')
-Media_object = MediaObjectDefinition('Media', 'MediaObj', 'Media')
-UserData_object = UserDataObjectDefinition('UserData', 'UserDataObj', 'UserData')
-TimeBase_object = TimeBaseObjectDefinition('TimeBase', 'TimeBaseObj', 'TimeBase')
-MovieController_object = MovieCtlObjectDefinition('MovieController', 'MovieCtlObj', 'MovieController')
-IdleManager_object = IdleManagerObjectDefinition('IdleManager', 'IdleManagerObj', 'IdleManager')
-SGOutput_object = SGOutputObjectDefinition('SGOutput', 'SGOutputObj', 'SGOutput')
-
-module.addobject(IdleManager_object)
-module.addobject(MovieController_object)
-module.addobject(TimeBase_object)
-module.addobject(UserData_object)
-module.addobject(Media_object)
-module.addobject(Track_object)
-module.addobject(Movie_object)
-module.addobject(SGOutput_object)
-
-# Test which types we are still missing.
-exec(open(string.lower(MODPREFIX) + 'typetest.py').read())
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-IdleManager_methods = []
-MovieController_methods = []
-TimeBase_methods = []
-UserData_methods = []
-Media_methods = []
-Track_methods = []
-Movie_methods = []
-SGOutput_methods = []
-exec(open(INPUTFILE).read())
-
-#
-# Some functions from ImageCompression.h that we need:
-ICMAlignmentProcRecordPtr = FakeType('(ICMAlignmentProcRecordPtr)0')
-dummyRect = FakeType('(Rect *)0')
-
-f = Function(void, 'AlignWindow',
-        (WindowPtr, 'wp', InMode),
-        (Boolean, 'front', InMode),
-        (dummyRect, 'alignmentRect', InMode),
-        (ICMAlignmentProcRecordPtr, 'alignmentProc', InMode),
-)
-functions.append(f)
-
-f = Function(void, 'DragAlignedWindow',
-        (WindowPtr, 'wp', InMode),
-        (Point, 'startPt', InMode),
-        (Rect_ptr, 'boundsRect', InMode),
-        (dummyRect, 'alignmentRect', InMode),
-        (ICMAlignmentProcRecordPtr, 'alignmentProc', InMode),
-)
-functions.append(f)
-
-# And we want the version of MoviesTask without a movie argument
-f = Function(void, 'MoviesTask',
-    (NullMovie, 'theMovie', InMode),
-    (long, 'maxMilliSecToUse', InMode),
-)
-functions.append(f)
-
-# And we want a GetMediaNextInterestingTime without duration
-f = Method(void, 'GetMediaNextInterestingTimeOnly',
-    (Media, 'theMedia', InMode),
-    (short, 'interestingTimeFlags', InMode),
-    (TimeValue, 'time', InMode),
-    (Fixed, 'rate', InMode),
-    (TimeValue, 'interestingTime', OutMode),
-)
-Media_methods.append(f)
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in MovieController_methods: MovieController_object.add(f)
-for f in TimeBase_methods: TimeBase_object.add(f)
-for f in UserData_methods: UserData_object.add(f)
-for f in Media_methods: Media_object.add(f)
-for f in Track_methods: Track_object.add(f)
-for f in Movie_methods: Movie_object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/qt/setup.py b/Mac/Modules/qt/setup.py
deleted file mode 100755 (executable)
index 8442011..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# This is a temporary setup script to allow distribution of
-# MacPython 2.4 modules for MacPython 2.3.
-
-from distutils.core import Extension, setup
-
-setup(name="QuickTime", version="0.2",
-        ext_modules=[
-                Extension('QuickTime._Qt', ['_Qtmodule.c'],
-                extra_link_args=['-framework', 'Carbon', '-framework', 'QuickTime'])
-        ],
-        py_modules=['QuickTime.Qt', 'QuickTime.QuickTime'],
-        package_dir={'QuickTime':'../../../Lib/plat-mac/Carbon'}
-        )
diff --git a/Mac/Modules/res/_Resmodule.c b/Mac/Modules/res/_Resmodule.c
deleted file mode 100644 (file)
index 80b5337..0000000
+++ /dev/null
@@ -1,1743 +0,0 @@
-
-/* ========================== Module _Res =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_ResObj_New(Handle);
-extern int _ResObj_Convert(PyObject *, Handle *);
-extern PyObject *_OptResObj_New(Handle);
-extern int _OptResObj_Convert(PyObject *, Handle *);
-#define ResObj_New _ResObj_New
-#define ResObj_Convert _ResObj_Convert
-#define OptResObj_New _OptResObj_New
-#define OptResObj_Convert _OptResObj_Convert
-#endif
-
-/* Function to dispose a resource, with a "normal" calling sequence */
-static void
-PyMac_AutoDisposeHandle(Handle h)
-{
-        DisposeHandle(h);
-}
-
-static PyObject *Res_Error;
-
-/* ---------------------- Object type Resource ---------------------- */
-
-PyTypeObject Resource_Type;
-
-#define ResObj_Check(x) (Py_TYPE(x) == &Resource_Type || PyObject_TypeCheck((x), &Resource_Type))
-
-typedef struct ResourceObject {
-       PyObject_HEAD
-       Handle ob_itself;
-       void (*ob_freeit)(Handle ptr);
-} ResourceObject;
-
-PyObject *ResObj_New(Handle itself)
-{
-       ResourceObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       it = PyObject_NEW(ResourceObject, &Resource_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       it->ob_freeit = NULL;
-       return (PyObject *)it;
-}
-
-int ResObj_Convert(PyObject *v, Handle *p_itself)
-{
-       if (!ResObj_Check(v))
-       {
-               PyObject *tmp;
-               if ( (tmp=PyObject_CallMethod(v, "as_Resource", "")) )
-               {
-                       *p_itself = ((ResourceObject *)tmp)->ob_itself;
-                       Py_DECREF(tmp);
-                       return 1;
-               }
-               PyErr_Clear();
-       }
-       if (!ResObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Resource required");
-               return 0;
-       }
-       *p_itself = ((ResourceObject *)v)->ob_itself;
-       return 1;
-}
-
-static void ResObj_dealloc(ResourceObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               self->ob_freeit(self->ob_itself);
-       }
-       self->ob_itself = NULL;
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *ResObj_HomeResFile(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef HomeResFile
-       PyMac_PRECHECK(HomeResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = HomeResFile(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ResObj_MacLoadResource(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef MacLoadResource
-       PyMac_PRECHECK(MacLoadResource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       MacLoadResource(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_ReleaseResource(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ReleaseResource
-       PyMac_PRECHECK(ReleaseResource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ReleaseResource(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_DetachResource(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DetachResource
-       PyMac_PRECHECK(DetachResource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DetachResource(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_GetResAttrs(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetResAttrs
-       PyMac_PRECHECK(GetResAttrs);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetResAttrs(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ResObj_GetResInfo(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short theID;
-       ResType theType;
-       Str255 name;
-#ifndef GetResInfo
-       PyMac_PRECHECK(GetResInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetResInfo(_self->ob_itself,
-                  &theID,
-                  &theType,
-                  name);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("hO&O&",
-                            theID,
-                            PyMac_BuildOSType, theType,
-                            PyMac_BuildStr255, name);
-       return _res;
-}
-
-static PyObject *ResObj_SetResInfo(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short theID;
-       Str255 name;
-#ifndef SetResInfo
-       PyMac_PRECHECK(SetResInfo);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &theID,
-                             PyMac_GetStr255, name))
-               return NULL;
-       SetResInfo(_self->ob_itself,
-                  theID,
-                  name);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_AddResource(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ResType theType;
-       short theID;
-       Str255 name;
-#ifndef AddResource
-       PyMac_PRECHECK(AddResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hO&",
-                             PyMac_GetOSType, &theType,
-                             &theID,
-                             PyMac_GetStr255, name))
-               return NULL;
-       AddResource(_self->ob_itself,
-                   theType,
-                   theID,
-                   name);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_GetResourceSizeOnDisk(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetResourceSizeOnDisk
-       PyMac_PRECHECK(GetResourceSizeOnDisk);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetResourceSizeOnDisk(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ResObj_GetMaxResourceSize(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetMaxResourceSize
-       PyMac_PRECHECK(GetMaxResourceSize);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMaxResourceSize(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *ResObj_SetResAttrs(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short attrs;
-#ifndef SetResAttrs
-       PyMac_PRECHECK(SetResAttrs);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &attrs))
-               return NULL;
-       SetResAttrs(_self->ob_itself,
-                   attrs);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_ChangedResource(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ChangedResource
-       PyMac_PRECHECK(ChangedResource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ChangedResource(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_RemoveResource(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef RemoveResource
-       PyMac_PRECHECK(RemoveResource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       RemoveResource(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_WriteResource(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef WriteResource
-       PyMac_PRECHECK(WriteResource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       WriteResource(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_SetResourceSize(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long newSize;
-#ifndef SetResourceSize
-       PyMac_PRECHECK(SetResourceSize);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &newSize))
-               return NULL;
-       SetResourceSize(_self->ob_itself,
-                       newSize);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_GetNextFOND(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef GetNextFOND
-       PyMac_PRECHECK(GetNextFOND);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetNextFOND(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *ResObj_as_Control(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       _res = CtlObj_New((ControlHandle)_self->ob_itself);
-       return _res;
-
-}
-
-static PyObject *ResObj_as_Menu(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       _res = MenuObj_New((MenuHandle)_self->ob_itself);
-       return _res;
-
-}
-
-static PyObject *ResObj_LoadResource(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef LoadResource
-       PyMac_PRECHECK(LoadResource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       LoadResource(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ResObj_AutoDispose(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       int onoff, old = 0;
-       if (!PyArg_ParseTuple(_args, "i", &onoff))
-               return NULL;
-       if ( _self->ob_freeit )
-               old = 1;
-       if ( onoff )
-               _self->ob_freeit = PyMac_AutoDisposeHandle;
-       else
-               _self->ob_freeit = NULL;
-       _res = Py_BuildValue("i", old);
-       return _res;
-
-}
-
-static PyMethodDef ResObj_methods[] = {
-       {"HomeResFile", (PyCFunction)ResObj_HomeResFile, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"MacLoadResource", (PyCFunction)ResObj_MacLoadResource, 1,
-        PyDoc_STR("() -> None")},
-       {"ReleaseResource", (PyCFunction)ResObj_ReleaseResource, 1,
-        PyDoc_STR("() -> None")},
-       {"DetachResource", (PyCFunction)ResObj_DetachResource, 1,
-        PyDoc_STR("() -> None")},
-       {"GetResAttrs", (PyCFunction)ResObj_GetResAttrs, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetResInfo", (PyCFunction)ResObj_GetResInfo, 1,
-        PyDoc_STR("() -> (short theID, ResType theType, Str255 name)")},
-       {"SetResInfo", (PyCFunction)ResObj_SetResInfo, 1,
-        PyDoc_STR("(short theID, Str255 name) -> None")},
-       {"AddResource", (PyCFunction)ResObj_AddResource, 1,
-        PyDoc_STR("(ResType theType, short theID, Str255 name) -> None")},
-       {"GetResourceSizeOnDisk", (PyCFunction)ResObj_GetResourceSizeOnDisk, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"GetMaxResourceSize", (PyCFunction)ResObj_GetMaxResourceSize, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"SetResAttrs", (PyCFunction)ResObj_SetResAttrs, 1,
-        PyDoc_STR("(short attrs) -> None")},
-       {"ChangedResource", (PyCFunction)ResObj_ChangedResource, 1,
-        PyDoc_STR("() -> None")},
-       {"RemoveResource", (PyCFunction)ResObj_RemoveResource, 1,
-        PyDoc_STR("() -> None")},
-       {"WriteResource", (PyCFunction)ResObj_WriteResource, 1,
-        PyDoc_STR("() -> None")},
-       {"SetResourceSize", (PyCFunction)ResObj_SetResourceSize, 1,
-        PyDoc_STR("(long newSize) -> None")},
-       {"GetNextFOND", (PyCFunction)ResObj_GetNextFOND, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"as_Control", (PyCFunction)ResObj_as_Control, 1,
-        PyDoc_STR("Return this resource/handle as a Control")},
-       {"as_Menu", (PyCFunction)ResObj_as_Menu, 1,
-        PyDoc_STR("Return this resource/handle as a Menu")},
-       {"LoadResource", (PyCFunction)ResObj_LoadResource, 1,
-        PyDoc_STR("() -> None")},
-       {"AutoDispose", (PyCFunction)ResObj_AutoDispose, 1,
-        PyDoc_STR("(int)->int. Automatically DisposeHandle the object on Python object cleanup")},
-       {NULL, NULL, 0}
-};
-
-static PyObject *ResObj_get_data(ResourceObject *self, void *closure)
-{
-
-                   PyObject *res;
-                   char state;
-
-                   state = HGetState(self->ob_itself);
-                   HLock(self->ob_itself);
-                   res = PyString_FromStringAndSize(
-                           *self->ob_itself,
-                           GetHandleSize(self->ob_itself));
-                   HUnlock(self->ob_itself);
-                   HSetState(self->ob_itself, state);
-                   return res;
-                   
-}
-
-static int ResObj_set_data(ResourceObject *self, PyObject *v, void *closure)
-{
-
-                   char *data;
-                   long size;
-
-                   if ( v == NULL )
-                           return -1;
-                   if ( !PyString_Check(v) )
-                           return -1;
-                   size = PyString_Size(v);
-                   data = PyString_AsString(v);
-                   /* XXXX Do I need the GetState/SetState calls? */
-                   SetHandleSize(self->ob_itself, size);
-                   if ( MemError())
-                           return -1;
-                   HLock(self->ob_itself);
-                   memcpy((char *)*self->ob_itself, data, size);
-                   HUnlock(self->ob_itself);
-                   /* XXXX Should I do the Changed call immedeately? */
-                   return 0;
-                   
-       return 0;
-}
-
-static PyObject *ResObj_get_size(ResourceObject *self, void *closure)
-{
-       return PyLong_FromLong(GetHandleSize(self->ob_itself));
-}
-
-#define ResObj_set_size NULL
-
-static PyGetSetDef ResObj_getsetlist[] = {
-       {"data", (getter)ResObj_get_data, (setter)ResObj_set_data, "The resource data"},
-       {"size", (getter)ResObj_get_size, (setter)ResObj_set_size, "The length of the resource data"},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define ResObj_compare NULL
-
-#define ResObj_repr NULL
-
-#define ResObj_hash NULL
-static int ResObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
-{
-       char *srcdata = NULL;
-       int srclen = 0;
-       Handle itself;
-       char *kw[] = {"itself", 0};
-
-       if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, ResObj_Convert, &itself))
-       {
-               ((ResourceObject *)_self)->ob_itself = itself;
-               return 0;
-       }
-       PyErr_Clear();
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|s#", kw, &srcdata, &srclen)) return -1;
-       if ((itself = NewHandle(srclen)) == NULL)
-       {
-               PyErr_NoMemory();
-               return 0;
-       }
-       ((ResourceObject *)_self)->ob_itself = itself;
-       if (srclen && srcdata)
-       {
-               HLock(itself);
-               memcpy(*itself, srcdata, srclen);
-               HUnlock(itself);
-       }
-       return 0;
-}
-
-#define ResObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *ResObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *self;
-       if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((ResourceObject *)self)->ob_itself = NULL;
-       ((ResourceObject *)self)->ob_freeit = NULL;
-       return self;
-}
-
-#define ResObj_tp_free PyObject_Del
-
-
-PyTypeObject Resource_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Res.Resource", /*tp_name*/
-       sizeof(ResourceObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) ResObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) ResObj_compare, /*tp_compare*/
-       (reprfunc) ResObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) ResObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       ResObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       ResObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       ResObj_tp_init, /* tp_init */
-       ResObj_tp_alloc, /* tp_alloc */
-       ResObj_tp_new, /* tp_new */
-       ResObj_tp_free, /* tp_free */
-};
-
-/* -------------------- End object type Resource -------------------- */
-
-
-static PyObject *Res_CloseResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short refNum;
-#ifndef CloseResFile
-       PyMac_PRECHECK(CloseResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       CloseResFile(refNum);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_ResError(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef ResError
-       PyMac_PRECHECK(ResError);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = ResError();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_CurResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef CurResFile
-       PyMac_PRECHECK(CurResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CurResFile();
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_UseResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short refNum;
-#ifndef UseResFile
-       PyMac_PRECHECK(UseResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       UseResFile(refNum);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_CountTypes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef CountTypes
-       PyMac_PRECHECK(CountTypes);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CountTypes();
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_Count1Types(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef Count1Types
-       PyMac_PRECHECK(Count1Types);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = Count1Types();
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_GetIndType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ResType theType;
-       short index;
-#ifndef GetIndType
-       PyMac_PRECHECK(GetIndType);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &index))
-               return NULL;
-       GetIndType(&theType,
-                  index);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildOSType, theType);
-       return _res;
-}
-
-static PyObject *Res_Get1IndType(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ResType theType;
-       short index;
-#ifndef Get1IndType
-       PyMac_PRECHECK(Get1IndType);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &index))
-               return NULL;
-       Get1IndType(&theType,
-                   index);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildOSType, theType);
-       return _res;
-}
-
-static PyObject *Res_SetResLoad(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean load;
-#ifndef SetResLoad
-       PyMac_PRECHECK(SetResLoad);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &load))
-               return NULL;
-       SetResLoad(load);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_CountResources(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       ResType theType;
-#ifndef CountResources
-       PyMac_PRECHECK(CountResources);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &theType))
-               return NULL;
-       _rv = CountResources(theType);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_Count1Resources(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       ResType theType;
-#ifndef Count1Resources
-       PyMac_PRECHECK(Count1Resources);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &theType))
-               return NULL;
-       _rv = Count1Resources(theType);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_GetIndResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       ResType theType;
-       short index;
-#ifndef GetIndResource
-       PyMac_PRECHECK(GetIndResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetOSType, &theType,
-                             &index))
-               return NULL;
-       _rv = GetIndResource(theType,
-                            index);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Res_Get1IndResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       ResType theType;
-       short index;
-#ifndef Get1IndResource
-       PyMac_PRECHECK(Get1IndResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetOSType, &theType,
-                             &index))
-               return NULL;
-       _rv = Get1IndResource(theType,
-                             index);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Res_GetResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       ResType theType;
-       short theID;
-#ifndef GetResource
-       PyMac_PRECHECK(GetResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetOSType, &theType,
-                             &theID))
-               return NULL;
-       _rv = GetResource(theType,
-                         theID);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Res_Get1Resource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       ResType theType;
-       short theID;
-#ifndef Get1Resource
-       PyMac_PRECHECK(Get1Resource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetOSType, &theType,
-                             &theID))
-               return NULL;
-       _rv = Get1Resource(theType,
-                          theID);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Res_GetNamedResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       ResType theType;
-       Str255 name;
-#ifndef GetNamedResource
-       PyMac_PRECHECK(GetNamedResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theType,
-                             PyMac_GetStr255, name))
-               return NULL;
-       _rv = GetNamedResource(theType,
-                              name);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Res_Get1NamedResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       ResType theType;
-       Str255 name;
-#ifndef Get1NamedResource
-       PyMac_PRECHECK(Get1NamedResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theType,
-                             PyMac_GetStr255, name))
-               return NULL;
-       _rv = Get1NamedResource(theType,
-                               name);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Res_UniqueID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       ResType theType;
-#ifndef UniqueID
-       PyMac_PRECHECK(UniqueID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &theType))
-               return NULL;
-       _rv = UniqueID(theType);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_Unique1ID(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       ResType theType;
-#ifndef Unique1ID
-       PyMac_PRECHECK(Unique1ID);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &theType))
-               return NULL;
-       _rv = Unique1ID(theType);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_UpdateResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short refNum;
-#ifndef UpdateResFile
-       PyMac_PRECHECK(UpdateResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       UpdateResFile(refNum);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_SetResPurge(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean install;
-#ifndef SetResPurge
-       PyMac_PRECHECK(SetResPurge);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &install))
-               return NULL;
-       SetResPurge(install);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_GetResFileAttrs(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       short refNum;
-#ifndef GetResFileAttrs
-       PyMac_PRECHECK(GetResFileAttrs);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       _rv = GetResFileAttrs(refNum);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_SetResFileAttrs(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short refNum;
-       short attrs;
-#ifndef SetResFileAttrs
-       PyMac_PRECHECK(SetResFileAttrs);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &refNum,
-                             &attrs))
-               return NULL;
-       SetResFileAttrs(refNum,
-                       attrs);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_OpenRFPerm(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       Str255 fileName;
-       short vRefNum;
-       SignedByte permission;
-#ifndef OpenRFPerm
-       PyMac_PRECHECK(OpenRFPerm);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hb",
-                             PyMac_GetStr255, fileName,
-                             &vRefNum,
-                             &permission))
-               return NULL;
-       _rv = OpenRFPerm(fileName,
-                        vRefNum,
-                        permission);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_HOpenResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-       SignedByte permission;
-#ifndef HOpenResFile
-       PyMac_PRECHECK(HOpenResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "hlO&b",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName,
-                             &permission))
-               return NULL;
-       _rv = HOpenResFile(vRefNum,
-                          dirID,
-                          fileName,
-                          permission);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_HCreateResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short vRefNum;
-       long dirID;
-       Str255 fileName;
-#ifndef HCreateResFile
-       PyMac_PRECHECK(HCreateResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "hlO&",
-                             &vRefNum,
-                             &dirID,
-                             PyMac_GetStr255, fileName))
-               return NULL;
-       HCreateResFile(vRefNum,
-                      dirID,
-                      fileName);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_FSpOpenResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       FSSpec spec;
-       SignedByte permission;
-#ifndef FSpOpenResFile
-       PyMac_PRECHECK(FSpOpenResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetFSSpec, &spec,
-                             &permission))
-               return NULL;
-       _rv = FSpOpenResFile(&spec,
-                            permission);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_FSpCreateResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       FSSpec spec;
-       OSType creator;
-       OSType fileType;
-       ScriptCode scriptTag;
-#ifndef FSpCreateResFile
-       PyMac_PRECHECK(FSpCreateResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&h",
-                             PyMac_GetFSSpec, &spec,
-                             PyMac_GetOSType, &creator,
-                             PyMac_GetOSType, &fileType,
-                             &scriptTag))
-               return NULL;
-       FSpCreateResFile(&spec,
-                        creator,
-                        fileType,
-                        scriptTag);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_InsertResourceFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 refNum;
-       RsrcChainLocation where;
-#ifndef InsertResourceFile
-       PyMac_PRECHECK(InsertResourceFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &refNum,
-                             &where))
-               return NULL;
-       _err = InsertResourceFile(refNum,
-                                 where);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_DetachResourceFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 refNum;
-#ifndef DetachResourceFile
-       PyMac_PRECHECK(DetachResourceFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &refNum))
-               return NULL;
-       _err = DetachResourceFile(refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Res_FSpResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       FSSpec resourceFile;
-       Boolean inChain;
-       SInt16 refNum;
-#ifndef FSpResourceFileAlreadyOpen
-       PyMac_PRECHECK(FSpResourceFileAlreadyOpen);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSSpec, &resourceFile))
-               return NULL;
-       _rv = FSpResourceFileAlreadyOpen(&resourceFile,
-                                        &inChain,
-                                        &refNum);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("bbh",
-                            _rv,
-                            inChain,
-                            refNum);
-       return _res;
-}
-
-static PyObject *Res_FSpOpenOrphanResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSSpec spec;
-       SignedByte permission;
-       SInt16 refNum;
-#ifndef FSpOpenOrphanResFile
-       PyMac_PRECHECK(FSpOpenOrphanResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetFSSpec, &spec,
-                             &permission))
-               return NULL;
-       _err = FSpOpenOrphanResFile(&spec,
-                                   permission,
-                                   &refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            refNum);
-       return _res;
-}
-
-static PyObject *Res_GetTopResourceFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 refNum;
-#ifndef GetTopResourceFile
-       PyMac_PRECHECK(GetTopResourceFile);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetTopResourceFile(&refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            refNum);
-       return _res;
-}
-
-static PyObject *Res_GetNextResourceFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 curRefNum;
-       SInt16 nextRefNum;
-#ifndef GetNextResourceFile
-       PyMac_PRECHECK(GetNextResourceFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &curRefNum))
-               return NULL;
-       _err = GetNextResourceFile(curRefNum,
-                                  &nextRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            nextRefNum);
-       return _res;
-}
-
-static PyObject *Res_FSOpenResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       FSRef ref;
-       SignedByte permission;
-#ifndef FSOpenResFile
-       PyMac_PRECHECK(FSOpenResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetFSRef, &ref,
-                             &permission))
-               return NULL;
-       _rv = FSOpenResFile(&ref,
-                           permission);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Res_FSCreateResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       FSRef parentRef;
-       UniChar *nameLength__in__;
-       UniCharCount nameLength__len__;
-       int nameLength__in_len__;
-       FSRef newRef;
-       FSSpec newSpec;
-#ifndef FSCreateResFile
-       PyMac_PRECHECK(FSCreateResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&u#",
-                             PyMac_GetFSRef, &parentRef,
-                             &nameLength__in__, &nameLength__in_len__))
-               return NULL;
-       nameLength__len__ = nameLength__in_len__;
-       FSCreateResFile(&parentRef,
-                       nameLength__len__, nameLength__in__,
-                       0,
-                       (FSCatalogInfo *)0,
-                       &newRef,
-                       &newSpec);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildFSRef, &newRef,
-                            PyMac_BuildFSSpec, &newSpec);
-       return _res;
-}
-
-static PyObject *Res_FSResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       FSRef resourceFileRef;
-       Boolean inChain;
-       SInt16 refNum;
-#ifndef FSResourceFileAlreadyOpen
-       PyMac_PRECHECK(FSResourceFileAlreadyOpen);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSRef, &resourceFileRef))
-               return NULL;
-       _rv = FSResourceFileAlreadyOpen(&resourceFileRef,
-                                       &inChain,
-                                       &refNum);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("bbh",
-                            _rv,
-                            inChain,
-                            refNum);
-       return _res;
-}
-
-static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef parentRef;
-       UniChar *nameLength__in__;
-       UniCharCount nameLength__len__;
-       int nameLength__in_len__;
-       UniChar *forkNameLength__in__;
-       UniCharCount forkNameLength__len__;
-       int forkNameLength__in_len__;
-       FSRef newRef;
-       FSSpec newSpec;
-#ifndef FSCreateResourceFile
-       PyMac_PRECHECK(FSCreateResourceFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&u#u#",
-                             PyMac_GetFSRef, &parentRef,
-                             &nameLength__in__, &nameLength__in_len__,
-                             &forkNameLength__in__, &forkNameLength__in_len__))
-               return NULL;
-       nameLength__len__ = nameLength__in_len__;
-       forkNameLength__len__ = forkNameLength__in_len__;
-       _err = FSCreateResourceFile(&parentRef,
-                                   nameLength__len__, nameLength__in__,
-                                   0,
-                                   (FSCatalogInfo *)0,
-                                   forkNameLength__len__, forkNameLength__in__,
-                                   &newRef,
-                                   &newSpec);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildFSRef, &newRef,
-                            PyMac_BuildFSSpec, &newSpec);
-       return _res;
-}
-
-static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       FSRef ref;
-       UniChar *forkNameLength__in__;
-       UniCharCount forkNameLength__len__;
-       int forkNameLength__in_len__;
-       SignedByte permissions;
-       SInt16 refNum;
-#ifndef FSOpenResourceFile
-       PyMac_PRECHECK(FSOpenResourceFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&u#b",
-                             PyMac_GetFSRef, &ref,
-                             &forkNameLength__in__, &forkNameLength__in_len__,
-                             &permissions))
-               return NULL;
-       forkNameLength__len__ = forkNameLength__in_len__;
-       _err = FSOpenResourceFile(&ref,
-                                 forkNameLength__len__, forkNameLength__in__,
-                                 permissions,
-                                 &refNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            refNum);
-       return _res;
-}
-
-static PyObject *Res_Handle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       char *buf;
-       int len;
-       Handle h;
-       ResourceObject *rv;
-
-       if (!PyArg_ParseTuple(_args, "s#", &buf, &len))
-               return NULL;
-       h = NewHandle(len);
-       if ( h == NULL ) {
-               PyErr_NoMemory();
-               return NULL;
-       }
-       HLock(h);
-       memcpy(*h, buf, len);
-       HUnlock(h);
-       rv = (ResourceObject *)ResObj_New(h);
-       rv->ob_freeit = PyMac_AutoDisposeHandle;
-       _res = (PyObject *)rv;
-       return _res;
-
-}
-
-static PyMethodDef Res_methods[] = {
-       {"CloseResFile", (PyCFunction)Res_CloseResFile, 1,
-        PyDoc_STR("(short refNum) -> None")},
-       {"ResError", (PyCFunction)Res_ResError, 1,
-        PyDoc_STR("() -> None")},
-       {"CurResFile", (PyCFunction)Res_CurResFile, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"UseResFile", (PyCFunction)Res_UseResFile, 1,
-        PyDoc_STR("(short refNum) -> None")},
-       {"CountTypes", (PyCFunction)Res_CountTypes, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"Count1Types", (PyCFunction)Res_Count1Types, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetIndType", (PyCFunction)Res_GetIndType, 1,
-        PyDoc_STR("(short index) -> (ResType theType)")},
-       {"Get1IndType", (PyCFunction)Res_Get1IndType, 1,
-        PyDoc_STR("(short index) -> (ResType theType)")},
-       {"SetResLoad", (PyCFunction)Res_SetResLoad, 1,
-        PyDoc_STR("(Boolean load) -> None")},
-       {"CountResources", (PyCFunction)Res_CountResources, 1,
-        PyDoc_STR("(ResType theType) -> (short _rv)")},
-       {"Count1Resources", (PyCFunction)Res_Count1Resources, 1,
-        PyDoc_STR("(ResType theType) -> (short _rv)")},
-       {"GetIndResource", (PyCFunction)Res_GetIndResource, 1,
-        PyDoc_STR("(ResType theType, short index) -> (Handle _rv)")},
-       {"Get1IndResource", (PyCFunction)Res_Get1IndResource, 1,
-        PyDoc_STR("(ResType theType, short index) -> (Handle _rv)")},
-       {"GetResource", (PyCFunction)Res_GetResource, 1,
-        PyDoc_STR("(ResType theType, short theID) -> (Handle _rv)")},
-       {"Get1Resource", (PyCFunction)Res_Get1Resource, 1,
-        PyDoc_STR("(ResType theType, short theID) -> (Handle _rv)")},
-       {"GetNamedResource", (PyCFunction)Res_GetNamedResource, 1,
-        PyDoc_STR("(ResType theType, Str255 name) -> (Handle _rv)")},
-       {"Get1NamedResource", (PyCFunction)Res_Get1NamedResource, 1,
-        PyDoc_STR("(ResType theType, Str255 name) -> (Handle _rv)")},
-       {"UniqueID", (PyCFunction)Res_UniqueID, 1,
-        PyDoc_STR("(ResType theType) -> (short _rv)")},
-       {"Unique1ID", (PyCFunction)Res_Unique1ID, 1,
-        PyDoc_STR("(ResType theType) -> (short _rv)")},
-       {"UpdateResFile", (PyCFunction)Res_UpdateResFile, 1,
-        PyDoc_STR("(short refNum) -> None")},
-       {"SetResPurge", (PyCFunction)Res_SetResPurge, 1,
-        PyDoc_STR("(Boolean install) -> None")},
-       {"GetResFileAttrs", (PyCFunction)Res_GetResFileAttrs, 1,
-        PyDoc_STR("(short refNum) -> (short _rv)")},
-       {"SetResFileAttrs", (PyCFunction)Res_SetResFileAttrs, 1,
-        PyDoc_STR("(short refNum, short attrs) -> None")},
-       {"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
-        PyDoc_STR("(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)")},
-       {"HOpenResFile", (PyCFunction)Res_HOpenResFile, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SignedByte permission) -> (short _rv)")},
-       {"HCreateResFile", (PyCFunction)Res_HCreateResFile, 1,
-        PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
-       {"FSpOpenResFile", (PyCFunction)Res_FSpOpenResFile, 1,
-        PyDoc_STR("(FSSpec spec, SignedByte permission) -> (short _rv)")},
-       {"FSpCreateResFile", (PyCFunction)Res_FSpCreateResFile, 1,
-        PyDoc_STR("(FSSpec spec, OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
-       {"InsertResourceFile", (PyCFunction)Res_InsertResourceFile, 1,
-        PyDoc_STR("(SInt16 refNum, RsrcChainLocation where) -> None")},
-       {"DetachResourceFile", (PyCFunction)Res_DetachResourceFile, 1,
-        PyDoc_STR("(SInt16 refNum) -> None")},
-       {"FSpResourceFileAlreadyOpen", (PyCFunction)Res_FSpResourceFileAlreadyOpen, 1,
-        PyDoc_STR("(FSSpec resourceFile) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
-       {"FSpOpenOrphanResFile", (PyCFunction)Res_FSpOpenOrphanResFile, 1,
-        PyDoc_STR("(FSSpec spec, SignedByte permission) -> (SInt16 refNum)")},
-       {"GetTopResourceFile", (PyCFunction)Res_GetTopResourceFile, 1,
-        PyDoc_STR("() -> (SInt16 refNum)")},
-       {"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
-        PyDoc_STR("(SInt16 curRefNum) -> (SInt16 nextRefNum)")},
-       {"FSOpenResFile", (PyCFunction)Res_FSOpenResFile, 1,
-        PyDoc_STR("(FSRef ref, SignedByte permission) -> (short _rv)")},
-       {"FSCreateResFile", (PyCFunction)Res_FSCreateResFile, 1,
-        PyDoc_STR("(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)")},
-       {"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
-        PyDoc_STR("(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
-       {"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
-        PyDoc_STR("(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (FSRef newRef, FSSpec newSpec)")},
-       {"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
-        PyDoc_STR("(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (SInt16 refNum)")},
-       {"Handle", (PyCFunction)Res_Handle, 1,
-        PyDoc_STR("Convert a string to a Handle object.\n\nResource() and Handle() are very similar, but objects created with Handle() are\nby default automatically DisposeHandle()d upon object cleanup. Use AutoDispose()\nto change this.\n")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-/* Alternative version of ResObj_New, which returns None for null argument */
-PyObject *OptResObj_New(Handle itself)
-{
-        if (itself == NULL) {
-                Py_INCREF(Py_None);
-                return Py_None;
-        }
-        return ResObj_New(itself);
-}
-
-int OptResObj_Convert(PyObject *v, Handle *p_itself)
-{
-        PyObject *tmp;
-
-        if ( v == Py_None ) {
-                *p_itself = NULL;
-                return 1;
-        }
-        if (ResObj_Check(v))
-        {
-                *p_itself = ((ResourceObject *)v)->ob_itself;
-                return 1;
-        }
-        /* If it isn't a resource yet see whether it is convertible */
-        if ( (tmp=PyObject_CallMethod(v, "as_Resource", "")) ) {
-                *p_itself = ((ResourceObject *)tmp)->ob_itself;
-                Py_DECREF(tmp);
-                return 1;
-        }
-        PyErr_Clear();
-        PyErr_SetString(PyExc_TypeError, "Resource required");
-        return 0;
-}
-
-
-void init_Res(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, ResObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, ResObj_Convert);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, OptResObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, OptResObj_Convert);
-
-
-       m = Py_InitModule("_Res", Res_methods);
-       d = PyModule_GetDict(m);
-       Res_Error = PyMac_GetOSErrException();
-       if (Res_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Res_Error) != 0)
-               return;
-       Py_TYPE(&Resource_Type) = &PyType_Type;
-       if (PyType_Ready(&Resource_Type) < 0) return;
-       Py_INCREF(&Resource_Type);
-       PyModule_AddObject(m, "Resource", (PyObject *)&Resource_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Resource_Type);
-       PyModule_AddObject(m, "ResourceType", (PyObject *)&Resource_Type);
-}
-
-/* ======================== End module _Res ========================= */
-
diff --git a/Mac/Modules/res/resedit.py b/Mac/Modules/res/resedit.py
deleted file mode 100644 (file)
index b3ef790..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-##resource_body = """
-##char *buf;
-##int len;
-##Handle h;
-##
-##if (!PyArg_ParseTuple(_args, "s#", &buf, &len))
-##      return NULL;
-##h = NewHandle(len);
-##if ( h == NULL ) {
-##      PyErr_NoMemory();
-##      return NULL;
-##}
-##HLock(h);
-##memcpy(*h, buf, len);
-##HUnlock(h);
-##_res = ResObj_New(h);
-##return _res;
-##"""
-##
-##f = ManualGenerator("Resource", resource_body)
-##f.docstring = lambda: """Convert a string to a resource object.
-##
-##The created resource object is actually just a handle,
-##apply AddResource() to write it to a resource file.
-##See also the Handle() docstring.
-##"""
-##functions.append(f)
-
-handle_body = """
-char *buf;
-int len;
-Handle h;
-ResourceObject *rv;
-
-if (!PyArg_ParseTuple(_args, "s#", &buf, &len))
-        return NULL;
-h = NewHandle(len);
-if ( h == NULL ) {
-        PyErr_NoMemory();
-        return NULL;
-}
-HLock(h);
-memcpy(*h, buf, len);
-HUnlock(h);
-rv = (ResourceObject *)ResObj_New(h);
-rv->ob_freeit = PyMac_AutoDisposeHandle;
-_res = (PyObject *)rv;
-return _res;
-"""
-
-f = ManualGenerator("Handle", handle_body)
-f.docstring = lambda: """Convert a string to a Handle object.
-
-Resource() and Handle() are very similar, but objects created with Handle() are
-by default automatically DisposeHandle()d upon object cleanup. Use AutoDispose()
-to change this.
-"""
-functions.append(f)
-
-# Convert resources to other things.
-
-as_xxx_body = """
-_res = %sObj_New((%sHandle)_self->ob_itself);
-return _res;
-"""
-
-def genresconverter(longname, shortname):
-
-    f = ManualGenerator("as_%s"%longname, as_xxx_body%(shortname, longname))
-    docstring =  "Return this resource/handle as a %s"%longname
-    f.docstring = lambda docstring=docstring: docstring
-    return f
-
-resmethods.append(genresconverter("Control", "Ctl"))
-resmethods.append(genresconverter("Menu", "Menu"))
-
-# The definition of this one is MacLoadResource, so we do it by hand...
-
-f = ResMethod(void, 'LoadResource',
-    (Handle, 'theResource', InMode),
-)
-resmethods.append(f)
-
-#
-# A method to set the auto-dispose flag
-#
-AutoDispose_body = """
-int onoff, old = 0;
-if (!PyArg_ParseTuple(_args, "i", &onoff))
-        return NULL;
-if ( _self->ob_freeit )
-        old = 1;
-if ( onoff )
-        _self->ob_freeit = PyMac_AutoDisposeHandle;
-else
-        _self->ob_freeit = NULL;
-_res = Py_BuildValue("i", old);
-return _res;
-"""
-f = ManualGenerator("AutoDispose", AutoDispose_body)
-f.docstring = lambda: "(int)->int. Automatically DisposeHandle the object on Python object cleanup"
-resmethods.append(f)
diff --git a/Mac/Modules/res/resscan.py b/Mac/Modules/res/resscan.py
deleted file mode 100644 (file)
index 542d3ec..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# Scan Resources.h header file, generate resgen.py and Resources.py files.
-# Then run ressupport to generate Resmodule.c.
-# (Should learn how to tell the compiler to compile it as well.)
-
-import sys
-import MacOS
-
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-def main():
-    input = "Resources.h"
-    output = "resgen.py"
-    defsoutput = TOOLBOXDIR + "Resources.py"
-    scanner = ResourcesScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now doing 'import ressupport' ===")
-    import ressupport
-    print("=== Done 'import ressupport'.  It's up to you to compile Resmodule.c ===")
-
-class ResourcesScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "ResFunction"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t == "Handle" and m == "InMode":
-                classname = "ResMethod"
-                listname = "resmethods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "ReadPartialResource",
-                "WritePartialResource",
-                "TempInsertROMMap",
-##                      "RmveResource",         # RemoveResource
-##                      "SizeResource",         # GetResourceSizeOnDisk
-##                      "MaxSizeRsrc",          # GetMaxResourceSize
-                # OS8 only
-                'RGetResource',
-                'OpenResFile',
-                'CreateResFile',
-                'RsrcZoneInit',
-                'InitResources',
-                'RsrcMapEntry',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("Str255", "*", "InMode")],
-                 [("*", "*", "OutMode")]),
-
-                ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
-                 [("InBuffer", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("long", "*", "InMode")],
-                 [("InOutBuffer", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("long", "*", "InMode"),
-                                            ("long", "*", "OutMode")],
-                 [("OutBuffer", "*", "InOutMode")]),
-
-                ([("SInt8", "*", "*")],
-                 [("SignedByte", "*", "*")]),
-
-
-                ([("UniCharCount", "*", "InMode"), ("UniChar_ptr", "*", "InMode")],
-                 [("UnicodeReverseInBuffer", "*", "*")]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/res/ressupport.py b/Mac/Modules/res/ressupport.py
deleted file mode 100644 (file)
index 4eed9ec..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-# This script will generate the Resources interface for Python.
-# It uses the "bgen" package to generate C code.
-# It execs the file resgen.py which contain the function definitions
-# (resgen.py was generated by resscan.py, scanning the <Resources.h> header file).
-
-from macsupport import *
-
-class ResMixIn:
-
-    def checkit(self):
-        if self.returntype.__class__ != OSErrType:
-            OutLbrace()
-            Output("OSErr _err = ResError();")
-            Output("if (_err != noErr) return PyMac_Error(_err);")
-            OutRbrace()
-        FunctionGenerator.checkit(self) # XXX
-
-class ResFunction(ResMixIn, OSErrWeakLinkFunctionGenerator): pass
-class ResMethod(ResMixIn, OSErrWeakLinkMethodGenerator): pass
-
-RsrcChainLocation = Type("RsrcChainLocation", "h")
-FSCatalogInfoBitmap = FakeType("0") # Type("FSCatalogInfoBitmap", "l")
-FSCatalogInfo_ptr = FakeType("(FSCatalogInfo *)0")
-
-# includestuff etc. are imported from macsupport
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_ResObj_New(Handle);
-extern int _ResObj_Convert(PyObject *, Handle *);
-extern PyObject *_OptResObj_New(Handle);
-extern int _OptResObj_Convert(PyObject *, Handle *);
-#define ResObj_New _ResObj_New
-#define ResObj_Convert _ResObj_Convert
-#define OptResObj_New _OptResObj_New
-#define OptResObj_Convert _OptResObj_Convert
-#endif
-
-/* Function to dispose a resource, with a "normal" calling sequence */
-static void
-PyMac_AutoDisposeHandle(Handle h)
-{
-        DisposeHandle(h);
-}
-"""
-
-finalstuff = finalstuff + """
-
-/* Alternative version of ResObj_New, which returns None for null argument */
-PyObject *OptResObj_New(Handle itself)
-{
-        if (itself == NULL) {
-                Py_INCREF(Py_None);
-                return Py_None;
-        }
-        return ResObj_New(itself);
-}
-
-int OptResObj_Convert(PyObject *v, Handle *p_itself)
-{
-        PyObject *tmp;
-
-        if ( v == Py_None ) {
-                *p_itself = NULL;
-                return 1;
-        }
-        if (ResObj_Check(v))
-        {
-                *p_itself = ((ResourceObject *)v)->ob_itself;
-                return 1;
-        }
-        /* If it isn't a resource yet see whether it is convertible */
-        if ( (tmp=PyObject_CallMethod(v, "as_Resource", "")) ) {
-                *p_itself = ((ResourceObject *)tmp)->ob_itself;
-                Py_DECREF(tmp);
-                return 1;
-        }
-        PyErr_Clear();
-        PyErr_SetString(PyExc_TypeError, "Resource required");
-        return 0;
-}
-"""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, ResObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, ResObj_Convert);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, OptResObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, OptResObj_Convert);
-"""
-
-module = MacModule('_Res', 'Res', includestuff, finalstuff, initstuff)
-
-class ResDefinition(PEP253Mixin, GlobalObjectDefinition):
-    getsetlist = [
-            ('data',
-            """
-            PyObject *res;
-            char state;
-
-            state = HGetState(self->ob_itself);
-            HLock(self->ob_itself);
-            res = PyString_FromStringAndSize(
-                    *self->ob_itself,
-                    GetHandleSize(self->ob_itself));
-            HUnlock(self->ob_itself);
-            HSetState(self->ob_itself, state);
-            return res;
-            """,
-            """
-            char *data;
-            long size;
-
-            if ( v == NULL )
-                    return -1;
-            if ( !PyString_Check(v) )
-                    return -1;
-            size = PyString_Size(v);
-            data = PyString_AsString(v);
-            /* XXXX Do I need the GetState/SetState calls? */
-            SetHandleSize(self->ob_itself, size);
-            if ( MemError())
-                    return -1;
-            HLock(self->ob_itself);
-            memcpy((char *)*self->ob_itself, data, size);
-            HUnlock(self->ob_itself);
-            /* XXXX Should I do the Changed call immedeately? */
-            return 0;
-            """,
-            'The resource data'
-            ), (
-            'size',
-            'return PyInt_FromLong(GetHandleSize(self->ob_itself));',
-            None,
-            'The length of the resource data'
-            )]
-
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-
-    def outputCheckConvertArg(self):
-        # if it isn't a resource we may be able to coerce it
-        Output("if (!%s_Check(v))", self.prefix)
-        OutLbrace()
-        Output("PyObject *tmp;")
-        Output('if ( (tmp=PyObject_CallMethod(v, "as_Resource", "")) )')
-        OutLbrace()
-        Output("*p_itself = ((ResourceObject *)tmp)->ob_itself;")
-        Output("Py_DECREF(tmp);")
-        Output("return 1;")
-        OutRbrace()
-        Output("PyErr_Clear();")
-        OutRbrace()
-
-    def outputStructMembers(self):
-        GlobalObjectDefinition.outputStructMembers(self)
-        Output("void (*ob_freeit)(%s ptr);", self.itselftype)
-
-    def outputInitStructMembers(self):
-        GlobalObjectDefinition.outputInitStructMembers(self)
-        Output("it->ob_freeit = NULL;")
-
-    def outputCleanupStructMembers(self):
-        Output("if (self->ob_freeit && self->ob_itself)")
-        OutLbrace()
-        Output("self->ob_freeit(self->ob_itself);")
-        OutRbrace()
-        Output("self->ob_itself = NULL;")
-
-    def output_tp_newBody(self):
-        Output("PyObject *self;")
-        Output
-        Output("if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;")
-        Output("((%s *)self)->ob_itself = NULL;", self.objecttype)
-        Output("((%s *)self)->ob_freeit = NULL;", self.objecttype)
-        Output("return self;")
-
-    def output_tp_initBody(self):
-        Output("char *srcdata = NULL;")
-        Output("int srclen = 0;")
-        Output("%s itself;", self.itselftype);
-        Output("char *kw[] = {\"itself\", 0};")
-        Output()
-        Output("if (PyArg_ParseTupleAndKeywords(_args, _kwds, \"O&\", kw, %s_Convert, &itself))",
-                self.prefix);
-        OutLbrace()
-        Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
-        Output("return 0;")
-        OutRbrace()
-        Output("PyErr_Clear();")
-        Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|s#\", kw, &srcdata, &srclen)) return -1;")
-        Output("if ((itself = NewHandle(srclen)) == NULL)")
-        OutLbrace()
-        Output("PyErr_NoMemory();")
-        Output("return 0;")
-        OutRbrace()
-        Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
-# XXXX          Output("((%s *)self)->ob_freeit = PyMac_AutoDisposeHandle;")
-        Output("if (srclen && srcdata)")
-        OutLbrace()
-        Output("HLock(itself);")
-        Output("memcpy(*itself, srcdata, srclen);")
-        Output("HUnlock(itself);")
-        OutRbrace()
-        Output("return 0;")
-
-resobject = ResDefinition('Resource', 'ResObj', 'Handle')
-module.addobject(resobject)
-
-functions = []
-resmethods = []
-
-exec(open('resgen.py').read())
-exec(open('resedit.py').read())
-
-for f in functions: module.add(f)
-for f in resmethods: resobject.add(f)
-
-SetOutputFileName('_Resmodule.c')
-module.generate()
diff --git a/Mac/Modules/scrap/_Scrapmodule.c b/Mac/Modules/scrap/_Scrapmodule.c
deleted file mode 100644 (file)
index bd27512..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
-
-/* ========================= Module _Scrap ========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-static PyObject *Scrap_Error;
-
-/* ----------------------- Object type Scrap ------------------------ */
-
-PyTypeObject Scrap_Type;
-
-#define ScrapObj_Check(x) (Py_TYPE(x) == &Scrap_Type || PyObject_TypeCheck((x), &Scrap_Type))
-
-typedef struct ScrapObject {
-       PyObject_HEAD
-       ScrapRef ob_itself;
-} ScrapObject;
-
-PyObject *ScrapObj_New(ScrapRef itself)
-{
-       ScrapObject *it;
-       it = PyObject_NEW(ScrapObject, &Scrap_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-int ScrapObj_Convert(PyObject *v, ScrapRef *p_itself)
-{
-       if (!ScrapObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Scrap required");
-               return 0;
-       }
-       *p_itself = ((ScrapObject *)v)->ob_itself;
-       return 1;
-}
-
-static void ScrapObj_dealloc(ScrapObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *ScrapObj_GetScrapFlavorFlags(ScrapObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ScrapFlavorType flavorType;
-       ScrapFlavorFlags flavorFlags;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &flavorType))
-               return NULL;
-       _err = GetScrapFlavorFlags(_self->ob_itself,
-                                  flavorType,
-                                  &flavorFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            flavorFlags);
-       return _res;
-}
-
-static PyObject *ScrapObj_GetScrapFlavorSize(ScrapObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ScrapFlavorType flavorType;
-       Size byteCount;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &flavorType))
-               return NULL;
-       _err = GetScrapFlavorSize(_self->ob_itself,
-                                 flavorType,
-                                 &byteCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            byteCount);
-       return _res;
-}
-
-static PyObject *ScrapObj_GetScrapFlavorData(ScrapObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ScrapFlavorType flavorType;
-       Size byteCount;
-
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &flavorType))
-               return NULL;
-       _err = GetScrapFlavorSize(_self->ob_itself,
-                                 flavorType,
-                                 &byteCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = PyString_FromStringAndSize(NULL, (int)byteCount);
-       if ( _res == NULL ) return NULL;
-       _err = GetScrapFlavorData(_self->ob_itself,
-                                 flavorType,
-                                 &byteCount,
-                                 PyString_AS_STRING(_res));
-       if (_err != noErr) {
-               Py_XDECREF(_res);
-               return PyMac_Error(_err);
-       }
-       return _res;
-}
-
-static PyObject *ScrapObj_PutScrapFlavor(ScrapObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ScrapFlavorType flavorType;
-       ScrapFlavorFlags flavorFlags;
-       char *flavorData__in__;
-       int flavorData__in_len__;
-       if (!PyArg_ParseTuple(_args, "O&Ks#",
-                             PyMac_GetOSType, &flavorType,
-                             &flavorFlags,
-                             &flavorData__in__, &flavorData__in_len__))
-               return NULL;
-       _err = PutScrapFlavor(_self->ob_itself,
-                             flavorType,
-                             flavorFlags,
-                             (Size)flavorData__in_len__,
-                             flavorData__in__);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *ScrapObj_GetScrapFlavorCount(ScrapObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 infoCount;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetScrapFlavorCount(_self->ob_itself,
-                                  &infoCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            infoCount);
-       return _res;
-}
-
-static PyObject *ScrapObj_GetScrapFlavorInfoList(ScrapObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PyObject *item;
-       OSStatus _err;
-       UInt32 infoCount;
-       ScrapFlavorInfo *infolist = NULL;
-       int i;
-       
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetScrapFlavorCount(_self->ob_itself,
-                                  &infoCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       if (infoCount == 0) return Py_BuildValue("[]");
-       
-       if ((infolist = (ScrapFlavorInfo *)malloc(infoCount*sizeof(ScrapFlavorInfo))) == NULL )
-               return PyErr_NoMemory();
-       
-       _err = GetScrapFlavorInfoList(_self->ob_itself, &infoCount, infolist);
-       if (_err != noErr) {
-               free(infolist);
-               return NULL;
-       }
-       if ((_res = PyList_New(infoCount)) == NULL ) {
-               free(infolist);
-               return NULL;
-       }
-       for(i=0; i<infoCount; i++) {
-               item = Py_BuildValue("O&l", PyMac_BuildOSType, infolist[i].flavorType,
-                       infolist[i].flavorFlags);
-               if ( !item || PyList_SetItem(_res, i, item) < 0 ) {
-                       Py_DECREF(_res);
-                       free(infolist);
-                       return NULL;
-               }
-       }
-       free(infolist);
-       return _res;
-}
-
-static PyMethodDef ScrapObj_methods[] = {
-       {"GetScrapFlavorFlags", (PyCFunction)ScrapObj_GetScrapFlavorFlags, 1,
-        PyDoc_STR("(ScrapFlavorType flavorType) -> (ScrapFlavorFlags flavorFlags)")},
-       {"GetScrapFlavorSize", (PyCFunction)ScrapObj_GetScrapFlavorSize, 1,
-        PyDoc_STR("(ScrapFlavorType flavorType) -> (Size byteCount)")},
-       {"GetScrapFlavorData", (PyCFunction)ScrapObj_GetScrapFlavorData, 1,
-        PyDoc_STR("(ScrapFlavorType flavorType, Buffer destination) -> (Size byteCount)")},
-       {"PutScrapFlavor", (PyCFunction)ScrapObj_PutScrapFlavor, 1,
-        PyDoc_STR("(ScrapFlavorType flavorType, ScrapFlavorFlags flavorFlags, Size flavorSize, Buffer flavorData) -> None")},
-       {"GetScrapFlavorCount", (PyCFunction)ScrapObj_GetScrapFlavorCount, 1,
-        PyDoc_STR("() -> (UInt32 infoCount)")},
-       {"GetScrapFlavorInfoList", (PyCFunction)ScrapObj_GetScrapFlavorInfoList, 1,
-        PyDoc_STR("() -> ([(ScrapFlavorType, ScrapFlavorInfo), ...])")},
-       {NULL, NULL, 0}
-};
-
-PyMethodChain ScrapObj_chain = { ScrapObj_methods, NULL };
-
-static PyObject *ScrapObj_getattr(ScrapObject *self, char *name)
-{
-       return Py_FindMethodInChain(&ScrapObj_chain, (PyObject *)self, name);
-}
-
-#define ScrapObj_setattr NULL
-
-#define ScrapObj_compare NULL
-
-#define ScrapObj_repr NULL
-
-#define ScrapObj_hash NULL
-
-PyTypeObject Scrap_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Scrap.Scrap", /*tp_name*/
-       sizeof(ScrapObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) ScrapObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc) ScrapObj_getattr, /*tp_getattr*/
-       (setattrfunc) ScrapObj_setattr, /*tp_setattr*/
-       (cmpfunc) ScrapObj_compare, /*tp_compare*/
-       (reprfunc) ScrapObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) ScrapObj_hash, /*tp_hash*/
-};
-
-/* --------------------- End object type Scrap ---------------------- */
-
-static PyObject *Scrap_LoadScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = LoadScrap();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Scrap_UnloadScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = UnloadScrap();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Scrap_GetCurrentScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       ScrapRef scrap;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetCurrentScrap(&scrap);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ScrapObj_New, scrap);
-       return _res;
-}
-
-static PyObject *Scrap_ClearCurrentScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = ClearCurrentScrap();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Scrap_CallInScrapPromises(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CallInScrapPromises();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef Scrap_methods[] = {
-       {"LoadScrap", (PyCFunction)Scrap_LoadScrap, 1,
-        PyDoc_STR("() -> None")},
-       {"UnloadScrap", (PyCFunction)Scrap_UnloadScrap, 1,
-        PyDoc_STR("() -> None")},
-       {"GetCurrentScrap", (PyCFunction)Scrap_GetCurrentScrap, 1,
-        PyDoc_STR("() -> (ScrapRef scrap)")},
-       {"ClearCurrentScrap", (PyCFunction)Scrap_ClearCurrentScrap, 1,
-        PyDoc_STR("() -> None")},
-       {"CallInScrapPromises", (PyCFunction)Scrap_CallInScrapPromises, 1,
-        PyDoc_STR("() -> None")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_Scrap(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-       m = Py_InitModule("_Scrap", Scrap_methods);
-       d = PyModule_GetDict(m);
-       Scrap_Error = PyMac_GetOSErrException();
-       if (Scrap_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Scrap_Error) != 0)
-               return;
-       Py_TYPE(&Scrap_Type) = &PyType_Type;
-       Py_INCREF(&Scrap_Type);
-       if (PyDict_SetItemString(d, "ScrapType", (PyObject *)&Scrap_Type) != 0)
-               Py_FatalError("can't initialize ScrapType");
-}
-
-/* ======================= End module _Scrap ======================== */
-
diff --git a/Mac/Modules/scrap/scrapscan.py b/Mac/Modules/scrap/scrapscan.py
deleted file mode 100644 (file)
index 0b977b6..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-#
-# Note that the scrap-manager include file is so weird that this
-# generates a boilerplate to be edited by hand.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "Scrap"
-SHORT = "scrap"
-
-def main():
-    input = "Scrap.h"
-    output = SHORT + "gen.py"
-    defsoutput = "@Scrap.py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-##      print "=== Testing definitions output code ==="
-##      exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t == 'ScrapRef' and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "GetScrapFlavorInfoList",
-                'InfoScrap',
-                'GetScrap',
-                'ZeroScrap',
-                'PutScrap',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                'ScrapPromiseKeeperUPP',
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([('void', '*', 'OutMode')], [('putscrapbuffer', '*', 'InMode')]),
-                ([('void_ptr', '*', 'InMode')], [('putscrapbuffer', '*', 'InMode')]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/scrap/scrapsupport.py b/Mac/Modules/scrap/scrapsupport.py
deleted file mode 100644 (file)
index b4226a5..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-# NOTE: the scrap include file is so bad that the bgen output has to be
-# massaged by hand.
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Scrap.h'               # The Apple header file
-MODNAME = '_Scrap'                              # The name of the module
-OBJECTNAME = 'Scrap'                    # The basic name of the objects used here
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Scrap'                     # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + 'Ref' # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = '@' + MODNAME + "module.c" # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-ScrapRef = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-/*
-** Generate ScrapInfo records
-*/
-static PyObject *
-SCRRec_New(itself)
-        ScrapStuff *itself;
-{
-
-        return Py_BuildValue("lO&hhO&", itself->scrapSize,
-                ResObj_New, itself->scrapHandle, itself->scrapCount, itself->scrapState,
-                PyMac_BuildStr255, itself->scrapName);
-}
-"""
-
-ScrapStuffPtr = OpaqueByValueType('ScrapStuffPtr', 'SCRRec')
-ScrapFlavorType = OSTypeType('ScrapFlavorType')
-ScrapFlavorFlags = Type('ScrapFlavorFlags', 'l')
-#ScrapFlavorInfo = OpaqueType('ScrapFlavorInfo', 'ScrapFlavorInfo')
-putscrapbuffer = FixedInputBufferType('void *')
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    pass
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-Method = OSErrMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/snd/_Sndihooks.c b/Mac/Modules/snd/_Sndihooks.c
deleted file mode 100644 (file)
index 383663a..0000000
+++ /dev/null
@@ -1,512 +0,0 @@
-/***********************************************************
-Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
-The Netherlands.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Stichting Mathematisch
-Centrum or CWI or Corporation for National Research Initiatives or
-CNRI not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-While CWI is the initial source for this software, a modified version
-is made available by the Corporation for National Research Initiatives
-(CNRI) at the Internet address ftp://ftp.python.org.
-
-STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
-CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-******************************************************************/
-
-#include "Python.h"
-#include "pymactoolbox.h"
-#include <Sound.h>
-
-#pragma options align=mac68k
-struct SampleRateAvailable_arg {
-       short   numrates;
-       Handle  rates;
-};
-
-struct SampleSizeAvailable_arg {
-       short   numsizes;
-       Handle  sizes;
-};
-
-#pragma options align=reset
-
-static PyObject *ErrorObject;
-
-
-/* Convert Python object to unsigned Fixed */
-static int
-PyMac_GetUFixed(PyObject *v, Fixed *f)
-{
-       double d;
-       unsigned long uns;
-       
-       if( !PyArg_Parse(v, "d", &d))
-               return 0;
-       uns = (unsigned long)(d * 0x10000);
-       *f = (Fixed)uns;
-       return 1;
-}
-
-/* Convert a Point to a Python object */
-static PyObject *
-PyMac_BuildUFixed(Fixed f)
-{
-       double d;
-       unsigned long funs;
-       
-       funs = (unsigned long)f;
-       
-       d = funs;
-       d = d / 0x10000;
-       return Py_BuildValue("d", d);
-}
-
-
-/* ----------------------------------------------------- */
-
-static char sndih_getChannelAvailable__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getChannelAvailable(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short nchannel;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siChannelAvailable, (Ptr)&nchannel)) != noErr )
-               return PyMac_Error(err);
-       return Py_BuildValue("h", nchannel);
-}
-
-static char sndih_getNumberChannels__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getNumberChannels(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short nchannel;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siNumberChannels, (Ptr)&nchannel)) != noErr )
-               return PyMac_Error(err);
-       return Py_BuildValue("h", nchannel);
-}
-
-static char sndih_setNumberChannels__doc__[] =
-""
-;
-
-static PyObject *
-sndih_setNumberChannels(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short nchannel;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "lh", &inRefNum, &nchannel))
-               return NULL;
-       
-       if( (err=SPBSetDeviceInfo(inRefNum, siNumberChannels, (Ptr)&nchannel)) != noErr )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char sndih_getContinuous__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getContinuous(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short onoff;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siContinuous, (Ptr)&onoff)) != noErr )
-               return PyMac_Error(err);
-       return Py_BuildValue("h", onoff);
-}
-
-static char sndih_setContinuous__doc__[] =
-""
-;
-
-static PyObject *
-sndih_setContinuous(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short onoff;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "lh", &inRefNum, &onoff))
-               return NULL;
-       
-       if( (err=SPBSetDeviceInfo(inRefNum, siContinuous, (Ptr)&onoff)) != noErr )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char sndih_getInputSourceNames__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getInputSourceNames(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       Handle names;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siInputSourceNames, (Ptr)&names)) != noErr )
-               return PyMac_Error(err);
-       return Py_BuildValue("O&", ResObj_New, names);
-}
-
-static char sndih_getInputSource__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getInputSource(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short source;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siInputSource, (Ptr)&source)) != noErr )
-               return PyMac_Error(err);
-       return Py_BuildValue("h", source);
-}
-
-static char sndih_setInputSource__doc__[] =
-""
-;
-
-static PyObject *
-sndih_setInputSource(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short source;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "lh", &inRefNum, &source))
-               return NULL;
-       
-       if( (err=SPBSetDeviceInfo(inRefNum, siInputSource, (Ptr)&source)) != noErr )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char sndih_getPlayThruOnOff__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getPlayThruOnOff(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short onoff;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siPlayThruOnOff, (Ptr)&onoff)) != noErr )
-               return PyMac_Error(err);
-       return Py_BuildValue("h", onoff);
-}
-
-static char sndih_setPlayThruOnOff__doc__[] =
-""
-;
-
-static PyObject *
-sndih_setPlayThruOnOff(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short onoff;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "lh", &inRefNum, &onoff))
-               return NULL;
-       
-       if( (err=SPBSetDeviceInfo(inRefNum, siPlayThruOnOff, (Ptr)&onoff)) != noErr )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char sndih_getSampleRate__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getSampleRate(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       Fixed sample_rate;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siSampleRate, (Ptr)&sample_rate)) != noErr )
-               return PyMac_Error(err);
-       return Py_BuildValue("O&", PyMac_BuildUFixed, sample_rate);
-}
-
-static char sndih_setSampleRate__doc__[] =
-""
-;
-
-static PyObject *
-sndih_setSampleRate(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       Fixed sample_rate;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "lO&", &inRefNum, PyMac_GetUFixed, &sample_rate))
-               return NULL;
-       
-       if( (err=SPBSetDeviceInfo(inRefNum, siSampleRate, (Ptr)&sample_rate)) != noErr )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char sndih_getSampleSize__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getSampleSize(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short bits;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siSampleSize, (Ptr)&bits)) != noErr )
-               return PyMac_Error(err);
-       return Py_BuildValue("h", bits);
-}
-
-static char sndih_setSampleSize__doc__[] =
-""
-;
-
-static PyObject *
-sndih_setSampleSize(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       short size;
-       OSErr err;
-
-       if (!PyArg_ParseTuple(args, "lh", &inRefNum, &size))
-               return NULL;
-       
-       if( (err=SPBSetDeviceInfo(inRefNum, siSampleSize, (Ptr)&size)) != noErr )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char sndih_getSampleSizeAvailable__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getSampleSizeAvailable(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       struct SampleSizeAvailable_arg arg;
-       OSErr err;
-       PyObject *rsizes;
-       short *fsizes;
-       int i;
-
-       arg.sizes = NULL;
-       rsizes = NULL;
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siSampleSizeAvailable, (Ptr)&arg)) != noErr ) {
-               return PyMac_Error(err);
-       }
-       fsizes = (short *)*(arg.sizes);
-       /* Handle contains a list of rates */
-       if( (rsizes = PyTuple_New(arg.numsizes)) == NULL)
-               return NULL;
-       for( i=0; i<arg.numsizes; i++ )
-               PyTuple_SetItem(rsizes, i, PyLong_FromLong((long)fsizes[i]));
-       return rsizes;
-}
-
-static char sndih_getSampleRateAvailable__doc__[] =
-""
-;
-
-static PyObject *
-sndih_getSampleRateAvailable(self, args)
-       PyObject *self; /* Not used */
-       PyObject *args;
-{
-       long inRefNum;
-       struct SampleRateAvailable_arg arg;
-       OSErr err;
-       PyObject *rrates, *obj;
-       Fixed *frates;
-       int i;
-
-       arg.rates = NULL;
-       rrates = NULL;
-       if (!PyArg_ParseTuple(args, "l", &inRefNum))
-               return NULL;
-       
-       if( (err=SPBGetDeviceInfo(inRefNum, siSampleRateAvailable, (Ptr)&arg)) != noErr ) {
-               return PyMac_Error(err);
-       }
-       frates = (Fixed *)*(arg.rates);
-       if( arg.numrates == 0 ) {
-               /* The handle contains upper and lowerbound */
-               rrates = Py_BuildValue("O&O&", frates[0], frates[1]);
-               if (rrates == NULL) return NULL;
-       } else {
-               /* Handle contains a list of rates */
-               if( (rrates = PyTuple_New(arg.numrates)) == NULL)
-                       return NULL;
-               for( i=0; i<arg.numrates; i++ ) {
-                       if( (obj = Py_BuildValue("O&", PyMac_BuildUFixed, frates[i]))==NULL)
-                               goto out;
-                       PyTuple_SetItem(rrates, i, obj);
-               }
-       }
-       return Py_BuildValue("hO", arg.numrates, rrates);
-out:
-       Py_XDECREF(rrates);
-       return NULL;
-}
-
-/* List of methods defined in the module */
-
-static struct PyMethodDef sndih_methods[] = {
- {"getChannelAvailable",       (PyCFunction)sndih_getChannelAvailable, METH_VARARGS,   sndih_getChannelAvailable__doc__},
- {"getNumberChannels", (PyCFunction)sndih_getNumberChannels,   METH_VARARGS,   sndih_getNumberChannels__doc__},
- {"setNumberChannels", (PyCFunction)sndih_setNumberChannels,   METH_VARARGS,   sndih_setNumberChannels__doc__},
- {"getContinuous",     (PyCFunction)sndih_getContinuous,       METH_VARARGS,   sndih_getContinuous__doc__},
- {"setContinuous",     (PyCFunction)sndih_setContinuous,       METH_VARARGS,   sndih_setContinuous__doc__},
- {"getInputSourceNames",       (PyCFunction)sndih_getInputSourceNames, METH_VARARGS,   sndih_getInputSourceNames__doc__},
- {"getInputSource",    (PyCFunction)sndih_getInputSource,      METH_VARARGS,   sndih_getInputSource__doc__},
- {"setInputSource",    (PyCFunction)sndih_setInputSource,      METH_VARARGS,   sndih_setInputSource__doc__},
- {"getPlayThruOnOff",  (PyCFunction)sndih_getPlayThruOnOff,    METH_VARARGS,   sndih_getPlayThruOnOff__doc__},
- {"setPlayThruOnOff",  (PyCFunction)sndih_setPlayThruOnOff,    METH_VARARGS,   sndih_setPlayThruOnOff__doc__},
- {"getSampleRate",     (PyCFunction)sndih_getSampleRate,       METH_VARARGS,   sndih_getSampleRate__doc__},
- {"setSampleRate",     (PyCFunction)sndih_setSampleRate,       METH_VARARGS,   sndih_setSampleRate__doc__},
- {"getSampleSize",     (PyCFunction)sndih_getSampleSize,       METH_VARARGS,   sndih_getSampleSize__doc__},
- {"setSampleSize",     (PyCFunction)sndih_setSampleSize,       METH_VARARGS,   sndih_setSampleSize__doc__},
- {"getSampleSizeAvailable",    (PyCFunction)sndih_getSampleSizeAvailable,      METH_VARARGS,   sndih_getSampleSizeAvailable__doc__},
- {"getSampleRateAvailable",    (PyCFunction)sndih_getSampleRateAvailable,      METH_VARARGS,   sndih_getSampleRateAvailable__doc__},
-       {NULL,   (PyCFunction)NULL, 0, NULL}            /* sentinel */
-};
-
-
-/* Initialization function for the module (*must* be called initSndihooks) */
-
-static char Sndihooks_module_documentation[] = 
-""
-;
-
-void
-init_Sndihooks()
-{
-       PyObject *m, *d;
-
-       /* Create the module and add the functions */
-       m = Py_InitModule4("_Sndihooks", sndih_methods,
-               Sndihooks_module_documentation,
-               (PyObject*)NULL,PYTHON_API_VERSION);
-
-       /* Add some symbolic constants to the module */
-       d = PyModule_GetDict(m);
-       ErrorObject = PyString_FromString("Sndihooks.error");
-       PyDict_SetItemString(d, "error", ErrorObject);
-
-       /* XXXX Add constants here */
-       
-       /* Check for errors */
-       if (PyErr_Occurred())
-               Py_FatalError("can't initialize module Sndihooks");
-}
-
diff --git a/Mac/Modules/snd/_Sndmodule.c b/Mac/Modules/snd/_Sndmodule.c
deleted file mode 100644 (file)
index 0e2e572..0000000
+++ /dev/null
@@ -1,1149 +0,0 @@
-
-/* ========================== Module _Snd =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-/* Convert a SndCommand argument */
-static int
-SndCmd_Convert(PyObject *v, SndCommand *pc)
-{
-        int len;
-        pc->param1 = 0;
-        pc->param2 = 0;
-        if (PyTuple_Check(v)) {
-                if (PyArg_ParseTuple(v, "h|hl", &pc->cmd, &pc->param1, &pc->param2))
-                        return 1;
-                PyErr_Clear();
-                return PyArg_ParseTuple(v, "Hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
-        }
-        return PyArg_Parse(v, "H", &pc->cmd);
-}
-
-static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
-static pascal void SPB_completion(SPBPtr my_spb); /* Forward */
-
-static PyObject *Snd_Error;
-
-/* --------------------- Object type SndChannel --------------------- */
-
-static PyTypeObject SndChannel_Type;
-
-#define SndCh_Check(x) (Py_TYPE(x) == &SndChannel_Type || PyObject_TypeCheck((x), &SndChannel_Type))
-
-typedef struct SndChannelObject {
-       PyObject_HEAD
-       SndChannelPtr ob_itself;
-       /* Members used to implement callbacks: */
-       PyObject *ob_callback;
-       long ob_A5;
-       SndCommand ob_cmd;
-} SndChannelObject;
-
-static PyObject *SndCh_New(SndChannelPtr itself)
-{
-       SndChannelObject *it;
-       it = PyObject_NEW(SndChannelObject, &SndChannel_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       it->ob_callback = NULL;
-       it->ob_A5 = SetCurrentA5();
-       return (PyObject *)it;
-}
-
-static void SndCh_dealloc(SndChannelObject *self)
-{
-       SndDisposeChannel(self->ob_itself, 1);
-       Py_XDECREF(self->ob_callback);
-       PyObject_Free((PyObject *)self);
-}
-
-static PyObject *SndCh_SndDoCommand(SndChannelObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SndCommand cmd;
-       Boolean noWait;
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             SndCmd_Convert, &cmd,
-                             &noWait))
-               return NULL;
-       _err = SndDoCommand(_self->ob_itself,
-                           &cmd,
-                           noWait);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *SndCh_SndDoImmediate(SndChannelObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SndCommand cmd;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             SndCmd_Convert, &cmd))
-               return NULL;
-       _err = SndDoImmediate(_self->ob_itself,
-                             &cmd);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *SndCh_SndPlay(SndChannelObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SndListHandle sndHandle;
-       Boolean async;
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             ResObj_Convert, &sndHandle,
-                             &async))
-               return NULL;
-       _err = SndPlay(_self->ob_itself,
-                      sndHandle,
-                      async);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *SndCh_SndChannelStatus(SndChannelObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short theLength;
-       SCStatus theStatus__out__;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &theLength))
-               return NULL;
-       _err = SndChannelStatus(_self->ob_itself,
-                               theLength,
-                               &theStatus__out__);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("s#",
-                            (char *)&theStatus__out__, (int)sizeof(SCStatus));
-       return _res;
-}
-
-static PyObject *SndCh_SndGetInfo(SndChannelObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType selector;
-       void * infoPtr;
-       if (!PyArg_ParseTuple(_args, "O&w",
-                             PyMac_GetOSType, &selector,
-                             &infoPtr))
-               return NULL;
-       _err = SndGetInfo(_self->ob_itself,
-                         selector,
-                         infoPtr);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *SndCh_SndSetInfo(SndChannelObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType selector;
-       void * infoPtr;
-       if (!PyArg_ParseTuple(_args, "O&w",
-                             PyMac_GetOSType, &selector,
-                             &infoPtr))
-               return NULL;
-       _err = SndSetInfo(_self->ob_itself,
-                         selector,
-                         infoPtr);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyMethodDef SndCh_methods[] = {
-       {"SndDoCommand", (PyCFunction)SndCh_SndDoCommand, 1,
-        PyDoc_STR("(SndCommand cmd, Boolean noWait) -> None")},
-       {"SndDoImmediate", (PyCFunction)SndCh_SndDoImmediate, 1,
-        PyDoc_STR("(SndCommand cmd) -> None")},
-       {"SndPlay", (PyCFunction)SndCh_SndPlay, 1,
-        PyDoc_STR("(SndListHandle sndHandle, Boolean async) -> None")},
-       {"SndChannelStatus", (PyCFunction)SndCh_SndChannelStatus, 1,
-        PyDoc_STR("(short theLength) -> (SCStatus theStatus)")},
-       {"SndGetInfo", (PyCFunction)SndCh_SndGetInfo, 1,
-        PyDoc_STR("(OSType selector, void * infoPtr) -> None")},
-       {"SndSetInfo", (PyCFunction)SndCh_SndSetInfo, 1,
-        PyDoc_STR("(OSType selector, void * infoPtr) -> None")},
-       {NULL, NULL, 0}
-};
-
-#define SndCh_getsetlist NULL
-
-
-#define SndCh_compare NULL
-
-#define SndCh_repr NULL
-
-#define SndCh_hash NULL
-
-static PyTypeObject SndChannel_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Snd.SndChannel", /*tp_name*/
-       sizeof(SndChannelObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) SndCh_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) SndCh_compare, /*tp_compare*/
-       (reprfunc) SndCh_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) SndCh_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       SndCh_methods, /* tp_methods */
-       0, /*tp_members*/
-       SndCh_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       0, /*tp_init*/
-       0, /*tp_alloc*/
-       0, /*tp_new*/
-       0, /*tp_free*/
-};
-
-/* ------------------- End object type SndChannel ------------------- */
-
-
-/* ------------------------ Object type SPB ------------------------- */
-
-static PyTypeObject SPB_Type;
-
-#define SPBObj_Check(x) (Py_TYPE(x) == &SPB_Type || PyObject_TypeCheck((x), &SPB_Type))
-
-typedef struct SPBObject {
-       PyObject_HEAD
-       /* Members used to implement callbacks: */
-       PyObject *ob_completion;
-       PyObject *ob_interrupt;
-       PyObject *ob_thiscallback;
-       long ob_A5;
-       SPB ob_spb;
-} SPBObject;
-
-static PyObject *SPBObj_New(void)
-{
-       SPBObject *it;
-       it = PyObject_NEW(SPBObject, &SPB_Type);
-       if (it == NULL) return NULL;
-       it->ob_completion = NULL;
-       it->ob_interrupt = NULL;
-       it->ob_thiscallback = NULL;
-       it->ob_A5 = SetCurrentA5();
-       memset((char *)&it->ob_spb, 0, sizeof(it->ob_spb));
-       it->ob_spb.userLong = (long)it;
-       return (PyObject *)it;
-}
-static int SPBObj_Convert(PyObject *v, SPBPtr *p_itself)
-{
-       if (!SPBObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "SPB required");
-               return 0;
-       }
-       *p_itself = &((SPBObject *)v)->ob_spb;
-       return 1;
-}
-
-static void SPBObj_dealloc(SPBObject *self)
-{
-       /* Cleanup of self->ob_itself goes here */
-       self->ob_spb.userLong = 0;
-       self->ob_thiscallback = 0;
-       Py_XDECREF(self->ob_completion);
-       Py_XDECREF(self->ob_interrupt);
-       PyObject_Free((PyObject *)self);
-}
-
-static PyMethodDef SPBObj_methods[] = {
-       {NULL, NULL, 0}
-};
-
-static PyObject *SPBObj_get_inRefNum(SPBObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_spb.inRefNum);
-}
-
-static int SPBObj_set_inRefNum(SPBObject *self, PyObject *v, void *closure)
-{
-       return -1 + PyArg_Parse(v, "l", &self->ob_spb.inRefNum);
-       return 0;
-}
-
-static PyObject *SPBObj_get_count(SPBObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_spb.count);
-}
-
-static int SPBObj_set_count(SPBObject *self, PyObject *v, void *closure)
-{
-       return -1 + PyArg_Parse(v, "l", &self->ob_spb.count);
-       return 0;
-}
-
-static PyObject *SPBObj_get_milliseconds(SPBObject *self, void *closure)
-{
-       return Py_BuildValue("l", self->ob_spb.milliseconds);
-}
-
-static int SPBObj_set_milliseconds(SPBObject *self, PyObject *v, void *closure)
-{
-       return -1 + PyArg_Parse(v, "l", &self->ob_spb.milliseconds);
-       return 0;
-}
-
-static PyObject *SPBObj_get_error(SPBObject *self, void *closure)
-{
-       return Py_BuildValue("h", self->ob_spb.error);
-}
-
-#define SPBObj_set_error NULL
-
-#define SPBObj_get_completionRoutine NULL
-
-static int SPBObj_set_completionRoutine(SPBObject *self, PyObject *v, void *closure)
-{
-       self->ob_spb.completionRoutine = NewSICompletionUPP(SPB_completion);
-                   self->ob_completion = v;
-                   Py_INCREF(v);
-                   return 0;
-       return 0;
-}
-
-static PyGetSetDef SPBObj_getsetlist[] = {
-       {"inRefNum", (getter)SPBObj_get_inRefNum, (setter)SPBObj_set_inRefNum, NULL},
-       {"count", (getter)SPBObj_get_count, (setter)SPBObj_set_count, NULL},
-       {"milliseconds", (getter)SPBObj_get_milliseconds, (setter)SPBObj_set_milliseconds, NULL},
-       {"error", (getter)SPBObj_get_error, (setter)SPBObj_set_error, NULL},
-       {"completionRoutine", (getter)SPBObj_get_completionRoutine, (setter)SPBObj_set_completionRoutine, NULL},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define SPBObj_compare NULL
-
-#define SPBObj_repr NULL
-
-#define SPBObj_hash NULL
-
-static PyTypeObject SPB_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Snd.SPB", /*tp_name*/
-       sizeof(SPBObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) SPBObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) SPBObj_compare, /*tp_compare*/
-       (reprfunc) SPBObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) SPBObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       SPBObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       SPBObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       0, /*tp_init*/
-       0, /*tp_alloc*/
-       0, /*tp_new*/
-       0, /*tp_free*/
-};
-
-/* ---------------------- End object type SPB ----------------------- */
-
-
-static PyObject *Snd_SPB(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       _res = SPBObj_New(); return _res;
-}
-
-static PyObject *Snd_SysBeep(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short duration;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &duration))
-               return NULL;
-       SysBeep(duration);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SndNewChannel(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SndChannelPtr chan = 0;
-       short synth;
-       long init;
-       PyObject* userRoutine;
-       if (!PyArg_ParseTuple(_args, "hlO",
-                             &synth,
-                             &init,
-                             &userRoutine))
-               return NULL;
-       if (userRoutine != Py_None && !PyCallable_Check(userRoutine))
-       {
-               PyErr_SetString(PyExc_TypeError, "callback must be callable");
-               goto userRoutine__error__;
-       }
-       _err = SndNewChannel(&chan,
-                            synth,
-                            init,
-                            NewSndCallBackUPP(SndCh_UserRoutine));
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            SndCh_New, chan);
-       if (_res != NULL && userRoutine != Py_None)
-       {
-               SndChannelObject *p = (SndChannelObject *)_res;
-               p->ob_itself->userInfo = (long)p;
-               Py_INCREF(userRoutine);
-               p->ob_callback = userRoutine;
-       }
- userRoutine__error__: ;
-       return _res;
-}
-
-static PyObject *Snd_SndSoundManagerVersion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       NumVersion _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = SndSoundManagerVersion();
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildNumVersion, _rv);
-       return _res;
-}
-
-static PyObject *Snd_SndManagerStatus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short theLength;
-       SMStatus theStatus__out__;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &theLength))
-               return NULL;
-       _err = SndManagerStatus(theLength,
-                               &theStatus__out__);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("s#",
-                            (char *)&theStatus__out__, (int)sizeof(SMStatus));
-       return _res;
-}
-
-static PyObject *Snd_SndGetSysBeepState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short sysBeepState;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       SndGetSysBeepState(&sysBeepState);
-       _res = Py_BuildValue("h",
-                            sysBeepState);
-       return _res;
-}
-
-static PyObject *Snd_SndSetSysBeepState(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short sysBeepState;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &sysBeepState))
-               return NULL;
-       _err = SndSetSysBeepState(sysBeepState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_GetSysBeepVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long level;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetSysBeepVolume(&level);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            level);
-       return _res;
-}
-
-static PyObject *Snd_SetSysBeepVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long level;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &level))
-               return NULL;
-       _err = SetSysBeepVolume(level);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_GetDefaultOutputVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long level;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetDefaultOutputVolume(&level);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            level);
-       return _res;
-}
-
-static PyObject *Snd_SetDefaultOutputVolume(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long level;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &level))
-               return NULL;
-       _err = SetDefaultOutputVolume(level);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_GetSoundHeaderOffset(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SndListHandle sndHandle;
-       long offset;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &sndHandle))
-               return NULL;
-       _err = GetSoundHeaderOffset(sndHandle,
-                                   &offset);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            offset);
-       return _res;
-}
-
-static PyObject *Snd_GetCompressionInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short compressionID;
-       OSType format;
-       short numChannels;
-       short sampleSize;
-       CompressionInfo cp__out__;
-       if (!PyArg_ParseTuple(_args, "hO&hh",
-                             &compressionID,
-                             PyMac_GetOSType, &format,
-                             &numChannels,
-                             &sampleSize))
-               return NULL;
-       _err = GetCompressionInfo(compressionID,
-                                 format,
-                                 numChannels,
-                                 sampleSize,
-                                 &cp__out__);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("s#",
-                            (char *)&cp__out__, (int)sizeof(CompressionInfo));
-       return _res;
-}
-
-static PyObject *Snd_SetSoundPreference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType theType;
-       Str255 name;
-       Handle settings;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theType,
-                             ResObj_Convert, &settings))
-               return NULL;
-       _err = SetSoundPreference(theType,
-                                 name,
-                                 settings);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildStr255, name);
-       return _res;
-}
-
-static PyObject *Snd_GetSoundPreference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType theType;
-       Str255 name;
-       Handle settings;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &theType,
-                             ResObj_Convert, &settings))
-               return NULL;
-       _err = GetSoundPreference(theType,
-                                 name,
-                                 settings);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildStr255, name);
-       return _res;
-}
-
-static PyObject *Snd_GetCompressionName(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       OSType compressionType;
-       Str255 compressionName;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetOSType, &compressionType))
-               return NULL;
-       _err = GetCompressionName(compressionType,
-                                 compressionName);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildStr255, compressionName);
-       return _res;
-}
-
-static PyObject *Snd_SPBVersion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       NumVersion _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = SPBVersion();
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildNumVersion, _rv);
-       return _res;
-}
-
-static PyObject *Snd_SndRecord(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Point corner;
-       OSType quality;
-       SndListHandle sndHandle;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &corner,
-                             PyMac_GetOSType, &quality))
-               return NULL;
-       _err = SndRecord((ModalFilterUPP)0,
-                        corner,
-                        quality,
-                        &sndHandle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, sndHandle);
-       return _res;
-}
-
-static PyObject *Snd_SPBSignInDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short deviceRefNum;
-       Str255 deviceName;
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &deviceRefNum,
-                             PyMac_GetStr255, deviceName))
-               return NULL;
-       _err = SPBSignInDevice(deviceRefNum,
-                              deviceName);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SPBSignOutDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short deviceRefNum;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &deviceRefNum))
-               return NULL;
-       _err = SPBSignOutDevice(deviceRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SPBGetIndexedDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short count;
-       Str255 deviceName;
-       Handle deviceIconHandle;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &count))
-               return NULL;
-       _err = SPBGetIndexedDevice(count,
-                                  deviceName,
-                                  &deviceIconHandle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            PyMac_BuildStr255, deviceName,
-                            ResObj_New, deviceIconHandle);
-       return _res;
-}
-
-static PyObject *Snd_SPBOpenDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Str255 deviceName;
-       short permission;
-       long inRefNum;
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetStr255, deviceName,
-                             &permission))
-               return NULL;
-       _err = SPBOpenDevice(deviceName,
-                            permission,
-                            &inRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            inRefNum);
-       return _res;
-}
-
-static PyObject *Snd_SPBCloseDevice(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long inRefNum;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inRefNum))
-               return NULL;
-       _err = SPBCloseDevice(inRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SPBRecord(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SPBPtr inParamPtr;
-       Boolean asynchFlag;
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             SPBObj_Convert, &inParamPtr,
-                             &asynchFlag))
-               return NULL;
-       _err = SPBRecord(inParamPtr,
-                        asynchFlag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SPBPauseRecording(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long inRefNum;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inRefNum))
-               return NULL;
-       _err = SPBPauseRecording(inRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SPBResumeRecording(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long inRefNum;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inRefNum))
-               return NULL;
-       _err = SPBResumeRecording(inRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SPBStopRecording(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long inRefNum;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inRefNum))
-               return NULL;
-       _err = SPBStopRecording(inRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SPBGetRecordingStatus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long inRefNum;
-       short recordingStatus;
-       short meterLevel;
-       unsigned long totalSamplesToRecord;
-       unsigned long numberOfSamplesRecorded;
-       unsigned long totalMsecsToRecord;
-       unsigned long numberOfMsecsRecorded;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inRefNum))
-               return NULL;
-       _err = SPBGetRecordingStatus(inRefNum,
-                                    &recordingStatus,
-                                    &meterLevel,
-                                    &totalSamplesToRecord,
-                                    &numberOfSamplesRecorded,
-                                    &totalMsecsToRecord,
-                                    &numberOfMsecsRecorded);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("hhllll",
-                            recordingStatus,
-                            meterLevel,
-                            totalSamplesToRecord,
-                            numberOfSamplesRecorded,
-                            totalMsecsToRecord,
-                            numberOfMsecsRecorded);
-       return _res;
-}
-
-static PyObject *Snd_SPBGetDeviceInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long inRefNum;
-       OSType infoType;
-       void * infoData;
-       if (!PyArg_ParseTuple(_args, "lO&w",
-                             &inRefNum,
-                             PyMac_GetOSType, &infoType,
-                             &infoData))
-               return NULL;
-       _err = SPBGetDeviceInfo(inRefNum,
-                               infoType,
-                               infoData);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SPBSetDeviceInfo(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long inRefNum;
-       OSType infoType;
-       void * infoData;
-       if (!PyArg_ParseTuple(_args, "lO&w",
-                             &inRefNum,
-                             PyMac_GetOSType, &infoType,
-                             &infoData))
-               return NULL;
-       _err = SPBSetDeviceInfo(inRefNum,
-                               infoType,
-                               infoData);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Snd_SPBMillisecondsToBytes(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long inRefNum;
-       long milliseconds;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inRefNum))
-               return NULL;
-       _err = SPBMillisecondsToBytes(inRefNum,
-                                     &milliseconds);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            milliseconds);
-       return _res;
-}
-
-static PyObject *Snd_SPBBytesToMilliseconds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       long inRefNum;
-       long byteCount;
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inRefNum))
-               return NULL;
-       _err = SPBBytesToMilliseconds(inRefNum,
-                                     &byteCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            byteCount);
-       return _res;
-}
-
-static PyMethodDef Snd_methods[] = {
-       {"SPB", (PyCFunction)Snd_SPB, 1,
-        PyDoc_STR(NULL)},
-       {"SysBeep", (PyCFunction)Snd_SysBeep, 1,
-        PyDoc_STR("(short duration) -> None")},
-       {"SndNewChannel", (PyCFunction)Snd_SndNewChannel, 1,
-        PyDoc_STR("(short synth, long init, PyObject* userRoutine) -> (SndChannelPtr chan)")},
-       {"SndSoundManagerVersion", (PyCFunction)Snd_SndSoundManagerVersion, 1,
-        PyDoc_STR("() -> (NumVersion _rv)")},
-       {"SndManagerStatus", (PyCFunction)Snd_SndManagerStatus, 1,
-        PyDoc_STR("(short theLength) -> (SMStatus theStatus)")},
-       {"SndGetSysBeepState", (PyCFunction)Snd_SndGetSysBeepState, 1,
-        PyDoc_STR("() -> (short sysBeepState)")},
-       {"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
-        PyDoc_STR("(short sysBeepState) -> None")},
-       {"GetSysBeepVolume", (PyCFunction)Snd_GetSysBeepVolume, 1,
-        PyDoc_STR("() -> (long level)")},
-       {"SetSysBeepVolume", (PyCFunction)Snd_SetSysBeepVolume, 1,
-        PyDoc_STR("(long level) -> None")},
-       {"GetDefaultOutputVolume", (PyCFunction)Snd_GetDefaultOutputVolume, 1,
-        PyDoc_STR("() -> (long level)")},
-       {"SetDefaultOutputVolume", (PyCFunction)Snd_SetDefaultOutputVolume, 1,
-        PyDoc_STR("(long level) -> None")},
-       {"GetSoundHeaderOffset", (PyCFunction)Snd_GetSoundHeaderOffset, 1,
-        PyDoc_STR("(SndListHandle sndHandle) -> (long offset)")},
-       {"GetCompressionInfo", (PyCFunction)Snd_GetCompressionInfo, 1,
-        PyDoc_STR("(short compressionID, OSType format, short numChannels, short sampleSize) -> (CompressionInfo cp)")},
-       {"SetSoundPreference", (PyCFunction)Snd_SetSoundPreference, 1,
-        PyDoc_STR("(OSType theType, Handle settings) -> (Str255 name)")},
-       {"GetSoundPreference", (PyCFunction)Snd_GetSoundPreference, 1,
-        PyDoc_STR("(OSType theType, Handle settings) -> (Str255 name)")},
-       {"GetCompressionName", (PyCFunction)Snd_GetCompressionName, 1,
-        PyDoc_STR("(OSType compressionType) -> (Str255 compressionName)")},
-       {"SPBVersion", (PyCFunction)Snd_SPBVersion, 1,
-        PyDoc_STR("() -> (NumVersion _rv)")},
-       {"SndRecord", (PyCFunction)Snd_SndRecord, 1,
-        PyDoc_STR("(Point corner, OSType quality) -> (SndListHandle sndHandle)")},
-       {"SPBSignInDevice", (PyCFunction)Snd_SPBSignInDevice, 1,
-        PyDoc_STR("(short deviceRefNum, Str255 deviceName) -> None")},
-       {"SPBSignOutDevice", (PyCFunction)Snd_SPBSignOutDevice, 1,
-        PyDoc_STR("(short deviceRefNum) -> None")},
-       {"SPBGetIndexedDevice", (PyCFunction)Snd_SPBGetIndexedDevice, 1,
-        PyDoc_STR("(short count) -> (Str255 deviceName, Handle deviceIconHandle)")},
-       {"SPBOpenDevice", (PyCFunction)Snd_SPBOpenDevice, 1,
-        PyDoc_STR("(Str255 deviceName, short permission) -> (long inRefNum)")},
-       {"SPBCloseDevice", (PyCFunction)Snd_SPBCloseDevice, 1,
-        PyDoc_STR("(long inRefNum) -> None")},
-       {"SPBRecord", (PyCFunction)Snd_SPBRecord, 1,
-        PyDoc_STR("(SPBPtr inParamPtr, Boolean asynchFlag) -> None")},
-       {"SPBPauseRecording", (PyCFunction)Snd_SPBPauseRecording, 1,
-        PyDoc_STR("(long inRefNum) -> None")},
-       {"SPBResumeRecording", (PyCFunction)Snd_SPBResumeRecording, 1,
-        PyDoc_STR("(long inRefNum) -> None")},
-       {"SPBStopRecording", (PyCFunction)Snd_SPBStopRecording, 1,
-        PyDoc_STR("(long inRefNum) -> None")},
-       {"SPBGetRecordingStatus", (PyCFunction)Snd_SPBGetRecordingStatus, 1,
-        PyDoc_STR("(long inRefNum) -> (short recordingStatus, short meterLevel, unsigned long totalSamplesToRecord, unsigned long numberOfSamplesRecorded, unsigned long totalMsecsToRecord, unsigned long numberOfMsecsRecorded)")},
-       {"SPBGetDeviceInfo", (PyCFunction)Snd_SPBGetDeviceInfo, 1,
-        PyDoc_STR("(long inRefNum, OSType infoType, void * infoData) -> None")},
-       {"SPBSetDeviceInfo", (PyCFunction)Snd_SPBSetDeviceInfo, 1,
-        PyDoc_STR("(long inRefNum, OSType infoType, void * infoData) -> None")},
-       {"SPBMillisecondsToBytes", (PyCFunction)Snd_SPBMillisecondsToBytes, 1,
-        PyDoc_STR("(long inRefNum) -> (long milliseconds)")},
-       {"SPBBytesToMilliseconds", (PyCFunction)Snd_SPBBytesToMilliseconds, 1,
-        PyDoc_STR("(long inRefNum) -> (long byteCount)")},
-       {NULL, NULL, 0}
-};
-
-
-
-/* Routine passed to Py_AddPendingCall -- call the Python callback */
-static int
-SndCh_CallCallBack(void *arg)
-{
-        SndChannelObject *p = (SndChannelObject *)arg;
-        PyObject *args;
-        PyObject *res;
-        args = Py_BuildValue("(O(hhl))",
-                             p, p->ob_cmd.cmd, p->ob_cmd.param1, p->ob_cmd.param2);
-        res = PyEval_CallObject(p->ob_callback, args);
-        Py_DECREF(args);
-        if (res == NULL)
-                return -1;
-        Py_DECREF(res);
-        return 0;
-}
-
-/* Routine passed to NewSndChannel -- schedule a call to SndCh_CallCallBack */
-static pascal void
-SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd)
-{
-        SndChannelObject *p = (SndChannelObject *)(chan->userInfo);
-        if (p->ob_callback != NULL) {
-                long A5 = SetA5(p->ob_A5);
-                p->ob_cmd = *cmd;
-                Py_AddPendingCall(SndCh_CallCallBack, (void *)p);
-                SetA5(A5);
-        }
-}
-
-/* SPB callbacks - Schedule callbacks to Python */
-static int
-SPB_CallCallBack(void *arg)
-{
-        SPBObject *p = (SPBObject *)arg;
-        PyObject *args;
-        PyObject *res;
-
-        if ( p->ob_thiscallback == 0 ) return 0;
-        args = Py_BuildValue("(O)", p);
-        res = PyEval_CallObject(p->ob_thiscallback, args);
-        p->ob_thiscallback = 0;
-        Py_DECREF(args);
-        if (res == NULL)
-                return -1;
-        Py_DECREF(res);
-        return 0;
-}
-
-static pascal void
-SPB_completion(SPBPtr my_spb)
-{
-        SPBObject *p = (SPBObject *)(my_spb->userLong);
-
-        if (p && p->ob_completion) {
-                long A5 = SetA5(p->ob_A5);
-                p->ob_thiscallback = p->ob_completion;  /* Hope we cannot get two at the same time */
-                Py_AddPendingCall(SPB_CallCallBack, (void *)p);
-                SetA5(A5);
-        }
-}
-
-
-
-void init_Snd(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-
-
-       m = Py_InitModule("_Snd", Snd_methods);
-       d = PyModule_GetDict(m);
-       Snd_Error = PyMac_GetOSErrException();
-       if (Snd_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Snd_Error) != 0)
-               return;
-       Py_TYPE(&SndChannel_Type) = &PyType_Type;
-       if (PyType_Ready(&SndChannel_Type) < 0) return;
-       Py_INCREF(&SndChannel_Type);
-       PyModule_AddObject(m, "SndChannel", (PyObject *)&SndChannel_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&SndChannel_Type);
-       PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type);
-       Py_TYPE(&SPB_Type) = &PyType_Type;
-       if (PyType_Ready(&SPB_Type) < 0) return;
-       Py_INCREF(&SPB_Type);
-       PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&SPB_Type);
-       PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
-}
-
-/* ======================== End module _Snd ========================= */
-
diff --git a/Mac/Modules/snd/sndscan.py b/Mac/Modules/snd/sndscan.py
deleted file mode 100644 (file)
index 03092ee..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-# Scan Sound.h header file, generate sndgen.py and Sound.py files.
-# Then import sndsupport (which execs sndgen.py) to generate Sndmodule.c.
-# (Should learn how to tell the compiler to compile it as well.)
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-def main():
-    input = "Sound.h"
-    output = "sndgen.py"
-    defsoutput = TOOLBOXDIR + "Sound.py"
-    scanner = SoundScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now doing 'import sndsupport' ===")
-    import sndsupport
-    print("=== Done.  It's up to you to compile Sndmodule.c ===")
-
-class SoundScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "SndFunction"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t == "SndChannelPtr" and m == "InMode":
-                classname = "SndMethod"
-                listname = "sndmethods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-
-    def makeblacklistnames(self):
-        return [
-                'SndDisposeChannel',            # automatic on deallocation
-                'SndAddModifier',               # for internal use only
-                'SndPlayDoubleBuffer',          # very low level routine
-                # Missing from libraries (UH332)
-                'SoundManagerSetInfo',
-                'SoundManagerGetInfo',
-                # Constants with funny definitions
-                'rate48khz',
-                'rate44khz',
-                'kInvalidSource',
-                # OS8 only:
-                'MACEVersion',
-                'SPBRecordToFile',
-                'Exp1to6',
-                'Comp6to1',
-                'Exp1to3',
-                'Comp3to1',
-                'SndControl',
-                'SndStopFilePlay',
-                'SndStartFilePlay',
-                'SndPauseFilePlay',
-                'SndRecordToFile',
-
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "GetSoundVol",
-                "SetSoundVol",
-                "UnsignedFixed",
-                # Don't have the time to dig into this...
-                "Component",
-                "ComponentInstance",
-                "SoundComponentDataPtr",
-                "SoundComponentData",
-                "SoundComponentData_ptr",
-                "SoundConverter",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("Str255", "*", "InMode")],
-                 [("*", "*", "OutMode")]),
-
-                ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
-                 [("InBuffer", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("long", "*", "InMode"),
-                                            ("long", "*", "OutMode")],
-                 [("VarVarOutBuffer", "*", "InOutMode")]),
-
-                ([("SCStatusPtr", "*", "InMode")],
-                 [("SCStatus", "*", "OutMode")]),
-
-                ([("SMStatusPtr", "*", "InMode")],
-                 [("SMStatus", "*", "OutMode")]),
-
-                ([("CompressionInfoPtr", "*", "InMode")],
-                 [("CompressionInfo", "*", "OutMode")]),
-
-                # For SndPlay's SndListHandle argument
-                ([("Handle", "sndHdl", "InMode")],
-                 [("SndListHandle", "*", "*")]),
-
-                # For SndStartFilePlay
-                ([("long", "bufferSize", "InMode"), ("void", "theBuffer", "OutMode")],
-                 [("*", "*", "*"), ("FakeType('0')", "*", "InMode")]),
-
-                # For Comp3to1 etc.
-                ([("void_ptr", "inBuffer", "InMode"),
-                  ("void", "outBuffer", "OutMode"),
-                  ("unsigned_long", "cnt", "InMode")],
-                 [("InOutBuffer", "buffer", "InOutMode")]),
-
-                # Ditto
-##                      ([("void_ptr", "inState", "InMode"), ("void", "outState", "OutMode")],
-##                       [("InOutBuf128", "state", "InOutMode")]),
-                ([("StateBlockPtr", "inState", "InMode"), ("StateBlockPtr", "outState", "InMode")],
-                 [("StateBlock", "state", "InOutMode")]),
-
-                # Catch-all for the last couple of void pointers
-                ([("void", "*", "OutMode")],
-                 [("void_ptr", "*", "InMode")]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/snd/sndsupport.py b/Mac/Modules/snd/sndsupport.py
deleted file mode 100644 (file)
index 5c5da54..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-# This script generates the Sound interface for Python.
-# It uses the "bgen" package to generate C code.
-# It execs the file sndgen.py which contain the function definitions
-# (sndgen.py was generated by sndscan.py, scanning the <Sound.h> header file).
-
-from macsupport import *
-
-
-# define our own function and module generators
-
-class SndMixIn: pass
-
-class SndFunction(SndMixIn, OSErrFunctionGenerator): pass
-class SndMethod(SndMixIn, OSErrMethodGenerator): pass
-
-
-# includestuff etc. are imported from macsupport
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-"""
-
-initstuff = initstuff + """
-"""
-
-
-# define types used for arguments (in addition to standard and macsupport types)
-
-class SndChannelPtrType(OpaqueByValueType):
-    def declare(self, name):
-        # Initializing all SndChannelPtr objects to 0 saves
-        # special-casing NewSndChannel(), where it is formally an
-        # input-output parameter but we treat it as output-only
-        # (since Python users are not supposed to allocate memory)
-        Output("SndChannelPtr %s = 0;", name)
-
-SndChannelPtr = SndChannelPtrType('SndChannelPtr', 'SndCh')
-
-SndCommand = OpaqueType('SndCommand', 'SndCmd')
-SndCommand_ptr = OpaqueType('SndCommand', 'SndCmd')
-SndListHandle = OpaqueByValueType("SndListHandle", "ResObj")
-SPBPtr = OpaqueByValueType("SPBPtr", "SPBObj")
-ModalFilterUPP = FakeType("(ModalFilterUPP)0")
-
-#
-# NOTE: the following is pretty dangerous. For void pointers we pass buffer addresses
-# but we have no way to check that the buffer is big enough. This is the same problem
-# as in C, though (but Pythoneers may not be suspecting this...)
-void_ptr = Type("void *", "w")
-
-class SndCallBackType(InputOnlyType):
-    def __init__(self):
-        Type.__init__(self, 'PyObject*', 'O')
-    def getargsCheck(self, name):
-        Output("if (%s != Py_None && !PyCallable_Check(%s))", name, name)
-        OutLbrace()
-        Output('PyErr_SetString(PyExc_TypeError, "callback must be callable");')
-        Output("goto %s__error__;", name)
-        OutRbrace()
-    def passInput(self, name):
-        return "NewSndCallBackUPP(SndCh_UserRoutine)"
-    def cleanup(self, name):
-        # XXX This knows it is executing inside the SndNewChannel wrapper
-        Output("if (_res != NULL && %s != Py_None)", name)
-        OutLbrace()
-        Output("SndChannelObject *p = (SndChannelObject *)_res;")
-        Output("p->ob_itself->userInfo = (long)p;")
-        Output("Py_INCREF(%s);", name)
-        Output("p->ob_callback = %s;", name)
-        OutRbrace()
-        DedentLevel()
-        Output(" %s__error__: ;", name)
-        IndentLevel()
-
-SndCallBackProcPtr = SndCallBackType()
-SndCallBackUPP = SndCallBackProcPtr
-
-SndCompletionProcPtr = FakeType('(SndCompletionProcPtr)0') # XXX
-SndCompletionUPP = SndCompletionProcPtr
-
-##InOutBuf128 = FixedInputOutputBufferType(128)
-StateBlock = StructInputOutputBufferType('StateBlock')
-
-AudioSelectionPtr = FakeType('0') # XXX
-
-ProcPtr = FakeType('0') # XXX
-FilePlayCompletionUPP = FakeType('0') # XXX
-
-SCStatus = StructOutputBufferType('SCStatus')
-SMStatus = StructOutputBufferType('SMStatus')
-CompressionInfo = StructOutputBufferType('CompressionInfo')
-
-includestuff = includestuff + """
-/* Convert a SndCommand argument */
-static int
-SndCmd_Convert(PyObject *v, SndCommand *pc)
-{
-        int len;
-        pc->param1 = 0;
-        pc->param2 = 0;
-        if (PyTuple_Check(v)) {
-                if (PyArg_ParseTuple(v, "h|hl", &pc->cmd, &pc->param1, &pc->param2))
-                        return 1;
-                PyErr_Clear();
-                return PyArg_ParseTuple(v, "Hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
-        }
-        return PyArg_Parse(v, "H", &pc->cmd);
-}
-
-static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
-static pascal void SPB_completion(SPBPtr my_spb); /* Forward */
-"""
-
-
-finalstuff = finalstuff + """
-/* Routine passed to Py_AddPendingCall -- call the Python callback */
-static int
-SndCh_CallCallBack(void *arg)
-{
-        SndChannelObject *p = (SndChannelObject *)arg;
-        PyObject *args;
-        PyObject *res;
-        args = Py_BuildValue("(O(hhl))",
-                             p, p->ob_cmd.cmd, p->ob_cmd.param1, p->ob_cmd.param2);
-        res = PyEval_CallObject(p->ob_callback, args);
-        Py_DECREF(args);
-        if (res == NULL)
-                return -1;
-        Py_DECREF(res);
-        return 0;
-}
-
-/* Routine passed to NewSndChannel -- schedule a call to SndCh_CallCallBack */
-static pascal void
-SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd)
-{
-        SndChannelObject *p = (SndChannelObject *)(chan->userInfo);
-        if (p->ob_callback != NULL) {
-                long A5 = SetA5(p->ob_A5);
-                p->ob_cmd = *cmd;
-                Py_AddPendingCall(SndCh_CallCallBack, (void *)p);
-                SetA5(A5);
-        }
-}
-
-/* SPB callbacks - Schedule callbacks to Python */
-static int
-SPB_CallCallBack(void *arg)
-{
-        SPBObject *p = (SPBObject *)arg;
-        PyObject *args;
-        PyObject *res;
-
-        if ( p->ob_thiscallback == 0 ) return 0;
-        args = Py_BuildValue("(O)", p);
-        res = PyEval_CallObject(p->ob_thiscallback, args);
-        p->ob_thiscallback = 0;
-        Py_DECREF(args);
-        if (res == NULL)
-                return -1;
-        Py_DECREF(res);
-        return 0;
-}
-
-static pascal void
-SPB_completion(SPBPtr my_spb)
-{
-        SPBObject *p = (SPBObject *)(my_spb->userLong);
-
-        if (p && p->ob_completion) {
-                long A5 = SetA5(p->ob_A5);
-                p->ob_thiscallback = p->ob_completion;  /* Hope we cannot get two at the same time */
-                Py_AddPendingCall(SPB_CallCallBack, (void *)p);
-                SetA5(A5);
-        }
-}
-
-"""
-
-
-# create the module and object definition and link them
-
-class SndObjectDefinition(PEP252Mixin, ObjectDefinition):
-
-    def outputStructMembers(self):
-        ObjectDefinition.outputStructMembers(self)
-        Output("/* Members used to implement callbacks: */")
-        Output("PyObject *ob_callback;")
-        Output("long ob_A5;");
-        Output("SndCommand ob_cmd;")
-
-    def outputInitStructMembers(self):
-        ObjectDefinition.outputInitStructMembers(self)
-        Output("it->ob_callback = NULL;")
-        Output("it->ob_A5 = SetCurrentA5();");
-
-    def outputCleanupStructMembers(self):
-        ObjectDefinition.outputCleanupStructMembers(self)
-        Output("Py_XDECREF(self->ob_callback);")
-
-    def outputFreeIt(self, itselfname):
-        Output("SndDisposeChannel(%s, 1);", itselfname)
-
-    def outputConvert(self):
-        pass # Not needed
-
-#
-
-class SpbObjectDefinition(PEP252Mixin, ObjectDefinition):
-    getsetlist = [
-            (
-            'inRefNum',
-            'return Py_BuildValue("l", self->ob_spb.inRefNum);',
-            'return -1 + PyArg_Parse(v, "l", &self->ob_spb.inRefNum);',
-            None,
-            ), (
-            'count',
-            'return Py_BuildValue("l", self->ob_spb.count);',
-            'return -1 + PyArg_Parse(v, "l", &self->ob_spb.count);',
-            None
-            ), (
-            'milliseconds',
-            'return Py_BuildValue("l", self->ob_spb.milliseconds);',
-            'return -1 + PyArg_Parse(v, "l", &self->ob_spb.milliseconds);',
-            None,
-            ), (
-            'error',
-            'return Py_BuildValue("h", self->ob_spb.error);',
-            None,
-            None
-            ), (
-            'completionRoutine',
-            None,
-            """self->ob_spb.completionRoutine = NewSICompletionUPP(SPB_completion);
-            self->ob_completion = v;
-            Py_INCREF(v);
-            return 0;""",
-            None,
-            )]
-
-    def outputStructMembers(self):
-        Output("/* Members used to implement callbacks: */")
-        Output("PyObject *ob_completion;")
-        Output("PyObject *ob_interrupt;")
-        Output("PyObject *ob_thiscallback;");
-        Output("long ob_A5;")
-        Output("SPB ob_spb;")
-
-    def outputNew(self):
-        Output()
-        Output("%sPyObject *%s_New(void)", self.static, self.prefix)
-        OutLbrace()
-        Output("%s *it;", self.objecttype)
-        self.outputCheckNewArg()
-        Output("it = PyObject_NEW(%s, &%s);", self.objecttype, self.typename)
-        Output("if (it == NULL) return NULL;")
-        self.outputInitStructMembers()
-        Output("return (PyObject *)it;")
-        OutRbrace()
-
-    def outputInitStructMembers(self):
-        Output("it->ob_completion = NULL;")
-        Output("it->ob_interrupt = NULL;")
-        Output("it->ob_thiscallback = NULL;")
-        Output("it->ob_A5 = SetCurrentA5();")
-        Output("memset((char *)&it->ob_spb, 0, sizeof(it->ob_spb));")
-        Output("it->ob_spb.userLong = (long)it;")
-
-    def outputCleanupStructMembers(self):
-        ObjectDefinition.outputCleanupStructMembers(self)
-        Output("self->ob_spb.userLong = 0;")
-        Output("self->ob_thiscallback = 0;")
-        Output("Py_XDECREF(self->ob_completion);")
-        Output("Py_XDECREF(self->ob_interrupt);")
-
-    def outputConvert(self):
-        Output("%sint %s_Convert(PyObject *v, %s *p_itself)", self.static, self.prefix, self.itselftype)
-        OutLbrace()
-        self.outputCheckConvertArg()
-        Output("if (!%s_Check(v))", self.prefix)
-        OutLbrace()
-        Output('PyErr_SetString(PyExc_TypeError, "%s required");', self.name)
-        Output("return 0;")
-        OutRbrace()
-        Output("*p_itself = &((%s *)v)->ob_spb;", self.objecttype)
-        Output("return 1;")
-        OutRbrace()
-
-
-sndobject = SndObjectDefinition('SndChannel', 'SndCh', 'SndChannelPtr')
-spbobject = SpbObjectDefinition('SPB', 'SPBObj', 'SPBPtr')
-spbgenerator = ManualGenerator("SPB", "_res = SPBObj_New(); return _res;")
-module = MacModule('_Snd', 'Snd', includestuff, finalstuff, initstuff)
-module.addobject(sndobject)
-module.addobject(spbobject)
-module.add(spbgenerator)
-
-
-# create lists of functions and object methods
-
-functions = []
-sndmethods = []
-
-
-# populate the lists
-
-exec(open('sndgen.py').read())
-
-
-# add the functions and methods to the module and object, respectively
-
-for f in functions: module.add(f)
-for f in sndmethods: sndobject.add(f)
-
-
-# generate output
-
-SetOutputFileName('_Sndmodule.c')
-module.generate()
diff --git a/Mac/Modules/te/_TEmodule.c b/Mac/Modules/te/_TEmodule.c
deleted file mode 100644 (file)
index 2f73272..0000000
+++ /dev/null
@@ -1,1330 +0,0 @@
-
-/* =========================== Module _TE =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_TEObj_New(TEHandle);
-extern int _TEObj_Convert(PyObject *, TEHandle *);
-
-#define TEObj_New _TEObj_New
-#define TEObj_Convert _TEObj_Convert
-#endif
-
-#define as_TE(h) ((TEHandle)h)
-#define as_Resource(teh) ((Handle)teh)
-
-/*
-** Parse/generate TextStyle records
-*/
-static PyObject *
-TextStyle_New(TextStylePtr itself)
-{
-
-        return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New,
-                                &itself->tsColor);
-}
-
-static int
-TextStyle_Convert(PyObject *v, TextStylePtr p_itself)
-{
-        long font, face, size;
-
-        if( !PyArg_ParseTuple(v, "lllO&", &font, &face, &size, QdRGB_Convert, &p_itself->tsColor) )
-                return 0;
-        p_itself->tsFont = (short)font;
-        p_itself->tsFace = (Style)face;
-        p_itself->tsSize = (short)size;
-        return 1;
-}
-
-static PyObject *TE_Error;
-
-/* ------------------------- Object type TE ------------------------- */
-
-PyTypeObject TE_Type;
-
-#define TEObj_Check(x) (Py_TYPE(x) == &TE_Type || PyObject_TypeCheck((x), &TE_Type))
-
-typedef struct TEObject {
-       PyObject_HEAD
-       TEHandle ob_itself;
-} TEObject;
-
-PyObject *TEObj_New(TEHandle itself)
-{
-       TEObject *it;
-       if (itself == NULL) {
-                                       PyErr_SetString(TE_Error,"Cannot create null TE");
-                                       return NULL;
-                               }
-       it = PyObject_NEW(TEObject, &TE_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       return (PyObject *)it;
-}
-
-int TEObj_Convert(PyObject *v, TEHandle *p_itself)
-{
-       if (!TEObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "TE required");
-               return 0;
-       }
-       *p_itself = ((TEObject *)v)->ob_itself;
-       return 1;
-}
-
-static void TEObj_dealloc(TEObject *self)
-{
-       TEDispose(self->ob_itself);
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *TEObj_TESetText(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *text__in__;
-       long text__len__;
-       int text__in_len__;
-#ifndef TESetText
-       PyMac_PRECHECK(TESetText);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             &text__in__, &text__in_len__))
-               return NULL;
-       text__len__ = text__in_len__;
-       TESetText(text__in__, text__len__,
-                 _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEGetText(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CharsHandle _rv;
-#ifndef TEGetText
-       PyMac_PRECHECK(TEGetText);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TEGetText(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TEObj_TEIdle(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TEIdle
-       PyMac_PRECHECK(TEIdle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TEIdle(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TESetSelect(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long selStart;
-       long selEnd;
-#ifndef TESetSelect
-       PyMac_PRECHECK(TESetSelect);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &selStart,
-                             &selEnd))
-               return NULL;
-       TESetSelect(selStart,
-                   selEnd,
-                   _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEActivate(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TEActivate
-       PyMac_PRECHECK(TEActivate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TEActivate(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEDeactivate(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TEDeactivate
-       PyMac_PRECHECK(TEDeactivate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TEDeactivate(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEKey(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CharParameter key;
-#ifndef TEKey
-       PyMac_PRECHECK(TEKey);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &key))
-               return NULL;
-       TEKey(key,
-             _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TECut(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TECut
-       PyMac_PRECHECK(TECut);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TECut(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TECopy(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TECopy
-       PyMac_PRECHECK(TECopy);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TECopy(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEPaste(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TEPaste
-       PyMac_PRECHECK(TEPaste);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TEPaste(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEDelete(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TEDelete
-       PyMac_PRECHECK(TEDelete);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TEDelete(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEInsert(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *text__in__;
-       long text__len__;
-       int text__in_len__;
-#ifndef TEInsert
-       PyMac_PRECHECK(TEInsert);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#",
-                             &text__in__, &text__in_len__))
-               return NULL;
-       text__len__ = text__in_len__;
-       TEInsert(text__in__, text__len__,
-                _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TESetAlignment(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short just;
-#ifndef TESetAlignment
-       PyMac_PRECHECK(TESetAlignment);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &just))
-               return NULL;
-       TESetAlignment(just,
-                      _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEUpdate(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect rUpdate;
-#ifndef TEUpdate
-       PyMac_PRECHECK(TEUpdate);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &rUpdate))
-               return NULL;
-       TEUpdate(&rUpdate,
-                _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEScroll(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short dh;
-       short dv;
-#ifndef TEScroll
-       PyMac_PRECHECK(TEScroll);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &dh,
-                             &dv))
-               return NULL;
-       TEScroll(dh,
-                dv,
-                _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TESelView(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TESelView
-       PyMac_PRECHECK(TESelView);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TESelView(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEPinScroll(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short dh;
-       short dv;
-#ifndef TEPinScroll
-       PyMac_PRECHECK(TEPinScroll);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &dh,
-                             &dv))
-               return NULL;
-       TEPinScroll(dh,
-                   dv,
-                   _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEAutoView(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean fAuto;
-#ifndef TEAutoView
-       PyMac_PRECHECK(TEAutoView);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &fAuto))
-               return NULL;
-       TEAutoView(fAuto,
-                  _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TECalText(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TECalText
-       PyMac_PRECHECK(TECalText);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TECalText(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEGetOffset(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       Point pt;
-#ifndef TEGetOffset
-       PyMac_PRECHECK(TEGetOffset);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &pt))
-               return NULL;
-       _rv = TEGetOffset(pt,
-                         _self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TEObj_TEGetPoint(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point _rv;
-       short offset;
-#ifndef TEGetPoint
-       PyMac_PRECHECK(TEGetPoint);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &offset))
-               return NULL;
-       _rv = TEGetPoint(offset,
-                        _self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, _rv);
-       return _res;
-}
-
-static PyObject *TEObj_TEClick(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point pt;
-       Boolean fExtend;
-#ifndef TEClick
-       PyMac_PRECHECK(TEClick);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             PyMac_GetPoint, &pt,
-                             &fExtend))
-               return NULL;
-       TEClick(pt,
-               fExtend,
-               _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TESetStyleHandle(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TEStyleHandle theHandle;
-#ifndef TESetStyleHandle
-       PyMac_PRECHECK(TESetStyleHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &theHandle))
-               return NULL;
-       TESetStyleHandle(theHandle,
-                        _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEGetStyleHandle(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TEStyleHandle _rv;
-#ifndef TEGetStyleHandle
-       PyMac_PRECHECK(TEGetStyleHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TEGetStyleHandle(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TEObj_TEGetStyle(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short offset;
-       TextStyle theStyle;
-       short lineHeight;
-       short fontAscent;
-#ifndef TEGetStyle
-       PyMac_PRECHECK(TEGetStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &offset))
-               return NULL;
-       TEGetStyle(offset,
-                  &theStyle,
-                  &lineHeight,
-                  &fontAscent,
-                  _self->ob_itself);
-       _res = Py_BuildValue("O&hh",
-                            TextStyle_New, &theStyle,
-                            lineHeight,
-                            fontAscent);
-       return _res;
-}
-
-static PyObject *TEObj_TEStylePaste(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef TEStylePaste
-       PyMac_PRECHECK(TEStylePaste);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       TEStylePaste(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TESetStyle(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short mode;
-       TextStyle newStyle;
-       Boolean fRedraw;
-#ifndef TESetStyle
-       PyMac_PRECHECK(TESetStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&b",
-                             &mode,
-                             TextStyle_Convert, &newStyle,
-                             &fRedraw))
-               return NULL;
-       TESetStyle(mode,
-                  &newStyle,
-                  fRedraw,
-                  _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEReplaceStyle(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short mode;
-       TextStyle oldStyle;
-       TextStyle newStyle;
-       Boolean fRedraw;
-#ifndef TEReplaceStyle
-       PyMac_PRECHECK(TEReplaceStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&O&b",
-                             &mode,
-                             TextStyle_Convert, &oldStyle,
-                             TextStyle_Convert, &newStyle,
-                             &fRedraw))
-               return NULL;
-       TEReplaceStyle(mode,
-                      &oldStyle,
-                      &newStyle,
-                      fRedraw,
-                      _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEGetStyleScrapHandle(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       StScrpHandle _rv;
-#ifndef TEGetStyleScrapHandle
-       PyMac_PRECHECK(TEGetStyleScrapHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TEGetStyleScrapHandle(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TEObj_TEStyleInsert(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *text__in__;
-       long text__len__;
-       int text__in_len__;
-       StScrpHandle hST;
-#ifndef TEStyleInsert
-       PyMac_PRECHECK(TEStyleInsert);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#O&",
-                             &text__in__, &text__in_len__,
-                             ResObj_Convert, &hST))
-               return NULL;
-       text__len__ = text__in_len__;
-       TEStyleInsert(text__in__, text__len__,
-                     hST,
-                     _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TEGetHeight(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       long endLine;
-       long startLine;
-#ifndef TEGetHeight
-       PyMac_PRECHECK(TEGetHeight);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &endLine,
-                             &startLine))
-               return NULL;
-       _rv = TEGetHeight(endLine,
-                         startLine,
-                         _self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TEObj_TEContinuousStyle(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       short mode;
-       TextStyle aStyle;
-#ifndef TEContinuousStyle
-       PyMac_PRECHECK(TEContinuousStyle);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &mode,
-                             TextStyle_Convert, &aStyle))
-               return NULL;
-       _rv = TEContinuousStyle(&mode,
-                               &aStyle,
-                               _self->ob_itself);
-       _res = Py_BuildValue("bhO&",
-                            _rv,
-                            mode,
-                            TextStyle_New, &aStyle);
-       return _res;
-}
-
-static PyObject *TEObj_TEUseStyleScrap(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long rangeStart;
-       long rangeEnd;
-       StScrpHandle newStyles;
-       Boolean fRedraw;
-#ifndef TEUseStyleScrap
-       PyMac_PRECHECK(TEUseStyleScrap);
-#endif
-       if (!PyArg_ParseTuple(_args, "llO&b",
-                             &rangeStart,
-                             &rangeEnd,
-                             ResObj_Convert, &newStyles,
-                             &fRedraw))
-               return NULL;
-       TEUseStyleScrap(rangeStart,
-                       rangeEnd,
-                       newStyles,
-                       fRedraw,
-                       _self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_TENumStyles(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       long rangeStart;
-       long rangeEnd;
-#ifndef TENumStyles
-       PyMac_PRECHECK(TENumStyles);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &rangeStart,
-                             &rangeEnd))
-               return NULL;
-       _rv = TENumStyles(rangeStart,
-                         rangeEnd,
-                         _self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TEObj_TEFeatureFlag(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       short feature;
-       short action;
-#ifndef TEFeatureFlag
-       PyMac_PRECHECK(TEFeatureFlag);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &feature,
-                             &action))
-               return NULL;
-       _rv = TEFeatureFlag(feature,
-                           action,
-                           _self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TEObj_TEGetHiliteRgn(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       RgnHandle region;
-#ifndef TEGetHiliteRgn
-       PyMac_PRECHECK(TEGetHiliteRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &region))
-               return NULL;
-       _err = TEGetHiliteRgn(region,
-                             _self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TEObj_as_Resource(TEObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef as_Resource
-       PyMac_PRECHECK(as_Resource);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = as_Resource(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyMethodDef TEObj_methods[] = {
-       {"TESetText", (PyCFunction)TEObj_TESetText, 1,
-        PyDoc_STR("(Buffer text) -> None")},
-       {"TEGetText", (PyCFunction)TEObj_TEGetText, 1,
-        PyDoc_STR("() -> (CharsHandle _rv)")},
-       {"TEIdle", (PyCFunction)TEObj_TEIdle, 1,
-        PyDoc_STR("() -> None")},
-       {"TESetSelect", (PyCFunction)TEObj_TESetSelect, 1,
-        PyDoc_STR("(long selStart, long selEnd) -> None")},
-       {"TEActivate", (PyCFunction)TEObj_TEActivate, 1,
-        PyDoc_STR("() -> None")},
-       {"TEDeactivate", (PyCFunction)TEObj_TEDeactivate, 1,
-        PyDoc_STR("() -> None")},
-       {"TEKey", (PyCFunction)TEObj_TEKey, 1,
-        PyDoc_STR("(CharParameter key) -> None")},
-       {"TECut", (PyCFunction)TEObj_TECut, 1,
-        PyDoc_STR("() -> None")},
-       {"TECopy", (PyCFunction)TEObj_TECopy, 1,
-        PyDoc_STR("() -> None")},
-       {"TEPaste", (PyCFunction)TEObj_TEPaste, 1,
-        PyDoc_STR("() -> None")},
-       {"TEDelete", (PyCFunction)TEObj_TEDelete, 1,
-        PyDoc_STR("() -> None")},
-       {"TEInsert", (PyCFunction)TEObj_TEInsert, 1,
-        PyDoc_STR("(Buffer text) -> None")},
-       {"TESetAlignment", (PyCFunction)TEObj_TESetAlignment, 1,
-        PyDoc_STR("(short just) -> None")},
-       {"TEUpdate", (PyCFunction)TEObj_TEUpdate, 1,
-        PyDoc_STR("(Rect rUpdate) -> None")},
-       {"TEScroll", (PyCFunction)TEObj_TEScroll, 1,
-        PyDoc_STR("(short dh, short dv) -> None")},
-       {"TESelView", (PyCFunction)TEObj_TESelView, 1,
-        PyDoc_STR("() -> None")},
-       {"TEPinScroll", (PyCFunction)TEObj_TEPinScroll, 1,
-        PyDoc_STR("(short dh, short dv) -> None")},
-       {"TEAutoView", (PyCFunction)TEObj_TEAutoView, 1,
-        PyDoc_STR("(Boolean fAuto) -> None")},
-       {"TECalText", (PyCFunction)TEObj_TECalText, 1,
-        PyDoc_STR("() -> None")},
-       {"TEGetOffset", (PyCFunction)TEObj_TEGetOffset, 1,
-        PyDoc_STR("(Point pt) -> (short _rv)")},
-       {"TEGetPoint", (PyCFunction)TEObj_TEGetPoint, 1,
-        PyDoc_STR("(short offset) -> (Point _rv)")},
-       {"TEClick", (PyCFunction)TEObj_TEClick, 1,
-        PyDoc_STR("(Point pt, Boolean fExtend) -> None")},
-       {"TESetStyleHandle", (PyCFunction)TEObj_TESetStyleHandle, 1,
-        PyDoc_STR("(TEStyleHandle theHandle) -> None")},
-       {"TEGetStyleHandle", (PyCFunction)TEObj_TEGetStyleHandle, 1,
-        PyDoc_STR("() -> (TEStyleHandle _rv)")},
-       {"TEGetStyle", (PyCFunction)TEObj_TEGetStyle, 1,
-        PyDoc_STR("(short offset) -> (TextStyle theStyle, short lineHeight, short fontAscent)")},
-       {"TEStylePaste", (PyCFunction)TEObj_TEStylePaste, 1,
-        PyDoc_STR("() -> None")},
-       {"TESetStyle", (PyCFunction)TEObj_TESetStyle, 1,
-        PyDoc_STR("(short mode, TextStyle newStyle, Boolean fRedraw) -> None")},
-       {"TEReplaceStyle", (PyCFunction)TEObj_TEReplaceStyle, 1,
-        PyDoc_STR("(short mode, TextStyle oldStyle, TextStyle newStyle, Boolean fRedraw) -> None")},
-       {"TEGetStyleScrapHandle", (PyCFunction)TEObj_TEGetStyleScrapHandle, 1,
-        PyDoc_STR("() -> (StScrpHandle _rv)")},
-       {"TEStyleInsert", (PyCFunction)TEObj_TEStyleInsert, 1,
-        PyDoc_STR("(Buffer text, StScrpHandle hST) -> None")},
-       {"TEGetHeight", (PyCFunction)TEObj_TEGetHeight, 1,
-        PyDoc_STR("(long endLine, long startLine) -> (long _rv)")},
-       {"TEContinuousStyle", (PyCFunction)TEObj_TEContinuousStyle, 1,
-        PyDoc_STR("(short mode, TextStyle aStyle) -> (Boolean _rv, short mode, TextStyle aStyle)")},
-       {"TEUseStyleScrap", (PyCFunction)TEObj_TEUseStyleScrap, 1,
-        PyDoc_STR("(long rangeStart, long rangeEnd, StScrpHandle newStyles, Boolean fRedraw) -> None")},
-       {"TENumStyles", (PyCFunction)TEObj_TENumStyles, 1,
-        PyDoc_STR("(long rangeStart, long rangeEnd) -> (long _rv)")},
-       {"TEFeatureFlag", (PyCFunction)TEObj_TEFeatureFlag, 1,
-        PyDoc_STR("(short feature, short action) -> (short _rv)")},
-       {"TEGetHiliteRgn", (PyCFunction)TEObj_TEGetHiliteRgn, 1,
-        PyDoc_STR("(RgnHandle region) -> None")},
-       {"as_Resource", (PyCFunction)TEObj_as_Resource, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {NULL, NULL, 0}
-};
-
-static PyObject *TEObj_get_destRect(TEObject *self, void *closure)
-{
-       return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->destRect);
-}
-
-#define TEObj_set_destRect NULL
-
-static PyObject *TEObj_get_viewRect(TEObject *self, void *closure)
-{
-       return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->viewRect);
-}
-
-#define TEObj_set_viewRect NULL
-
-static PyObject *TEObj_get_selRect(TEObject *self, void *closure)
-{
-       return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->selRect);
-}
-
-#define TEObj_set_selRect NULL
-
-static PyObject *TEObj_get_lineHeight(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->lineHeight);
-}
-
-#define TEObj_set_lineHeight NULL
-
-static PyObject *TEObj_get_fontAscent(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->fontAscent);
-}
-
-#define TEObj_set_fontAscent NULL
-
-static PyObject *TEObj_get_selPoint(TEObject *self, void *closure)
-{
-       return Py_BuildValue("O&", PyMac_BuildPoint, (*self->ob_itself)->selPoint);
-}
-
-#define TEObj_set_selPoint NULL
-
-static PyObject *TEObj_get_selStart(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->selStart);
-}
-
-#define TEObj_set_selStart NULL
-
-static PyObject *TEObj_get_selEnd(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->selEnd);
-}
-
-#define TEObj_set_selEnd NULL
-
-static PyObject *TEObj_get_active(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->active);
-}
-
-#define TEObj_set_active NULL
-
-static PyObject *TEObj_get_just(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->just);
-}
-
-#define TEObj_set_just NULL
-
-static PyObject *TEObj_get_teLength(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->teLength);
-}
-
-#define TEObj_set_teLength NULL
-
-static PyObject *TEObj_get_txFont(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->txFont);
-}
-
-#define TEObj_set_txFont NULL
-
-static PyObject *TEObj_get_txFace(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->txFace);
-}
-
-#define TEObj_set_txFace NULL
-
-static PyObject *TEObj_get_txMode(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->txMode);
-}
-
-#define TEObj_set_txMode NULL
-
-static PyObject *TEObj_get_txSize(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->txSize);
-}
-
-#define TEObj_set_txSize NULL
-
-static PyObject *TEObj_get_nLines(TEObject *self, void *closure)
-{
-       return Py_BuildValue("h", (*self->ob_itself)->nLines);
-}
-
-#define TEObj_set_nLines NULL
-
-static PyGetSetDef TEObj_getsetlist[] = {
-       {"destRect", (getter)TEObj_get_destRect, (setter)TEObj_set_destRect, "Destination rectangle"},
-       {"viewRect", (getter)TEObj_get_viewRect, (setter)TEObj_set_viewRect, "Viewing rectangle"},
-       {"selRect", (getter)TEObj_get_selRect, (setter)TEObj_set_selRect, "Selection rectangle"},
-       {"lineHeight", (getter)TEObj_get_lineHeight, (setter)TEObj_set_lineHeight, "Height of a line"},
-       {"fontAscent", (getter)TEObj_get_fontAscent, (setter)TEObj_set_fontAscent, "Ascent of a line"},
-       {"selPoint", (getter)TEObj_get_selPoint, (setter)TEObj_set_selPoint, "Selection Point"},
-       {"selStart", (getter)TEObj_get_selStart, (setter)TEObj_set_selStart, "Start of selection"},
-       {"selEnd", (getter)TEObj_get_selEnd, (setter)TEObj_set_selEnd, "End of selection"},
-       {"active", (getter)TEObj_get_active, (setter)TEObj_set_active, "TBD"},
-       {"just", (getter)TEObj_get_just, (setter)TEObj_set_just, "Justification"},
-       {"teLength", (getter)TEObj_get_teLength, (setter)TEObj_set_teLength, "TBD"},
-       {"txFont", (getter)TEObj_get_txFont, (setter)TEObj_set_txFont, "Current font"},
-       {"txFace", (getter)TEObj_get_txFace, (setter)TEObj_set_txFace, "Current font variant"},
-       {"txMode", (getter)TEObj_get_txMode, (setter)TEObj_set_txMode, "Current text-drawing mode"},
-       {"txSize", (getter)TEObj_get_txSize, (setter)TEObj_set_txSize, "Current font size"},
-       {"nLines", (getter)TEObj_get_nLines, (setter)TEObj_set_nLines, "TBD"},
-       {NULL, NULL, NULL, NULL},
-};
-
-
-#define TEObj_compare NULL
-
-#define TEObj_repr NULL
-
-#define TEObj_hash NULL
-#define TEObj_tp_init 0
-
-#define TEObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *TEObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       TEHandle itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TEObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((TEObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define TEObj_tp_free PyObject_Del
-
-
-PyTypeObject TE_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_TE.TE", /*tp_name*/
-       sizeof(TEObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) TEObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) TEObj_compare, /*tp_compare*/
-       (reprfunc) TEObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) TEObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       TEObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       TEObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       TEObj_tp_init, /* tp_init */
-       TEObj_tp_alloc, /* tp_alloc */
-       TEObj_tp_new, /* tp_new */
-       TEObj_tp_free, /* tp_free */
-};
-
-/* ----------------------- End object type TE ----------------------- */
-
-
-static PyObject *TE_TEScrapHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef TEScrapHandle
-       PyMac_PRECHECK(TEScrapHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TEScrapHandle();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TE_TEGetScrapLength(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef TEGetScrapLength
-       PyMac_PRECHECK(TEGetScrapLength);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TEGetScrapLength();
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TE_TENew(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TEHandle _rv;
-       Rect destRect;
-       Rect viewRect;
-#ifndef TENew
-       PyMac_PRECHECK(TENew);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &destRect,
-                             PyMac_GetRect, &viewRect))
-               return NULL;
-       _rv = TENew(&destRect,
-                   &viewRect);
-       _res = Py_BuildValue("O&",
-                            TEObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TE_TETextBox(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *text__in__;
-       long text__len__;
-       int text__in_len__;
-       Rect box;
-       short just;
-#ifndef TETextBox
-       PyMac_PRECHECK(TETextBox);
-#endif
-       if (!PyArg_ParseTuple(_args, "s#O&h",
-                             &text__in__, &text__in_len__,
-                             PyMac_GetRect, &box,
-                             &just))
-               return NULL;
-       text__len__ = text__in_len__;
-       TETextBox(text__in__, text__len__,
-                 &box,
-                 just);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TE_TEStyleNew(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TEHandle _rv;
-       Rect destRect;
-       Rect viewRect;
-#ifndef TEStyleNew
-       PyMac_PRECHECK(TEStyleNew);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &destRect,
-                             PyMac_GetRect, &viewRect))
-               return NULL;
-       _rv = TEStyleNew(&destRect,
-                        &viewRect);
-       _res = Py_BuildValue("O&",
-                            TEObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TE_TESetScrapLength(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long length;
-#ifndef TESetScrapLength
-       PyMac_PRECHECK(TESetScrapLength);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &length))
-               return NULL;
-       TESetScrapLength(length);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TE_TEFromScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef TEFromScrap
-       PyMac_PRECHECK(TEFromScrap);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TEFromScrap();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TE_TEToScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef TEToScrap
-       PyMac_PRECHECK(TEToScrap);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = TEToScrap();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TE_TEGetScrapHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-#ifndef TEGetScrapHandle
-       PyMac_PRECHECK(TEGetScrapHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TEGetScrapHandle();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *TE_TESetScrapHandle(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle value;
-#ifndef TESetScrapHandle
-       PyMac_PRECHECK(TESetScrapHandle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &value))
-               return NULL;
-       TESetScrapHandle(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TE_LMGetWordRedraw(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 _rv;
-#ifndef LMGetWordRedraw
-       PyMac_PRECHECK(LMGetWordRedraw);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = LMGetWordRedraw();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *TE_LMSetWordRedraw(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       UInt8 value;
-#ifndef LMSetWordRedraw
-       PyMac_PRECHECK(LMSetWordRedraw);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &value))
-               return NULL;
-       LMSetWordRedraw(value);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *TE_as_TE(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       TEHandle _rv;
-       Handle h;
-#ifndef as_TE
-       PyMac_PRECHECK(as_TE);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &h))
-               return NULL;
-       _rv = as_TE(h);
-       _res = Py_BuildValue("O&",
-                            TEObj_New, _rv);
-       return _res;
-}
-
-static PyMethodDef TE_methods[] = {
-       {"TEScrapHandle", (PyCFunction)TE_TEScrapHandle, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"TEGetScrapLength", (PyCFunction)TE_TEGetScrapLength, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"TENew", (PyCFunction)TE_TENew, 1,
-        PyDoc_STR("(Rect destRect, Rect viewRect) -> (TEHandle _rv)")},
-       {"TETextBox", (PyCFunction)TE_TETextBox, 1,
-        PyDoc_STR("(Buffer text, Rect box, short just) -> None")},
-       {"TEStyleNew", (PyCFunction)TE_TEStyleNew, 1,
-        PyDoc_STR("(Rect destRect, Rect viewRect) -> (TEHandle _rv)")},
-       {"TESetScrapLength", (PyCFunction)TE_TESetScrapLength, 1,
-        PyDoc_STR("(long length) -> None")},
-       {"TEFromScrap", (PyCFunction)TE_TEFromScrap, 1,
-        PyDoc_STR("() -> None")},
-       {"TEToScrap", (PyCFunction)TE_TEToScrap, 1,
-        PyDoc_STR("() -> None")},
-       {"TEGetScrapHandle", (PyCFunction)TE_TEGetScrapHandle, 1,
-        PyDoc_STR("() -> (Handle _rv)")},
-       {"TESetScrapHandle", (PyCFunction)TE_TESetScrapHandle, 1,
-        PyDoc_STR("(Handle value) -> None")},
-       {"LMGetWordRedraw", (PyCFunction)TE_LMGetWordRedraw, 1,
-        PyDoc_STR("() -> (UInt8 _rv)")},
-       {"LMSetWordRedraw", (PyCFunction)TE_LMSetWordRedraw, 1,
-        PyDoc_STR("(UInt8 value) -> None")},
-       {"as_TE", (PyCFunction)TE_as_TE, 1,
-        PyDoc_STR("(Handle h) -> (TEHandle _rv)")},
-       {NULL, NULL, 0}
-};
-
-
-
-
-void init_TE(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
-
-
-       m = Py_InitModule("_TE", TE_methods);
-       d = PyModule_GetDict(m);
-       TE_Error = PyMac_GetOSErrException();
-       if (TE_Error == NULL ||
-           PyDict_SetItemString(d, "Error", TE_Error) != 0)
-               return;
-       Py_TYPE(&TE_Type) = &PyType_Type;
-       if (PyType_Ready(&TE_Type) < 0) return;
-       Py_INCREF(&TE_Type);
-       PyModule_AddObject(m, "TE", (PyObject *)&TE_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&TE_Type);
-       PyModule_AddObject(m, "TEType", (PyObject *)&TE_Type);
-}
-
-/* ========================= End module _TE ========================= */
-
diff --git a/Mac/Modules/te/tescan.py b/Mac/Modules/te/tescan.py
deleted file mode 100644 (file)
index 431006f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-from scantools import Scanner
-
-LONG = "TextEdit"
-SHORT = "te"
-OBJECT = "TEHandle"
-
-def main():
-    input = LONG + ".h"
-    output = SHORT + "gen.py"
-    defsoutput = TOOLBOXDIR + LONG + ".py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    exec "import " + SHORT + "support"
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[-1]
-            # This is non-functional today
-            if t == OBJECT and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def makeblacklistnames(self):
-        return [
-                "TEDispose",
-                "TEInit",
-##                      "TEGetHiliteRgn",
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                "TEClickLoopUPP",
-                "UniversalProcPtr",
-                "WordBreakUPP",
-                "TEDoTextUPP",
-                "TERecalcUPP",
-                "TEFindWordUPP",
-                ]
-
-    def makerepairinstructions(self):
-        return [
-                ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
-                 [("InBuffer", "*", "*")]),
-
-                # TEContinuousStyle
-                ([("short", "mode", "OutMode"), ("TextStyle", "aStyle", "OutMode")],
-                 [("short", "mode", "InOutMode"), ("TextStyle", "aStyle", "InOutMode")])
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/te/tesupport.py b/Mac/Modules/te/tesupport.py
deleted file mode 100644 (file)
index 96c9604..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'TextEdit.h'            # The Apple header file
-MODNAME = '_TE'                         # The name of the module
-OBJECTNAME = 'TE'                       # The basic name of the objects used here
-KIND = 'Handle'                         # Usually 'Ptr' or 'Handle'
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'TE'                        # The prefix for module-wide routines
-OBJECTTYPE = "TEHandle"         # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-TEHandle = OpaqueByValueType("TEHandle", "TEObj")
-CharsHandle = OpaqueByValueType("CharsHandle", "ResObj")
-Handle = OpaqueByValueType("Handle", "ResObj")
-StScrpHandle = OpaqueByValueType("StScrpHandle", "ResObj")
-TEStyleHandle = OpaqueByValueType("TEStyleHandle", "ResObj")
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-
-TextStyle = OpaqueType("TextStyle", "TextStyle")
-TextStyle_ptr = TextStyle
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_TEObj_New(TEHandle);
-extern int _TEObj_Convert(PyObject *, TEHandle *);
-
-#define TEObj_New _TEObj_New
-#define TEObj_Convert _TEObj_Convert
-#endif
-
-#define as_TE(h) ((TEHandle)h)
-#define as_Resource(teh) ((Handle)teh)
-
-/*
-** Parse/generate TextStyle records
-*/
-static PyObject *
-TextStyle_New(TextStylePtr itself)
-{
-
-        return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New,
-                                &itself->tsColor);
-}
-
-static int
-TextStyle_Convert(PyObject *v, TextStylePtr p_itself)
-{
-        long font, face, size;
-
-        if( !PyArg_ParseTuple(v, "lllO&", &font, &face, &size, QdRGB_Convert, &p_itself->tsColor) )
-                return 0;
-        p_itself->tsFont = (short)font;
-        p_itself->tsFace = (Style)face;
-        p_itself->tsSize = (short)size;
-        return 1;
-}
-"""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
-"""
-
-class TEMethodGenerator(OSErrWeakLinkMethodGenerator):
-    """Similar to MethodGenerator, but has self as last argument"""
-
-    def parseArgumentList(self, args):
-        args, a0 = args[:-1], args[-1]
-        t0, n0, m0 = a0
-        if m0 != InMode:
-            raise ValueError("method's 'self' must be 'InMode'")
-        self.itself = Variable(t0, "_self->ob_itself", SelfMode)
-        FunctionGenerator.parseArgumentList(self, args)
-        self.argumentList.append(self.itself)
-
-
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    # XXXX Could be subtype of Resource
-    # Attributes that can be set.
-    getsetlist = [
-            (
-            'destRect',
-            'return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->destRect);',
-            None,
-            'Destination rectangle'
-            ), (
-            'viewRect',
-            'return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->viewRect);',
-            None,
-            'Viewing rectangle'
-            ), (
-            'selRect',
-            'return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->selRect);',
-            None,
-            'Selection rectangle'
-            ), (
-            'lineHeight',
-            'return Py_BuildValue("h", (*self->ob_itself)->lineHeight);',
-            None,
-            'Height of a line'
-            ), (
-            'fontAscent',
-            'return Py_BuildValue("h", (*self->ob_itself)->fontAscent);',
-            None,
-            'Ascent of a line'
-            ), (
-            "selPoint",
-            'return Py_BuildValue("O&", PyMac_BuildPoint, (*self->ob_itself)->selPoint);',
-            None,
-            'Selection Point'
-            ), (
-            'selStart',
-            'return Py_BuildValue("h", (*self->ob_itself)->selStart);',
-            None,
-            'Start of selection'
-            ), (
-            'selEnd',
-            'return Py_BuildValue("h", (*self->ob_itself)->selEnd);',
-            None,
-            'End of selection'
-            ), (
-            'active',
-            'return Py_BuildValue("h", (*self->ob_itself)->active);',
-            None,
-            'TBD'
-            ), (
-            'just',
-            'return Py_BuildValue("h", (*self->ob_itself)->just);',
-            None,
-            'Justification'
-            ), (
-            'teLength',
-            'return Py_BuildValue("h", (*self->ob_itself)->teLength);',
-            None,
-            'TBD'
-            ), (
-            'txFont',
-            'return Py_BuildValue("h", (*self->ob_itself)->txFont);',
-            None,
-            'Current font'
-            ), (
-            'txFace',
-            'return Py_BuildValue("h", (*self->ob_itself)->txFace);',
-            None,
-            'Current font variant'
-            ), (
-            'txMode',
-            'return Py_BuildValue("h", (*self->ob_itself)->txMode);',
-            None,
-            'Current text-drawing mode'
-            ), (
-            'txSize',
-            'return Py_BuildValue("h", (*self->ob_itself)->txSize);',
-            None,
-            'Current font size'
-            ), (
-            'nLines',
-            'return Py_BuildValue("h", (*self->ob_itself)->nLines);',
-            None,
-            'TBD'
-            )]
-
-    def outputCheckNewArg(self):
-        Output("""if (itself == NULL) {
-                                PyErr_SetString(TE_Error,"Cannot create null TE");
-                                return NULL;
-                        }""")
-    def outputFreeIt(self, itselfname):
-        Output("TEDispose(%s);", itselfname)
-
-
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = TEMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-
-# Converter from/to handle
-f = Function(TEHandle, 'as_TE', (Handle, 'h', InMode))
-functions.append(f)
-f = Method(Handle, 'as_Resource', (TEHandle, 'teh', InMode))
-methods.append(f)
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c
deleted file mode 100644 (file)
index a079b89..0000000
+++ /dev/null
@@ -1,3257 +0,0 @@
-
-/* ========================== Module _Win =========================== */
-
-#include "Python.h"
-
-
-
-#include "pymactoolbox.h"
-
-/* Macro to test whether a weak-loaded CFM function exists */
-#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-        PyErr_SetString(PyExc_NotImplementedError, \
-        "Not available in this shared library/OS version"); \
-        return NULL; \
-    }} while(0)
-
-
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_WinObj_New(WindowRef);
-extern PyObject *_WinObj_WhichWindow(WindowRef);
-extern int _WinObj_Convert(PyObject *, WindowRef *);
-
-#define WinObj_New _WinObj_New
-#define WinObj_WhichWindow _WinObj_WhichWindow
-#define WinObj_Convert _WinObj_Convert
-#endif
-
-/* Classic calls that we emulate in carbon mode */
-#define GetWindowUpdateRgn(win, rgn) GetWindowRegion((win), kWindowUpdateRgn, (rgn))
-#define GetWindowStructureRgn(win, rgn) GetWindowRegion((win), kWindowStructureRgn, (rgn))
-#define GetWindowContentRgn(win, rgn) GetWindowRegion((win), kWindowContentRgn, (rgn))
-
-/* Function to dispose a window, with a "normal" calling sequence */
-static void
-PyMac_AutoDisposeWindow(WindowPtr w)
-{
-        DisposeWindow(w);
-}
-
-static PyObject *Win_Error;
-
-/* ----------------------- Object type Window ----------------------- */
-
-PyTypeObject Window_Type;
-
-#define WinObj_Check(x) (Py_TYPE(x) == &Window_Type || PyObject_TypeCheck((x), &Window_Type))
-
-typedef struct WindowObject {
-       PyObject_HEAD
-       WindowPtr ob_itself;
-       void (*ob_freeit)(WindowPtr ptr);
-} WindowObject;
-
-PyObject *WinObj_New(WindowPtr itself)
-{
-       WindowObject *it;
-       if (itself == NULL) return PyMac_Error(resNotFound);
-       /* XXXX Or should we use WhichWindow code here? */
-       it = PyObject_NEW(WindowObject, &Window_Type);
-       if (it == NULL) return NULL;
-       it->ob_itself = itself;
-       it->ob_freeit = NULL;
-       if (GetWRefCon(itself) == 0)
-       {
-               SetWRefCon(itself, (long)it);
-               it->ob_freeit = PyMac_AutoDisposeWindow;
-       }
-       return (PyObject *)it;
-}
-
-int WinObj_Convert(PyObject *v, WindowPtr *p_itself)
-{
-
-       if (v == Py_None) { *p_itself = NULL; return 1; }
-       if (PyLong_Check(v)) { *p_itself = (WindowPtr)PyLong_AsLong(v); return 1; }
-
-       {
-               DialogRef dlg;
-               if (DlgObj_Convert(v, &dlg) && dlg) {
-                       *p_itself = GetDialogWindow(dlg);
-                       return 1;
-               }
-               PyErr_Clear();
-       }
-       if (!WinObj_Check(v))
-       {
-               PyErr_SetString(PyExc_TypeError, "Window required");
-               return 0;
-       }
-       *p_itself = ((WindowObject *)v)->ob_itself;
-       return 1;
-}
-
-static void WinObj_dealloc(WindowObject *self)
-{
-       if (self->ob_freeit && self->ob_itself)
-       {
-               SetWRefCon(self->ob_itself, 0);
-               self->ob_freeit(self->ob_itself);
-       }
-       self->ob_itself = NULL;
-       self->ob_freeit = NULL;
-       Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *WinObj_GetWindowOwnerCount(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 outCount;
-#ifndef GetWindowOwnerCount
-       PyMac_PRECHECK(GetWindowOwnerCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowOwnerCount(_self->ob_itself,
-                                  &outCount);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outCount);
-       return _res;
-}
-
-static PyObject *WinObj_CloneWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef CloneWindow
-       PyMac_PRECHECK(CloneWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CloneWindow(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowRetainCount(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ItemCount _rv;
-#ifndef GetWindowRetainCount
-       PyMac_PRECHECK(GetWindowRetainCount);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWindowRetainCount(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_RetainWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef RetainWindow
-       PyMac_PRECHECK(RetainWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = RetainWindow(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ReleaseWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef ReleaseWindow
-       PyMac_PRECHECK(ReleaseWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = ReleaseWindow(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ReshapeCustomWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef ReshapeCustomWindow
-       PyMac_PRECHECK(ReshapeCustomWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = ReshapeCustomWindow(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowWidgetHilite(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowDefPartCode outHilite;
-#ifndef GetWindowWidgetHilite
-       PyMac_PRECHECK(GetWindowWidgetHilite);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowWidgetHilite(_self->ob_itself,
-                                    &outHilite);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("h",
-                            outHilite);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowClass(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowClass outClass;
-#ifndef GetWindowClass
-       PyMac_PRECHECK(GetWindowClass);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowClass(_self->ob_itself,
-                             &outClass);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outClass);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowAttributes(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowAttributes outAttributes;
-#ifndef GetWindowAttributes
-       PyMac_PRECHECK(GetWindowAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowAttributes(_self->ob_itself,
-                                  &outAttributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outAttributes);
-       return _res;
-}
-
-static PyObject *WinObj_ChangeWindowAttributes(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowAttributes setTheseAttributes;
-       WindowAttributes clearTheseAttributes;
-#ifndef ChangeWindowAttributes
-       PyMac_PRECHECK(ChangeWindowAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "ll",
-                             &setTheseAttributes,
-                             &clearTheseAttributes))
-               return NULL;
-       _err = ChangeWindowAttributes(_self->ob_itself,
-                                     setTheseAttributes,
-                                     clearTheseAttributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowClass(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowClass inWindowClass;
-#ifndef SetWindowClass
-       PyMac_PRECHECK(SetWindowClass);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inWindowClass))
-               return NULL;
-       _err = SetWindowClass(_self->ob_itself,
-                             inWindowClass);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowModality(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowModality inModalKind;
-       WindowPtr inUnavailableWindow;
-#ifndef SetWindowModality
-       PyMac_PRECHECK(SetWindowModality);
-#endif
-       if (!PyArg_ParseTuple(_args, "lO&",
-                             &inModalKind,
-                             WinObj_Convert, &inUnavailableWindow))
-               return NULL;
-       _err = SetWindowModality(_self->ob_itself,
-                                inModalKind,
-                                inUnavailableWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowModality(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowModality outModalKind;
-       WindowPtr outUnavailableWindow;
-#ifndef GetWindowModality
-       PyMac_PRECHECK(GetWindowModality);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowModality(_self->ob_itself,
-                                &outModalKind,
-                                &outUnavailableWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("lO&",
-                            outModalKind,
-                            WinObj_WhichWindow, outUnavailableWindow);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowContentColor(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       RGBColor color;
-#ifndef SetWindowContentColor
-       PyMac_PRECHECK(SetWindowContentColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             QdRGB_Convert, &color))
-               return NULL;
-       _err = SetWindowContentColor(_self->ob_itself,
-                                    &color);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowContentColor(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       RGBColor color;
-#ifndef GetWindowContentColor
-       PyMac_PRECHECK(GetWindowContentColor);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowContentColor(_self->ob_itself,
-                                    &color);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            QdRGB_New, &color);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowContentPattern(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       PixPatHandle outPixPat;
-#ifndef GetWindowContentPattern
-       PyMac_PRECHECK(GetWindowContentPattern);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &outPixPat))
-               return NULL;
-       _err = GetWindowContentPattern(_self->ob_itself,
-                                      outPixPat);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowContentPattern(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       PixPatHandle pixPat;
-#ifndef SetWindowContentPattern
-       PyMac_PRECHECK(SetWindowContentPattern);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pixPat))
-               return NULL;
-       _err = SetWindowContentPattern(_self->ob_itself,
-                                      pixPat);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ScrollWindowRect(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inScrollRect;
-       SInt16 inHPixels;
-       SInt16 inVPixels;
-       ScrollWindowOptions inOptions;
-       RgnHandle outExposedRgn;
-#ifndef ScrollWindowRect
-       PyMac_PRECHECK(ScrollWindowRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhlO&",
-                             PyMac_GetRect, &inScrollRect,
-                             &inHPixels,
-                             &inVPixels,
-                             &inOptions,
-                             ResObj_Convert, &outExposedRgn))
-               return NULL;
-       _err = ScrollWindowRect(_self->ob_itself,
-                               &inScrollRect,
-                               inHPixels,
-                               inVPixels,
-                               inOptions,
-                               outExposedRgn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ScrollWindowRegion(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       RgnHandle inScrollRgn;
-       SInt16 inHPixels;
-       SInt16 inVPixels;
-       ScrollWindowOptions inOptions;
-       RgnHandle outExposedRgn;
-#ifndef ScrollWindowRegion
-       PyMac_PRECHECK(ScrollWindowRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hhlO&",
-                             ResObj_Convert, &inScrollRgn,
-                             &inHPixels,
-                             &inVPixels,
-                             &inOptions,
-                             ResObj_Convert, &outExposedRgn))
-               return NULL;
-       _err = ScrollWindowRegion(_self->ob_itself,
-                                 inScrollRgn,
-                                 inHPixels,
-                                 inVPixels,
-                                 inOptions,
-                                 outExposedRgn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ClipAbove(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ClipAbove
-       PyMac_PRECHECK(ClipAbove);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ClipAbove(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_PaintOne(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle clobberedRgn;
-#ifndef PaintOne
-       PyMac_PRECHECK(PaintOne);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &clobberedRgn))
-               return NULL;
-       PaintOne(_self->ob_itself,
-                clobberedRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_PaintBehind(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle clobberedRgn;
-#ifndef PaintBehind
-       PyMac_PRECHECK(PaintBehind);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &clobberedRgn))
-               return NULL;
-       PaintBehind(_self->ob_itself,
-                   clobberedRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_CalcVis(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef CalcVis
-       PyMac_PRECHECK(CalcVis);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CalcVis(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_CalcVisBehind(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle clobberedRgn;
-#ifndef CalcVisBehind
-       PyMac_PRECHECK(CalcVisBehind);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &clobberedRgn))
-               return NULL;
-       CalcVisBehind(_self->ob_itself,
-                     clobberedRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_BringToFront(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef BringToFront
-       PyMac_PRECHECK(BringToFront);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       BringToFront(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SendBehind(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr behindWindow;
-#ifndef SendBehind
-       PyMac_PRECHECK(SendBehind);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &behindWindow))
-               return NULL;
-       SendBehind(_self->ob_itself,
-                  behindWindow);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SelectWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef SelectWindow
-       PyMac_PRECHECK(SelectWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       SelectWindow(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetNextWindowOfClass(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-       WindowClass inWindowClass;
-       Boolean mustBeVisible;
-#ifndef GetNextWindowOfClass
-       PyMac_PRECHECK(GetNextWindowOfClass);
-#endif
-       if (!PyArg_ParseTuple(_args, "lb",
-                             &inWindowClass,
-                             &mustBeVisible))
-               return NULL;
-       _rv = GetNextWindowOfClass(_self->ob_itself,
-                                  inWindowClass,
-                                  mustBeVisible);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowAlternateTitle(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inTitle;
-#ifndef SetWindowAlternateTitle
-       PyMac_PRECHECK(SetWindowAlternateTitle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &inTitle))
-               return NULL;
-       _err = SetWindowAlternateTitle(_self->ob_itself,
-                                      inTitle);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_CopyWindowAlternateTitle(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef outTitle;
-#ifndef CopyWindowAlternateTitle
-       PyMac_PRECHECK(CopyWindowAlternateTitle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CopyWindowAlternateTitle(_self->ob_itself,
-                                       &outTitle);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, outTitle);
-       return _res;
-}
-
-static PyObject *WinObj_HiliteWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean fHilite;
-#ifndef HiliteWindow
-       PyMac_PRECHECK(HiliteWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &fHilite))
-               return NULL;
-       HiliteWindow(_self->ob_itself,
-                    fHilite);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SetWRefCon(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long data;
-#ifndef SetWRefCon
-       PyMac_PRECHECK(SetWRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &data))
-               return NULL;
-       SetWRefCon(_self->ob_itself,
-                  data);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWRefCon(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetWRefCon
-       PyMac_PRECHECK(GetWRefCon);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWRefCon(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowPic(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PicHandle pic;
-#ifndef SetWindowPic
-       PyMac_PRECHECK(SetWindowPic);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &pic))
-               return NULL;
-       SetWindowPic(_self->ob_itself,
-                    pic);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowPic(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PicHandle _rv;
-#ifndef GetWindowPic
-       PyMac_PRECHECK(GetWindowPic);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWindowPic(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *WinObj_GetWVariant(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetWVariant
-       PyMac_PRECHECK(GetWVariant);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWVariant(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowFeatures(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       UInt32 outFeatures;
-#ifndef GetWindowFeatures
-       PyMac_PRECHECK(GetWindowFeatures);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowFeatures(_self->ob_itself,
-                                &outFeatures);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outFeatures);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowRegion(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowRegionCode inRegionCode;
-       RgnHandle ioWinRgn;
-#ifndef GetWindowRegion
-       PyMac_PRECHECK(GetWindowRegion);
-#endif
-       if (!PyArg_ParseTuple(_args, "HO&",
-                             &inRegionCode,
-                             ResObj_Convert, &ioWinRgn))
-               return NULL;
-       _err = GetWindowRegion(_self->ob_itself,
-                              inRegionCode,
-                              ioWinRgn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowStructureWidths(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect outRect;
-#ifndef GetWindowStructureWidths
-       PyMac_PRECHECK(GetWindowStructureWidths);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowStructureWidths(_self->ob_itself,
-                                       &outRect);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &outRect);
-       return _res;
-}
-
-static PyObject *WinObj_BeginUpdate(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef BeginUpdate
-       PyMac_PRECHECK(BeginUpdate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       BeginUpdate(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_EndUpdate(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef EndUpdate
-       PyMac_PRECHECK(EndUpdate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       EndUpdate(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_InvalWindowRgn(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       RgnHandle region;
-#ifndef InvalWindowRgn
-       PyMac_PRECHECK(InvalWindowRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &region))
-               return NULL;
-       _err = InvalWindowRgn(_self->ob_itself,
-                             region);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_InvalWindowRect(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect bounds;
-#ifndef InvalWindowRect
-       PyMac_PRECHECK(InvalWindowRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &bounds))
-               return NULL;
-       _err = InvalWindowRect(_self->ob_itself,
-                              &bounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ValidWindowRgn(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       RgnHandle region;
-#ifndef ValidWindowRgn
-       PyMac_PRECHECK(ValidWindowRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &region))
-               return NULL;
-       _err = ValidWindowRgn(_self->ob_itself,
-                             region);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ValidWindowRect(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect bounds;
-#ifndef ValidWindowRect
-       PyMac_PRECHECK(ValidWindowRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &bounds))
-               return NULL;
-       _err = ValidWindowRect(_self->ob_itself,
-                              &bounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_DrawGrowIcon(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef DrawGrowIcon
-       PyMac_PRECHECK(DrawGrowIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       DrawGrowIcon(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SetWTitle(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 title;
-#ifndef SetWTitle
-       PyMac_PRECHECK(SetWTitle);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, title))
-               return NULL;
-       SetWTitle(_self->ob_itself,
-                 title);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWTitle(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 title;
-#ifndef GetWTitle
-       PyMac_PRECHECK(GetWTitle);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetWTitle(_self->ob_itself,
-                 title);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildStr255, title);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowTitleWithCFString(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef inString;
-#ifndef SetWindowTitleWithCFString
-       PyMac_PRECHECK(SetWindowTitleWithCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             CFStringRefObj_Convert, &inString))
-               return NULL;
-       _err = SetWindowTitleWithCFString(_self->ob_itself,
-                                         inString);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_CopyWindowTitleAsCFString(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       CFStringRef outString;
-#ifndef CopyWindowTitleAsCFString
-       PyMac_PRECHECK(CopyWindowTitleAsCFString);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = CopyWindowTitleAsCFString(_self->ob_itself,
-                                        &outString);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CFStringRefObj_New, outString);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowProxyFSSpec(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSSpec inFile;
-#ifndef SetWindowProxyFSSpec
-       PyMac_PRECHECK(SetWindowProxyFSSpec);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetFSSpec, &inFile))
-               return NULL;
-       _err = SetWindowProxyFSSpec(_self->ob_itself,
-                                   &inFile);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowProxyFSSpec(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       FSSpec outFile;
-#ifndef GetWindowProxyFSSpec
-       PyMac_PRECHECK(GetWindowProxyFSSpec);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowProxyFSSpec(_self->ob_itself,
-                                   &outFile);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildFSSpec, &outFile);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowProxyAlias(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       AliasHandle inAlias;
-#ifndef SetWindowProxyAlias
-       PyMac_PRECHECK(SetWindowProxyAlias);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &inAlias))
-               return NULL;
-       _err = SetWindowProxyAlias(_self->ob_itself,
-                                  inAlias);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowProxyAlias(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       AliasHandle alias;
-#ifndef GetWindowProxyAlias
-       PyMac_PRECHECK(GetWindowProxyAlias);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowProxyAlias(_self->ob_itself,
-                                  &alias);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, alias);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowProxyCreatorAndType(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType fileCreator;
-       OSType fileType;
-       SInt16 vRefNum;
-#ifndef SetWindowProxyCreatorAndType
-       PyMac_PRECHECK(SetWindowProxyCreatorAndType);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             PyMac_GetOSType, &fileCreator,
-                             PyMac_GetOSType, &fileType,
-                             &vRefNum))
-               return NULL;
-       _err = SetWindowProxyCreatorAndType(_self->ob_itself,
-                                           fileCreator,
-                                           fileType,
-                                           vRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowProxyIcon(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       IconRef outIcon;
-#ifndef GetWindowProxyIcon
-       PyMac_PRECHECK(GetWindowProxyIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowProxyIcon(_self->ob_itself,
-                                 &outIcon);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            ResObj_New, outIcon);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowProxyIcon(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       IconRef icon;
-#ifndef SetWindowProxyIcon
-       PyMac_PRECHECK(SetWindowProxyIcon);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &icon))
-               return NULL;
-       _err = SetWindowProxyIcon(_self->ob_itself,
-                                 icon);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_RemoveWindowProxy(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef RemoveWindowProxy
-       PyMac_PRECHECK(RemoveWindowProxy);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = RemoveWindowProxy(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_BeginWindowProxyDrag(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       DragReference outNewDrag;
-       RgnHandle outDragOutlineRgn;
-#ifndef BeginWindowProxyDrag
-       PyMac_PRECHECK(BeginWindowProxyDrag);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &outDragOutlineRgn))
-               return NULL;
-       _err = BeginWindowProxyDrag(_self->ob_itself,
-                                   &outNewDrag,
-                                   outDragOutlineRgn);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            DragObj_New, outNewDrag);
-       return _res;
-}
-
-static PyObject *WinObj_EndWindowProxyDrag(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       DragReference theDrag;
-#ifndef EndWindowProxyDrag
-       PyMac_PRECHECK(EndWindowProxyDrag);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             DragObj_Convert, &theDrag))
-               return NULL;
-       _err = EndWindowProxyDrag(_self->ob_itself,
-                                 theDrag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_TrackWindowProxyFromExistingDrag(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point startPt;
-       DragReference drag;
-       RgnHandle inDragOutlineRgn;
-#ifndef TrackWindowProxyFromExistingDrag
-       PyMac_PRECHECK(TrackWindowProxyFromExistingDrag);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&",
-                             PyMac_GetPoint, &startPt,
-                             DragObj_Convert, &drag,
-                             ResObj_Convert, &inDragOutlineRgn))
-               return NULL;
-       _err = TrackWindowProxyFromExistingDrag(_self->ob_itself,
-                                               startPt,
-                                               drag,
-                                               inDragOutlineRgn);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_TrackWindowProxyDrag(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point startPt;
-#ifndef TrackWindowProxyDrag
-       PyMac_PRECHECK(TrackWindowProxyDrag);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &startPt))
-               return NULL;
-       _err = TrackWindowProxyDrag(_self->ob_itself,
-                                   startPt);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_IsWindowModified(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsWindowModified
-       PyMac_PRECHECK(IsWindowModified);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsWindowModified(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowModified(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean modified;
-#ifndef SetWindowModified
-       PyMac_PRECHECK(SetWindowModified);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &modified))
-               return NULL;
-       _err = SetWindowModified(_self->ob_itself,
-                                modified);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_IsWindowPathSelectClick(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord event;
-#ifndef IsWindowPathSelectClick
-       PyMac_PRECHECK(IsWindowPathSelectClick);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &event))
-               return NULL;
-       _rv = IsWindowPathSelectClick(_self->ob_itself,
-                                     &event);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_WindowPathSelect(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       MenuHandle menu;
-       SInt32 outMenuResult;
-#ifndef WindowPathSelect
-       PyMac_PRECHECK(WindowPathSelect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             MenuObj_Convert, &menu))
-               return NULL;
-       _err = WindowPathSelect(_self->ob_itself,
-                               menu,
-                               &outMenuResult);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outMenuResult);
-       return _res;
-}
-
-static PyObject *WinObj_HiliteWindowFrameForDrag(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean hilited;
-#ifndef HiliteWindowFrameForDrag
-       PyMac_PRECHECK(HiliteWindowFrameForDrag);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &hilited))
-               return NULL;
-       _err = HiliteWindowFrameForDrag(_self->ob_itself,
-                                       hilited);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_TransitionWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowTransitionEffect inEffect;
-       WindowTransitionAction inAction;
-       Rect inRect;
-#ifndef TransitionWindow
-       PyMac_PRECHECK(TransitionWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "llO&",
-                             &inEffect,
-                             &inAction,
-                             PyMac_GetRect, &inRect))
-               return NULL;
-       _err = TransitionWindow(_self->ob_itself,
-                               inEffect,
-                               inAction,
-                               &inRect);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_TransitionWindowAndParent(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inParentWindow;
-       WindowTransitionEffect inEffect;
-       WindowTransitionAction inAction;
-       Rect inRect;
-#ifndef TransitionWindowAndParent
-       PyMac_PRECHECK(TransitionWindowAndParent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&llO&",
-                             WinObj_Convert, &inParentWindow,
-                             &inEffect,
-                             &inAction,
-                             PyMac_GetRect, &inRect))
-               return NULL;
-       _err = TransitionWindowAndParent(_self->ob_itself,
-                                        inParentWindow,
-                                        inEffect,
-                                        inAction,
-                                        &inRect);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_MacMoveWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short hGlobal;
-       short vGlobal;
-       Boolean front;
-#ifndef MacMoveWindow
-       PyMac_PRECHECK(MacMoveWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhb",
-                             &hGlobal,
-                             &vGlobal,
-                             &front))
-               return NULL;
-       MacMoveWindow(_self->ob_itself,
-                     hGlobal,
-                     vGlobal,
-                     front);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SizeWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short w;
-       short h;
-       Boolean fUpdate;
-#ifndef SizeWindow
-       PyMac_PRECHECK(SizeWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhb",
-                             &w,
-                             &h,
-                             &fUpdate))
-               return NULL;
-       SizeWindow(_self->ob_itself,
-                  w,
-                  h,
-                  fUpdate);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GrowWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       Point startPt;
-       Rect bBox;
-#ifndef GrowWindow
-       PyMac_PRECHECK(GrowWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &startPt,
-                             PyMac_GetRect, &bBox))
-               return NULL;
-       _rv = GrowWindow(_self->ob_itself,
-                        startPt,
-                        &bBox);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_DragWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Point startPt;
-       Rect boundsRect;
-#ifndef DragWindow
-       PyMac_PRECHECK(DragWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &startPt,
-                             PyMac_GetRect, &boundsRect))
-               return NULL;
-       DragWindow(_self->ob_itself,
-                  startPt,
-                  &boundsRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ZoomWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPartCode partCode;
-       Boolean front;
-#ifndef ZoomWindow
-       PyMac_PRECHECK(ZoomWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &partCode,
-                             &front))
-               return NULL;
-       ZoomWindow(_self->ob_itself,
-                  partCode,
-                  front);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_IsWindowCollapsable(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsWindowCollapsable
-       PyMac_PRECHECK(IsWindowCollapsable);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsWindowCollapsable(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_IsWindowCollapsed(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsWindowCollapsed
-       PyMac_PRECHECK(IsWindowCollapsed);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsWindowCollapsed(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_CollapseWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean collapse;
-#ifndef CollapseWindow
-       PyMac_PRECHECK(CollapseWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &collapse))
-               return NULL;
-       _err = CollapseWindow(_self->ob_itself,
-                             collapse);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowBounds(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowRegionCode regionCode;
-       Rect globalBounds;
-#ifndef GetWindowBounds
-       PyMac_PRECHECK(GetWindowBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &regionCode))
-               return NULL;
-       _err = GetWindowBounds(_self->ob_itself,
-                              regionCode,
-                              &globalBounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &globalBounds);
-       return _res;
-}
-
-static PyObject *WinObj_ResizeWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point inStartPoint;
-       Rect inSizeConstraints;
-       Rect outNewContentRect;
-#ifndef ResizeWindow
-       PyMac_PRECHECK(ResizeWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &inStartPoint,
-                             PyMac_GetRect, &inSizeConstraints))
-               return NULL;
-       _rv = ResizeWindow(_self->ob_itself,
-                          inStartPoint,
-                          &inSizeConstraints,
-                          &outNewContentRect);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildRect, &outNewContentRect);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowBounds(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowRegionCode regionCode;
-       Rect globalBounds;
-#ifndef SetWindowBounds
-       PyMac_PRECHECK(SetWindowBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "HO&",
-                             &regionCode,
-                             PyMac_GetRect, &globalBounds))
-               return NULL;
-       _err = SetWindowBounds(_self->ob_itself,
-                              regionCode,
-                              &globalBounds);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_RepositionWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr parentWindow;
-       WindowPositionMethod method;
-#ifndef RepositionWindow
-       PyMac_PRECHECK(RepositionWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             WinObj_Convert, &parentWindow,
-                             &method))
-               return NULL;
-       _err = RepositionWindow(_self->ob_itself,
-                               parentWindow,
-                               method);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_MoveWindowStructure(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       short hGlobal;
-       short vGlobal;
-#ifndef MoveWindowStructure
-       PyMac_PRECHECK(MoveWindowStructure);
-#endif
-       if (!PyArg_ParseTuple(_args, "hh",
-                             &hGlobal,
-                             &vGlobal))
-               return NULL;
-       _err = MoveWindowStructure(_self->ob_itself,
-                                  hGlobal,
-                                  vGlobal);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_IsWindowInStandardState(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point inIdealSize;
-       Rect outIdealStandardState;
-#ifndef IsWindowInStandardState
-       PyMac_PRECHECK(IsWindowInStandardState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &inIdealSize))
-               return NULL;
-       _rv = IsWindowInStandardState(_self->ob_itself,
-                                     &inIdealSize,
-                                     &outIdealStandardState);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildRect, &outIdealStandardState);
-       return _res;
-}
-
-static PyObject *WinObj_ZoomWindowIdeal(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPartCode inPartCode;
-       Point ioIdealSize;
-#ifndef ZoomWindowIdeal
-       PyMac_PRECHECK(ZoomWindowIdeal);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inPartCode))
-               return NULL;
-       _err = ZoomWindowIdeal(_self->ob_itself,
-                              inPartCode,
-                              &ioIdealSize);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildPoint, ioIdealSize);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowIdealUserState(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect outUserState;
-#ifndef GetWindowIdealUserState
-       PyMac_PRECHECK(GetWindowIdealUserState);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetWindowIdealUserState(_self->ob_itself,
-                                      &outUserState);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &outUserState);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowIdealUserState(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Rect inUserState;
-#ifndef SetWindowIdealUserState
-       PyMac_PRECHECK(SetWindowIdealUserState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &inUserState))
-               return NULL;
-       _err = SetWindowIdealUserState(_self->ob_itself,
-                                      &inUserState);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowGreatestAreaDevice(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowRegionCode inRegion;
-       GDHandle outGreatestDevice;
-       Rect outGreatestDeviceRect;
-#ifndef GetWindowGreatestAreaDevice
-       PyMac_PRECHECK(GetWindowGreatestAreaDevice);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &inRegion))
-               return NULL;
-       _err = GetWindowGreatestAreaDevice(_self->ob_itself,
-                                          inRegion,
-                                          &outGreatestDevice,
-                                          &outGreatestDeviceRect);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&",
-                            ResObj_New, outGreatestDevice,
-                            PyMac_BuildRect, &outGreatestDeviceRect);
-       return _res;
-}
-
-static PyObject *WinObj_ConstrainWindowToScreen(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowRegionCode inRegionCode;
-       WindowConstrainOptions inOptions;
-       Rect inScreenRect;
-       Rect outStructure;
-#ifndef ConstrainWindowToScreen
-       PyMac_PRECHECK(ConstrainWindowToScreen);
-#endif
-       if (!PyArg_ParseTuple(_args, "HlO&",
-                             &inRegionCode,
-                             &inOptions,
-                             PyMac_GetRect, &inScreenRect))
-               return NULL;
-       _err = ConstrainWindowToScreen(_self->ob_itself,
-                                      inRegionCode,
-                                      inOptions,
-                                      &inScreenRect,
-                                      &outStructure);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &outStructure);
-       return _res;
-}
-
-static PyObject *WinObj_HideWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef HideWindow
-       PyMac_PRECHECK(HideWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       HideWindow(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_MacShowWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef MacShowWindow
-       PyMac_PRECHECK(MacShowWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       MacShowWindow(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ShowHide(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean showFlag;
-#ifndef ShowHide
-       PyMac_PRECHECK(ShowHide);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &showFlag))
-               return NULL;
-       ShowHide(_self->ob_itself,
-                showFlag);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_MacIsWindowVisible(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef MacIsWindowVisible
-       PyMac_PRECHECK(MacIsWindowVisible);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MacIsWindowVisible(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_ShowSheetWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr inParentWindow;
-#ifndef ShowSheetWindow
-       PyMac_PRECHECK(ShowSheetWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inParentWindow))
-               return NULL;
-       _err = ShowSheetWindow(_self->ob_itself,
-                              inParentWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_HideSheetWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef HideSheetWindow
-       PyMac_PRECHECK(HideSheetWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = HideSheetWindow(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetSheetWindowParent(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowPtr outParentWindow;
-#ifndef GetSheetWindowParent
-       PyMac_PRECHECK(GetSheetWindowParent);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetSheetWindowParent(_self->ob_itself,
-                                   &outParentWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            WinObj_WhichWindow, outParentWindow);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType propertyCreator;
-       OSType propertyTag;
-       UInt32 attributes;
-#ifndef GetWindowPropertyAttributes
-       PyMac_PRECHECK(GetWindowPropertyAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetOSType, &propertyCreator,
-                             PyMac_GetOSType, &propertyTag))
-               return NULL;
-       _err = GetWindowPropertyAttributes(_self->ob_itself,
-                                          propertyCreator,
-                                          propertyTag,
-                                          &attributes);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            attributes);
-       return _res;
-}
-
-static PyObject *WinObj_ChangeWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OSType propertyCreator;
-       OSType propertyTag;
-       UInt32 attributesToSet;
-       UInt32 attributesToClear;
-#ifndef ChangeWindowPropertyAttributes
-       PyMac_PRECHECK(ChangeWindowPropertyAttributes);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&ll",
-                             PyMac_GetOSType, &propertyCreator,
-                             PyMac_GetOSType, &propertyTag,
-                             &attributesToSet,
-                             &attributesToClear))
-               return NULL;
-       _err = ChangeWindowPropertyAttributes(_self->ob_itself,
-                                             propertyCreator,
-                                             propertyTag,
-                                             attributesToSet,
-                                             attributesToClear);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_TrackBox(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point thePt;
-       WindowPartCode partCode;
-#ifndef TrackBox
-       PyMac_PRECHECK(TrackBox);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetPoint, &thePt,
-                             &partCode))
-               return NULL;
-       _rv = TrackBox(_self->ob_itself,
-                      thePt,
-                      partCode);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_TrackGoAway(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       Point thePt;
-#ifndef TrackGoAway
-       PyMac_PRECHECK(TrackGoAway);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &thePt))
-               return NULL;
-       _rv = TrackGoAway(_self->ob_itself,
-                         thePt);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowPort(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr _rv;
-#ifndef GetWindowPort
-       PyMac_PRECHECK(GetWindowPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWindowPort(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, _rv);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowStructurePort(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr _rv;
-#ifndef GetWindowStructurePort
-       PyMac_PRECHECK(GetWindowStructurePort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWindowStructurePort(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, _rv);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowKind(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetWindowKind
-       PyMac_PRECHECK(GetWindowKind);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWindowKind(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_IsWindowHilited(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsWindowHilited
-       PyMac_PRECHECK(IsWindowHilited);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsWindowHilited(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_IsWindowUpdatePending(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsWindowUpdatePending
-       PyMac_PRECHECK(IsWindowUpdatePending);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsWindowUpdatePending(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_MacGetNextWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-#ifndef MacGetNextWindow
-       PyMac_PRECHECK(MacGetNextWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MacGetNextWindow(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowStandardState(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect rect;
-#ifndef GetWindowStandardState
-       PyMac_PRECHECK(GetWindowStandardState);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetWindowStandardState(_self->ob_itself,
-                              &rect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &rect);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowUserState(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect rect;
-#ifndef GetWindowUserState
-       PyMac_PRECHECK(GetWindowUserState);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetWindowUserState(_self->ob_itself,
-                          &rect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &rect);
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowKind(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short kind;
-#ifndef SetWindowKind
-       PyMac_PRECHECK(SetWindowKind);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &kind))
-               return NULL;
-       SetWindowKind(_self->ob_itself,
-                     kind);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowStandardState(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect rect;
-#ifndef SetWindowStandardState
-       PyMac_PRECHECK(SetWindowStandardState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &rect))
-               return NULL;
-       SetWindowStandardState(_self->ob_itself,
-                              &rect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SetWindowUserState(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect rect;
-#ifndef SetWindowUserState
-       PyMac_PRECHECK(SetWindowUserState);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &rect))
-               return NULL;
-       SetWindowUserState(_self->ob_itself,
-                          &rect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_SetPortWindowPort(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef SetPortWindowPort
-       PyMac_PRECHECK(SetPortWindowPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       SetPortWindowPort(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowPortBounds(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect bounds;
-#ifndef GetWindowPortBounds
-       PyMac_PRECHECK(GetWindowPortBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetWindowPortBounds(_self->ob_itself,
-                           &bounds);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &bounds);
-       return _res;
-}
-
-static PyObject *WinObj_IsWindowVisible(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsWindowVisible
-       PyMac_PRECHECK(IsWindowVisible);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsWindowVisible(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowStructureRgn(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle r;
-#ifndef GetWindowStructureRgn
-       PyMac_PRECHECK(GetWindowStructureRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &r))
-               return NULL;
-       GetWindowStructureRgn(_self->ob_itself,
-                             r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowContentRgn(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle r;
-#ifndef GetWindowContentRgn
-       PyMac_PRECHECK(GetWindowContentRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &r))
-               return NULL;
-       GetWindowContentRgn(_self->ob_itself,
-                           r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetWindowUpdateRgn(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle r;
-#ifndef GetWindowUpdateRgn
-       PyMac_PRECHECK(GetWindowUpdateRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &r))
-               return NULL;
-       GetWindowUpdateRgn(_self->ob_itself,
-                          r);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_GetNextWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-#ifndef GetNextWindow
-       PyMac_PRECHECK(GetNextWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetNextWindow(_self->ob_itself);
-       _res = Py_BuildValue("O&",
-                            WinObj_WhichWindow, _rv);
-       return _res;
-}
-
-static PyObject *WinObj_MoveWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short hGlobal;
-       short vGlobal;
-       Boolean front;
-#ifndef MoveWindow
-       PyMac_PRECHECK(MoveWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "hhb",
-                             &hGlobal,
-                             &vGlobal,
-                             &front))
-               return NULL;
-       MoveWindow(_self->ob_itself,
-                  hGlobal,
-                  vGlobal,
-                  front);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_ShowWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef ShowWindow
-       PyMac_PRECHECK(ShowWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       ShowWindow(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *WinObj_AutoDispose(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       int onoff, old = 0;
-       if (!PyArg_ParseTuple(_args, "i", &onoff))
-               return NULL;
-       if ( _self->ob_freeit )
-               old = 1;
-       if ( onoff )
-               _self->ob_freeit = PyMac_AutoDisposeWindow;
-       else
-               _self->ob_freeit = NULL;
-       _res = Py_BuildValue("i", old);
-       return _res;
-
-}
-
-static PyMethodDef WinObj_methods[] = {
-       {"GetWindowOwnerCount", (PyCFunction)WinObj_GetWindowOwnerCount, 1,
-        PyDoc_STR("() -> (UInt32 outCount)")},
-       {"CloneWindow", (PyCFunction)WinObj_CloneWindow, 1,
-        PyDoc_STR("() -> None")},
-       {"GetWindowRetainCount", (PyCFunction)WinObj_GetWindowRetainCount, 1,
-        PyDoc_STR("() -> (ItemCount _rv)")},
-       {"RetainWindow", (PyCFunction)WinObj_RetainWindow, 1,
-        PyDoc_STR("() -> None")},
-       {"ReleaseWindow", (PyCFunction)WinObj_ReleaseWindow, 1,
-        PyDoc_STR("() -> None")},
-       {"ReshapeCustomWindow", (PyCFunction)WinObj_ReshapeCustomWindow, 1,
-        PyDoc_STR("() -> None")},
-       {"GetWindowWidgetHilite", (PyCFunction)WinObj_GetWindowWidgetHilite, 1,
-        PyDoc_STR("() -> (WindowDefPartCode outHilite)")},
-       {"GetWindowClass", (PyCFunction)WinObj_GetWindowClass, 1,
-        PyDoc_STR("() -> (WindowClass outClass)")},
-       {"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
-        PyDoc_STR("() -> (WindowAttributes outAttributes)")},
-       {"ChangeWindowAttributes", (PyCFunction)WinObj_ChangeWindowAttributes, 1,
-        PyDoc_STR("(WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes) -> None")},
-       {"SetWindowClass", (PyCFunction)WinObj_SetWindowClass, 1,
-        PyDoc_STR("(WindowClass inWindowClass) -> None")},
-       {"SetWindowModality", (PyCFunction)WinObj_SetWindowModality, 1,
-        PyDoc_STR("(WindowModality inModalKind, WindowPtr inUnavailableWindow) -> None")},
-       {"GetWindowModality", (PyCFunction)WinObj_GetWindowModality, 1,
-        PyDoc_STR("() -> (WindowModality outModalKind, WindowPtr outUnavailableWindow)")},
-       {"SetWindowContentColor", (PyCFunction)WinObj_SetWindowContentColor, 1,
-        PyDoc_STR("(RGBColor color) -> None")},
-       {"GetWindowContentColor", (PyCFunction)WinObj_GetWindowContentColor, 1,
-        PyDoc_STR("() -> (RGBColor color)")},
-       {"GetWindowContentPattern", (PyCFunction)WinObj_GetWindowContentPattern, 1,
-        PyDoc_STR("(PixPatHandle outPixPat) -> None")},
-       {"SetWindowContentPattern", (PyCFunction)WinObj_SetWindowContentPattern, 1,
-        PyDoc_STR("(PixPatHandle pixPat) -> None")},
-       {"ScrollWindowRect", (PyCFunction)WinObj_ScrollWindowRect, 1,
-        PyDoc_STR("(Rect inScrollRect, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
-       {"ScrollWindowRegion", (PyCFunction)WinObj_ScrollWindowRegion, 1,
-        PyDoc_STR("(RgnHandle inScrollRgn, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
-       {"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
-        PyDoc_STR("() -> None")},
-       {"PaintOne", (PyCFunction)WinObj_PaintOne, 1,
-        PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
-       {"PaintBehind", (PyCFunction)WinObj_PaintBehind, 1,
-        PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
-       {"CalcVis", (PyCFunction)WinObj_CalcVis, 1,
-        PyDoc_STR("() -> None")},
-       {"CalcVisBehind", (PyCFunction)WinObj_CalcVisBehind, 1,
-        PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
-       {"BringToFront", (PyCFunction)WinObj_BringToFront, 1,
-        PyDoc_STR("() -> None")},
-       {"SendBehind", (PyCFunction)WinObj_SendBehind, 1,
-        PyDoc_STR("(WindowPtr behindWindow) -> None")},
-       {"SelectWindow", (PyCFunction)WinObj_SelectWindow, 1,
-        PyDoc_STR("() -> None")},
-       {"GetNextWindowOfClass", (PyCFunction)WinObj_GetNextWindowOfClass, 1,
-        PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)")},
-       {"SetWindowAlternateTitle", (PyCFunction)WinObj_SetWindowAlternateTitle, 1,
-        PyDoc_STR("(CFStringRef inTitle) -> None")},
-       {"CopyWindowAlternateTitle", (PyCFunction)WinObj_CopyWindowAlternateTitle, 1,
-        PyDoc_STR("() -> (CFStringRef outTitle)")},
-       {"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1,
-        PyDoc_STR("(Boolean fHilite) -> None")},
-       {"SetWRefCon", (PyCFunction)WinObj_SetWRefCon, 1,
-        PyDoc_STR("(long data) -> None")},
-       {"GetWRefCon", (PyCFunction)WinObj_GetWRefCon, 1,
-        PyDoc_STR("() -> (long _rv)")},
-       {"SetWindowPic", (PyCFunction)WinObj_SetWindowPic, 1,
-        PyDoc_STR("(PicHandle pic) -> None")},
-       {"GetWindowPic", (PyCFunction)WinObj_GetWindowPic, 1,
-        PyDoc_STR("() -> (PicHandle _rv)")},
-       {"GetWVariant", (PyCFunction)WinObj_GetWVariant, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1,
-        PyDoc_STR("() -> (UInt32 outFeatures)")},
-       {"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
-        PyDoc_STR("(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> None")},
-       {"GetWindowStructureWidths", (PyCFunction)WinObj_GetWindowStructureWidths, 1,
-        PyDoc_STR("() -> (Rect outRect)")},
-       {"BeginUpdate", (PyCFunction)WinObj_BeginUpdate, 1,
-        PyDoc_STR("() -> None")},
-       {"EndUpdate", (PyCFunction)WinObj_EndUpdate, 1,
-        PyDoc_STR("() -> None")},
-       {"InvalWindowRgn", (PyCFunction)WinObj_InvalWindowRgn, 1,
-        PyDoc_STR("(RgnHandle region) -> None")},
-       {"InvalWindowRect", (PyCFunction)WinObj_InvalWindowRect, 1,
-        PyDoc_STR("(Rect bounds) -> None")},
-       {"ValidWindowRgn", (PyCFunction)WinObj_ValidWindowRgn, 1,
-        PyDoc_STR("(RgnHandle region) -> None")},
-       {"ValidWindowRect", (PyCFunction)WinObj_ValidWindowRect, 1,
-        PyDoc_STR("(Rect bounds) -> None")},
-       {"DrawGrowIcon", (PyCFunction)WinObj_DrawGrowIcon, 1,
-        PyDoc_STR("() -> None")},
-       {"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1,
-        PyDoc_STR("(Str255 title) -> None")},
-       {"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1,
-        PyDoc_STR("() -> (Str255 title)")},
-       {"SetWindowTitleWithCFString", (PyCFunction)WinObj_SetWindowTitleWithCFString, 1,
-        PyDoc_STR("(CFStringRef inString) -> None")},
-       {"CopyWindowTitleAsCFString", (PyCFunction)WinObj_CopyWindowTitleAsCFString, 1,
-        PyDoc_STR("() -> (CFStringRef outString)")},
-       {"SetWindowProxyFSSpec", (PyCFunction)WinObj_SetWindowProxyFSSpec, 1,
-        PyDoc_STR("(FSSpec inFile) -> None")},
-       {"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
-        PyDoc_STR("() -> (FSSpec outFile)")},
-       {"SetWindowProxyAlias", (PyCFunction)WinObj_SetWindowProxyAlias, 1,
-        PyDoc_STR("(AliasHandle inAlias) -> None")},
-       {"GetWindowProxyAlias", (PyCFunction)WinObj_GetWindowProxyAlias, 1,
-        PyDoc_STR("() -> (AliasHandle alias)")},
-       {"SetWindowProxyCreatorAndType", (PyCFunction)WinObj_SetWindowProxyCreatorAndType, 1,
-        PyDoc_STR("(OSType fileCreator, OSType fileType, SInt16 vRefNum) -> None")},
-       {"GetWindowProxyIcon", (PyCFunction)WinObj_GetWindowProxyIcon, 1,
-        PyDoc_STR("() -> (IconRef outIcon)")},
-       {"SetWindowProxyIcon", (PyCFunction)WinObj_SetWindowProxyIcon, 1,
-        PyDoc_STR("(IconRef icon) -> None")},
-       {"RemoveWindowProxy", (PyCFunction)WinObj_RemoveWindowProxy, 1,
-        PyDoc_STR("() -> None")},
-       {"BeginWindowProxyDrag", (PyCFunction)WinObj_BeginWindowProxyDrag, 1,
-        PyDoc_STR("(RgnHandle outDragOutlineRgn) -> (DragReference outNewDrag)")},
-       {"EndWindowProxyDrag", (PyCFunction)WinObj_EndWindowProxyDrag, 1,
-        PyDoc_STR("(DragReference theDrag) -> None")},
-       {"TrackWindowProxyFromExistingDrag", (PyCFunction)WinObj_TrackWindowProxyFromExistingDrag, 1,
-        PyDoc_STR("(Point startPt, DragReference drag, RgnHandle inDragOutlineRgn) -> None")},
-       {"TrackWindowProxyDrag", (PyCFunction)WinObj_TrackWindowProxyDrag, 1,
-        PyDoc_STR("(Point startPt) -> None")},
-       {"IsWindowModified", (PyCFunction)WinObj_IsWindowModified, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"SetWindowModified", (PyCFunction)WinObj_SetWindowModified, 1,
-        PyDoc_STR("(Boolean modified) -> None")},
-       {"IsWindowPathSelectClick", (PyCFunction)WinObj_IsWindowPathSelectClick, 1,
-        PyDoc_STR("(EventRecord event) -> (Boolean _rv)")},
-       {"WindowPathSelect", (PyCFunction)WinObj_WindowPathSelect, 1,
-        PyDoc_STR("(MenuHandle menu) -> (SInt32 outMenuResult)")},
-       {"HiliteWindowFrameForDrag", (PyCFunction)WinObj_HiliteWindowFrameForDrag, 1,
-        PyDoc_STR("(Boolean hilited) -> None")},
-       {"TransitionWindow", (PyCFunction)WinObj_TransitionWindow, 1,
-        PyDoc_STR("(WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
-       {"TransitionWindowAndParent", (PyCFunction)WinObj_TransitionWindowAndParent, 1,
-        PyDoc_STR("(WindowPtr inParentWindow, WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
-       {"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
-        PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
-       {"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
-        PyDoc_STR("(short w, short h, Boolean fUpdate) -> None")},
-       {"GrowWindow", (PyCFunction)WinObj_GrowWindow, 1,
-        PyDoc_STR("(Point startPt, Rect bBox) -> (long _rv)")},
-       {"DragWindow", (PyCFunction)WinObj_DragWindow, 1,
-        PyDoc_STR("(Point startPt, Rect boundsRect) -> None")},
-       {"ZoomWindow", (PyCFunction)WinObj_ZoomWindow, 1,
-        PyDoc_STR("(WindowPartCode partCode, Boolean front) -> None")},
-       {"IsWindowCollapsable", (PyCFunction)WinObj_IsWindowCollapsable, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"IsWindowCollapsed", (PyCFunction)WinObj_IsWindowCollapsed, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1,
-        PyDoc_STR("(Boolean collapse) -> None")},
-       {"GetWindowBounds", (PyCFunction)WinObj_GetWindowBounds, 1,
-        PyDoc_STR("(WindowRegionCode regionCode) -> (Rect globalBounds)")},
-       {"ResizeWindow", (PyCFunction)WinObj_ResizeWindow, 1,
-        PyDoc_STR("(Point inStartPoint, Rect inSizeConstraints) -> (Boolean _rv, Rect outNewContentRect)")},
-       {"SetWindowBounds", (PyCFunction)WinObj_SetWindowBounds, 1,
-        PyDoc_STR("(WindowRegionCode regionCode, Rect globalBounds) -> None")},
-       {"RepositionWindow", (PyCFunction)WinObj_RepositionWindow, 1,
-        PyDoc_STR("(WindowPtr parentWindow, WindowPositionMethod method) -> None")},
-       {"MoveWindowStructure", (PyCFunction)WinObj_MoveWindowStructure, 1,
-        PyDoc_STR("(short hGlobal, short vGlobal) -> None")},
-       {"IsWindowInStandardState", (PyCFunction)WinObj_IsWindowInStandardState, 1,
-        PyDoc_STR("(Point inIdealSize) -> (Boolean _rv, Rect outIdealStandardState)")},
-       {"ZoomWindowIdeal", (PyCFunction)WinObj_ZoomWindowIdeal, 1,
-        PyDoc_STR("(WindowPartCode inPartCode) -> (Point ioIdealSize)")},
-       {"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 1,
-        PyDoc_STR("() -> (Rect outUserState)")},
-       {"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
-        PyDoc_STR("(Rect inUserState) -> None")},
-       {"GetWindowGreatestAreaDevice", (PyCFunction)WinObj_GetWindowGreatestAreaDevice, 1,
-        PyDoc_STR("(WindowRegionCode inRegion) -> (GDHandle outGreatestDevice, Rect outGreatestDeviceRect)")},
-       {"ConstrainWindowToScreen", (PyCFunction)WinObj_ConstrainWindowToScreen, 1,
-        PyDoc_STR("(WindowRegionCode inRegionCode, WindowConstrainOptions inOptions, Rect inScreenRect) -> (Rect outStructure)")},
-       {"HideWindow", (PyCFunction)WinObj_HideWindow, 1,
-        PyDoc_STR("() -> None")},
-       {"MacShowWindow", (PyCFunction)WinObj_MacShowWindow, 1,
-        PyDoc_STR("() -> None")},
-       {"ShowHide", (PyCFunction)WinObj_ShowHide, 1,
-        PyDoc_STR("(Boolean showFlag) -> None")},
-       {"MacIsWindowVisible", (PyCFunction)WinObj_MacIsWindowVisible, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"ShowSheetWindow", (PyCFunction)WinObj_ShowSheetWindow, 1,
-        PyDoc_STR("(WindowPtr inParentWindow) -> None")},
-       {"HideSheetWindow", (PyCFunction)WinObj_HideSheetWindow, 1,
-        PyDoc_STR("() -> None")},
-       {"GetSheetWindowParent", (PyCFunction)WinObj_GetSheetWindowParent, 1,
-        PyDoc_STR("() -> (WindowPtr outParentWindow)")},
-       {"GetWindowPropertyAttributes", (PyCFunction)WinObj_GetWindowPropertyAttributes, 1,
-        PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
-       {"ChangeWindowPropertyAttributes", (PyCFunction)WinObj_ChangeWindowPropertyAttributes, 1,
-        PyDoc_STR("(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
-       {"TrackBox", (PyCFunction)WinObj_TrackBox, 1,
-        PyDoc_STR("(Point thePt, WindowPartCode partCode) -> (Boolean _rv)")},
-       {"TrackGoAway", (PyCFunction)WinObj_TrackGoAway, 1,
-        PyDoc_STR("(Point thePt) -> (Boolean _rv)")},
-       {"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
-        PyDoc_STR("() -> (CGrafPtr _rv)")},
-       {"GetWindowStructurePort", (PyCFunction)WinObj_GetWindowStructurePort, 1,
-        PyDoc_STR("() -> (CGrafPtr _rv)")},
-       {"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
-        PyDoc_STR("() -> (short _rv)")},
-       {"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"IsWindowUpdatePending", (PyCFunction)WinObj_IsWindowUpdatePending, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"MacGetNextWindow", (PyCFunction)WinObj_MacGetNextWindow, 1,
-        PyDoc_STR("() -> (WindowPtr _rv)")},
-       {"GetWindowStandardState", (PyCFunction)WinObj_GetWindowStandardState, 1,
-        PyDoc_STR("() -> (Rect rect)")},
-       {"GetWindowUserState", (PyCFunction)WinObj_GetWindowUserState, 1,
-        PyDoc_STR("() -> (Rect rect)")},
-       {"SetWindowKind", (PyCFunction)WinObj_SetWindowKind, 1,
-        PyDoc_STR("(short kind) -> None")},
-       {"SetWindowStandardState", (PyCFunction)WinObj_SetWindowStandardState, 1,
-        PyDoc_STR("(Rect rect) -> None")},
-       {"SetWindowUserState", (PyCFunction)WinObj_SetWindowUserState, 1,
-        PyDoc_STR("(Rect rect) -> None")},
-       {"SetPortWindowPort", (PyCFunction)WinObj_SetPortWindowPort, 1,
-        PyDoc_STR("() -> None")},
-       {"GetWindowPortBounds", (PyCFunction)WinObj_GetWindowPortBounds, 1,
-        PyDoc_STR("() -> (Rect bounds)")},
-       {"IsWindowVisible", (PyCFunction)WinObj_IsWindowVisible, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
-        PyDoc_STR("(RgnHandle r) -> None")},
-       {"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
-        PyDoc_STR("(RgnHandle r) -> None")},
-       {"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
-        PyDoc_STR("(RgnHandle r) -> None")},
-       {"GetNextWindow", (PyCFunction)WinObj_GetNextWindow, 1,
-        PyDoc_STR("() -> (WindowPtr _rv)")},
-       {"MoveWindow", (PyCFunction)WinObj_MoveWindow, 1,
-        PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
-       {"ShowWindow", (PyCFunction)WinObj_ShowWindow, 1,
-        PyDoc_STR("() -> None")},
-       {"AutoDispose", (PyCFunction)WinObj_AutoDispose, 1,
-        PyDoc_STR("(int)->int. Automatically DisposeHandle the object on Python object cleanup")},
-       {NULL, NULL, 0}
-};
-
-#define WinObj_getsetlist NULL
-
-
-static int WinObj_compare(WindowObject *self, WindowObject *other)
-{
-       if ( self->ob_itself > other->ob_itself ) return 1;
-       if ( self->ob_itself < other->ob_itself ) return -1;
-       return 0;
-}
-
-static PyObject * WinObj_repr(WindowObject *self)
-{
-       char buf[100];
-       sprintf(buf, "<Window object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
-       return PyUnicode_FromString(buf);
-}
-
-static int WinObj_hash(WindowObject *self)
-{
-       return (int)self->ob_itself;
-}
-#define WinObj_tp_init 0
-
-#define WinObj_tp_alloc PyType_GenericAlloc
-
-static PyObject *WinObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
-{
-       PyObject *_self;
-       WindowPtr itself;
-       char *kw[] = {"itself", 0};
-
-       if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, WinObj_Convert, &itself)) return NULL;
-       if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
-       ((WindowObject *)_self)->ob_itself = itself;
-       return _self;
-}
-
-#define WinObj_tp_free PyObject_Del
-
-
-PyTypeObject Window_Type = {
-       PyVarObject_HEAD_INIT(NULL, 0)
-       "_Win.Window", /*tp_name*/
-       sizeof(WindowObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) WinObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc)0, /*tp_getattr*/
-       (setattrfunc)0, /*tp_setattr*/
-       (cmpfunc) WinObj_compare, /*tp_compare*/
-       (reprfunc) WinObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) WinObj_hash, /*tp_hash*/
-       0, /*tp_call*/
-       0, /*tp_str*/
-       PyObject_GenericGetAttr, /*tp_getattro*/
-       PyObject_GenericSetAttr, /*tp_setattro */
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
-       0, /*tp_doc*/
-       0, /*tp_traverse*/
-       0, /*tp_clear*/
-       0, /*tp_richcompare*/
-       0, /*tp_weaklistoffset*/
-       0, /*tp_iter*/
-       0, /*tp_iternext*/
-       WinObj_methods, /* tp_methods */
-       0, /*tp_members*/
-       WinObj_getsetlist, /*tp_getset*/
-       0, /*tp_base*/
-       0, /*tp_dict*/
-       0, /*tp_descr_get*/
-       0, /*tp_descr_set*/
-       0, /*tp_dictoffset*/
-       WinObj_tp_init, /* tp_init */
-       WinObj_tp_alloc, /* tp_alloc */
-       WinObj_tp_new, /* tp_new */
-       WinObj_tp_free, /* tp_free */
-};
-
-/* --------------------- End object type Window --------------------- */
-
-
-static PyObject *Win_GetNewCWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-       short windowID;
-       WindowPtr behind;
-#ifndef GetNewCWindow
-       PyMac_PRECHECK(GetNewCWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &windowID,
-                             WinObj_Convert, &behind))
-               return NULL;
-       _rv = GetNewCWindow(windowID,
-                           (void *)0,
-                           behind);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Win_NewWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-       Rect boundsRect;
-       Str255 title;
-       Boolean visible;
-       short theProc;
-       WindowPtr behind;
-       Boolean goAwayFlag;
-       long refCon;
-#ifndef NewWindow
-       PyMac_PRECHECK(NewWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
-                             PyMac_GetRect, &boundsRect,
-                             PyMac_GetStr255, title,
-                             &visible,
-                             &theProc,
-                             WinObj_Convert, &behind,
-                             &goAwayFlag,
-                             &refCon))
-               return NULL;
-       _rv = NewWindow((void *)0,
-                       &boundsRect,
-                       title,
-                       visible,
-                       theProc,
-                       behind,
-                       goAwayFlag,
-                       refCon);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Win_GetNewWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-       short windowID;
-       WindowPtr behind;
-#ifndef GetNewWindow
-       PyMac_PRECHECK(GetNewWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &windowID,
-                             WinObj_Convert, &behind))
-               return NULL;
-       _rv = GetNewWindow(windowID,
-                          (void *)0,
-                          behind);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Win_NewCWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-       Rect boundsRect;
-       Str255 title;
-       Boolean visible;
-       short procID;
-       WindowPtr behind;
-       Boolean goAwayFlag;
-       long refCon;
-#ifndef NewCWindow
-       PyMac_PRECHECK(NewCWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
-                             PyMac_GetRect, &boundsRect,
-                             PyMac_GetStr255, title,
-                             &visible,
-                             &procID,
-                             WinObj_Convert, &behind,
-                             &goAwayFlag,
-                             &refCon))
-               return NULL;
-       _rv = NewCWindow((void *)0,
-                        &boundsRect,
-                        title,
-                        visible,
-                        procID,
-                        behind,
-                        goAwayFlag,
-                        refCon);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Win_CreateNewWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       WindowClass windowClass;
-       WindowAttributes attributes;
-       Rect contentBounds;
-       WindowPtr outWindow;
-#ifndef CreateNewWindow
-       PyMac_PRECHECK(CreateNewWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "llO&",
-                             &windowClass,
-                             &attributes,
-                             PyMac_GetRect, &contentBounds))
-               return NULL;
-       _err = CreateNewWindow(windowClass,
-                              attributes,
-                              &contentBounds,
-                              &outWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, outWindow);
-       return _res;
-}
-
-static PyObject *Win_CreateWindowFromResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt16 resID;
-       WindowPtr outWindow;
-#ifndef CreateWindowFromResource
-       PyMac_PRECHECK(CreateWindowFromResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &resID))
-               return NULL;
-       _err = CreateWindowFromResource(resID,
-                                       &outWindow);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, outWindow);
-       return _res;
-}
-
-static PyObject *Win_ShowFloatingWindows(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef ShowFloatingWindows
-       PyMac_PRECHECK(ShowFloatingWindows);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = ShowFloatingWindows();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Win_HideFloatingWindows(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef HideFloatingWindows
-       PyMac_PRECHECK(HideFloatingWindows);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = HideFloatingWindows();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Win_AreFloatingWindowsVisible(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef AreFloatingWindowsVisible
-       PyMac_PRECHECK(AreFloatingWindowsVisible);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = AreFloatingWindowsVisible();
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Win_CheckUpdate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord theEvent;
-#ifndef CheckUpdate
-       PyMac_PRECHECK(CheckUpdate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CheckUpdate(&theEvent);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildEventRecord, &theEvent);
-       return _res;
-}
-
-static PyObject *Win_MacFindWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPartCode _rv;
-       Point thePoint;
-       WindowPtr window;
-#ifndef MacFindWindow
-       PyMac_PRECHECK(MacFindWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &thePoint))
-               return NULL;
-       _rv = MacFindWindow(thePoint,
-                           &window);
-       _res = Py_BuildValue("hO&",
-                            _rv,
-                            WinObj_WhichWindow, window);
-       return _res;
-}
-
-static PyObject *Win_FrontWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-#ifndef FrontWindow
-       PyMac_PRECHECK(FrontWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = FrontWindow();
-       _res = Py_BuildValue("O&",
-                            WinObj_WhichWindow, _rv);
-       return _res;
-}
-
-static PyObject *Win_FrontNonFloatingWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-#ifndef FrontNonFloatingWindow
-       PyMac_PRECHECK(FrontNonFloatingWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = FrontNonFloatingWindow();
-       _res = Py_BuildValue("O&",
-                            WinObj_WhichWindow, _rv);
-       return _res;
-}
-
-static PyObject *Win_GetFrontWindowOfClass(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-       WindowClass inWindowClass;
-       Boolean mustBeVisible;
-#ifndef GetFrontWindowOfClass
-       PyMac_PRECHECK(GetFrontWindowOfClass);
-#endif
-       if (!PyArg_ParseTuple(_args, "lb",
-                             &inWindowClass,
-                             &mustBeVisible))
-               return NULL;
-       _rv = GetFrontWindowOfClass(inWindowClass,
-                                   mustBeVisible);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Win_FindWindowOfClass(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Point where;
-       WindowClass inWindowClass;
-       WindowPtr outWindow;
-       WindowPartCode outWindowPart;
-#ifndef FindWindowOfClass
-       PyMac_PRECHECK(FindWindowOfClass);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             PyMac_GetPoint, &where,
-                             &inWindowClass))
-               return NULL;
-       _err = FindWindowOfClass(&where,
-                                inWindowClass,
-                                &outWindow,
-                                &outWindowPart);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&h",
-                            WinObj_WhichWindow, outWindow,
-                            outWindowPart);
-       return _res;
-}
-
-static PyObject *Win_CreateStandardWindowMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       OptionBits inOptions;
-       MenuHandle outMenu;
-#ifndef CreateStandardWindowMenu
-       PyMac_PRECHECK(CreateStandardWindowMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &inOptions))
-               return NULL;
-       _err = CreateStandardWindowMenu(inOptions,
-                                       &outMenu);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            MenuObj_New, outMenu);
-       return _res;
-}
-
-static PyObject *Win_CollapseAllWindows(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       Boolean collapse;
-#ifndef CollapseAllWindows
-       PyMac_PRECHECK(CollapseAllWindows);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &collapse))
-               return NULL;
-       _err = CollapseAllWindows(collapse);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       GDHandle inDevice;
-       Rect outAvailableRect;
-#ifndef GetAvailableWindowPositioningBounds
-       PyMac_PRECHECK(GetAvailableWindowPositioningBounds);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &inDevice))
-               return NULL;
-       _err = GetAvailableWindowPositioningBounds(inDevice,
-                                                  &outAvailableRect);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &outAvailableRect);
-       return _res;
-}
-
-static PyObject *Win_DisableScreenUpdates(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef DisableScreenUpdates
-       PyMac_PRECHECK(DisableScreenUpdates);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = DisableScreenUpdates();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Win_EnableScreenUpdates(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef EnableScreenUpdates
-       PyMac_PRECHECK(EnableScreenUpdates);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = EnableScreenUpdates();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Win_PinRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       Rect theRect;
-       Point thePt;
-#ifndef PinRect
-       PyMac_PRECHECK(PinRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetRect, &theRect,
-                             PyMac_GetPoint, &thePt))
-               return NULL;
-       _rv = PinRect(&theRect,
-                     thePt);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-
-static PyObject *Win_GetGrayRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle _rv;
-#ifndef GetGrayRgn
-       PyMac_PRECHECK(GetGrayRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetGrayRgn();
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Win_GetWindowFromPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WindowPtr _rv;
-       CGrafPtr port;
-#ifndef GetWindowFromPort
-       PyMac_PRECHECK(GetWindowFromPort);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             GrafObj_Convert, &port))
-               return NULL;
-       _rv = GetWindowFromPort(port);
-       _res = Py_BuildValue("O&",
-                            WinObj_New, _rv);
-       return _res;
-}
-
-static PyObject *Win_WhichWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       long ptr;
-
-       if ( !PyArg_ParseTuple(_args, "i", &ptr) )
-               return NULL;
-       _res = WinObj_WhichWindow((WindowPtr)ptr);
-       return _res;
-
-}
-
-static PyObject *Win_FindWindow(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       Point thePoint;
-       WindowPtr theWindow;
-#ifndef FindWindow
-       PyMac_PRECHECK(FindWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &thePoint))
-               return NULL;
-       _rv = FindWindow(thePoint,
-                        &theWindow);
-       _res = Py_BuildValue("hO&",
-                            _rv,
-                            WinObj_WhichWindow, theWindow);
-       return _res;
-}
-
-static PyMethodDef Win_methods[] = {
-       {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1,
-        PyDoc_STR("(short windowID, WindowPtr behind) -> (WindowPtr _rv)")},
-       {"NewWindow", (PyCFunction)Win_NewWindow, 1,
-        PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)")},
-       {"GetNewWindow", (PyCFunction)Win_GetNewWindow, 1,
-        PyDoc_STR("(short windowID, WindowPtr behind) -> (WindowPtr _rv)")},
-       {"NewCWindow", (PyCFunction)Win_NewCWindow, 1,
-        PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)")},
-       {"CreateNewWindow", (PyCFunction)Win_CreateNewWindow, 1,
-        PyDoc_STR("(WindowClass windowClass, WindowAttributes attributes, Rect contentBounds) -> (WindowPtr outWindow)")},
-       {"CreateWindowFromResource", (PyCFunction)Win_CreateWindowFromResource, 1,
-        PyDoc_STR("(SInt16 resID) -> (WindowPtr outWindow)")},
-       {"ShowFloatingWindows", (PyCFunction)Win_ShowFloatingWindows, 1,
-        PyDoc_STR("() -> None")},
-       {"HideFloatingWindows", (PyCFunction)Win_HideFloatingWindows, 1,
-        PyDoc_STR("() -> None")},
-       {"AreFloatingWindowsVisible", (PyCFunction)Win_AreFloatingWindowsVisible, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-       {"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1,
-        PyDoc_STR("() -> (Boolean _rv, EventRecord theEvent)")},
-       {"MacFindWindow", (PyCFunction)Win_MacFindWindow, 1,
-        PyDoc_STR("(Point thePoint) -> (WindowPartCode _rv, WindowPtr window)")},
-       {"FrontWindow", (PyCFunction)Win_FrontWindow, 1,
-        PyDoc_STR("() -> (WindowPtr _rv)")},
-       {"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
-        PyDoc_STR("() -> (WindowPtr _rv)")},
-       {"GetFrontWindowOfClass", (PyCFunction)Win_GetFrontWindowOfClass, 1,
-        PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)")},
-       {"FindWindowOfClass", (PyCFunction)Win_FindWindowOfClass, 1,
-        PyDoc_STR("(Point where, WindowClass inWindowClass) -> (WindowPtr outWindow, WindowPartCode outWindowPart)")},
-       {"CreateStandardWindowMenu", (PyCFunction)Win_CreateStandardWindowMenu, 1,
-        PyDoc_STR("(OptionBits inOptions) -> (MenuHandle outMenu)")},
-       {"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
-        PyDoc_STR("(Boolean collapse) -> None")},
-       {"GetAvailableWindowPositioningBounds", (PyCFunction)Win_GetAvailableWindowPositioningBounds, 1,
-        PyDoc_STR("(GDHandle inDevice) -> (Rect outAvailableRect)")},
-       {"DisableScreenUpdates", (PyCFunction)Win_DisableScreenUpdates, 1,
-        PyDoc_STR("() -> None")},
-       {"EnableScreenUpdates", (PyCFunction)Win_EnableScreenUpdates, 1,
-        PyDoc_STR("() -> None")},
-       {"PinRect", (PyCFunction)Win_PinRect, 1,
-        PyDoc_STR("(Rect theRect, Point thePt) -> (long _rv)")},
-       {"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
-        PyDoc_STR("() -> (RgnHandle _rv)")},
-       {"GetWindowFromPort", (PyCFunction)Win_GetWindowFromPort, 1,
-        PyDoc_STR("(CGrafPtr port) -> (WindowPtr _rv)")},
-       {"WhichWindow", (PyCFunction)Win_WhichWindow, 1,
-        PyDoc_STR("Resolve an integer WindowPtr address to a Window object")},
-       {"FindWindow", (PyCFunction)Win_FindWindow, 1,
-        PyDoc_STR("(Point thePoint) -> (short _rv, WindowPtr theWindow)")},
-       {NULL, NULL, 0}
-};
-
-
-
-/* Return the object corresponding to the window, or NULL */
-
-PyObject *
-WinObj_WhichWindow(WindowPtr w)
-{
-        PyObject *it;
-
-        if (w == NULL) {
-                it = Py_None;
-                Py_INCREF(it);
-        } else {
-                it = (PyObject *) GetWRefCon(w);
-                if (it == NULL || !IsPointerValid((Ptr)it) || ((WindowObject *)it)->ob_itself != w || !WinObj_Check(it)) {
-                        it = WinObj_New(w);
-                        ((WindowObject *)it)->ob_freeit = NULL;
-                } else {
-                        Py_INCREF(it);
-                }
-        }
-        return it;
-}
-
-
-void init_Win(void)
-{
-       PyObject *m;
-       PyObject *d;
-
-
-
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New);
-               PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow);
-               PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert);
-
-
-       m = Py_InitModule("_Win", Win_methods);
-       d = PyModule_GetDict(m);
-       Win_Error = PyMac_GetOSErrException();
-       if (Win_Error == NULL ||
-           PyDict_SetItemString(d, "Error", Win_Error) != 0)
-               return;
-       Py_TYPE(&Window_Type) = &PyType_Type;
-       if (PyType_Ready(&Window_Type) < 0) return;
-       Py_INCREF(&Window_Type);
-       PyModule_AddObject(m, "Window", (PyObject *)&Window_Type);
-       /* Backward-compatible name */
-       Py_INCREF(&Window_Type);
-       PyModule_AddObject(m, "WindowType", (PyObject *)&Window_Type);
-}
-
-/* ======================== End module _Win ========================= */
-
diff --git a/Mac/Modules/win/winedit.py b/Mac/Modules/win/winedit.py
deleted file mode 100644 (file)
index 01cfe86..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-# These are inline-routines/defines, so we do them "by hand"
-#
-
-f = Method(Boolean, 'IsWindowVisible',
-    (WindowRef, 'theWindow', InMode),
-)
-methods.append(f)
-
-f = Method(void, 'GetWindowStructureRgn',
-        (WindowRef, 'theWindow', InMode),
-        (RgnHandle, 'r', InMode),
-)
-methods.append(f)
-
-f = Method(void, 'GetWindowContentRgn',
-        (WindowRef, 'theWindow', InMode),
-        (RgnHandle, 'r', InMode),
-)
-methods.append(f)
-
-f = Method(void, 'GetWindowUpdateRgn',
-        (WindowRef, 'theWindow', InMode),
-        (RgnHandle, 'r', InMode),
-)
-methods.append(f)
-
-f = Method(ExistingWindowPtr, 'GetNextWindow',
-        (WindowRef, 'theWindow', InMode),
-)
-methods.append(f)
-
-f = Function(short, 'FindWindow',
-    (Point, 'thePoint', InMode),
-    (ExistingWindowPtr, 'theWindow', OutMode),
-)
-functions.append(f)
-
-f = Method(void, 'MoveWindow',
-    (WindowPtr, 'theWindow', InMode),
-    (short, 'hGlobal', InMode),
-    (short, 'vGlobal', InMode),
-    (Boolean, 'front', InMode),
-)
-methods.append(f)
-
-f = Method(void, 'ShowWindow',
-    (WindowPtr, 'theWindow', InMode),
-)
-methods.append(f)
-
-#
-# A method to set the auto-dispose flag
-#
-AutoDispose_body = """
-int onoff, old = 0;
-if (!PyArg_ParseTuple(_args, "i", &onoff))
-        return NULL;
-if ( _self->ob_freeit )
-        old = 1;
-if ( onoff )
-        _self->ob_freeit = PyMac_AutoDisposeWindow;
-else
-        _self->ob_freeit = NULL;
-_res = Py_BuildValue("i", old);
-return _res;
-"""
-f = ManualGenerator("AutoDispose", AutoDispose_body)
-f.docstring = lambda: "(int)->int. Automatically DisposeHandle the object on Python object cleanup"
-methods.append(f)
diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py
deleted file mode 100644 (file)
index 3727f2d..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-# Scan an Apple header file, generating a Python file of generator calls.
-import sys
-from bgenlocations import TOOLBOXDIR, BGENDIR
-sys.path.append(BGENDIR)
-
-from scantools import Scanner
-
-def main():
-    input = "MacWindows.h"
-    output = "wingen.py"
-    defsoutput = TOOLBOXDIR + "Windows.py"
-    scanner = MyScanner(input, output, defsoutput)
-    scanner.scan()
-    scanner.close()
-    print("=== Testing definitions output code ===")
-    exec(open(defsoutput).read(), {}, {})
-    print("=== Done scanning and generating, now importing the generated code... ===")
-    import winsupport
-    print("=== Done.  It's up to you to compile it now! ===")
-
-class MyScanner(Scanner):
-
-    def destination(self, type, name, arglist):
-        classname = "Function"
-        listname = "functions"
-        if arglist:
-            t, n, m = arglist[0]
-            if t in ("WindowPtr", "WindowPeek", "WindowRef") and m == "InMode":
-                classname = "Method"
-                listname = "methods"
-        return classname, listname
-
-    def writeinitialdefs(self):
-        self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
-        self.defsfile.write("false = 0\n")
-        self.defsfile.write("true = 1\n")
-        self.defsfile.write("kWindowNoConstrainAttribute = 0x80000000\n")
-
-    def makeblacklistnames(self):
-        return [
-                'DisposeWindow', # Implied when the object is deleted
-                'CloseWindow',
-                'SetWindowProperty',    # For the moment
-                'GetWindowProperty',
-                'GetWindowPropertySize',
-                'RemoveWindowProperty',
-                'MacCloseWindow',
-                'GetWindowList', # Don't know whether this is safe...
-                # Constants with funny definitions
-                'kMouseUpOutOfSlop',
-                'kAllWindowClasses',
-                'kWindowNoConstrainAttribute',
-                # OS8 only:
-                'GetAuxWin',
-                'GetWindowDataHandle',
-                'SaveOld',
-                'DrawNew',
-                'SetWinColor',
-                'SetDeskCPat',
-                'InitWindows',
-                'InitFloatingWindows',
-                'GetWMgrPort',
-                'GetCWMgrPort',
-                'ValidRgn',             # Use versions with Window in their name
-                'ValidRect',
-                'InvalRgn',
-                'InvalRect',
-                'IsValidWindowPtr', # I think this is useless for Python, but not sure...
-                'GetWindowZoomFlag',    # Not available in Carbon
-                'GetWindowTitleWidth',  # Ditto
-                'GetWindowGoAwayFlag',
-                'GetWindowSpareFlag',
-                ]
-
-    def makeblacklisttypes(self):
-        return [
-                'ProcPtr',
-                'DragGrayRgnUPP',
-                'WindowPaintUPP',
-                'Collection',           # For now, to be done later
-                'WindowDefSpec',        # Too difficult for now
-                'WindowDefSpec_ptr',
-                'EventRef', #TBD
-                ]
-
-    def makerepairinstructions(self):
-        return [
-
-                # GetWTitle
-                ([("Str255", "*", "InMode")],
-                 [("*", "*", "OutMode")]),
-
-                ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
-                 [("InBuffer", "*", "*")]),
-
-                ([("void", "*", "OutMode"), ("long", "*", "InMode"),
-                                            ("long", "*", "OutMode")],
-                 [("VarVarOutBuffer", "*", "InOutMode")]),
-
-                ([("void", "wStorage", "OutMode")],
-                 [("NullStorage", "*", "InMode")]),
-
-                # match FindWindowOfClass
-                ([("WindowRef", "outWindow", "OutMode"), ("WindowPartCode", "outWindowPart", "OutMode")],
-                 [("ExistingWindowPtr", "*", "OutMode"), ("WindowPartCode", "outWindowPart", "OutMode")]),
-            # then match CreateNewWindow and CreateWindowFromResource
-                ([("WindowRef", "outWindow", "OutMode")],
-                 [("WindowRef", "*", "*")]),
-
-                ([("WindowPtr", "*", "OutMode")],
-                 [("ExistingWindowPtr", "*", "*")]),
-                ([("WindowRef", "*", "OutMode")],       # Same, but other style headerfiles
-                 [("ExistingWindowPtr", "*", "*")]),
-
-                ([("WindowPtr", "FrontWindow", "ReturnMode")],
-                 [("ExistingWindowPtr", "*", "*")]),
-                ([("WindowRef", "FrontWindow", "ReturnMode")],  # Ditto
-                 [("ExistingWindowPtr", "*", "*")]),
-                ([("WindowPtr", "FrontNonFloatingWindow", "ReturnMode")],
-                 [("ExistingWindowPtr", "*", "*")]),
-                ([("WindowRef", "FrontNonFloatingWindow", "ReturnMode")],       # Ditto
-                 [("ExistingWindowPtr", "*", "*")]),
-
-                ([("Rect_ptr", "*", "ReturnMode")], # GetWindowXXXState accessors
-                 [("void", "*", "ReturnMode")]),
-                ]
-
-if __name__ == "__main__":
-    main()
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
deleted file mode 100644 (file)
index 2cadbdc..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-# This script generates a Python interface for an Apple Macintosh Manager.
-# It uses the "bgen" package to generate C code.
-# The function specifications are generated by scanning the mamager's header file,
-# using the "scantools" package (customized for this particular manager).
-
-import string
-
-# Declarations that change for each manager
-MACHEADERFILE = 'Windows.h'             # The Apple header file
-MODNAME = '_Win'                                # The name of the module
-OBJECTNAME = 'Window'                   # The basic name of the objects used here
-
-# The following is *usually* unchanged but may still require tuning
-MODPREFIX = 'Win'                       # The prefix for module-wide routines
-OBJECTTYPE = OBJECTNAME + 'Ptr'         # The C type used to represent them
-OBJECTPREFIX = MODPREFIX + 'Obj'        # The prefix for object methods
-INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner
-EDITFILE = string.lower(MODPREFIX) + 'edit.py' # The manual definitions
-OUTPUTFILE = MODNAME + "module.c"       # The file generated by this program
-
-from macsupport import *
-
-# Create the type objects
-
-WindowPtr = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
-WindowRef = WindowPtr
-WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
-WindowPeek.passInput = lambda name: "(WindowPeek)(%s)" % name
-CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
-GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
-
-DragReference = OpaqueByValueType("DragReference", "DragObj")
-
-RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
-PicHandle = OpaqueByValueType("PicHandle", "ResObj")
-WCTabHandle = OpaqueByValueType("WCTabHandle", "ResObj")
-AuxWinHandle = OpaqueByValueType("AuxWinHandle", "ResObj")
-PixPatHandle = OpaqueByValueType("PixPatHandle", "ResObj")
-AliasHandle = OpaqueByValueType("AliasHandle", "ResObj")
-IconRef = OpaqueByValueType("IconRef", "ResObj")
-
-WindowRegionCode = Type("WindowRegionCode", "H")
-WindowClass = Type("WindowClass", "l")
-WindowAttributes = Type("WindowAttributes", "l")
-WindowPositionMethod = Type("WindowPositionMethod", "l")
-WindowTransitionEffect = Type("WindowTransitionEffect", "l")
-WindowTransitionAction = Type("WindowTransitionAction", "l")
-RGBColor = OpaqueType("RGBColor", "QdRGB")
-RGBColor_ptr = RGBColor
-ScrollWindowOptions = Type("ScrollWindowOptions", "l")
-WindowPartCode = Type("WindowPartCode", "h")
-WindowDefPartCode = Type("WindowDefPartCode", "h")
-WindowModality = Type("WindowModality", "l")
-GDHandle = OpaqueByValueType("GDHandle", "ResObj")
-WindowConstrainOptions = Type("WindowConstrainOptions", "l")
-
-PropertyCreator = OSTypeType("PropertyCreator")
-PropertyTag = OSTypeType("PropertyTag")
-
-includestuff = includestuff + """
-#include <Carbon/Carbon.h>
-
-#ifdef USE_TOOLBOX_OBJECT_GLUE
-extern PyObject *_WinObj_New(WindowRef);
-extern PyObject *_WinObj_WhichWindow(WindowRef);
-extern int _WinObj_Convert(PyObject *, WindowRef *);
-
-#define WinObj_New _WinObj_New
-#define WinObj_WhichWindow _WinObj_WhichWindow
-#define WinObj_Convert _WinObj_Convert
-#endif
-
-/* Classic calls that we emulate in carbon mode */
-#define GetWindowUpdateRgn(win, rgn) GetWindowRegion((win), kWindowUpdateRgn, (rgn))
-#define GetWindowStructureRgn(win, rgn) GetWindowRegion((win), kWindowStructureRgn, (rgn))
-#define GetWindowContentRgn(win, rgn) GetWindowRegion((win), kWindowContentRgn, (rgn))
-
-/* Function to dispose a window, with a "normal" calling sequence */
-static void
-PyMac_AutoDisposeWindow(WindowPtr w)
-{
-        DisposeWindow(w);
-}
-"""
-
-finalstuff = finalstuff + """
-/* Return the object corresponding to the window, or NULL */
-
-PyObject *
-WinObj_WhichWindow(WindowPtr w)
-{
-        PyObject *it;
-
-        if (w == NULL) {
-                it = Py_None;
-                Py_INCREF(it);
-        } else {
-                it = (PyObject *) GetWRefCon(w);
-                if (it == NULL || !IsPointerValid((Ptr)it) || ((WindowObject *)it)->ob_itself != w || !WinObj_Check(it)) {
-                        it = WinObj_New(w);
-                        ((WindowObject *)it)->ob_freeit = NULL;
-                } else {
-                        Py_INCREF(it);
-                }
-        }
-        return it;
-}
-"""
-
-initstuff = initstuff + """
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New);
-        PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow);
-        PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert);
-"""
-
-class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
-    def outputCheckNewArg(self):
-        Output("if (itself == NULL) return PyMac_Error(resNotFound);")
-        Output("/* XXXX Or should we use WhichWindow code here? */")
-    def outputStructMembers(self):
-        GlobalObjectDefinition.outputStructMembers(self)
-        Output("void (*ob_freeit)(%s ptr);", self.itselftype)
-    def outputInitStructMembers(self):
-        GlobalObjectDefinition.outputInitStructMembers(self)
-        Output("it->ob_freeit = NULL;")
-        Output("if (GetWRefCon(itself) == 0)")
-        OutLbrace()
-        Output("SetWRefCon(itself, (long)it);")
-        Output("it->ob_freeit = PyMac_AutoDisposeWindow;")
-        OutRbrace()
-    def outputCheckConvertArg(self):
-        Out("""
-        if (v == Py_None) { *p_itself = NULL; return 1; }
-        if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }
-        """)
-        OutLbrace()
-        Output("DialogRef dlg;")
-        OutLbrace("if (DlgObj_Convert(v, &dlg) && dlg)")
-        Output("*p_itself = GetDialogWindow(dlg);")
-        Output("return 1;")
-        OutRbrace()
-        Output("PyErr_Clear();")
-        OutRbrace()
-    def outputCleanupStructMembers(self):
-        Output("if (self->ob_freeit && self->ob_itself)")
-        OutLbrace()
-        Output("SetWRefCon(self->ob_itself, 0);")
-        Output("self->ob_freeit(self->ob_itself);")
-        OutRbrace()
-        Output("self->ob_itself = NULL;")
-        Output("self->ob_freeit = NULL;")
-
-    def outputCompare(self):
-        Output()
-        Output("static int %s_compare(%s *self, %s *other)", self.prefix, self.objecttype, self.objecttype)
-        OutLbrace()
-        Output("if ( self->ob_itself > other->ob_itself ) return 1;")
-        Output("if ( self->ob_itself < other->ob_itself ) return -1;")
-        Output("return 0;")
-        OutRbrace()
-
-    def outputHash(self):
-        Output()
-        Output("static int %s_hash(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("return (int)self->ob_itself;")
-        OutRbrace()
-
-    def outputRepr(self):
-        Output()
-        Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
-        OutLbrace()
-        Output("char buf[100];")
-        Output("""sprintf(buf, "<Window object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""")
-        Output("return PyString_FromString(buf);")
-        OutRbrace()
-
-##      def outputFreeIt(self, itselfname):
-##              Output("DisposeWindow(%s);", itselfname)
-# From here on it's basically all boiler plate...
-
-# Create the generator groups and link them
-module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
-object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
-module.addobject(object)
-
-# Create the generator classes used to populate the lists
-Function = OSErrWeakLinkFunctionGenerator
-Method = OSErrWeakLinkMethodGenerator
-
-# Create and populate the lists
-functions = []
-methods = []
-exec(open(INPUTFILE).read())
-
-# Add manual routines for converting integer WindowPtr's (as returned by
-# various event routines)  and Dialog objects to a WindowObject.
-whichwin_body = """
-long ptr;
-
-if ( !PyArg_ParseTuple(_args, "i", &ptr) )
-        return NULL;
-_res = WinObj_WhichWindow((WindowPtr)ptr);
-return _res;
-"""
-
-f = ManualGenerator("WhichWindow", whichwin_body)
-f.docstring = lambda : "Resolve an integer WindowPtr address to a Window object"
-
-functions.append(f)
-
-# And add the routines that access the internal bits of a window struct. They
-# are currently #defined in Windows.h, they will be real routines in Copland
-# (at which time this exec can go)
-exec(open(EDITFILE).read())
-
-# add the populated lists to the generator groups
-# (in a different wordl the scan program would generate this)
-for f in functions: module.add(f)
-for f in methods: object.add(f)
-
-
-
-# generate output (open the output file as late as possible)
-SetOutputFileName(OUTPUTFILE)
-module.generate()
index d2e36b487b15e6290d5342792f39fb846eac8e62..c339ba8fcb9ca1209456a8ffdd08b2ce1f2e2f56 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -132,12 +132,6 @@ class PyBuildExt(build_ext):
 
         # Platform-dependent module source and include directories
         platform = self.get_platform()
-        if platform in ('darwin', 'mac') and ("--disable-toolbox-glue" not in
-            sysconfig.get_config_var("CONFIG_ARGS")):
-            # Mac OS X also includes some mac-specific modules
-            macmoddir = os.path.join(os.getcwd(), srcdir, 'Mac/Modules')
-            moddirlist.append(macmoddir)
-            incdirlist.append('./Mac/Include')
 
         alldirlist = moddirlist + incdirlist
 
@@ -1124,88 +1118,6 @@ class PyBuildExt(build_ext):
         else:
             missing.append('ossaudiodev')
 
-        if platform == 'darwin' and ("--disable-toolbox-glue" not in
-                sysconfig.get_config_var("CONFIG_ARGS")):
-
-            if os.uname()[2] > '8.':
-                # We're on Mac OS X 10.4 or later, the compiler should
-                # support '-Wno-deprecated-declarations'. This will
-                # surpress deprecation warnings for the Carbon extensions,
-                # these extensions wrap the Carbon APIs and even those
-                # parts that are deprecated.
-                carbon_extra_compile_args = ['-Wno-deprecated-declarations']
-            else:
-                carbon_extra_compile_args = []
-
-            # Mac OS X specific modules.
-            def macSrcExists(name1, name2=''):
-                if not name1:
-                    return None
-                names = (name1,)
-                if name2:
-                    names = (name1, name2)
-                path = os.path.join(srcdir, 'Mac', 'Modules', *names)
-                return os.path.exists(path)
-
-            def addMacExtension(name, kwds, extra_srcs=[]):
-                dirname = ''
-                if name[0] == '_':
-                    dirname = name[1:].lower()
-                cname = name + '.c'
-                cmodulename = name + 'module.c'
-                # Check for NNN.c, NNNmodule.c, _nnn/NNN.c, _nnn/NNNmodule.c
-                if macSrcExists(cname):
-                    srcs = [cname]
-                elif macSrcExists(cmodulename):
-                    srcs = [cmodulename]
-                elif macSrcExists(dirname, cname):
-                    # XXX(nnorwitz): If all the names ended with module, we
-                    # wouldn't need this condition.  ibcarbon is the only one.
-                    srcs = [os.path.join(dirname, cname)]
-                elif macSrcExists(dirname, cmodulename):
-                    srcs = [os.path.join(dirname, cmodulename)]
-                else:
-                    raise RuntimeError("%s not found" % name)
-
-                # Here's the whole point:  add the extension with sources
-                exts.append(Extension(name, srcs + extra_srcs, **kwds))
-
-            # Core Foundation
-            core_kwds = {'extra_compile_args': carbon_extra_compile_args,
-                         'extra_link_args': ['-framework', 'CoreFoundation'],
-                        }
-            addMacExtension('_CF', core_kwds, ['cf/pycfbridge.c'])
-            addMacExtension('autoGIL', core_kwds)
-
-            # Carbon
-            carbon_kwds = {'extra_compile_args': carbon_extra_compile_args,
-                           'extra_link_args': ['-framework', 'Carbon'],
-                          }
-            CARBON_EXTS = ['ColorPicker', 'gestalt', 'MacOS', 'Nav',
-                           'OSATerminology', 'icglue',
-                           # All these are in subdirs
-                           '_AE', '_AH', '_App', '_CarbonEvt', '_Cm', '_Ctl',
-                           '_Dlg', '_Drag', '_Evt', '_File', '_Folder', '_Fm',
-                           '_Help', '_Icn', '_IBCarbon', '_List',
-                           '_Menu', '_Mlte', '_OSA', '_Res', '_Qd', '_Qdoffs',
-                           '_Scrap', '_Snd', '_TE', '_Win',
-                          ]
-            for name in CARBON_EXTS:
-                addMacExtension(name, carbon_kwds)
-
-            # Application Services & QuickTime
-            app_kwds = {'extra_compile_args': carbon_extra_compile_args,
-                        'extra_link_args': ['-framework','ApplicationServices'],
-                       }
-            addMacExtension('_Launch', app_kwds)
-            addMacExtension('_CG', app_kwds)
-
-            exts.append( Extension('_Qt', ['qt/_Qtmodule.c'],
-                        extra_compile_args=carbon_extra_compile_args,
-                        extra_link_args=['-framework', 'QuickTime',
-                                     '-framework', 'Carbon']) )
-
-
         self.extensions.extend(exts)
 
         # Call the method for detecting whether _tkinter can be compiled