summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-12-30 22:04:23 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-12-30 22:04:23 (GMT)
commit60087fb45092d9c199cea162e58d9193c7c1558c (patch)
tree05f3343e7707c4a4179e409506b39601279f04c1 /Lib/plat-mac
parentc262a1f51ce89dbea4aeb072cf631686c47ed97f (diff)
downloadcpython-60087fb45092d9c199cea162e58d9193c7c1558c.zip
cpython-60087fb45092d9c199cea162e58d9193c7c1558c.tar.gz
cpython-60087fb45092d9c199cea162e58d9193c7c1558c.tar.bz2
Moved most of Mac/Lib hierarchy to Lib/plat-mac: it can be used both
in MacPython-OS9 and MacPython-OSX (or the equivalent unix Python on Mac OS X). The only items remaining in Mac/Lib are modules that are meaningful only for MacPython-OS9 (CFM stuff, MacPython preferences in resources, etc).
Diffstat (limited to 'Lib/plat-mac')
-rw-r--r--Lib/plat-mac/Audio_mac.py122
-rw-r--r--Lib/plat-mac/Carbon/AE.py1
-rw-r--r--Lib/plat-mac/Carbon/AH.py1
-rw-r--r--Lib/plat-mac/Carbon/Alias.py1
-rw-r--r--Lib/plat-mac/Carbon/Aliases.py18
-rw-r--r--Lib/plat-mac/Carbon/App.py1
-rw-r--r--Lib/plat-mac/Carbon/Appearance.py626
-rw-r--r--Lib/plat-mac/Carbon/AppleEvents.py958
-rw-r--r--Lib/plat-mac/Carbon/AppleHelp.py6
-rw-r--r--Lib/plat-mac/Carbon/CF.py1
-rwxr-xr-xLib/plat-mac/Carbon/CG.py1
-rwxr-xr-xLib/plat-mac/Carbon/CarbonEvents.py352
-rwxr-xr-xLib/plat-mac/Carbon/CarbonEvt.py1
-rw-r--r--Lib/plat-mac/Carbon/Cm.py1
-rw-r--r--Lib/plat-mac/Carbon/Components.py62
-rw-r--r--Lib/plat-mac/Carbon/ControlAccessor.py57
-rw-r--r--Lib/plat-mac/Carbon/Controls.py667
-rw-r--r--Lib/plat-mac/Carbon/CoreFoundation.py28
-rwxr-xr-xLib/plat-mac/Carbon/CoreGraphics.py24
-rw-r--r--Lib/plat-mac/Carbon/Ctl.py1
-rw-r--r--Lib/plat-mac/Carbon/Dialogs.py76
-rw-r--r--Lib/plat-mac/Carbon/Dlg.py1
-rw-r--r--Lib/plat-mac/Carbon/Drag.py1
-rw-r--r--Lib/plat-mac/Carbon/Dragconst.py76
-rw-r--r--Lib/plat-mac/Carbon/Events.py87
-rw-r--r--Lib/plat-mac/Carbon/Evt.py1
-rw-r--r--Lib/plat-mac/Carbon/File.py1
-rw-r--r--Lib/plat-mac/Carbon/Files.py423
-rw-r--r--Lib/plat-mac/Carbon/Fm.py1
-rw-r--r--Lib/plat-mac/Carbon/Folder.py1
-rw-r--r--Lib/plat-mac/Carbon/Folders.py185
-rw-r--r--Lib/plat-mac/Carbon/Fonts.py51
-rw-r--r--Lib/plat-mac/Carbon/Help.py1
-rw-r--r--Lib/plat-mac/Carbon/IBCarbon.py1
-rw-r--r--Lib/plat-mac/Carbon/IBCarbonRuntime.py5
-rw-r--r--Lib/plat-mac/Carbon/Icn.py1
-rw-r--r--Lib/plat-mac/Carbon/Icons.py361
-rw-r--r--Lib/plat-mac/Carbon/List.py1
-rw-r--r--Lib/plat-mac/Carbon/Lists.py35
-rw-r--r--Lib/plat-mac/Carbon/MacHelp.py58
-rw-r--r--Lib/plat-mac/Carbon/MacTextEditor.py213
-rw-r--r--Lib/plat-mac/Carbon/MediaDescr.py97
-rw-r--r--Lib/plat-mac/Carbon/Menu.py1
-rw-r--r--Lib/plat-mac/Carbon/Menus.py156
-rw-r--r--Lib/plat-mac/Carbon/Mlte.py1
-rw-r--r--Lib/plat-mac/Carbon/QDOffscreen.py47
-rw-r--r--Lib/plat-mac/Carbon/Qd.py1
-rw-r--r--Lib/plat-mac/Carbon/Qdoffs.py1
-rw-r--r--Lib/plat-mac/Carbon/Qt.py1
-rw-r--r--Lib/plat-mac/Carbon/QuickDraw.py217
-rw-r--r--Lib/plat-mac/Carbon/QuickTime.py1134
-rw-r--r--Lib/plat-mac/Carbon/Res.py4
-rw-r--r--Lib/plat-mac/Carbon/Resources.py27
-rw-r--r--Lib/plat-mac/Carbon/Scrap.py1
-rw-r--r--Lib/plat-mac/Carbon/Snd.py1
-rw-r--r--Lib/plat-mac/Carbon/Sndihooks.py1
-rw-r--r--Lib/plat-mac/Carbon/Sound.py400
-rw-r--r--Lib/plat-mac/Carbon/TE.py1
-rw-r--r--Lib/plat-mac/Carbon/TextEdit.py57
-rw-r--r--Lib/plat-mac/Carbon/WASTEconst.py207
-rw-r--r--Lib/plat-mac/Carbon/Win.py1
-rw-r--r--Lib/plat-mac/Carbon/Windows.py263
-rw-r--r--Lib/plat-mac/Carbon/__init__.py4
-rw-r--r--Lib/plat-mac/EasyDialogs.py598
-rw-r--r--Lib/plat-mac/FrameWork.py1120
-rw-r--r--Lib/plat-mac/MiniAEFrame.py199
-rw-r--r--Lib/plat-mac/PixMapWrapper.py216
-rw-r--r--Lib/plat-mac/WASTEconst.py207
-rw-r--r--Lib/plat-mac/aepack.py385
-rw-r--r--Lib/plat-mac/aetools.py313
-rw-r--r--Lib/plat-mac/aetypes.py584
-rw-r--r--Lib/plat-mac/applesingle.py100
-rw-r--r--Lib/plat-mac/appletrawmain.py63
-rwxr-xr-xLib/plat-mac/appletrunner.py17
-rw-r--r--Lib/plat-mac/argvemulator.py114
-rw-r--r--Lib/plat-mac/bgenlocations.py61
-rw-r--r--Lib/plat-mac/buildtools.py521
-rwxr-xr-xLib/plat-mac/bundlebuilder.py704
-rw-r--r--Lib/plat-mac/cfmfile.py186
-rw-r--r--Lib/plat-mac/dialogs.rsrcbin0 -> 18045 bytes
-rw-r--r--Lib/plat-mac/errors.rsrcbin0 -> 86868 bytes
-rw-r--r--Lib/plat-mac/findertools.py833
-rw-r--r--Lib/plat-mac/ic.py268
-rw-r--r--Lib/plat-mac/icopen.py66
-rw-r--r--Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py682
-rw-r--r--Lib/plat-mac/lib-scriptpackages/CodeWarrior/Metrowerks_Shell_Suite.py2373
-rw-r--r--Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py62
-rw-r--r--Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py407
-rw-r--r--Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py188
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py96
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Explorer/Netscape_Suite.py49
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Explorer/Required_Suite.py108
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py71
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Explorer/URL_Suite.py54
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py226
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Explorer/__init__.py76
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Containers_and_folders.py497
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Earlier_terms.py746
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Enumerations.py117
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Files_and_suitcases.py296
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py380
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py340
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Obsolete_terms.py220
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Process_classes.py152
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py335
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Type_Definitions.py274
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/Window_classes.py414
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Finder/__init__.py461
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py269
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py86
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Netscape/Required_suite.py108
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py241
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py60
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Netscape/Text.py122
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py426
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py101
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py2182
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/Macintosh_Connectivity_Clas.py373
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suite.py417
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suppleme.py73
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/Required_Suite.py32
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py711
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/Table_Suite.py104
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/Text_Suite.py218
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/Type_Names_Suite.py440
-rw-r--r--Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py469
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py317
-rw-r--r--Lib/plat-mac/lib-scriptpackages/Terminal/__init__.py28
-rw-r--r--Lib/plat-mac/lib-scriptpackages/_builtinSuites/__init__.py28
-rw-r--r--Lib/plat-mac/lib-scriptpackages/_builtinSuites/builtin_Suite.py140
-rw-r--r--Lib/plat-mac/macerrors.py1852
-rw-r--r--Lib/plat-mac/macfs.py231
-rw-r--r--Lib/plat-mac/macostools.py137
-rw-r--r--Lib/plat-mac/macresource.py115
-rw-r--r--Lib/plat-mac/plistlib.py436
-rw-r--r--Lib/plat-mac/videoreader.py276
136 files changed, 32303 insertions, 0 deletions
diff --git a/Lib/plat-mac/Audio_mac.py b/Lib/plat-mac/Audio_mac.py
new file mode 100644
index 0000000..d8b327b
--- /dev/null
+++ b/Lib/plat-mac/Audio_mac.py
@@ -0,0 +1,122 @@
+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 macfs
+ fss, ok = macfs.PromptGetFile("Select an AIFF soundfile", "AIFF")
+ if not ok: return
+ fn = fss.as_pathname()
+ 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
new file mode 100644
index 0000000..0f46017
--- /dev/null
+++ b/Lib/plat-mac/Carbon/AE.py
@@ -0,0 +1 @@
+from _AE import *
diff --git a/Lib/plat-mac/Carbon/AH.py b/Lib/plat-mac/Carbon/AH.py
new file mode 100644
index 0000000..0701e7b
--- /dev/null
+++ b/Lib/plat-mac/Carbon/AH.py
@@ -0,0 +1 @@
+from _AH import *
diff --git a/Lib/plat-mac/Carbon/Alias.py b/Lib/plat-mac/Carbon/Alias.py
new file mode 100644
index 0000000..cb612a6
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Alias.py
@@ -0,0 +1 @@
+from _Alias import *
diff --git a/Lib/plat-mac/Carbon/Aliases.py b/Lib/plat-mac/Carbon/Aliases.py
new file mode 100644
index 0000000..1211e3d
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Aliases.py
@@ -0,0 +1,18 @@
+# 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
new file mode 100644
index 0000000..cc0d46d
--- /dev/null
+++ b/Lib/plat-mac/Carbon/App.py
@@ -0,0 +1 @@
+from _App import *
diff --git a/Lib/plat-mac/Carbon/Appearance.py b/Lib/plat-mac/Carbon/Appearance.py
new file mode 100644
index 0000000..d74c5df
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Appearance.py
@@ -0,0 +1,626 @@
+# 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
+kThemeBrushSheetBackground = 50
+kThemeBrushDrawerBackground = 51
+kThemeBrushBlack = -1
+kThemeBrushWhite = -2
+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
+kThemeBackgroundTabPane = 1
+kThemeBackgroundPlacard = 2
+kThemeBackgroundWindowHeader = 3
+kThemeBackgroundListViewWindowHeader = 4
+kThemeBackgroundSecondaryGroupBox = 5
+kThemeNameTag = FOUR_CHAR_CODE('name')
+kThemeVariantNameTag = FOUR_CHAR_CODE('varn')
+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')
+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
+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
+# 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
new file mode 100644
index 0000000..68dfc79
--- /dev/null
+++ b/Lib/plat-mac/Carbon/AppleEvents.py
@@ -0,0 +1,958 @@
+# Generated from 'AEDataModel.h'
+
+def FOUR_CHAR_CODE(x): return x
+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')
+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')
+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
new file mode 100644
index 0000000..3496d59
--- /dev/null
+++ b/Lib/plat-mac/Carbon/AppleHelp.py
@@ -0,0 +1,6 @@
+# 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
new file mode 100644
index 0000000..4a784c0
--- /dev/null
+++ b/Lib/plat-mac/Carbon/CF.py
@@ -0,0 +1 @@
+from _CF import *
diff --git a/Lib/plat-mac/Carbon/CG.py b/Lib/plat-mac/Carbon/CG.py
new file mode 100755
index 0000000..96f5772
--- /dev/null
+++ b/Lib/plat-mac/Carbon/CG.py
@@ -0,0 +1 @@
+from _CG import *
diff --git a/Lib/plat-mac/Carbon/CarbonEvents.py b/Lib/plat-mac/Carbon/CarbonEvents.py
new file mode 100755
index 0000000..8dde8de
--- /dev/null
+++ b/Lib/plat-mac/Carbon/CarbonEvents.py
@@ -0,0 +1,352 @@
+# 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
+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)
+kMouseTrackingMousePressed = 1
+kMouseTrackingMouseReleased = 2
+kMouseTrackingMouseExited = 3
+kMouseTrackingMouseEntered = 4
+kMouseTrackingMouseMoved = 5
+kMouseTrackingKeyModifiersChanged = 6
+kMouseTrackingUserCancelled = 7
+kMouseTrackingTimedOut = 8
+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 ')
+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 = 1L << kEventKeyModifierNumLockBit
+kEventKeyModifierFnMask = 1L << kEventKeyModifierFnBit
+kEventAppActivated = 1
+kEventAppDeactivated = 2
+kEventAppQuit = 3
+kEventAppLaunchNotification = 4
+kEventAppLaunched = 5
+kEventAppTerminated = 6
+kEventAppFrontSwitched = 7
+kEventAppleEvent = 1
+kEventWindowUpdate = 1
+kEventWindowDrawContent = 2
+kEventWindowActivated = 5
+kEventWindowDeactivated = 6
+kEventWindowGetClickActivation = 7
+kEventWindowShowing = 22
+kEventWindowHiding = 23
+kEventWindowShown = 24
+kEventWindowHidden = 25
+kEventWindowBoundsChanging = 26
+kEventWindowBoundsChanged = 27
+kEventWindowResizeStarted = 28
+kEventWindowResizeCompleted = 29
+kEventWindowDragStarted = 30
+kEventWindowDragCompleted = 31
+kWindowBoundsChangeUserDrag = (1 << 0)
+kWindowBoundsChangeUserResize = (1 << 1)
+kWindowBoundsChangeSizeChanged = (1 << 2)
+kWindowBoundsChangeOriginChanged = (1 << 3)
+kEventWindowClickDragRgn = 32
+kEventWindowClickResizeRgn = 33
+kEventWindowClickCollapseRgn = 34
+kEventWindowClickCloseRgn = 35
+kEventWindowClickZoomRgn = 36
+kEventWindowClickContentRgn = 37
+kEventWindowClickProxyIconRgn = 38
+kEventWindowCursorChange = 40
+kEventWindowCollapse = 66
+kEventWindowCollapsed = 67
+kEventWindowCollapseAll = 68
+kEventWindowExpand = 69
+kEventWindowExpanded = 70
+kEventWindowExpandAll = 71
+kEventWindowClose = 72
+kEventWindowClosed = 73
+kEventWindowCloseAll = 74
+kEventWindowZoom = 75
+kEventWindowZoomed = 76
+kEventWindowZoomAll = 77
+kEventWindowContextualMenuSelect = 78
+kEventWindowPathSelect = 79
+kEventWindowGetIdealSize = 80
+kEventWindowGetMinimumSize = 81
+kEventWindowGetMaximumSize = 82
+kEventWindowConstrain = 83
+kEventWindowHandleContentClick = 85
+kEventWindowProxyBeginDrag = 128
+kEventWindowProxyEndDrag = 129
+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
+kEventMenuDispose = 1001
+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')
+kHICommandPreferences = FOUR_CHAR_CODE('pref')
+kHICommandZoomWindow = FOUR_CHAR_CODE('zoom')
+kHICommandMinimizeWindow = FOUR_CHAR_CODE('mini')
+kHICommandArrangeInFront = FOUR_CHAR_CODE('frnt')
+kHICommandAbout = FOUR_CHAR_CODE('abou')
+kHICommandFromMenu = (1L << 0)
+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)
+kEventTabletPointer = 1
+kEventTabletProximity = 2
+kEventVolumeMounted = 1
+kEventVolumeUnmounted = 2
+typeFSVolumeRefNum = FOUR_CHAR_CODE('voln')
+kEventParamDirectObject = FOUR_CHAR_CODE('----')
+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')
+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')
+typeCGContextRef = FOUR_CHAR_CODE('cntx')
+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')
+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')
+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')
+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')
+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')
+typeMenuItemIndex = FOUR_CHAR_CODE('midx')
+typeMenuCommand = FOUR_CHAR_CODE('mcmd')
+typeMenuTrackingMode = FOUR_CHAR_CODE('mtmd')
+typeMenuEventOptions = FOUR_CHAR_CODE('meop')
+kEventParamProcessID = FOUR_CHAR_CODE('psn ')
+kEventParamLaunchRefCon = FOUR_CHAR_CODE('lref')
+kEventParamLaunchErr = FOUR_CHAR_CODE('err ')
+kEventParamTabletPointerRec = FOUR_CHAR_CODE('tbrc')
+kEventParamTabletProximityRec = FOUR_CHAR_CODE('tbpx')
+typeTabletPointerRec = FOUR_CHAR_CODE('tbrc')
+typeTabletProximityRec = FOUR_CHAR_CODE('tbpx')
+# sHandler = NewEventHandlerUPP( x )
+kUserFocusAuto = -1
diff --git a/Lib/plat-mac/Carbon/CarbonEvt.py b/Lib/plat-mac/Carbon/CarbonEvt.py
new file mode 100755
index 0000000..63a7792
--- /dev/null
+++ b/Lib/plat-mac/Carbon/CarbonEvt.py
@@ -0,0 +1 @@
+from _CarbonEvt import *
diff --git a/Lib/plat-mac/Carbon/Cm.py b/Lib/plat-mac/Carbon/Cm.py
new file mode 100644
index 0000000..3c8bc33
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Cm.py
@@ -0,0 +1 @@
+from _Cm import *
diff --git a/Lib/plat-mac/Carbon/Components.py b/Lib/plat-mac/Carbon/Components.py
new file mode 100644
index 0000000..3fbca02
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Components.py
@@ -0,0 +1,62 @@
+# 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 = 1L << 29
+cmpWantsRegisterMessage = 1L << 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
new file mode 100644
index 0000000..20cf414
--- /dev/null
+++ b/Lib/plat-mac/Carbon/ControlAccessor.py
@@ -0,0 +1,57 @@
+# Accessor functions for control properties
+
+from 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
new file mode 100644
index 0000000..23a2b9e
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Controls.py
@@ -0,0 +1,667 @@
+# 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 = 1L << 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')
+kControlCollectionTagSubControls = FOUR_CHAR_CODE('subc')
+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')
+kControlBevelButtonOwnedMenuRefTag = FOUR_CHAR_CODE('omrf')
+# kControlBevelButtonCenterPopupGlyphTag = FOUR_CHAR_CODE('pglc')
+kControlBevelButtonKindTag = FOUR_CHAR_CODE('bebk')
+kControlBevelButtonLastMenuTag = FOUR_CHAR_CODE('lmnu')
+kControlBevelButtonMenuDelayTag = FOUR_CHAR_CODE('mdly')
+kControlBevelButtonScaleIconTag = FOUR_CHAR_CODE('scal')
+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')
+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 = FOUR_CHAR_CODE('size')
+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 = 0L
+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 = 0L
+kDataBrowserItemIsActiveProperty = 1L
+kDataBrowserItemIsSelectableProperty = 2L
+kDataBrowserItemIsEditableProperty = 3L
+kDataBrowserItemIsContainerProperty = 4L
+kDataBrowserContainerIsOpenableProperty = 5L
+kDataBrowserContainerIsClosableProperty = 6L
+kDataBrowserContainerIsSortableProperty = 7L
+kDataBrowserItemSelfIdentityProperty = 8L
+kDataBrowserContainerAliasIDProperty = 9L
+kDataBrowserColumnViewPreviewProperty = 10L
+kDataBrowserItemParentContainerProperty = 11L
+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 = 0L
+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
+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
new file mode 100644
index 0000000..2907c1d
--- /dev/null
+++ b/Lib/plat-mac/Carbon/CoreFoundation.py
@@ -0,0 +1,28 @@
+# 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
new file mode 100755
index 0000000..bd90980
--- /dev/null
+++ b/Lib/plat-mac/Carbon/CoreGraphics.py
@@ -0,0 +1,24 @@
+# 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
diff --git a/Lib/plat-mac/Carbon/Ctl.py b/Lib/plat-mac/Carbon/Ctl.py
new file mode 100644
index 0000000..b9dc3ef
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Ctl.py
@@ -0,0 +1 @@
+from _Ctl import *
diff --git a/Lib/plat-mac/Carbon/Dialogs.py b/Lib/plat-mac/Carbon/Dialogs.py
new file mode 100644
index 0000000..dbb69dc
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Dialogs.py
@@ -0,0 +1,76 @@
+# 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
diff --git a/Lib/plat-mac/Carbon/Dlg.py b/Lib/plat-mac/Carbon/Dlg.py
new file mode 100644
index 0000000..7b22d84
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Dlg.py
@@ -0,0 +1 @@
+from _Dlg import *
diff --git a/Lib/plat-mac/Carbon/Drag.py b/Lib/plat-mac/Carbon/Drag.py
new file mode 100644
index 0000000..a2349d7
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Drag.py
@@ -0,0 +1 @@
+from _Drag import *
diff --git a/Lib/plat-mac/Carbon/Dragconst.py b/Lib/plat-mac/Carbon/Dragconst.py
new file mode 100644
index 0000000..f08f478
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Dragconst.py
@@ -0,0 +1,76 @@
+# Generated from 'Drag.h'
+
+def FOUR_CHAR_CODE(x): return x
+from Carbon.TextEdit import *
+from Carbon.QuickDraw import *
+
+
+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 = (1L << 0)
+kDragInsideSenderApplication = (1L << 1)
+kDragInsideSenderWindow = (1L << 2)
+kDragBehaviorNone = 0
+kDragBehaviorZoomBackAnimation = (1L << 0)
+kDragRegionAndImage = (1L << 4)
+kDragStandardTranslucency = 0L
+kDragDarkTranslucency = 1L
+kDragDarkerTranslucency = 2L
+kDragOpaqueTranslucency = 3L
+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)
+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
+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
new file mode 100644
index 0000000..c8c920a
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Events.py
@@ -0,0 +1,87 @@
+# 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
+kEscapeCharCode = 27
+kClearCharCode = 27
+kLeftArrowCharCode = 28
+kRightArrowCharCode = 29
+kUpArrowCharCode = 30
+kDownArrowCharCode = 31
+kDeleteCharCode = 127
+kNonBreakingSpaceCharCode = 202
+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
new file mode 100644
index 0000000..7a5ffa6
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Evt.py
@@ -0,0 +1 @@
+from _Evt import *
diff --git a/Lib/plat-mac/Carbon/File.py b/Lib/plat-mac/Carbon/File.py
new file mode 100644
index 0000000..58c2857
--- /dev/null
+++ b/Lib/plat-mac/Carbon/File.py
@@ -0,0 +1 @@
+from _File import *
diff --git a/Lib/plat-mac/Carbon/Files.py b/Lib/plat-mac/Carbon/Files.py
new file mode 100644
index 0000000..f36689d
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Files.py
@@ -0,0 +1,423 @@
+# 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
+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
+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
+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
new file mode 100644
index 0000000..0f42fdc
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Fm.py
@@ -0,0 +1 @@
+from _Fm import *
diff --git a/Lib/plat-mac/Carbon/Folder.py b/Lib/plat-mac/Carbon/Folder.py
new file mode 100644
index 0000000..a4e4902
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Folder.py
@@ -0,0 +1 @@
+from _Folder import *
diff --git a/Lib/plat-mac/Carbon/Folders.py b/Lib/plat-mac/Carbon/Folders.py
new file mode 100644
index 0000000..7a69ca4
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Folders.py
@@ -0,0 +1,185 @@
+# Generated from 'Folders.h'
+
+def FOUR_CHAR_CODE(x): return x
+true = True
+false = False
+kOnSystemDisk = -32768L
+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')
+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
new file mode 100644
index 0000000..0b54249
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Fonts.py
@@ -0,0 +1,51 @@
+# Generated from 'Fonts.h'
+
+def FOUR_CHAR_CODE(x): return x
+kNilOptions = 0
+systemFont = 0
+applFont = 1
+kPlatformDefaultGuiFontID = applFont
+kPlatformDefaultGuiFontID = -1
+commandMark = 17
+checkMark = 18
+diamondMark = 19
+appleMark = 20
+propFont = 36864L
+prpFntH = 36865L
+prpFntW = 36866L
+prpFntHW = 36867L
+fixedFont = 45056L
+fxdFntH = 45057L
+fxdFntW = 45058L
+fxdFntHW = 45059L
+fontWid = 44208L
+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
new file mode 100644
index 0000000..5fca0d7
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Help.py
@@ -0,0 +1 @@
+from _Help import *
diff --git a/Lib/plat-mac/Carbon/IBCarbon.py b/Lib/plat-mac/Carbon/IBCarbon.py
new file mode 100644
index 0000000..60f0e74
--- /dev/null
+++ b/Lib/plat-mac/Carbon/IBCarbon.py
@@ -0,0 +1 @@
+from _IBCarbon import *
diff --git a/Lib/plat-mac/Carbon/IBCarbonRuntime.py b/Lib/plat-mac/Carbon/IBCarbonRuntime.py
new file mode 100644
index 0000000..4678018
--- /dev/null
+++ b/Lib/plat-mac/Carbon/IBCarbonRuntime.py
@@ -0,0 +1,5 @@
+# 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
new file mode 100644
index 0000000..b04134c
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Icn.py
@@ -0,0 +1 @@
+from _Icn import *
diff --git a/Lib/plat-mac/Carbon/Icons.py b/Lib/plat-mac/Carbon/Icons.py
new file mode 100644
index 0000000..5a03dac
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Icons.py
@@ -0,0 +1,361 @@
+# Generated from 'Icons.h'
+
+def FOUR_CHAR_CODE(x): return x
+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')
+kGenericWORMIcon = FOUR_CHAR_CODE('worm')
+kInternationResourcesIcon = 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')
+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')
+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')
+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')
+kLocalesFolderIcon = FOUR_CHAR_CODE('\xc4loc')
+kMacOSReadMeFolderIcon = FOUR_CHAR_CODE('mor\xc4')
+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')
+kAppearanceFolderIcon = FOUR_CHAR_CODE('appr')
+kUtilitiesFolderIcon = FOUR_CHAR_CODE('uti\xc4')
+kVoicesFolderIcon = FOUR_CHAR_CODE('fvoc')
+kColorSyncFolderIcon = FOUR_CHAR_CODE('prof')
+kInternetSearchSitesFolderIcon = FOUR_CHAR_CODE('issf')
+kUsersFolderIcon = FOUR_CHAR_CODE('usr\xc4')
+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')
+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')
+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')
+kIconServicesNormalUsageFlag = 0
+kIconFamilyType = FOUR_CHAR_CODE('icns')
diff --git a/Lib/plat-mac/Carbon/List.py b/Lib/plat-mac/Carbon/List.py
new file mode 100644
index 0000000..b0d6e22
--- /dev/null
+++ b/Lib/plat-mac/Carbon/List.py
@@ -0,0 +1 @@
+from _List import *
diff --git a/Lib/plat-mac/Carbon/Lists.py b/Lib/plat-mac/Carbon/Lists.py
new file mode 100644
index 0000000..76518ba
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Lists.py
@@ -0,0 +1,35 @@
+# 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
new file mode 100644
index 0000000..a231a8d
--- /dev/null
+++ b/Lib/plat-mac/Carbon/MacHelp.py
@@ -0,0 +1,58 @@
+# 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
new file mode 100644
index 0000000..bf3ebe5
--- /dev/null
+++ b/Lib/plat-mac/Carbon/MacTextEditor.py
@@ -0,0 +1,213 @@
+# 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
+kTXNWillDefaultToATSUIBit = 0
+kTXNWillDefaultToATSUIMask = 1L << kTXNWillDefaultToATSUIBit
+kTXNWantMoviesBit = 0
+kTXNWantSoundBit = 1
+kTXNWantGraphicsBit = 2
+kTXNAlwaysUseQuickDrawTextBit = 3
+kTXNUseTemporaryMemoryBit = 4
+kTXNWantMoviesMask = 1L << kTXNWantMoviesBit
+kTXNWantSoundMask = 1L << kTXNWantSoundBit
+kTXNWantGraphicsMask = 1L << kTXNWantGraphicsBit
+kTXNAlwaysUseQuickDrawTextMask = 1L << kTXNAlwaysUseQuickDrawTextBit
+kTXNUseTemporaryMemoryMask = 1L << 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
+kTXNDrawGrowIconMask = 1L << kTXNDrawGrowIconBit
+kTXNShowWindowMask = 1L << kTXNShowWindowBit
+kTXNWantHScrollBarMask = 1L << kTXNWantHScrollBarBit
+kTXNWantVScrollBarMask = 1L << kTXNWantVScrollBarBit
+kTXNNoTSMEverMask = 1L << kTXNNoTSMEverBit
+kTXNReadOnlyMask = 1L << kTXNReadOnlyBit
+kTXNNoKeyboardSyncMask = 1L << kTXNNoKeyboardSyncBit
+kTXNNoSelectionMask = 1L << kTXNNoSelectionBit
+kTXNSaveStylesAsSTYLResourceMask = 1L << kTXNSaveStylesAsSTYLResourceBit
+kOutputTextInUnicodeEncodingMask = 1L << kOutputTextInUnicodeEncodingBit
+kTXNDoNotInstallDragProcsMask = 1L << kTXNDoNotInstallDragProcsBit
+kTXNAlwaysWrapAtViewEdgeMask = 1L << kTXNAlwaysWrapAtViewEdgeBit
+kTXNDontDrawCaretWhenInactiveMask = 1L << kTXNDontDrawCaretWhenInactiveBit
+kTXNDontDrawSelectionWhenInactiveMask = 1L << kTXNDontDrawSelectionWhenInactiveBit
+kTXNSingleLineOnlyMask = 1L << kTXNSingleLineOnlyBit
+kTXNDisableDragAndDropMask = 1L << kTXNDisableDragAndDropBit
+kTXNSetFlushnessBit = 0
+kTXNSetJustificationBit = 1
+kTXNUseFontFallBackBit = 2
+kTXNRotateTextBit = 3
+kTXNUseVerticalTextBit = 4
+kTXNDontUpdateBoxRectBit = 5
+kTXNDontDrawTextBit = 6
+kTXNSetFlushnessMask = 1L << kTXNSetFlushnessBit
+kTXNSetJustificationMask = 1L << kTXNSetJustificationBit
+kTXNUseFontFallBackMask = 1L << kTXNUseFontFallBackBit
+kTXNRotateTextMask = 1L << kTXNRotateTextBit
+kTXNUseVerticalTextMask = 1L << kTXNUseVerticalTextBit
+kTXNDontUpdateBoxRectMask = 1L << kTXNDontUpdateBoxRectBit
+kTXNDontDrawTextMask = 1L << kTXNDontDrawTextBit
+kTXNFontContinuousBit = 0
+kTXNSizeContinuousBit = 1
+kTXNStyleContinuousBit = 2
+kTXNColorContinuousBit = 3
+kTXNFontContinuousMask = 1L << kTXNFontContinuousBit
+kTXNSizeContinuousMask = 1L << kTXNSizeContinuousBit
+kTXNStyleContinuousMask = 1L << kTXNStyleContinuousBit
+kTXNColorContinuousMask = 1L << kTXNColorContinuousBit
+kTXNIgnoreCaseBit = 0
+kTXNEntireWordBit = 1
+kTXNUseEncodingWordRulesBit = 31
+kTXNIgnoreCaseMask = 1L << kTXNIgnoreCaseBit
+kTXNEntireWordMask = 1L << 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 = 0xFFFFFFFFUL
+# kTXNStartOffset = 0UL
+# kTXNEndOffset = 0x7FFFFFFFUL
+kTXNSingleStylePerTextDocumentResType = FOUR_CHAR_CODE('MPSR')
+kTXNMultipleStylesPerTextDocumentResType = FOUR_CHAR_CODE('styl')
+kTXNShowStart = false
+kTXNShowEnd = true
+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 = 1L << kTXNTextInputCountBit
+kTXNRunCountMask = 1L << kTXNRunCountBit
+kTXNAllCountMask = kTXNTextInputCountMask | kTXNRunCountMask
+kTXNNoAppleEventHandlersBit = 0
+kTXNRestartAppleEventHandlersBit = 1
+kTXNNoAppleEventHandlersMask = 1 << kTXNNoAppleEventHandlersBit
+kTXNRestartAppleEventHandlersMask = 1 << kTXNRestartAppleEventHandlersBit
+# status = TXNInitTextension( &defaults
+# justification = LMTESysJust
diff --git a/Lib/plat-mac/Carbon/MediaDescr.py b/Lib/plat-mac/Carbon/MediaDescr.py
new file mode 100644
index 0000000..3c73820
--- /dev/null
+++ b/Lib/plat-mac/Carbon/MediaDescr.py
@@ -0,0 +1,97 @@
+# 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 = apply(struct.pack, tuple(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
new file mode 100644
index 0000000..075cb9d
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Menu.py
@@ -0,0 +1 @@
+from _Menu import *
diff --git a/Lib/plat-mac/Carbon/Menus.py b/Lib/plat-mac/Carbon/Menus.py
new file mode 100644
index 0000000..a0e3432
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Menus.py
@@ -0,0 +1,156 @@
+# 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
+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)
+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)
+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
+kCMHelpItemNoHelp = 0
+kCMHelpItemAppleGuide = 1
+kCMHelpItemOtherHelp = 2
+kCMNothingSelected = 0
+kCMMenuItemSelected = 1
+kCMShowHelpSelected = 3
diff --git a/Lib/plat-mac/Carbon/Mlte.py b/Lib/plat-mac/Carbon/Mlte.py
new file mode 100644
index 0000000..b81fbc5
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Mlte.py
@@ -0,0 +1 @@
+from _Mlte import *
diff --git a/Lib/plat-mac/Carbon/QDOffscreen.py b/Lib/plat-mac/Carbon/QDOffscreen.py
new file mode 100644
index 0000000..b3f557e
--- /dev/null
+++ b/Lib/plat-mac/Carbon/QDOffscreen.py
@@ -0,0 +1,47 @@
+# 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 = 1L << pixPurgeBit
+noNewDevice = 1L << noNewDeviceBit
+useTempMem = 1L << useTempMemBit
+keepLocal = 1L << keepLocalBit
+useDistantHdwrMem = 1L << useDistantHdwrMemBit
+useLocalHdwrMem = 1L << useLocalHdwrMemBit
+pixelsPurgeable = 1L << pixelsPurgeableBit
+pixelsLocked = 1L << pixelsLockedBit
+kAllocDirectDrawSurface = 1L << 14
+mapPix = 1L << mapPixBit
+newDepth = 1L << newDepthBit
+alignPix = 1L << alignPixBit
+newRowBytes = 1L << newRowBytesBit
+reallocPix = 1L << reallocPixBit
+clipPix = 1L << clipPixBit
+stretchPix = 1L << stretchPixBit
+ditherPix = 1L << ditherPixBit
+gwFlagErr = 1L << gwFlagErrBit
+deviceIsIndirect = (1L << 0)
+deviceNeedsLock = (1L << 1)
+deviceIsStatic = (1L << 2)
+deviceIsExternalBuffer = (1L << 3)
+deviceIsDDSurface = (1L << 4)
+deviceIsDCISurface = (1L << 5)
+deviceIsGDISurface = (1L << 6)
+deviceIsAScreen = (1L << 7)
+deviceIsOverlaySurface = (1L << 8)
diff --git a/Lib/plat-mac/Carbon/Qd.py b/Lib/plat-mac/Carbon/Qd.py
new file mode 100644
index 0000000..227fe98
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Qd.py
@@ -0,0 +1 @@
+from _Qd import *
diff --git a/Lib/plat-mac/Carbon/Qdoffs.py b/Lib/plat-mac/Carbon/Qdoffs.py
new file mode 100644
index 0000000..90a3d2c
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Qdoffs.py
@@ -0,0 +1 @@
+from _Qdoffs import *
diff --git a/Lib/plat-mac/Carbon/Qt.py b/Lib/plat-mac/Carbon/Qt.py
new file mode 100644
index 0000000..8a1585a
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Qt.py
@@ -0,0 +1 @@
+from _Qt import *
diff --git a/Lib/plat-mac/Carbon/QuickDraw.py b/Lib/plat-mac/Carbon/QuickDraw.py
new file mode 100644
index 0000000..38d8451
--- /dev/null
+++ b/Lib/plat-mac/Carbon/QuickDraw.py
@@ -0,0 +1,217 @@
+# 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
+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 = 1L << 0
+cursorDoesHardware = 1L << 1
+cursorDoesUnreadableScreenBits = 1L << 2
+kRenderCursorInHardware = 1L << 0
+kRenderCursorInSoftware = 1L << 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
new file mode 100644
index 0000000..a6284ec
--- /dev/null
+++ b/Lib/plat-mac/Carbon/QuickTime.py
@@ -0,0 +1,1134 @@
+# Generated from 'Movies.h'
+
+def FOUR_CHAR_CODE(x): return x
+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')
+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')
+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 = 1L << 7
+DoTheRightThing = 0
+kQTNetworkStatusNoNetwork = -2
+kQTNetworkStatusUncertain = -1
+kQTNetworkStatusNotConnected = 0
+kQTNetworkStatusConnected = 1
+kMusicFlagDontPlay2Soft = 1L << 0
+kMusicFlagDontSlaveToMovie = 1L << 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 = 1L << 16
+searchTextDontHiliteFoundText = 1L << 17
+searchTextOneTrackOnly = 1L << 18
+searchTextEnabledTracksOnly = 1L << 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 = 1L << 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
+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
+kActionQTVRSetPanAngle = 4096
+kActionQTVRSetTiltAngle = 4097
+kActionQTVRSetFieldOfView = 4098
+kActionQTVRShowDefaultView = 4099
+kActionQTVRGoToNodeID = 4100
+kActionQTVREnableHotSpot = 4101
+kActionQTVRShowHotSpots = 4102
+kActionQTVRTranslateObject = 4103
+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
+kActionSpriteTrackSetVariable = 7168
+kActionSpriteTrackNewSprite = 7169
+kActionSpriteTrackDisposeSprite = 7170
+kActionSpriteTrackSetVariableToString = 7171
+kActionSpriteTrackConcatVariables = 7172
+kActionSpriteTrackSetVariableToMovieURL = 7173
+kActionSpriteTrackSetVariableToMovieBaseURL = 7174
+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
+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
+kOperandQTVRPanAngle = 4096
+kOperandQTVRTiltAngle = 4097
+kOperandQTVRFieldOfView = 4098
+kOperandQTVRNodeID = 4099
+kOperandQTVRHotSpotsVisible = 4100
+kOperandQTVRViewCenterH = 4101
+kOperandQTVRViewCenterV = 4102
+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 = kActionMovieRestartAtTime
+kFirstTrackAction = kActionTrackSetVolume
+kLastTrackAction = kActionTrackSetBassTreble
+kFirstSpriteAction = kActionSpriteSetMatrix
+kLastSpriteAction = kActionSpriteStretch
+kFirstQTVRAction = kActionQTVRSetPanAngle
+kLastQTVRAction = kActionQTVRTranslateObject
+kFirstMusicAction = kActionMusicPlayNote
+kLastMusicAction = kActionMusicSetController
+kFirstSystemAction = kActionCase
+kLastSystemAction = kActionDontPassKeyEvent
+kFirstSpriteTrackAction = kActionSpriteTrackSetVariable
+kLastSpriteTrackAction = kActionSpriteTrackSetVariableToMovieBaseURL
+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')
+kActionFlagActionIsDelta = 1L << 1
+kActionFlagParameterWrapsAround = 1L << 2
+kActionFlagActionIsToggle = 1L << 3
+kStatusStringIsURLLink = 1L << 1
+kStatusStringIsStreamingStatus = 1L << 2
+kStatusHasCodeNumber = 1L << 3
+kStatusIsError = 1L << 4
+kScriptIsUnknownType = 1L << 0
+kScriptIsJavaScript = 1L << 1
+kScriptIsLingoEvent = 1L << 2
+kScriptIsVBEvent = 1L << 3
+kScriptIsProjectorCommand = 1L << 4
+kScriptIsAppleScript = 1L << 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
+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 = 1L << 31
+createMovieFileDontCreateMovie = 1L << 30
+createMovieFileDontOpenFile = 1L << 29
+createMovieFileDontCreateResFile = 1L << 28
+flattenAddMovieToDataFork = 1L << 0
+flattenActiveTracksOnly = 1L << 2
+flattenDontInterleaveFlatten = 1L << 3
+flattenFSSpecPtrIsDataRefRecordPtr = 1L << 4
+flattenCompressMovieResource = 1L << 5
+flattenForceMovieResourceBeforeMovieData = 1L << 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
+mediaHandlerFlagBaseClient = 1
+movieTrackMediaType = 1 << 0
+movieTrackCharacteristic = 1 << 1
+movieTrackEnabledOnly = 1 << 2
+movieDrawingCallWhenChanged = 0
+movieDrawingCallAlways = 1
+kQTCloneShareSamples = 1 << 0
+kQTCloneDontCopyEdits = 1 << 1
+kGetMovieImporterValidateToFind = 1L << 0
+kGetMovieImporterAllowNewFile = 1L << 1
+kGetMovieImporterDontConsiderGraphicsImporters = 1L << 2
+kGetMovieImporterDontConsiderFileOnlyImporters = 1L << 6
+kGetMovieImporterAutoImportOnly = 1L << 10
+kQTGetMIMETypeInfoIsQuickTimeMovieType = FOUR_CHAR_CODE('moov')
+kQTGetMIMETypeInfoIsUnhelpfulType = FOUR_CHAR_CODE('dumb')
+kMovieLoadStateError = -1L
+kMovieLoadStateLoading = 1000
+kMovieLoadStateLoaded = 2000
+kMovieLoadStatePlayable = 10000
+kMovieLoadStatePlaythroughOK = 20000
+kMovieLoadStateComplete = 100000L
+kQTDontUseDataToFindImporter = 1L << 0
+kQTDontLookForMovieImporterIfGraphicsImporterFound = 1L << 1
+kQTAllowOpeningStillImagesAsMovies = 1L << 2
+kQTAllowImportersThatWouldCreateNewFile = 1L << 3
+kQTAllowAggressiveImporters = 1L << 4
+preloadAlways = 1L << 0
+preloadOnlyIfEnabled = 1L << 1
+fullScreenHideCursor = 1L << 0
+fullScreenAllowEvents = 1L << 1
+fullScreenDontChangeMenuBar = 1L << 2
+fullScreenPreflightSize = 1L << 3
+movieExecuteWiredActionDontExecute = 1L << 0
+kBackgroundSpriteLayerNum = 32767
+kSpritePropertyMatrix = 1
+kSpritePropertyImageDescription = 2
+kSpritePropertyImageDataPtr = 3
+kSpritePropertyVisible = 4
+kSpritePropertyLayer = 5
+kSpritePropertyGraphicsMode = 6
+kSpritePropertyImageDataSize = 7
+kSpritePropertyActionHandlingSpriteID = 8
+kSpritePropertyImageIndex = 100
+kSpriteTrackPropertyBackgroundColor = 101
+kSpriteTrackPropertyOffscreenBitDepth = 102
+kSpriteTrackPropertySampleFormat = 103
+kSpriteTrackPropertyScaleSpritesToScaleWorld = 104
+kSpriteTrackPropertyHasActions = 105
+kSpriteTrackPropertyVisible = 106
+kSpriteTrackPropertyQTIdleEventsFrequency = 107
+kSpriteImagePropertyRegistrationPoint = 1000
+kSpriteImagePropertyGroupID = 1001
+kNoQTIdleEvents = -1
+kOnlyDrawToSpriteWorld = 1L << 0
+kSpriteWorldPreflight = 1L << 1
+kSpriteWorldDidDraw = 1L << 0
+kSpriteWorldNeedsToDraw = 1L << 1
+kKeyFrameAndSingleOverride = 1L << 1
+kKeyFrameAndAllOverrides = 1L << 2
+kScaleSpritesToScaleWorld = 1L << 1
+kSpriteWorldHighQuality = 1L << 2
+kSpriteWorldDontAutoInvalidate = 1L << 3
+kSpriteWorldInvisible = 1L << 4
+kParentAtomIsContainer = 0
+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
+elOptionsIncludeNoneInList = 0x00000001
+pdOptionsCollectOneValue = 0x00000001
+pdOptionsAllowOptionalInterpolations = 0x00000002
+pdOptionsModalDialogBox = 0x00000004
+effectIsRealtime = 0
+kAccessKeyAtomType = FOUR_CHAR_CODE('acky')
+kAccessKeySystemFlag = 1L << 0
+ConnectionSpeedPrefsType = FOUR_CHAR_CODE('cspd')
+BandwidthManagementPrefsType = FOUR_CHAR_CODE('bwmg')
+kQTIdlePriority = 10
+kQTNonRealTimePriority = 20
+kQTRealTimeSharedPriority = 25
+kQTRealTimePriority = 30
+kQTBandwidthNotifyNeedToStop = 1L << 0
+kQTBandwidthNotifyGoodToGo = 1L << 1
+kQTBandwidthChangeRequest = 1L << 2
+kQTBandwidthQueueRequest = 1L << 3
+kQTBandwidthScheduledRequest = 1L << 4
+kQTBandwidthVoluntaryRelease = 1L << 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')
+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 = 1L << 0
+videoFlagDontLeanAhead = 1L << 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 = 1L << 0
+spriteHitTestImage = 1L << 1
+spriteHitTestInvisibleSprites = 1L << 2
+spriteHitTestIsClick = 1L << 3
+spriteHitTestLocInDisplayCoordinates = 1L << 4
+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
+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
+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
+kMusicMediaGetIndexedTunePlayerSelect = 0x0101
diff --git a/Lib/plat-mac/Carbon/Res.py b/Lib/plat-mac/Carbon/Res.py
new file mode 100644
index 0000000..8465ab8
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Res.py
@@ -0,0 +1,4 @@
+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
new file mode 100644
index 0000000..8030396
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Resources.py
@@ -0,0 +1,27 @@
+# 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
new file mode 100644
index 0000000..0dcbd37
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Scrap.py
@@ -0,0 +1 @@
+from _Scrap import *
diff --git a/Lib/plat-mac/Carbon/Snd.py b/Lib/plat-mac/Carbon/Snd.py
new file mode 100644
index 0000000..679f10b
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Snd.py
@@ -0,0 +1 @@
+from _Snd import *
diff --git a/Lib/plat-mac/Carbon/Sndihooks.py b/Lib/plat-mac/Carbon/Sndihooks.py
new file mode 100644
index 0000000..73a3d28
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Sndihooks.py
@@ -0,0 +1 @@
+from _Sndihooks import *
diff --git a/Lib/plat-mac/Carbon/Sound.py b/Lib/plat-mac/Carbon/Sound.py
new file mode 100644
index 0000000..ffe9efa
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Sound.py
@@ -0,0 +1,400 @@
+# 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 = (1L << 16)
+kRateConvert = (1L << 17)
+kCreateSoundSource = (1L << 18)
+kVMAwareness = (1L << 21)
+kHighQuality = (1L << 22)
+kNonRealTime = (1L << 23)
+kSourcePaused = (1 << 0)
+kPassThrough = (1L << 16)
+kNoSoundComponentChain = (1L << 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 = (1L << 0)
+audioDoesStereo = (1L << 1)
+audioDoesIndependentChannels = (1L << 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 = 1L << 0
+kExtendedSoundBufferSizeValid = 1L << 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
new file mode 100644
index 0000000..4351d7a
--- /dev/null
+++ b/Lib/plat-mac/Carbon/TE.py
@@ -0,0 +1 @@
+from _TE import *
diff --git a/Lib/plat-mac/Carbon/TextEdit.py b/Lib/plat-mac/Carbon/TextEdit.py
new file mode 100644
index 0000000..eb5fb92
--- /dev/null
+++ b/Lib/plat-mac/Carbon/TextEdit.py
@@ -0,0 +1,57 @@
+# 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/WASTEconst.py b/Lib/plat-mac/Carbon/WASTEconst.py
new file mode 100644
index 0000000..dc73905
--- /dev/null
+++ b/Lib/plat-mac/Carbon/WASTEconst.py
@@ -0,0 +1,207 @@
+# Generated from 'WASTE.h'
+
+kPascalStackBased = None # workaround for header parsing
+def FOUR_CHAR_CODE(x): return x
+weCantUndoErr = -10015
+weEmptySelectionErr = -10013
+weUnknownObjectTypeErr = -9478
+weObjectNotFoundErr = -9477
+weReadOnlyErr = -9476
+weTextNotFoundErr = -9474
+weInvalidTextEncodingErr = -9473
+weDuplicateAttributeErr = -9472
+weInvalidAttributeSizeErr = -9471
+weReadOnlyAttributeErr = -9470
+weOddByteCountErr = -9469
+weHandlerNotFoundErr = -1717
+weNotHandledErr = -1708
+weNewerVersionErr = -1706
+weCorruptDataErr = -1702
+weProtocolErr = -603
+weUndefinedSelectorErr = -50
+weFlushLeft = -2
+weFlushRight = -1
+weFlushDefault = 0
+weCenter = 1
+weJustify = 2
+weDirDefault = 1
+weDirRightToLeft = -1
+weDirLeftToRight = 0
+weDoFont = 0x0001
+weDoFace = 0x0002
+weDoSize = 0x0004
+weDoColor = 0x0008
+weDoAll = weDoFont | weDoFace | weDoSize | weDoColor
+weDoAddSize = 0x0010
+weDoToggleFace = 0x0020
+weDoReplaceFace = 0x0040
+weDoPreserveScript = 0x0080
+weDoExtractSubscript = 0x0100
+weDoFaceMask = 0x0200
+weDoDirection = 0x00000001
+weDoAlignment = 0x00000002
+weDoLeftIndent = 0x00000004
+weDoRightIndent = 0x00000008
+weDoFirstLineIndent = 0x00000010
+weDoLineSpacing = 0x00000020
+weDoSpaceBefore = 0x00000040
+weDoSpaceAfter = 0x00000080
+weDoBottomBorderStyle = 0x00000400
+kLeadingEdge = -1
+kTrailingEdge = 0
+kObjectEdge = 2
+weFAutoScroll = 0
+weFOutlineHilite = 2
+weFReadOnly = 5
+weFUndo = 6
+weFIntCutAndPaste = 7
+weFDragAndDrop = 8
+weFInhibitRecal = 9
+weFUseTempMem = 10
+weFDrawOffscreen = 11
+weFInhibitRedraw = 12
+weFMonoStyled = 13
+weFMultipleUndo = 14
+weFNoKeyboardSync = 29
+weFInhibitICSupport = 30
+weFInhibitColor = 31
+# weDoAutoScroll = 1UL << weFAutoScroll
+# weDoOutlineHilite = 1UL << weFOutlineHilite
+# weDoReadOnly = 1UL << weFReadOnly
+# weDoUndo = 1UL << weFUndo
+# weDoIntCutAndPaste = 1UL << weFIntCutAndPaste
+# weDoDragAndDrop = 1UL << weFDragAndDrop
+# weDoInhibitRecal = 1UL << weFInhibitRecal
+# weDoUseTempMem = 1UL << weFUseTempMem
+# weDoDrawOffscreen = 1UL << weFDrawOffscreen
+# weDoInhibitRedraw = 1UL << weFInhibitRedraw
+# weDoMonoStyled = 1UL << weFMonoStyled
+# weDoMultipleUndo = 1UL << weFMultipleUndo
+# weDoNoKeyboardSync = 1UL << weFNoKeyboardSync
+# weDoInhibitICSupport = 1UL << weFInhibitICSupport
+# weDoInhibitColor = 1UL << weFInhibitColor
+weBitToggle = -2
+weBitTest = -1
+weBitClear = 0
+weBitSet = 1
+weLowerCase = 0
+weUpperCase = 1
+weFindWholeWords = 0x00000001
+weFindCaseInsensitive = 0x00000002
+weFindDiacriticalInsensitive = 0x00000004
+wePutIntCutAndPaste = 0x00000001
+wePutAddToTypingSequence = 0x00000002
+wePutDetectUnicodeBOM = 0x00000200
+weStreamDestinationKindMask = 0x000000FF
+weStreamIncludeObjects = 0x00000100
+weGetAddUnicodeBOM = 0x00000200
+weGetLittleEndian = 0x00000400
+weTagFontFamily = FOUR_CHAR_CODE('font')
+weTagFontSize = FOUR_CHAR_CODE('ptsz')
+weTagPlain = FOUR_CHAR_CODE('plan')
+weTagBold = FOUR_CHAR_CODE('bold')
+weTagItalic = FOUR_CHAR_CODE('ital')
+weTagUnderline = FOUR_CHAR_CODE('undl')
+weTagOutline = FOUR_CHAR_CODE('outl')
+weTagShadow = FOUR_CHAR_CODE('shad')
+weTagCondensed = FOUR_CHAR_CODE('cond')
+weTagExtended = FOUR_CHAR_CODE('pexp')
+weTagStrikethrough = FOUR_CHAR_CODE('strk')
+weTagTextColor = FOUR_CHAR_CODE('colr')
+weTagBackgroundColor = FOUR_CHAR_CODE('pbcl')
+weTagTransferMode = FOUR_CHAR_CODE('pptm')
+weTagVerticalShift = FOUR_CHAR_CODE('xshf')
+weTagAlignment = FOUR_CHAR_CODE('pjst')
+weTagDirection = FOUR_CHAR_CODE('LDIR')
+weTagLineSpacing = FOUR_CHAR_CODE('ledg')
+weTagLeftIndent = FOUR_CHAR_CODE('lein')
+weTagRightIndent = FOUR_CHAR_CODE('riin')
+weTagFirstLineIndent = FOUR_CHAR_CODE('fidt')
+weTagSpaceBefore = FOUR_CHAR_CODE('spbe')
+weTagSpaceAfter = FOUR_CHAR_CODE('spaf')
+weTagBottomBorderStyle = FOUR_CHAR_CODE('BBRD')
+weTagForceFontFamily = FOUR_CHAR_CODE('ffnt')
+weTagAddFontSize = FOUR_CHAR_CODE('+siz')
+weTagAddVerticalShift = FOUR_CHAR_CODE('+shf')
+weTagTextEncoding = FOUR_CHAR_CODE('ptxe')
+weTagQDStyles = FOUR_CHAR_CODE('qdst')
+weTagTETextStyle = FOUR_CHAR_CODE('tets')
+weTagAlignmentDefault = FOUR_CHAR_CODE('deft')
+weTagAlignmentLeft = FOUR_CHAR_CODE('left')
+weTagAlignmentCenter = FOUR_CHAR_CODE('cent')
+weTagAlignmentRight = FOUR_CHAR_CODE('rght')
+weTagAlignmentFull = FOUR_CHAR_CODE('full')
+weTagDirectionDefault = FOUR_CHAR_CODE('deft')
+weTagDirectionLeftToRight = FOUR_CHAR_CODE('L->R')
+weTagDirectionRightToLeft = FOUR_CHAR_CODE('R->L')
+weTagBorderStyleNone = FOUR_CHAR_CODE('NONE')
+weTagBorderStyleThin = FOUR_CHAR_CODE('SLDL')
+weTagBorderStyleDotted = FOUR_CHAR_CODE('DTDL')
+weTagBorderStyleThick = FOUR_CHAR_CODE('THKL')
+weLineSpacingSingle = 0x00000000
+weLineSpacingOneAndHalf = 0x00008000
+weLineSpacingDouble = 0x00010000
+weCharByteHook = FOUR_CHAR_CODE('cbyt')
+weCharToPixelHook = FOUR_CHAR_CODE('c2p ')
+weCharTypeHook = FOUR_CHAR_CODE('ctyp')
+weClickLoop = FOUR_CHAR_CODE('clik')
+weCurrentDrag = FOUR_CHAR_CODE('drag')
+weDrawTextHook = FOUR_CHAR_CODE('draw')
+weDrawTSMHiliteHook = FOUR_CHAR_CODE('dtsm')
+weEraseHook = FOUR_CHAR_CODE('eras')
+weFontFamilyToNameHook = FOUR_CHAR_CODE('ff2n')
+weFontNameToFamilyHook = FOUR_CHAR_CODE('fn2f')
+weFluxProc = FOUR_CHAR_CODE('flux')
+weHiliteDropAreaHook = FOUR_CHAR_CODE('hidr')
+weLineBreakHook = FOUR_CHAR_CODE('lbrk')
+wePixelToCharHook = FOUR_CHAR_CODE('p2c ')
+wePort = FOUR_CHAR_CODE('port')
+wePreTrackDragHook = FOUR_CHAR_CODE('ptrk')
+weRefCon = FOUR_CHAR_CODE('refc')
+weScrollProc = FOUR_CHAR_CODE('scrl')
+weText = FOUR_CHAR_CODE('text')
+weTranslateDragHook = FOUR_CHAR_CODE('xdrg')
+weTranslucencyThreshold = FOUR_CHAR_CODE('tluc')
+weTSMDocumentID = FOUR_CHAR_CODE('tsmd')
+weTSMPreUpdate = FOUR_CHAR_CODE('pre ')
+weTSMPostUpdate = FOUR_CHAR_CODE('post')
+weURLHint = FOUR_CHAR_CODE('urlh')
+weWordBreakHook = FOUR_CHAR_CODE('wbrk')
+weNewHandler = FOUR_CHAR_CODE('new ')
+weDisposeHandler = FOUR_CHAR_CODE('free')
+weDrawHandler = FOUR_CHAR_CODE('draw')
+weClickHandler = FOUR_CHAR_CODE('clik')
+weStreamHandler = FOUR_CHAR_CODE('strm')
+weHoverHandler = FOUR_CHAR_CODE('hovr')
+kTypeText = FOUR_CHAR_CODE('TEXT')
+kTypeStyles = FOUR_CHAR_CODE('styl')
+kTypeSoup = FOUR_CHAR_CODE('SOUP')
+kTypeFontTable = FOUR_CHAR_CODE('FISH')
+kTypeParaFormat = FOUR_CHAR_CODE('WEpf')
+kTypeRulerScrap = FOUR_CHAR_CODE('WEru')
+kTypeCharFormat = FOUR_CHAR_CODE('WEcf')
+kTypeStyleScrap = FOUR_CHAR_CODE('WEst')
+kTypeUnicodeText = FOUR_CHAR_CODE('utxt')
+kTypeUTF8Text = FOUR_CHAR_CODE('UTF8')
+kTypeStyledText = FOUR_CHAR_CODE('STXT')
+weAKNone = 0
+weAKUnspecified = 1
+weAKTyping = 2
+weAKCut = 3
+weAKPaste = 4
+weAKClear = 5
+weAKDrag = 6
+weAKSetStyle = 7
+weAKSetRuler = 8
+weAKBackspace = 9
+weAKFwdDelete = 10
+weAKCaseChange = 11
+weAKObjectChange = 12
+weToScrap = 0
+weToDrag = 1
+weToSoup = 2
+weMouseEnter = 0
+weMouseWithin = 1
+weMouseLeave = 2
+kCurrentSelection = -1
+kNullStyle = -2
diff --git a/Lib/plat-mac/Carbon/Win.py b/Lib/plat-mac/Carbon/Win.py
new file mode 100644
index 0000000..2805772
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Win.py
@@ -0,0 +1 @@
+from _Win import *
diff --git a/Lib/plat-mac/Carbon/Windows.py b/Lib/plat-mac/Carbon/Windows.py
new file mode 100644
index 0000000..71685df
--- /dev/null
+++ b/Lib/plat-mac/Carbon/Windows.py
@@ -0,0 +1,263 @@
+# Generated from 'MacWindows.h'
+
+def FOUR_CHAR_CODE(x): return x
+false = 0
+true = 1
+kAlertWindowClass = 1L
+kMovableAlertWindowClass = 2L
+kModalWindowClass = 3L
+kMovableModalWindowClass = 4L
+kFloatingWindowClass = 5L
+kDocumentWindowClass = 6L
+kUtilityWindowClass = 8L
+kHelpWindowClass = 10L
+kSheetWindowClass = 11L
+kToolbarWindowClass = 12L
+kPlainWindowClass = 13L
+kOverlayWindowClass = 14L
+kSheetAlertWindowClass = 15L
+kAltPlainWindowClass = 16L
+# kAllWindowClasses = (unsigned long)0xFFFFFFFF
+kWindowNoAttributes = 0L
+kWindowCloseBoxAttribute = (1L << 0)
+kWindowHorizontalZoomAttribute = (1L << 1)
+kWindowVerticalZoomAttribute = (1L << 2)
+kWindowFullZoomAttribute = (kWindowVerticalZoomAttribute | kWindowHorizontalZoomAttribute)
+kWindowCollapseBoxAttribute = (1L << 3)
+kWindowResizableAttribute = (1L << 4)
+kWindowSideTitlebarAttribute = (1L << 5)
+kWindowNoUpdatesAttribute = (1L << 16)
+kWindowNoActivatesAttribute = (1L << 17)
+kWindowOpaqueForEventsAttribute = (1L << 18)
+kWindowNoShadowAttribute = (1L << 21)
+kWindowHideOnSuspendAttribute = (1L << 24)
+kWindowStandardHandlerAttribute = (1L << 25)
+kWindowHideOnFullScreenAttribute = (1L << 26)
+kWindowInWindowMenuAttribute = (1L << 27)
+kWindowLiveResizeAttribute = (1L << 28)
+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 = 0x00000001
+kWindowCenterOnParentWindow = 0x00000002
+kWindowCenterOnParentWindowScreen = 0x00000003
+kWindowCascadeOnMainScreen = 0x00000004
+kWindowCascadeOnParentWindow = 0x00000005
+kWindowCascadeOnParentWindowScreen = 0x00000006
+kWindowAlertPositionOnMainScreen = 0x00000007
+kWindowAlertPositionOnParentWindow = 0x00000008
+kWindowAlertPositionOnParentWindowScreen = 0x00000009
+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
+wNoHit = 0
+wInContent = 1
+wInDrag = 2
+wInGrow = 3
+wInGoAway = 4
+wInZoomIn = 5
+wInZoomOut = 6
+wInCollapseBox = 9
+wInProxyIcon = 10
+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 << 0L)
+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
+windowGroupInvalidErr = -5616
+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 = (1L << 0)
+kScrollWindowEraseToPortBackground = (1L << 1)
+kWindowZoomTransitionEffect = 1
+kWindowSheetTransitionEffect = 2
+kWindowSlideTransitionEffect = 3
+kWindowShowTransitionAction = 1
+kWindowHideTransitionAction = 2
+kWindowMoveTransitionAction = 3
+kWindowResizeTransitionAction = 4
+kWindowConstrainMayResize = (1L << 0)
+kWindowConstrainMoveRegardlessOfFit = (1L << 1)
+kWindowConstrainAllowPartial = (1L << 2)
+kWindowConstrainCalcOnly = (1L << 3)
+kWindowConstrainStandardOptions = kWindowConstrainMoveRegardlessOfFit
+kWindowPropertyPersistent = 0x00000001
+kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer
+kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether
+kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether
diff --git a/Lib/plat-mac/Carbon/__init__.py b/Lib/plat-mac/Carbon/__init__.py
new file mode 100644
index 0000000..d0cfec3
--- /dev/null
+++ b/Lib/plat-mac/Carbon/__init__.py
@@ -0,0 +1,4 @@
+# Filter out warnings about signed/unsigned constants
+import warnings
+warnings.filterwarnings("ignore", "", FutureWarning, ".*Controls")
+warnings.filterwarnings("ignore", "", FutureWarning, ".*MacTextEditor") \ No newline at end of file
diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py
new file mode 100644
index 0000000..8e1e056
--- /dev/null
+++ b/Lib/plat-mac/EasyDialogs.py
@@ -0,0 +1,598 @@
+"""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.
+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
+import MacOS
+import string
+from Carbon.ControlAccessor import * # Also import Controls constants
+import macfs
+import macresource
+
+_initialized = 0
+
+def _initialize():
+ global _initialized
+ if _initialized: return
+ macresource.need("DLOG", 260, "dialogs.rsrc", __name__)
+
+
+def cr2lf(text):
+ if '\r' in text:
+ text = string.join(string.split(text, '\r'), '\n')
+ return text
+
+def lf2cr(text):
+ if '\n' in text:
+ text = string.join(string.split(text, '\n'), '\r')
+ 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()
+ 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 != 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()
+ 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 != None:
+ h = d.GetDialogItemAsControl(1)
+ h.SetControlTitle(ok)
+ if cancel != 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()
+ 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 != None:
+ h = d.GetDialogItemAsControl(1)
+ h.SetControlTitle(ok)
+ if cancel != 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()
+ 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 != None:
+ if yes == '':
+ d.HideDialogItem(2)
+ else:
+ h = d.GetDialogItemAsControl(2)
+ h.SetControlTitle(yes)
+ if no != None:
+ if no == '':
+ d.HideDialogItem(3)
+ else:
+ h = d.GetDialogItemAsControl(3)
+ h.SetControlTitle(no)
+ if cancel != 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
+ 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 != 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()
+ 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:
+ fss, ok = macfs.StandardGetFile()
+ if ok:
+ stringstoadd = [fss.as_pathname()]
+ elif n == ARGV_ADD_NEWFILE:
+ fss, ok = macfs.StandardPutFile('')
+ if ok:
+ stringstoadd = [fss.as_pathname()]
+ elif n == ARGV_ADD_FOLDER:
+ fss, ok = macfs.GetDirectory()
+ if ok:
+ stringstoadd = [fss.as_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 = `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 = string.split(oldstr)
+ 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'):
+ apply(MacOS.SchedParams, appsw)
+ del d
+
+def test():
+ import time, sys
+
+ 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)
+ for i in range(len(argv)):
+ print 'arg[%d] = %s'%(i, `argv[i]`)
+ print 'Type return to continue - ',
+ sys.stdin.readline()
+ 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))
+ 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 xrange(20):
+ bar.inc()
+ time.sleep(0.05)
+ bar.set(0,100)
+ for i in xrange(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'):
+ apply(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
new file mode 100644
index 0000000..24acd41
--- /dev/null
+++ b/Lib/plat-mac/FrameWork.py
@@ -0,0 +1,1120 @@
+"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 == 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 == 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 = apply(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'):
+ apply(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 eventname.has_key(what):
+ 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 'Unsupported in MachoPython'
+ old = self._doing_asyncevents
+ if old:
+ MacOS.SetEventHandler()
+ apply(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 self._windows.has_key(window):
+ 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 partname.has_key(partcode):
+ name = "do_" + partname[partcode]
+ else:
+ name = "do_%d" % partcode
+
+ if wid == 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 self._windows.has_key(wid):
+ # 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 self._windows.has_key(w):
+ 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", `c`
+
+ def do_updateEvt(self, event):
+ (what, message, when, where, modifiers) = event
+ wid = WhichWindow(message)
+ if wid and self._windows.has_key(wid):
+ 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 self._windows.has_key(wid):
+ 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:',
+ self.printevent(event)
+
+ def do_suspendresume(self, event):
+ (what, message, when, where, modifiers) = event
+ wid = MyFrontWindow()
+ if wid and self._windows.has_key(wid):
+ 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:",
+ self.printevent(event)
+ try:
+ AEProcessAppleEvent(event)
+ except:
+ pass
+ #print "AEProcessAppleEvent error:"
+ #traceback.print_exc()
+
+ def do_unknownevent(self, event):
+ if DEBUG:
+ print "Unhandled event:",
+ self.printevent(event)
+
+ def printevent(self, event):
+ (what, message, when, where, modifiers) = event
+ nicewhat = `what`
+ if eventname.has_key(what):
+ nicewhat = eventname[what]
+ print nicewhat,
+ if what == kHighLevelEvent:
+ h, v = where
+ print `ostypecode(message)`, hex(when), `ostypecode(h | (v<<16))`,
+ else:
+ print hex(message), hex(when), where,
+ 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 == 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 self.parent._windows.has_key(wid):
+ 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 self.menus.has_key(id):
+ 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)
+ self.menu.SetMenuItemText(item, label) # set the actual text
+ 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 '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 type(callback) <> types.StringType:
+ menuhandler = callback
+ else:
+ # callback is string
+ wid = MyFrontWindow()
+ if wid and self.bar.parent._windows.has_key(wid):
+ 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 & 0xffff0000) >> 16
+ 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 <> 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 == None: self.barx_enabled, vx = 0, 0
+ if vy == 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 == 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 == 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
new file mode 100644
index 0000000..ab54039
--- /dev/null
+++ b/Lib/plat-mac/MiniAEFrame.py
@@ -0,0 +1,199 @@
+"""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 sys
+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: %s %s" % \
+ (`code(message)`, `code(h | (v<<16))`)
+ try:
+ AE.AEProcessAppleEvent(event)
+ except AE.Error, 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 self.ae_handlers.has_key((_class, _type)):
+ _function = self.ae_handlers[(_class, _type)]
+ elif self.ae_handlers.has_key((_class, '****')):
+ _function = self.ae_handlers[(_class, '****')]
+ elif self.ae_handlers.has_key(('****', '****')):
+ _function = self.ae_handlers[('****', '****')]
+ else:
+ raise 'Cannot happen: AE callback without handler', (_class, _type)
+
+ # XXXX Do key-to-name mapping here
+
+ _parameters['_attributes'] = _attributes
+ _parameters['_class'] = _class
+ _parameters['_type'] = _type
+ if _parameters.has_key('----'):
+ _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 = apply(_function, (_object,), _parameters)
+ else:
+ #Same try/except comment as above
+ rv = apply(_function, (), _parameters)
+
+ if rv == 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
new file mode 100644
index 0000000..bcd3e07
--- /dev/null
+++ b/Lib/plat-mac/PixMapWrapper.py
@@ -0,0 +1,216 @@
+"""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 'UseErr', "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 == None:
+ dest[2] = x1 + src[2]-src[0]
+ if y2 == 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 macfs
+ import Image
+ fsspec, ok = macfs.PromptGetFile("Image File:")
+ if not ok: return
+ path = fsspec.as_pathname()
+ pm = PixMapWrapper()
+ pm.fromImage( Image.open(path) )
+ pm.blit(20,20)
+ return pm
+
diff --git a/Lib/plat-mac/WASTEconst.py b/Lib/plat-mac/WASTEconst.py
new file mode 100644
index 0000000..f453338
--- /dev/null
+++ b/Lib/plat-mac/WASTEconst.py
@@ -0,0 +1,207 @@
+# Generated from 'WASTE.h'
+
+kPascalStackBased = None # workaround for header parsing
+def FOUR_CHAR_CODE(x): return x
+weCantUndoErr = -10015
+weEmptySelectionErr = -10013
+weUnknownObjectTypeErr = -9478
+weObjectNotFoundErr = -9477
+weReadOnlyErr = -9476
+weTextNotFoundErr = -9474
+weInvalidTextEncodingErr = -9473
+weDuplicateAttributeErr = -9472
+weInvalidAttributeSizeErr = -9471
+weReadOnlyAttributeErr = -9470
+weOddByteCountErr = -9469
+weHandlerNotFoundErr = -1717
+weNotHandledErr = -1708
+weNewerVersionErr = -1706
+weCorruptDataErr = -1702
+weProtocolErr = -603
+weUndefinedSelectorErr = -50
+weFlushLeft = -2
+weFlushRight = -1
+weFlushDefault = 0
+weCenter = 1
+weJustify = 2
+weDirDefault = 1
+weDirRightToLeft = -1
+weDirLeftToRight = 0
+weDoFont = 0x0001
+weDoFace = 0x0002
+weDoSize = 0x0004
+weDoColor = 0x0008
+weDoAll = weDoFont | weDoFace | weDoSize | weDoColor
+weDoAddSize = 0x0010
+weDoToggleFace = 0x0020
+weDoReplaceFace = 0x0040
+weDoPreserveScript = 0x0080
+weDoExtractSubscript = 0x0100
+weDoFaceMask = 0x0200
+weDoDirection = 0x00000001
+weDoAlignment = 0x00000002
+weDoLeftIndent = 0x00000004
+weDoRightIndent = 0x00000008
+weDoFirstLineIndent = 0x00000010
+weDoLineSpacing = 0x00000020
+weDoSpaceBefore = 0x00000040
+weDoSpaceAfter = 0x00000080
+weDoBottomBorderStyle = 0x00000400
+kLeadingEdge = -1
+kTrailingEdge = 0
+kObjectEdge = 2
+weFAutoScroll = 0
+weFOutlineHilite = 2
+weFReadOnly = 5
+weFUndo = 6
+weFIntCutAndPaste = 7
+weFDragAndDrop = 8
+weFInhibitRecal = 9
+weFUseTempMem = 10
+weFDrawOffscreen = 11
+weFInhibitRedraw = 12
+weFMonoStyled = 13
+weFMultipleUndo = 14
+weFNoKeyboardSync = 29
+weFInhibitICSupport = 30
+weFInhibitColor = 31
+weDoAutoScroll = 1 << weFAutoScroll
+weDoOutlineHilite = 1 << weFOutlineHilite
+weDoReadOnly = 1 << weFReadOnly
+weDoUndo = 1 << weFUndo
+weDoIntCutAndPaste = 1 << weFIntCutAndPaste
+weDoDragAndDrop = 1 << weFDragAndDrop
+weDoInhibitRecal = 1 << weFInhibitRecal
+weDoUseTempMem = 1 << weFUseTempMem
+weDoDrawOffscreen = 1 << weFDrawOffscreen
+weDoInhibitRedraw = 1 << weFInhibitRedraw
+weDoMonoStyled = 1 << weFMonoStyled
+weDoMultipleUndo = 1 << weFMultipleUndo
+weDoNoKeyboardSync = 1 << weFNoKeyboardSync
+weDoInhibitICSupport = 1 << weFInhibitICSupport
+# weDoInhibitColor = 1 << weFInhibitColor
+weBitToggle = -2
+weBitTest = -1
+weBitClear = 0
+weBitSet = 1
+weLowerCase = 0
+weUpperCase = 1
+weFindWholeWords = 0x00000001
+weFindCaseInsensitive = 0x00000002
+weFindDiacriticalInsensitive = 0x00000004
+wePutIntCutAndPaste = 0x00000001
+wePutAddToTypingSequence = 0x00000002
+wePutDetectUnicodeBOM = 0x00000200
+weStreamDestinationKindMask = 0x000000FF
+weStreamIncludeObjects = 0x00000100
+weGetAddUnicodeBOM = 0x00000200
+weGetLittleEndian = 0x00000400
+weTagFontFamily = FOUR_CHAR_CODE('font')
+weTagFontSize = FOUR_CHAR_CODE('ptsz')
+weTagPlain = FOUR_CHAR_CODE('plan')
+weTagBold = FOUR_CHAR_CODE('bold')
+weTagItalic = FOUR_CHAR_CODE('ital')
+weTagUnderline = FOUR_CHAR_CODE('undl')
+weTagOutline = FOUR_CHAR_CODE('outl')
+weTagShadow = FOUR_CHAR_CODE('shad')
+weTagCondensed = FOUR_CHAR_CODE('cond')
+weTagExtended = FOUR_CHAR_CODE('pexp')
+weTagStrikethrough = FOUR_CHAR_CODE('strk')
+weTagTextColor = FOUR_CHAR_CODE('colr')
+weTagBackgroundColor = FOUR_CHAR_CODE('pbcl')
+weTagTransferMode = FOUR_CHAR_CODE('pptm')
+weTagVerticalShift = FOUR_CHAR_CODE('xshf')
+weTagAlignment = FOUR_CHAR_CODE('pjst')
+weTagDirection = FOUR_CHAR_CODE('LDIR')
+weTagLineSpacing = FOUR_CHAR_CODE('ledg')
+weTagLeftIndent = FOUR_CHAR_CODE('lein')
+weTagRightIndent = FOUR_CHAR_CODE('riin')
+weTagFirstLineIndent = FOUR_CHAR_CODE('fidt')
+weTagSpaceBefore = FOUR_CHAR_CODE('spbe')
+weTagSpaceAfter = FOUR_CHAR_CODE('spaf')
+weTagBottomBorderStyle = FOUR_CHAR_CODE('BBRD')
+weTagForceFontFamily = FOUR_CHAR_CODE('ffnt')
+weTagAddFontSize = FOUR_CHAR_CODE('+siz')
+weTagAddVerticalShift = FOUR_CHAR_CODE('+shf')
+weTagTextEncoding = FOUR_CHAR_CODE('ptxe')
+weTagQDStyles = FOUR_CHAR_CODE('qdst')
+weTagTETextStyle = FOUR_CHAR_CODE('tets')
+weTagAlignmentDefault = FOUR_CHAR_CODE('deft')
+weTagAlignmentLeft = FOUR_CHAR_CODE('left')
+weTagAlignmentCenter = FOUR_CHAR_CODE('cent')
+weTagAlignmentRight = FOUR_CHAR_CODE('rght')
+weTagAlignmentFull = FOUR_CHAR_CODE('full')
+weTagDirectionDefault = FOUR_CHAR_CODE('deft')
+weTagDirectionLeftToRight = FOUR_CHAR_CODE('L->R')
+weTagDirectionRightToLeft = FOUR_CHAR_CODE('R->L')
+weTagBorderStyleNone = FOUR_CHAR_CODE('NONE')
+weTagBorderStyleThin = FOUR_CHAR_CODE('SLDL')
+weTagBorderStyleDotted = FOUR_CHAR_CODE('DTDL')
+weTagBorderStyleThick = FOUR_CHAR_CODE('THKL')
+weLineSpacingSingle = 0x00000000
+weLineSpacingOneAndHalf = 0x00008000
+weLineSpacingDouble = 0x00010000
+weCharByteHook = FOUR_CHAR_CODE('cbyt')
+weCharToPixelHook = FOUR_CHAR_CODE('c2p ')
+weCharTypeHook = FOUR_CHAR_CODE('ctyp')
+weClickLoop = FOUR_CHAR_CODE('clik')
+weCurrentDrag = FOUR_CHAR_CODE('drag')
+weDrawTextHook = FOUR_CHAR_CODE('draw')
+weDrawTSMHiliteHook = FOUR_CHAR_CODE('dtsm')
+weEraseHook = FOUR_CHAR_CODE('eras')
+weFontFamilyToNameHook = FOUR_CHAR_CODE('ff2n')
+weFontNameToFamilyHook = FOUR_CHAR_CODE('fn2f')
+weFluxProc = FOUR_CHAR_CODE('flux')
+weHiliteDropAreaHook = FOUR_CHAR_CODE('hidr')
+weLineBreakHook = FOUR_CHAR_CODE('lbrk')
+wePixelToCharHook = FOUR_CHAR_CODE('p2c ')
+wePort = FOUR_CHAR_CODE('port')
+wePreTrackDragHook = FOUR_CHAR_CODE('ptrk')
+weRefCon = FOUR_CHAR_CODE('refc')
+weScrollProc = FOUR_CHAR_CODE('scrl')
+weText = FOUR_CHAR_CODE('text')
+weTranslateDragHook = FOUR_CHAR_CODE('xdrg')
+weTranslucencyThreshold = FOUR_CHAR_CODE('tluc')
+weTSMDocumentID = FOUR_CHAR_CODE('tsmd')
+weTSMPreUpdate = FOUR_CHAR_CODE('pre ')
+weTSMPostUpdate = FOUR_CHAR_CODE('post')
+weURLHint = FOUR_CHAR_CODE('urlh')
+weWordBreakHook = FOUR_CHAR_CODE('wbrk')
+weNewHandler = FOUR_CHAR_CODE('new ')
+weDisposeHandler = FOUR_CHAR_CODE('free')
+weDrawHandler = FOUR_CHAR_CODE('draw')
+weClickHandler = FOUR_CHAR_CODE('clik')
+weStreamHandler = FOUR_CHAR_CODE('strm')
+weHoverHandler = FOUR_CHAR_CODE('hovr')
+kTypeText = FOUR_CHAR_CODE('TEXT')
+kTypeStyles = FOUR_CHAR_CODE('styl')
+kTypeSoup = FOUR_CHAR_CODE('SOUP')
+kTypeFontTable = FOUR_CHAR_CODE('FISH')
+kTypeParaFormat = FOUR_CHAR_CODE('WEpf')
+kTypeRulerScrap = FOUR_CHAR_CODE('WEru')
+kTypeCharFormat = FOUR_CHAR_CODE('WEcf')
+kTypeStyleScrap = FOUR_CHAR_CODE('WEst')
+kTypeUnicodeText = FOUR_CHAR_CODE('utxt')
+kTypeUTF8Text = FOUR_CHAR_CODE('UTF8')
+kTypeStyledText = FOUR_CHAR_CODE('STXT')
+weAKNone = 0
+weAKUnspecified = 1
+weAKTyping = 2
+weAKCut = 3
+weAKPaste = 4
+weAKClear = 5
+weAKDrag = 6
+weAKSetStyle = 7
+weAKSetRuler = 8
+weAKBackspace = 9
+weAKFwdDelete = 10
+weAKCaseChange = 11
+weAKObjectChange = 12
+weToScrap = 0
+weToDrag = 1
+weToSoup = 2
+weMouseEnter = 0
+weMouseWithin = 1
+weMouseLeave = 2
+kCurrentSelection = -1
+kNullStyle = -2
diff --git a/Lib/plat-mac/aepack.py b/Lib/plat-mac/aepack.py
new file mode 100644
index 0000000..dfb2953
--- /dev/null
+++ b/Lib/plat-mac/aepack.py
@@ -0,0 +1,385 @@
+"""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
+import string
+import types
+from string import strip
+from types import *
+from Carbon import AE
+from Carbon.AppleEvents import *
+import MacOS
+import macfs
+import StringIO
+import aetypes
+from aetypes import mkenum, mktype
+import os
+
+# These ones seem to be missing from AppleEvents
+# (they're in AERegistry.h)
+
+#typeColorTable = 'clrt'
+#typeDrawingArea = 'cdrw'
+#typePixelMap = 'cpix'
+#typePixelMapMinus = 'tpmm'
+#typeRotation = 'trot'
+#typeTextStyles = 'tsty'
+#typeStyledText = 'STXT'
+#typeAEText = 'tTXT'
+#typeEnumeration = 'enum'
+
+#
+# Some AE types are immedeately coerced into something
+# we like better (and which is equivalent)
+#
+unpacker_coercions = {
+ typeComp : typeFloat,
+ typeColorTable : typeAEList,
+ typeDrawingArea : typeAERecord,
+ typeFixed : typeFloat,
+ typeExtended : typeFloat,
+ typePixelMap : typeAERecord,
+ typeRotation : typeAERecord,
+ typeStyledText : typeAERecord,
+ typeTextStyles : typeAERecord,
+};
+
+#
+# Some python types we need in the packer:
+#
+AEDescType = AE.AEDescType
+FSSType = macfs.FSSpecType
+AliasType = macfs.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 type(x) is StringType:
+ return AE.AECreateDesc(forcetype, x)
+ else:
+ return pack(x).AECoerceDesc(forcetype)
+
+ if x == None:
+ return AE.AECreateDesc('null', '')
+
+ t = type(x)
+ if t == AEDescType:
+ return x
+ if t == FSSType:
+ return AE.AECreateDesc('fss ', x.data)
+ if t == AliasType:
+ return AE.AECreateDesc('alis', x.data)
+ if t == IntType:
+ return AE.AECreateDesc('long', struct.pack('l', x))
+ if t == FloatType:
+ return AE.AECreateDesc('doub', struct.pack('d', x))
+ if t == StringType:
+ return AE.AECreateDesc('TEXT', x)
+ if t == UnicodeType:
+ data = t.encode('utf16')
+ if data[:2] == '\xfe\xff':
+ data = data[2:]
+ return AE.AECreateDesc('utxt', data)
+ if t == ListType:
+ list = AE.AECreateList('', 0)
+ for item in x:
+ list.AEPutDesc(0, pack(item))
+ return list
+ if t == DictionaryType:
+ record = AE.AECreateList('', 1)
+ for key, value in x.items():
+ packkey(record, key, value)
+ #record.AEPutParamDesc(key, pack(value))
+ return record
+ if t == InstanceType and hasattr(x, '__aepack__'):
+ return x.__aepack__()
+ if hasattr(x, 'which'):
+ return AE.AECreateDesc('TEXT', x.which)
+ if hasattr(x, 'want'):
+ return AE.AECreateDesc('TEXT', x.want)
+ return AE.AECreateDesc('TEXT', repr(x)) # Copout
+
+def unpack(desc, formodulename=""):
+ """Unpack an AE descriptor to a python object"""
+ t = desc.type
+
+ if unpacker_coercions.has_key(t):
+ desc = desc.AECoerceDesc(unpacker_coercions[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, '****')
+ l.append(unpack(item, formodulename))
+ return l
+ if t == typeAERecord:
+ d = {}
+ for i in range(desc.AECountItems()):
+ keyword, item = desc.AEGetNthDesc(i+1, '****')
+ d[keyword] = unpack(item, formodulename)
+ return d
+ if t == typeAEText:
+ record = desc.AECoerceDesc('reco')
+ return mkaetext(unpack(record, formodulename))
+ if t == typeAlias:
+ return macfs.RawAlias(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 unicode(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 macfs.RawFSSpec(desc.data)
+ if t == typeInsertionLoc:
+ record = desc.AECoerceDesc('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 (long(a) << 32) + b
+ if t == typeNull:
+ return None
+ if t == typeMagnitude:
+ v = struct.unpack('l', desc.data)
+ if v < 0:
+ v = 0x100000000L + v
+ return v
+ if t == typeObjectSpecifier:
+ record = desc.AECoerceDesc('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)
+ #
+ # The following are special
+ #
+ if t == 'rang':
+ record = desc.AECoerceDesc('reco')
+ return mkrange(unpack(record, formodulename))
+ if t == 'cmpd':
+ record = desc.AECoerceDesc('reco')
+ return mkcomparison(unpack(record, formodulename))
+ if t == 'logi':
+ record = desc.AECoerceDesc('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['star'], dict['stop'])
+
+def mkcomparison(dict):
+ return aetypes.Comparison(dict['obj1'], dict['relo'].enum, dict['obj2'])
+
+def mklogical(dict):
+ return aetypes.Logical(dict['logc'], dict['term'])
+
+def mkstyledtext(dict):
+ return aetypes.StyledText(dict['ksty'], dict['ktxt'])
+
+def mkaetext(dict):
+ return aetypes.AEText(dict[keyAEScriptTag], dict[keyAEStyles], dict[keyAEText])
+
+def mkinsertionloc(dict):
+ return aetypes.InsertionLoc(dict[keyAEObject], dict[keyAEPosition])
+
+def mkobject(dict):
+ want = dict['want'].type
+ form = dict['form'].enum
+ seld = dict['seld']
+ fr = dict['from']
+ if form in ('name', 'indx', 'rang', 'test'):
+ if want == 'text': return aetypes.Text(seld, fr)
+ if want == 'cha ': return aetypes.Character(seld, fr)
+ if want == 'cwor': return aetypes.Word(seld, fr)
+ if want == 'clin': return aetypes.Line(seld, fr)
+ if want == 'cpar': return aetypes.Paragraph(seld, fr)
+ if want == 'cwin': return aetypes.Window(seld, fr)
+ if want == 'docu': return aetypes.Document(seld, fr)
+ if want == 'file': return aetypes.File(seld, fr)
+ if want == 'cins': return aetypes.InsertionPoint(seld, fr)
+ if want == 'prop' and form == '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):
+ want = dict['want'].type
+ module = __import__(modulename)
+ codenamemapper = module._classdeclarations
+ classtype = codenamemapper.get(want, None)
+ newobj = mkobject(dict)
+ if classtype:
+ newobj.__class__ = classtype
+ return newobj
+
+def _test():
+ """Test program. Pack and unpack various things"""
+ objs = [
+ 'a string',
+ 12,
+ 12.0,
+ None,
+ ['a', 'list', 'of', 'strings'],
+ {'key1': 'value1', 'key2':'value2'},
+ macfs.FSSpec(':'),
+ macfs.FSSpec(':').NewAliasMinimal(),
+ aetypes.Enum('enum'),
+ aetypes.Type('type'),
+ aetypes.Keyword('kwrd'),
+ aetypes.Range(1, 10),
+ aetypes.Comparison(1, '< ', 10),
+ aetypes.Logical('not ', 1),
+ # Cannot do StyledText
+ # Cannot do AEText
+ aetypes.IntlText(0, 0, 'international text'),
+ aetypes.IntlWritingCode(0,0),
+ aetypes.QDPoint(50,100),
+ aetypes.QDRectangle(50,100,150,200),
+ aetypes.RGBColor(0x7000, 0x6000, 0x5000),
+ aetypes.Unknown('xxxx', 'unknown type data'),
+ aetypes.Character(1),
+ aetypes.Character(2, aetypes.Line(2)),
+ ]
+ for o in objs:
+ print 'BEFORE', o, `o`
+ packed = pack(o)
+ unpacked = unpack(packed)
+ print 'AFTER ', unpacked, `unpacked`
+ import sys
+ sys.exit(1)
+
+if __name__ == '__main__':
+ _test()
+
diff --git a/Lib/plat-mac/aetools.py b/Lib/plat-mac/aetools.py
new file mode 100644
index 0000000..8d9657e
--- /dev/null
+++ b/Lib/plat-mac/aetools.py
@@ -0,0 +1,313 @@
+"""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 types import *
+from Carbon import AE
+from Carbon import AppleEvents
+import MacOS
+import sys
+
+from aetypes import *
+from aepack import packkey, pack, unpack, coerce, AEDescType
+
+Error = 'aetools.Error'
+
+# 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, 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), msg:
+ if msg[0] != -1701 and msg[0] != -1704:
+ raise sys.exc_type, sys.exc_value
+ 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():
+ packkey(ae, key, 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 keydict.has_key(k):
+ 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 not arguments.has_key(key) or edict is None:
+ return
+ v = arguments[key]
+ ok = edict.values()
+ if edict.has_key(v):
+ arguments[key] = 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 arguments.has_key('errs'):
+ err_a2 = arguments['errs']
+ else:
+ err_a2 = MacOS.GetErrorString(errn)
+ if arguments.has_key('erob'):
+ 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
+
+ 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 type(signature) == AEDescType:
+ self.target = signature
+ elif type(signature) == InstanceType and hasattr(signature, '__aepack__'):
+ self.target = signature.__aepack__()
+ elif type(signature) == StringType 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)
+
+ 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"""
+
+ 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, as=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 as:
+ _arguments['rtyp'] = mktype(as)
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.has_key('errn'):
+ raise Error, decodeerror(_arguments)
+
+ if _arguments.has_key('----'):
+ return _arguments['----']
+ if as:
+ item.__class__ = as
+ return item
+
+ def _set(self, _object, _arguments = {}, _attributes = {}):
+ """ _set: set data for an object
+ Required argument: the object
+ Keyword argument _parameters: Parameter dictionary for the set operation
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ Returns: the data
+ """
+ _code = 'core'
+ _subcode = 'setd'
+
+ _arguments['----'] = _object
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.has_key('errn'):
+ raise Error, decodeerror(_arguments)
+
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+# 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 _arguments.has_key('errn'):
+ raise Error, decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ 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():
+ 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
new file mode 100644
index 0000000..d376e74
--- /dev/null
+++ b/Lib/plat-mac/aetypes.py
@@ -0,0 +1,584 @@
+"""aetypes - Python objects representing various AE types."""
+
+from Carbon.AppleEvents import *
+import struct
+from types import *
+import string
+
+#
+# convoluted, since there are cyclic dependencies between this file and
+# aetools_convert.
+#
+def pack(*args, **kwargs):
+ from aepack import pack
+ return apply(pack, args, kwargs)
+
+def IsSubclass(cls, base):
+ """Test whether CLASS1 is the same as or a subclass of CLASS2"""
+ # Loop to optimize for single inheritance
+ while 1:
+ if cls is base: return 1
+ if len(cls.__bases__) <> 1: break
+ cls = cls.__bases__[0]
+ # Recurse to cope with multiple inheritance
+ for c in cls.__bases__:
+ if IsSubclass(c, base): return 1
+ return 0
+
+def IsInstance(x, cls):
+ """Test whether OBJECT is an instance of (a subclass of) CLASS"""
+ return type(x) is InstanceType and IsSubclass(x.__class__, cls)
+
+def nice(s):
+ """'nice' representation of an object"""
+ if type(s) is StringType: return repr(s)
+ else: return str(s)
+
+class Unknown:
+ """An uninterpreted AE object"""
+
+ def __init__(self, type, data):
+ self.type = type
+ self.data = data
+
+ def __repr__(self):
+ return "Unknown(%s, %s)" % (`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 = "%-4.4s" % str(enum)
+
+ def __repr__(self):
+ return "Enum(%s)" % `self.enum`
+
+ def __str__(self):
+ return string.strip(self.enum)
+
+ 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(%s, %s)" % (`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(%s)" % `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 = "%-4.4s" % str(type)
+
+ def __repr__(self):
+ return "Type(%s)" % `self.type`
+
+ def __str__(self):
+ return string.strip(self.type)
+
+ 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 = "%-4.4s" % str(keyword)
+
+ def __repr__(self):
+ return "Keyword(%s)" % `self.keyword`
+
+ def __str__(self):
+ return string.strip(self.keyword)
+
+ 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(%s, %s)" % (`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 = "%-4.4s" % str(relo)
+ self.obj2 = obj2
+
+ def __repr__(self):
+ return "Comparison(%s, %s, %s)" % (`self.obj1`, `self.relo`, `self.obj2`)
+
+ def __str__(self):
+ return "%s %s %s" % (nice(self.obj1), string.strip(self.relo), 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 = "%-4.4s" % str(abso)
+
+ def __repr__(self):
+ return "Ordinal(%s)" % (`self.abso`)
+
+ def __str__(self):
+ return "%s" % (string.strip(self.abso))
+
+ 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 = "%-4.4s" % str(logc)
+ self.term = term
+
+ def __repr__(self):
+ return "Logical(%s, %s)" % (`self.logc`, `self.term`)
+
+ def __str__(self):
+ if type(self.term) == ListType and len(self.term) == 2:
+ return "%s %s %s" % (nice(self.term[0]),
+ string.strip(self.logc),
+ nice(self.term[1]))
+ else:
+ return "%s(%s)" % (string.strip(self.logc), 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(%s, %s)" % (`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(%s, %s, %s)" % (`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(%s, %s, %s)" % (`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(%s, %s)" % (`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(%s, %s)" % (`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(%s, %s, %s, %s)" % (`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(%s, %s, %s)" % (`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(%s, %s, %s" % (`self.want`, `self.form`, `self.seld`)
+ if self.fr:
+ s = s + ", %s)" % `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 compatability, 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(%s, %s)" % (`self.seld.type`, `self.fr`)
+ else:
+ return "Property(%s)" % `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(%s"%`self.seld.type`
+ if self.fr:
+ rv = rv + ", fr=%s" % `self.fr`
+ if self.want != 'prop':
+ rv = rv + ", want=%s" % `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 t == StringType:
+ form = 'name'
+ elif IsRange(seld):
+ form = 'rang'
+ elif IsComparison(seld) or IsLogical(seld):
+ form = 'test'
+ elif t == TupleType:
+ # 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
+
+ def __init__(self, which, fr = None):
+ SelectableItem.__init__(self, self.want, which, fr)
+
+ def __repr__(self):
+ if not self.fr:
+ return "%s(%s)" % (self.__class__.__name__, `self.seld`)
+ return "%s(%s, %s)" % (self.__class__.__name__, `self.seld`, `self.fr`)
+
+ def __str__(self):
+ seld = self.seld
+ if type(seld) == StringType:
+ ss = repr(seld)
+ elif IsRange(seld):
+ start, stop = seld.start, seld.stop
+ if type(start) == InstanceType == type(stop) and \
+ start.__class__ == self.__class__ == stop.__class__:
+ 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 self._elemdict.has_key(name):
+ cls = self._elemdict[name]
+ return DelayedComponentItem(cls, self)
+ if self._propdict.has_key(name):
+ 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(???, %s)" % (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 = '%s'
+"""
+
+exec template % ("Text", 'text')
+exec template % ("Character", 'cha ')
+exec template % ("Word", 'cwor')
+exec template % ("Line", 'clin')
+exec template % ("paragraph", 'cpar')
+exec template % ("Window", 'cwin')
+exec template % ("Document", 'docu')
+exec template % ("File", 'file')
+exec template % ("InsertionPoint", 'cins')
+
diff --git a/Lib/plat-mac/applesingle.py b/Lib/plat-mac/applesingle.py
new file mode 100644
index 0000000..f8be3d2
--- /dev/null
+++ b/Lib/plat-mac/applesingle.py
@@ -0,0 +1,100 @@
+# applesingle - a module to decode AppleSingle files
+import struct
+import MacOS
+import sys
+
+Error="applesingle.Error"
+
+verbose=0
+
+# 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)
+
+def decode(input, output, resonly=0):
+ if type(input) == type(''):
+ input = open(input, 'rb')
+ # Should we also test for FSSpecs or FSRefs?
+ header = input.read(AS_HEADER_LENGTH)
+ try:
+ magic, version, dummy, nentry = struct.unpack(AS_HEADER_FORMAT, header)
+ except ValueError, 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 = [input.read(AS_ENTRY_LENGTH) for i in range(nentry)]
+ didwork = 0
+ for hdr in headers:
+ try:
+ id, offset, length = struct.unpack(AS_ENTRY_FORMAT, hdr)
+ except ValueError, arg:
+ raise Error, "Unpack entry error: %s"%arg
+ if verbose:
+ print 'Fork %d, offset %d, length %d'%(id, offset, length)
+ input.seek(offset)
+ if length == 0:
+ data = ''
+ else:
+ data = input.read(length)
+ if len(data) != length:
+ raise Error, 'Short read: expected %d bytes got %d'%(length, len(data))
+ if id == AS_DATAFORK:
+ if verbose:
+ print ' (data fork)'
+ if not resonly:
+ didwork = 1
+ fp = open(output, 'wb')
+ fp.write(data)
+ fp.close()
+ elif id == AS_RESOURCEFORK:
+ didwork = 1
+ if verbose:
+ print ' (resource fork)'
+ if resonly:
+ fp = open(output, 'wb')
+ else:
+ fp = MacOS.openrf(output, 'wb')
+ fp.write(data)
+ fp.close()
+ elif id in AS_IGNORE:
+ if verbose:
+ print ' (ignored)'
+ else:
+ raise Error, 'Unknown fork type %d'%id
+ if not didwork:
+ raise Error, 'No useful forks found'
+
+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 = 1
+ del sys.argv[1]
+ else:
+ resonly = 0
+ decode(sys.argv[1], sys.argv[2], resonly=resonly)
+
+if __name__ == '__main__':
+ _test()
+ \ No newline at end of file
diff --git a/Lib/plat-mac/appletrawmain.py b/Lib/plat-mac/appletrawmain.py
new file mode 100644
index 0000000..4771f3c
--- /dev/null
+++ b/Lib/plat-mac/appletrawmain.py
@@ -0,0 +1,63 @@
+# 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
+ execfile(__file__)
+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
new file mode 100755
index 0000000..adda7b1
--- /dev/null
+++ b/Lib/plat-mac/appletrunner.py
@@ -0,0 +1,17 @@
+#!/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
new file mode 100644
index 0000000..89d48b8
--- /dev/null
+++ b/Lib/plat-mac/argvemulator.py
@@ -0,0 +1,114 @@
+"""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.Events import *
+import aetools
+
+class ArgvCollector:
+
+ """A minimal FrameWork.Application-like class"""
+
+ def __init__(self):
+ self.quitting = 0
+ self.ae_handlers = {}
+ # Remove the funny -psn_xxx_xxx argument
+ if len(sys.argv) > 1 and sys.argv[1][:4] == '-psn':
+ del sys.argv[1]
+ self.installaehandler('aevt', 'oapp', self.open_app)
+ self.installaehandler('aevt', 'odoc', self.open_file)
+
+ 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 mainloop(self, mask = highLevelEventMask, timeout = 1*60):
+ stoptime = Evt.TickCount() + timeout
+ while not self.quitting and Evt.TickCount() < stoptime:
+ self.dooneevent(mask, timeout)
+ self.close()
+
+ def _quit(self):
+ self.quitting = 1
+
+ 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, err:
+ msg = "High Level Event: %s %s" % \
+ (`hex(message)`, `hex(h | (v<<16))`)
+ print 'AE error: ', err
+ print 'in', msg
+ traceback.print_exc()
+ return
+ else:
+ print "Unhandled event:", event
+
+ def callback_wrapper(self, _request, _reply):
+ _parameters, _attributes = aetools.unpackevent(_request)
+ _class = _attributes['evcl'].type
+ _type = _attributes['evid'].type
+
+ if self.ae_handlers.has_key((_class, _type)):
+ _function = self.ae_handlers[(_class, _type)]
+ elif self.ae_handlers.has_key((_class, '****')):
+ _function = self.ae_handlers[(_class, '****')]
+ elif self.ae_handlers.has_key(('****', '****')):
+ _function = self.ae_handlers[('****', '****')]
+ else:
+ raise 'Cannot happen: AE callback without handler', (_class, _type)
+
+ # XXXX Do key-to-name mapping here
+
+ _parameters['_attributes'] = _attributes
+ _parameters['_class'] = _class
+ _parameters['_type'] = _type
+ if _parameters.has_key('----'):
+ _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 = apply(_function, (_object,), _parameters)
+ else:
+ #Same try/except comment as above
+ rv = apply(_function, (), _parameters)
+
+ if rv == None:
+ aetools.packevent(_reply, {})
+ else:
+ aetools.packevent(_reply, {'----':rv})
+
+ def open_app(self, **args):
+ self._quit()
+
+ def open_file(self, _object=None, **args):
+ for alias in _object:
+ fss = alias.Resolve()[0]
+ pathname = fss.as_pathname()
+ sys.argv.append(pathname)
+ self._quit()
+
+ def other(self, _object=None, _class=None, _type=None, **args):
+ print 'Ignore AppleEvent', (_class, _type), 'for', _object, 'Other args:', args
+
+if __name__ == '__main__':
+ ArgvCollector().mainloop()
+ print "sys.argv=", sys.argv
diff --git a/Lib/plat-mac/bgenlocations.py b/Lib/plat-mac/bgenlocations.py
new file mode 100644
index 0000000..84f3587
--- /dev/null
+++ b/Lib/plat-mac/bgenlocations.py
@@ -0,0 +1,61 @@
+#
+# 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 sys, os
+
+Error = "bgenlocations.Error"
+#
+# Where bgen is. For unix-Python bgen isn't installed, so you have to refer to
+# the source tree here.
+if sys.platform == 'mac':
+ # For MacPython we know where it is
+ def _pardir(p): return os.path.split(p)[0]
+ BGENDIR=os.path.join(sys.prefix, "Tools", "bgen", "bgen")
+else:
+ # for unix-Python we don't know, please set it yourself.
+ 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.
+#
+if sys.platform == 'mac':
+ _MWERKSDIR="Macintosh HD:Applications (Mac OS 9):Metrowerks CodeWarrior 7.0:Metrowerks CodeWarrior"
+else:
+ _MWERKSDIR="/Volumes/Moes/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/"
+INCLUDEDIR=os.path.join(_MWERKSDIR, "MacOS Support", "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.
+#
+if sys.platform == 'mac':
+ TOOLBOXDIR=os.path.join(sys.prefix, "Mac", "Lib", "Carbon")
+else:
+ TOOLBOXDIR="/Users/jack/src/python/Mac/Lib/Carbon"
+
+# Creator for C files:
+CREATOR="CWIE"
+
+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
new file mode 100644
index 0000000..01b5392
--- /dev/null
+++ b/Lib/plat-mac/buildtools.py
@@ -0,0 +1,521 @@
+"""tools for BuildApplet and BuildApplication"""
+
+import sys
+import os
+import string
+import imp
+import marshal
+import macfs
+from Carbon import Res
+import MACFS
+import MacOS
+import macostools
+import macresource
+import EasyDialogs
+import shutil
+
+
+BuildError = "BuildError"
+
+# .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
+
+
+def findtemplate(template=None):
+ """Locate the applet template along sys.path"""
+ if MacOS.runtimemodel == 'macho':
+ if template:
+ return template
+ return findtemplate_macho()
+ if not template:
+ template=TEMPLATE
+ for p in sys.path:
+ file = os.path.join(p, template)
+ try:
+ file, d1, d2 = macfs.ResolveAliasFile(file)
+ break
+ except (macfs.error, ValueError):
+ continue
+ else:
+ raise BuildError, "Template %s not found on sys.path" % `template`
+ file = file.as_pathname()
+ return file
+
+def findtemplate_macho():
+ execpath = sys.executable.split('/')
+ if not 'Contents' in execpath:
+ raise BuildError, "Not running from a .app bundle: %s" % sys.executable
+ i = execpath.index('Contents')
+ return '/'.join(execpath[:i])
+
+
+def process(template, filename, destname, copy_codefragment,
+ rsrcname=None, others=[], raw=0, progress="default"):
+
+ 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, filename, "exec")
+ except SyntaxError, 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 string.lower(filename[-3:]) == ".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)
+
+
+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=[]):
+ if MacOS.runtimemodel == 'macho':
+ return process_common_macho(template, progress, code, rsrcname, destname,
+ is_update, raw, others)
+ if others:
+ raise BuildError, "Extra files only allowed for MachoPython applets"
+ # Create FSSpecs for the various files
+ template_fss = macfs.FSSpec(template)
+ template_fss, d1, d2 = macfs.ResolveAliasFile(template_fss)
+ dest_fss = macfs.FSSpec(destname)
+
+ # 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.FSpOpenResFile(dest_fss, WRITE)
+ except MacOS.Error:
+ Res.FSpCreateResFile(destname, '????', 'APPL', MACFS.smAllScripts)
+ output = Res.FSpOpenResFile(dest_fss, WRITE)
+
+ # Copy the resources from the target specific resource template, if any
+ typesfound, ownertype = [], None
+ try:
+ input = Res.FSpOpenResFile(rsrcname, 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.FSpOpenResFile(template_fss, READ)
+ dummy, tmplowner = copyres(input, output, skiptypes, 1, progress)
+
+ Res.CloseResFile(input)
+## if ownertype == 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 == 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
+ dest_finfo = dest_fss.GetFInfo()
+ dest_finfo.Creator = ownertype
+ dest_finfo.Type = 'APPL'
+ dest_finfo.Flags = dest_finfo.Flags | MACFS.kHasBundle | MACFS.kIsShared
+ dest_finfo.Flags = dest_finfo.Flags & ~MACFS.kHasBeenInited
+ dest_fss.SetFInfo(dest_finfo)
+
+ macostools.touched(dest_fss)
+ if progress:
+ progress.label("Done.")
+ progress.inc(0)
+
+def process_common_macho(template, progress, code, rsrcname, destname, is_update, raw=0, others=[]):
+ # First make sure the name ends in ".app"
+ if destname[-4:] != '.app':
+ destname = destname + '.app'
+ # Now deduce the short name
+ shortname = os.path.split(destname)[1]
+ 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
+ # Start with copying the .app framework
+ if not is_update:
+ exceptlist = ["Contents/Info.plist",
+ "Contents/Resources/English.lproj/InfoPlist.strings",
+ "Contents/Resources/English.lproj/Documentation",
+ "Contents/Resources/python.rsrc",
+ ]
+ copyapptree(template, destname, exceptlist, progress)
+ # SERIOUS HACK. If we've just copied a symlink as the
+ # executable we assume we're running from the MacPython addon
+ # to 10.2 python. We remove the symlink again and install
+ # the appletrunner script.
+ executable = os.path.join(destname, "Contents/MacOS/python")
+ if os.path.islink(executable):
+ os.remove(executable)
+ dummyfp, appletrunner, d2 = imp.find_module('appletrunner')
+ del dummyfp
+ shutil.copy2(appletrunner, executable)
+ os.chmod(executable, 0775)
+ # Now either use the .plist file or the default
+ if progress:
+ progress.label('Create info.plist')
+ progress.inc(0)
+ if plistname:
+ shutil.copy2(plistname, os.path.join(destname, 'Contents', 'Info.plist'))
+ if icnsname:
+ icnsdest = os.path.split(icnsname)[1]
+ icnsdest = os.path.join(destname,
+ os.path.join('Contents', 'Resources', icnsdest))
+ shutil.copy2(icnsname, icnsdest)
+ # XXXX Wrong. This should be parsed from plist file. Also a big hack:-)
+ if shortname == 'PythonIDE':
+ ownertype = 'Pide'
+ else:
+ ownertype = 'PytA'
+ # XXXX Should copy .icns file
+ else:
+ cocoainfo = ''
+ for o in others:
+ if o[-4:] == '.nib':
+ nibname = os.path.split(o)[1][:-4]
+ cocoainfo = """
+ <key>NSMainNibFile</key>
+ <string>%s</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>""" % nibname
+ elif o[-6:] == '.lproj':
+ files = os.listdir(o)
+ for f in files:
+ if f[-4:] == '.nib':
+ nibname = os.path.split(f)[1][:-4]
+ cocoainfo = """
+ <key>NSMainNibFile</key>
+ <string>%s</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>""" % nibname
+
+ plistname = os.path.join(template, 'Contents', 'Resources', 'Applet-Info.plist')
+ plistdata = open(plistname).read()
+ plistdata = plistdata % {'appletname':shortname, 'cocoainfo':cocoainfo}
+ ofp = open(os.path.join(destname, 'Contents', 'Info.plist'), 'w')
+ ofp.write(plistdata)
+ ofp.close()
+ ownertype = 'PytA'
+ # Create the PkgInfo file
+ if progress:
+ progress.label('Create PkgInfo')
+ progress.inc(0)
+ ofp = open(os.path.join(destname, 'Contents', 'PkgInfo'), 'wb')
+ ofp.write('APPL' + ownertype)
+ ofp.close()
+
+
+ # Copy the resources from the target specific resource template, if any
+ typesfound, ownertype = [], None
+ try:
+ input = macresource.open_pathname(rsrcname)
+ except (MacOS.Error, ValueError):
+ if progress:
+ progress.inc(50)
+ else:
+ if progress:
+ progress.label("Copy resources...")
+ progress.set(20)
+ resfilename = 'python.rsrc' # XXXX later: '%s.rsrc' % shortname
+ try:
+ output = Res.FSOpenResourceFile(
+ os.path.join(destname, 'Contents', 'Resources', resfilename),
+ u'', WRITE)
+ except MacOS.Error:
+ fsr, dummy = Res.FSCreateResourceFile(
+ os.path.join(destname, 'Contents', 'Resources'),
+ unicode(resfilename), '')
+ output = Res.FSOpenResourceFile(fsr, u'', WRITE)
+
+ typesfound, ownertype = copyres(input, output, [], 0, progress)
+ Res.CloseResFile(input)
+ Res.CloseResFile(output)
+
+ if code:
+ if raw:
+ pycname = '__rawmain__.pyc'
+ else:
+ pycname = '__main__.pyc'
+ # And we also create __rawmain__.pyc
+ outputfilename = os.path.join(destname, 'Contents', 'Resources', '__rawmain__.pyc')
+ if progress:
+ progress.label('Creating __rawmain__.pyc')
+ progress.inc(0)
+ rawsourcefp, rawsourcefile, d2 = imp.find_module('appletrawmain')
+ rawsource = rawsourcefp.read()
+ rawcode = compile(rawsource, rawsourcefile, 'exec')
+ writepycfile(rawcode, outputfilename)
+
+ outputfilename = os.path.join(destname, 'Contents', 'Resources', pycname)
+ if progress:
+ progress.label('Creating '+pycname)
+ progress.inc(0)
+ writepycfile(code, outputfilename)
+ # Copy other files the user asked for
+ for osrc in others:
+ oname = os.path.split(osrc)[1]
+ odst = os.path.join(destname, 'Contents', 'Resources', oname)
+ if progress:
+ progress.label('Copy ' + oname)
+ progress.inc(0)
+ if os.path.isdir(osrc):
+ copyapptree(osrc, odst)
+ else:
+ shutil.copy2(osrc, odst)
+ 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 = string.lower(name)
+
+ 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
new file mode 100755
index 0000000..d911292
--- /dev/null
+++ b/Lib/plat-mac/bundlebuilder.py
@@ -0,0 +1,704 @@
+#! /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 name, value in cls.__dict__.items():
+ if name[0] != "_" and not isinstance(value,
+ (function, classmethod)):
+ defaults[name] = deepcopy(value)
+ for base in cls.__bases__:
+ if hasattr(base, "_getDefaults"):
+ defaults.update(base._getDefaults())
+ 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 = "APPL"
+ # The creator code of the bundle.
+ creator = 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 = []
+
+ # Directory where the bundle will be assembled.
+ builddir = "build"
+
+ # platform, name of the subfolder of Contents that contains the executable.
+ platform = "MacOS"
+
+ # Make symlinks instead copying files. This is handy during debugging, but
+ # makes the bundle non-distributable.
+ symlink = 0
+
+ # Verbosity level.
+ verbosity = 1
+
+ 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)
+ self.execdir = pathjoin("Contents", self.platform)
+
+ 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
+
+ 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)
+ os.mkdir(self.bundlepath)
+ self.preProcess()
+ self._copyFiles()
+ self._addMetaFiles()
+ self.postProcess()
+ 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, "wb")
+ 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))))
+ 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_FROZEN = hasattr(imp, "set_frozenmodules")
+
+# 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
+del sys.path[1:] # sys.path[0] is Contents/Resources/
+"""
+
+if USE_FROZEN:
+ FROZEN_ARCHIVE = "FrozenModules.marshal"
+ SITE_PY += """\
+# bootstrapping
+import imp, marshal
+f = open(sys.path[0] + "/%s", "rb")
+imp.set_frozenmodules(marshal.load(f))
+f.close()
+""" % FROZEN_ARCHIVE
+
+SITE_CO = compile(SITE_PY, "<-bundlebuilder.py->", "exec")
+
+EXT_LOADER = """\
+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)
+sys.modules["%(name)s"] = mod
+"""
+
+MAYMISS_MODULES = ['mac', 'os2', 'nt', 'ntpath', 'dos', 'dospath',
+ 'win32api', 'ce', '_winreg', 'nturl2path', 'sitecustomize',
+ 'org.python.core', 'riscos', 'riscosenviron', 'riscospath'
+]
+
+STRIP_EXEC = "/usr/bin/strip"
+
+BOOTSTRAP_SCRIPT = """\
+#!/bin/sh
+
+execdir=$(dirname ${0})
+executable=${execdir}/%(executable)s
+resdir=$(dirname ${execdir})/Resources
+main=${resdir}/%(mainprogram)s
+PYTHONPATH=$resdir
+export PYTHONPATH
+exec ${executable} ${main} ${1}
+"""
+
+
+class AppBuilder(BundleBuilder):
+
+ # 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
+
+ # Symlink the executable instead of copying it.
+ symlink_exec = 0
+
+ # If True, build standalone app.
+ standalone = 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.
+ strip = 0
+
+ # Found Python modules: [(name, codeobject, ispkg), ...]
+ pymodules = []
+
+ # Modules that modulefinder couldn't find:
+ missingModules = []
+ maybeMissingModules = []
+
+ # List of all binaries (executables or shared libs), for stripping purposes
+ binaries = []
+
+ def setup(self):
+ if self.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'")
+
+ 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:
+ self.symlink_exec = 1
+ self.executable = sys.executable
+
+ if self.nibname:
+ self.plist.NSMainNibFile = self.nibname
+ if not hasattr(self.plist, "NSPrincipalClass"):
+ self.plist.NSPrincipalClass = "NSApplication"
+
+ BundleBuilder.setup(self)
+
+ self.plist.CFBundleExecutable = self.name
+
+ if self.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.executable, execpath))
+ self.binaries.append(execpath)
+ self.execpath = execpath
+
+ if self.mainprogram is not None:
+ mainprogram = os.path.basename(self.mainprogram)
+ self.files.append((self.mainprogram, pathjoin(resdir, mainprogram)))
+ # Write bootstrap script
+ executable = os.path.basename(self.executable)
+ execdir = pathjoin(self.bundlepath, self.execdir)
+ bootstrappath = pathjoin(execdir, self.name)
+ makedirs(execdir)
+ open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals())
+ os.chmod(bootstrappath, 0775)
+
+ def postProcess(self):
+ if self.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 addPythonModules(self):
+ self.message("Adding Python modules", 1)
+
+ if USE_FROZEN:
+ # This anticipates the acceptance of this patch:
+ # http://www.python.org/sf/642578
+ # Create a file containing all modules, frozen.
+ frozenmodules = []
+ for name, code, ispkg in self.pymodules:
+ if ispkg:
+ self.message("Adding Python package %s" % name, 2)
+ else:
+ self.message("Adding Python module %s" % name, 2)
+ frozenmodules.append((name, marshal.dumps(code), ispkg))
+ frozenmodules = tuple(frozenmodules)
+ relpath = pathjoin("Contents", "Resources", FROZEN_ARCHIVE)
+ abspath = pathjoin(self.bundlepath, relpath)
+ f = open(abspath, "wb")
+ marshal.dump(frozenmodules, f)
+ f.close()
+ # add site.pyc
+ sitepath = pathjoin(self.bundlepath, "Contents", "Resources",
+ "site" + PYC_EXT)
+ writePyc(SITE_CO, 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:
+ self.message("Stripping binaries", 1)
+ for relpath in self.binaries:
+ self.message("Stripping %s" % relpath, 2)
+ abspath = pathjoin(self.bundlepath, relpath)
+ assert not os.path.islink(abspath)
+ rv = os.system("%s -S \"%s\"" % (STRIP_EXEC, abspath))
+
+ def findDependencies(self):
+ self.message("Finding module dependencies", 1)
+ import modulefinder
+ mf = modulefinder.ModuleFinder(excludes=self.excludeModules)
+ # manually add our own site.py
+ site = mf.add_module("site")
+ site.__code__ = SITE_CO
+ mf.scan_code(SITE_CO, site)
+
+ 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:
+ if mod.__file__ and mod.__code__ is None:
+ # C extension
+ path = mod.__file__
+ filename = os.path.basename(path)
+ if USE_FROZEN:
+ # "proper" freezing, put extensions in Contents/Resources/,
+ # freeze a tiny "loader" program. Due to Thomas Heller.
+ dstpath = pathjoin("Contents", "Resources", filename)
+ source = EXT_LOADER % {"name": name, "filename": filename}
+ code = compile(source, "<dynloader for %s>" % name, "exec")
+ mod.__code__ = code
+ else:
+ # just copy the file
+ dstpath = name.split(".")[:-1] + [filename]
+ dstpath = pathjoin("Contents", "Resources", *dstpath)
+ self.files.append((path, dstpath))
+ self.binaries.append(dstpath)
+ if mod.__code__ is not None:
+ ispkg = mod.__path__ is not None
+ if not USE_FROZEN or name != "site":
+ # Our site.py is doing the bootstrapping, so we must
+ # include a real .pyc file if USE_FROZEN 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:
+ 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("\0" * 8) # don't bother about a time stamp
+ marshal.dump(code, f)
+ f.seek(0, 0)
+ f.write(MAGIC)
+ 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)
+ 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, why:
+ if why.errno != errno.EEXIST:
+ raise
+
+def symlink(src, dst, mkdirs=0):
+ """Copy a file or a directory."""
+ 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
+ -e, --executable=FILE the executable to be used
+ -m, --mainprogram=FILE the Python main program
+ -p, --plist=FILE .plist file (default: generate one)
+ --nib=NAME main nib name
+ -c, --creator=CCCC 4-char creator code (default: '????')
+ -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
+ -x, --exclude=MODULE exclude module (with --standalone)
+ -i, --include=MODULE include module (with --standalone)
+ --package=PACKAGE include a whole package (with --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:e:m:c:p:lx:i:hvq"
+ longopts = ("builddir=", "name=", "resource=", "executable=",
+ "mainprogram=", "creator=", "nib=", "plist=", "link",
+ "link-exec", "help", "verbose", "quiet", "standalone",
+ "exclude=", "include=", "package=", "strip")
+
+ 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(arg)
+ elif opt in ('-e', '--executable'):
+ builder.executable = arg
+ elif opt in ('-m', '--mainprogram'):
+ builder.mainprogram = arg
+ elif opt in ('-c', '--creator'):
+ builder.creator = 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 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
+
+ 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/cfmfile.py b/Lib/plat-mac/cfmfile.py
new file mode 100644
index 0000000..63d7233
--- /dev/null
+++ b/Lib/plat-mac/cfmfile.py
@@ -0,0 +1,186 @@
+"""codefragments.py -- wrapper to modify code fragments."""
+
+# (c) 1998, Just van Rossum, Letterror
+
+__version__ = "0.8b3"
+__author__ = "jvr"
+
+import macfs
+import struct
+from Carbon import Res
+import os
+import sys
+
+DEBUG = 0
+
+error = "cfm.error"
+
+BUFSIZE = 0x80000
+
+def mergecfmfiles(srclist, dst, architecture = 'fat'):
+ """Merge all files in srclist into a new file dst.
+
+ If architecture is given, only code fragments of that type will be used:
+ "pwpc" for PPC, "m68k" for cfm68k. This does not work for "classic"
+ 68k code, since it does not use code fragments to begin with.
+ If architecture is None, all fragments will be used, enabling FAT binaries.
+ """
+
+ srclist = list(srclist)
+ for i in range(len(srclist)):
+ if type(srclist[i]) == macfs.FSSpecType:
+ srclist[i] = srclist[i].as_pathname()
+ if type(dst) == macfs.FSSpecType:
+ dst = dst.as_pathname()
+
+ dstfile = open(dst, "wb")
+ rf = Res.FSpOpenResFile(dst, 3)
+ try:
+ dstcfrg = CfrgResource()
+ for src in srclist:
+ srccfrg = CfrgResource(src)
+ for frag in srccfrg.fragments:
+ if frag.architecture == 'pwpc' and architecture == 'm68k':
+ continue
+ if frag.architecture == 'm68k' and architecture == 'pwpc':
+ continue
+ dstcfrg.append(frag)
+
+ frag.copydata(dstfile)
+
+ cfrgres = Res.Resource(dstcfrg.build())
+ Res.UseResFile(rf)
+ cfrgres.AddResource('cfrg', 0, "")
+ finally:
+ dstfile.close()
+ rf = Res.CloseResFile(rf)
+
+
+class CfrgResource:
+
+ def __init__(self, path = None):
+ self.version = 1
+ self.fragments = []
+ self.path = path
+ if path is not None and os.path.exists(path):
+ currentresref = Res.CurResFile()
+ resref = Res.FSpOpenResFile(path, 1)
+ Res.UseResFile(resref)
+ try:
+ try:
+ data = Res.Get1Resource('cfrg', 0).data
+ except Res.Error:
+ raise Res.Error, "no 'cfrg' resource found", sys.exc_traceback
+ finally:
+ Res.CloseResFile(resref)
+ Res.UseResFile(currentresref)
+ self.parse(data)
+ if self.version <> 1:
+ raise error, "unknown 'cfrg' resource format"
+
+ def parse(self, data):
+ (res1, res2, self.version,
+ res3, res4, res5, res6,
+ self.memberCount) = struct.unpack("8l", data[:32])
+ data = data[32:]
+ while data:
+ frag = FragmentDescriptor(self.path, data)
+ data = data[frag.memberSize:]
+ self.fragments.append(frag)
+
+ def build(self):
+ self.memberCount = len(self.fragments)
+ data = struct.pack("8l", 0, 0, self.version, 0, 0, 0, 0, self.memberCount)
+ for frag in self.fragments:
+ data = data + frag.build()
+ return data
+
+ def append(self, frag):
+ self.fragments.append(frag)
+
+
+class FragmentDescriptor:
+
+ def __init__(self, path, data = None):
+ self.path = path
+ if data is not None:
+ self.parse(data)
+
+ def parse(self, data):
+ self.architecture = data[:4]
+ ( self.updatelevel,
+ self.currentVersion,
+ self.oldDefVersion,
+ self.stacksize,
+ self.applibdir,
+ self.fragtype,
+ self.where,
+ self.offset,
+ self.length,
+ self.res1, self.res2,
+ self.memberSize,) = struct.unpack("4lhBB4lh", data[4:42])
+ pname = data[42:self.memberSize]
+ self.name = pname[1:1+ord(pname[0])]
+
+ def build(self):
+ data = self.architecture
+ data = data + struct.pack("4lhBB4l",
+ self.updatelevel,
+ self.currentVersion,
+ self.oldDefVersion,
+ self.stacksize,
+ self.applibdir,
+ self.fragtype,
+ self.where,
+ self.offset,
+ self.length,
+ self.res1, self.res2)
+ self.memberSize = len(data) + 2 + 1 + len(self.name)
+ # pad to 4 byte boundaries
+ if self.memberSize % 4:
+ self.memberSize = self.memberSize + 4 - (self.memberSize % 4)
+ data = data + struct.pack("hb", self.memberSize, len(self.name))
+ data = data + self.name
+ data = data + '\000' * (self.memberSize - len(data))
+ return data
+
+ def getfragment(self):
+ if self.where <> 1:
+ raise error, "can't read fragment, unsupported location"
+ f = open(self.path, "rb")
+ f.seek(self.offset)
+ if self.length:
+ frag = f.read(self.length)
+ else:
+ frag = f.read()
+ f.close()
+ return frag
+
+ def copydata(self, outfile):
+ if self.where <> 1:
+ raise error, "can't read fragment, unsupported location"
+ infile = open(self.path, "rb")
+ if self.length == 0:
+ infile.seek(0, 2)
+ self.length = infile.tell()
+
+ # Position input file and record new offset from output file
+ infile.seek(self.offset)
+
+ # pad to 16 byte boundaries
+ offset = outfile.tell()
+ if offset % 16:
+ offset = offset + 16 - (offset % 16)
+ outfile.seek(offset)
+ self.offset = offset
+
+ l = self.length
+ while l:
+ if l > BUFSIZE:
+ outfile.write(infile.read(BUFSIZE))
+ l = l - BUFSIZE
+ else:
+ outfile.write(infile.read(l))
+ l = 0
+ infile.close()
+
diff --git a/Lib/plat-mac/dialogs.rsrc b/Lib/plat-mac/dialogs.rsrc
new file mode 100644
index 0000000..defaf43
--- /dev/null
+++ b/Lib/plat-mac/dialogs.rsrc
Binary files differ
diff --git a/Lib/plat-mac/errors.rsrc b/Lib/plat-mac/errors.rsrc
new file mode 100644
index 0000000..61c487e
--- /dev/null
+++ b/Lib/plat-mac/errors.rsrc
Binary files differ
diff --git a/Lib/plat-mac/findertools.py b/Lib/plat-mac/findertools.py
new file mode 100644
index 0000000..aeb6b93
--- /dev/null
+++ b/Lib/plat-mac/findertools.py
@@ -0,0 +1,833 @@
+"""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 macfs
+import aetypes
+from types import *
+
+__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 = macfs.FSSpec(file)
+ return finder.open(fss)
+
+def Print(file):
+ """Print a file thru the finder. Specify file by name or fsspec"""
+ finder = _getfinder()
+ fss = macfs.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(macfs.FSSpec(s))
+ else:
+ src_fss = macfs.FSSpec(src)
+ dst_fss = macfs.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(macfs.FSSpec(s))
+ else:
+ src_fss = macfs.FSSpec(src)
+ dst_fss = macfs.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 or fsspec."""
+ finder = _getfinder()
+ fss = macfs.FSSpec(file)
+ file_alias = fss.NewAlias()
+ return finder.reveal(file_alias)
+
+def select(file):
+ """select a file in the finder. Specify file by name or fsspec."""
+ finder = _getfinder()
+ fss = macfs.FSSpec(file)
+ file_alias = fss.NewAlias()
+ 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 or fsspec."""
+ finder = _getfinder()
+ fss = macfs.FSSpec(file)
+ file_alias = fss.NewAlias()
+ 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 = macfs.FSSpec(object)
+ fss = macfs.FSSpec(object)
+ object_alias = fss.NewAlias()
+ if comment == 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ p = []
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(_arg)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 = macfs.FSSpec(object)
+ fss = macfs.FSSpec(object)
+ object_alias = fss.NewAlias()
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+
+def closewindow(object):
+ """Close a Finder window for folder, Specify by path."""
+ finder = _getfinder()
+ fss = macfs.FSSpec(object)
+ object_alias = fss.NewAlias()
+ 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 args.has_key('errn'):
+ 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."""
+ fss = macfs.FSSpec(object)
+ object_alias = fss.NewAlias()
+ if not pos:
+ return _getlocation(object_alias)
+ return _setlocation(object_alias, pos)
+
+def _setlocation(object_alias, (x, y)):
+ """_setlocation: Set 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
+ args["data"] = [x, y]
+ _reply, args, attrs = finder.send("core", "setd", args, attrs)
+ if args.has_key('errn'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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."""
+ fss = macfs.FSSpec(object)
+ object_alias = fss.NewAlias()
+ if index == 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ 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
+ """
+ fss = macfs.FSSpec(folder)
+ folder_alias = fss.NewAlias()
+ if view == 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ views = {'iimg':0, 'pnam':1, 'lgbu':2}
+ if args.has_key('----'):
+ 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.
+ """
+ fss = macfs.FSSpec(folder)
+ folder_alias = fss.NewAlias()
+ openwindow(fss)
+ if not size:
+ return _getwindowsize(folder_alias)
+ return _setwindowsize(folder_alias, size)
+
+def _setwindowsize(folder_alias, (w, h)):
+ """Set the size of a Finder window for folder to (w, h)"""
+ 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 args.has_key('errn'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ return args['----']
+
+def windowposition(folder, pos=None):
+ """Set the position of a Finder window for folder to pos=(w, h)."""
+ fss = macfs.FSSpec(folder)
+ folder_alias = fss.NewAlias()
+ openwindow(fss)
+ if not pos:
+ return _getwindowposition(folder_alias)
+ if type(pos) == InstanceType:
+ # pos might be a QDPoint object as returned by _getwindowposition
+ pos = (pos.h, pos.v)
+ return _setwindowposition(folder_alias, pos)
+
+def _setwindowposition(folder_alias, (x, y)):
+ """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
+ args["data"] = [x, y]
+ _reply, args, attrs = finder.send('core', 'setd', args, attrs)
+ if args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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."""
+ fss = macfs.FSSpec(object)
+ object_alias = fss.NewAlias()
+ if icondata == 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ 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 args.has_key('errn'):
+ raise Error, aetools.decodeerror(args)
+ if args.has_key('----'):
+ if args['----'] == 1:
+ status = 0
+ return status
+
+def movetotrash(path):
+ """move the object to the trash"""
+ fss = macfs.FSSpec(path)
+ trashfolder = macfs.FSSpec(macfs.FindFolder(fss.as_tuple()[0], 'trsh', 0) + ("",)).as_pathname()
+ 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 args.has_key('errn'):
+ raise aetools.Error, aetools.decodeerror(args)
+
+
+def _test():
+ print 'Original findertools functionality test...'
+ print 'Testing launch...'
+ fss, ok = macfs.PromptGetFile('File to launch:')
+ if ok:
+ result = launch(fss)
+ if result:
+ print 'Result: ', result
+ print 'Press return-',
+ sys.stdin.readline()
+ print 'Testing print...'
+ fss, ok = macfs.PromptGetFile('File to print:')
+ if ok:
+ result = Print(fss)
+ if result:
+ print 'Result: ', result
+ print 'Press return-',
+ sys.stdin.readline()
+ print 'Testing copy...'
+ fss, ok = macfs.PromptGetFile('File to copy:')
+ if ok:
+ dfss, ok = macfs.GetDirectory()
+ if ok:
+ result = copy(fss, dfss)
+ if result:
+ print 'Result:', result
+ print 'Press return-',
+ sys.stdin.readline()
+ print 'Testing move...'
+ fss, ok = macfs.PromptGetFile('File to move:')
+ if ok:
+ dfss, ok = macfs.GetDirectory()
+ if ok:
+ result = move(fss, dfss)
+ if result:
+ print 'Result:', result
+ print 'Press return-',
+ sys.stdin.readline()
+ import EasyDialogs
+ print 'Testing sleep...'
+ if EasyDialogs.AskYesNoCancel('Sleep?') > 0:
+ result = sleep()
+ if result:
+ print 'Result:', result
+ print 'Press return-',
+ sys.stdin.readline()
+ print 'Testing shutdown...'
+ if EasyDialogs.AskYesNoCancel('Shut down?') > 0:
+ result = shutdown()
+ if result:
+ print 'Result:', result
+ print 'Press return-',
+ sys.stdin.readline()
+ print 'Testing restart...'
+ if EasyDialogs.AskYesNoCancel('Restart?') > 0:
+ result = restart()
+ if result:
+ print 'Result:', result
+ print 'Press return-',
+ 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 = macfs.FSSpec("@findertoolstest").as_pathname()
+ 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/ic.py b/Lib/plat-mac/ic.py
new file mode 100644
index 0000000..3c0272c
--- /dev/null
+++ b/Lib/plat-mac/ic.py
@@ -0,0 +1,268 @@
+"""IC wrapper module, based on Internet Config 1.3"""
+
+import icglue
+import string
+import sys
+from Carbon import Res
+import macfs
+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(%s)"%`self.data`
+
+_ICOpaqueDataType=type(ICOpaqueData(''))
+
+def _decode_default(data, key):
+ if len(data) == 0:
+ return data
+ if ord(data[0]) == len(data)-1:
+ # Assume Pstring
+ return data[1:]
+ return ICOpaqueData(data)
+
+
+def _decode_multistr(data, key):
+ numstr = ord(data[0]) << 8 | ord(data[1])
+ rv = []
+ ptr = 2
+ for i in range(numstr):
+ strlen = ord(data[ptr])
+ str = data[ptr+1:ptr+strlen+1]
+ rv.append(str)
+ ptr = ptr + strlen + 1
+ return rv
+
+def _decode_fontrecord(data, key):
+ size = ord(data[0]) << 8 | ord(data[1])
+ face = ord(data[2])
+ namelen = ord(data[4])
+ return size, face, data[5:5+namelen]
+
+def _decode_boolean(data, key):
+ return ord(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 = ord(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:', `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[:string.index(key, '\245')+1]
+ else:
+ key2 = key
+ if _decoder_table.has_key(key2):
+ 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[:string.index(key, '\245')+1]
+ else:
+ key2 = key
+ if _decoder_table.has_key(key2):
+ 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 has_key(self, key):
+ return self.__contains__(key)
+
+ 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=""):
+ self.ic.ICLaunchURL(hint, url, 0, len(url))
+
+ def parseurl(self, data, start=None, end=None, hint=""):
+ if start == None:
+ selStart = 0
+ selEnd = len(data)
+ else:
+ selStart = selEnd = start
+ if end != 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):
+ if type(file) == type(''):
+ fss = macfs.FSSpec(file)
+ else:
+ fss = file
+ name = fss.as_tuple()[2]
+ record = self.mapfile(name)
+ fss.SetCreatorType(record[2], record[1])
+ macostools.touched(fss)
+
+# Convenience routines
+_dft_ic = None
+
+def launchurl(url, hint=""):
+ global _dft_ic
+ if _dft_ic == None: _dft_ic = IC()
+ return _dft_ic.launchurl(url, hint)
+
+def parseurl(data, start=None, end=None, hint=""):
+ global _dft_ic
+ if _dft_ic == None: _dft_ic = IC()
+ return _dft_ic.parseurl(data, start, end, hint)
+
+def mapfile(filename):
+ global _dft_ic
+ if _dft_ic == None: _dft_ic = IC()
+ return _dft_ic.mapfile(filename)
+
+def maptypecreator(type, creator, filename=""):
+ global _dft_ic
+ if _dft_ic == None: _dft_ic = IC()
+ return _dft_ic.maptypecreator(type, creator, filename)
+
+def settypecreator(file):
+ global _dft_ic
+ if _dft_ic == 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
new file mode 100644
index 0000000..d819159
--- /dev/null
+++ b/Lib/plat-mac/icopen.py
@@ -0,0 +1,66 @@
+"""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 __builtin__
+
+_builtin_open = globals().get('_builtin_open', __builtin__.open)
+
+def _open_with_typer(*args):
+ file = apply(_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
+
+__builtin__.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')
+""" \ No newline at end of file
diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py
new file mode 100644
index 0000000..7bc5b19
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/CodeWarrior_suite.py
@@ -0,0 +1,682 @@
+"""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['----']
+
+ _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 _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def 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 != 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['----']
+
+ 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 != 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 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 != 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_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 != 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['----']
+
+
+class build_progress_document(aetools.ComponentItem):
+ """build progress document - a build progress document """
+ want = 'PRGS'
+class inherits(aetools.NProperty):
+ """inherits - all properties and elements of the given class are inherited by this class. """
+ which = 'c@#^'
+ want = 'docu'
+
+build_progress_documents = build_progress_document
+
+class catalog_document(aetools.ComponentItem):
+ """catalog document - a browser catalog document """
+ want = 'CTLG'
+
+catalog_documents = catalog_document
+
+class class_browser(aetools.ComponentItem):
+ """class browser - a class browser """
+ want = 'BROW'
+
+class_browsers = class_browser
+
+class class_hierarchy(aetools.ComponentItem):
+ """class hierarchy - a class hierarchy document """
+ want = 'HIER'
+
+class_hierarchies = class_hierarchy
+
+class editor_document(aetools.ComponentItem):
+ """editor document - an editor document """
+ want = 'EDIT'
+
+editor_documents = editor_document
+
+class file_compare_document(aetools.ComponentItem):
+ """file compare document - a file compare document """
+ want = 'COMP'
+
+file_compare_documents = file_compare_document
+
+class message_document(aetools.ComponentItem):
+ """message document - a message document """
+ want = 'MSSG'
+
+message_documents = message_document
+
+class project_document(aetools.ComponentItem):
+ """project document - a project document """
+ want = 'PRJD'
+class 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 project_inspector(aetools.ComponentItem):
+ """project inspector - the project inspector """
+ want = 'INSP'
+
+project_inspectors = project_inspector
+
+class single_class_browser(aetools.ComponentItem):
+ """single class browser - a single class browser """
+ want = '1BRW'
+
+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 subtarget(aetools.ComponentItem):
+ """subtarget - a target that is prerequisite for another target """
+ want = 'SBTG'
+class target(aetools.NProperty):
+ """target - the target that is dependent on this subtarget """
+ which = 'TrgT'
+ want = 'TRGT'
+class link_against_output(aetools.NProperty):
+ """link against output - is the output of this subtarget linked into its dependent target? """
+ which = 'LNKO'
+ want = 'bool'
+
+subtargets = subtarget
+
+class symbol_browser(aetools.ComponentItem):
+ """symbol browser - a symbol browser """
+ want = 'SYMB'
+
+symbol_browsers = symbol_browser
+
+class target(aetools.ComponentItem):
+ """target - a target in a project """
+ want = 'TRGT'
+class name(aetools.NProperty):
+ """name - """
+ which = 'pnam'
+ want = 'itxt'
+class project_document(aetools.NProperty):
+ """project document - the project document that contains this target """
+ which = 'PrjD'
+ want = 'PRJD'
+# element 'SRCF' as ['indx', 'test', 'rang']
+# element 'SBTG' as ['indx', 'test', 'rang']
+
+targets = target
+
+class target_file(aetools.ComponentItem):
+ """target file - a source or header file in a target """
+ want = 'SRCF'
+class id(aetools.NProperty):
+ """id - the unique ID number of the target file """
+ which = 'ID '
+ want = 'long'
+class type(aetools.NProperty):
+ """type - the type of source file """
+ which = 'FTYP'
+ want = 'FTYP'
+class location(aetools.NProperty):
+ """location - the location of the target file on disk """
+ which = 'FILE'
+ want = 'fss '
+class path(aetools.NProperty):
+ """path - the path of the source file on disk """
+ which = 'Path'
+ want = 'itxt'
+class linked(aetools.NProperty):
+ """linked - is the source file in the link order of its target? """
+ which = 'LINK'
+ want = 'bool'
+class 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 modified_date(aetools.NProperty):
+ """modified date - the date and time this source file was last modified """
+ which = 'MODD'
+ want = 'ldt '
+class compiled_date(aetools.NProperty):
+ """compiled date - the date and this source file was last compiled """
+ which = 'CMPD'
+ want = 'ldt '
+class code_size(aetools.NProperty):
+ """code size - the size of the code (in bytes) produced by compiling this source file """
+ which = 'CSZE'
+ want = 'long'
+class data_size(aetools.NProperty):
+ """data size - the size of the date (in bytes) produced by compiling this source file """
+ which = 'DSZE'
+ want = 'long'
+class debug(aetools.NProperty):
+ """debug - is debugging information generated for this source file? """
+ which = 'DBUG'
+ want = 'bool'
+class weak_link(aetools.NProperty):
+ """weak link - is this shared library linked weakly? """
+ which = 'WEAK'
+ want = 'bool'
+class init_before(aetools.NProperty):
+ """init before - is the \xd4initialize before\xd5 flag set for this shared library? """
+ which = 'INIT'
+ want = 'bool'
+class merge_output(aetools.NProperty):
+ """merge output - is this shared library merged into another code fragment? """
+ which = 'MRGE'
+ want = 'bool'
+class prerequisites(aetools.NProperty):
+ """prerequisites - the source files needed to build this source file """
+ which = 'PRER'
+ want = 'list'
+class dependents(aetools.NProperty):
+ """dependents - the source files that need this source file in order to build """
+ which = 'DPND'
+ want = 'list'
+
+target_files = target_file
+
+class text_document(aetools.ComponentItem):
+ """text document - a document that contains text """
+ want = 'TXTD'
+class modified(aetools.NProperty):
+ """modified - Has the document been modified since the last save? """
+ which = 'imod'
+ want = 'bool'
+class 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
+
+class ToolServer_worksheet(aetools.ComponentItem):
+ """ToolServer worksheet - a ToolServer worksheet """
+ want = 'TOOL'
+
+ToolServer_worksheets = ToolServer_worksheet
+import Standard_Suite
+build_progress_document._superclassnames = ['document']
+build_progress_document._privpropdict = {
+ 'inherits' : inherits,
+}
+build_progress_document._privelemdict = {
+}
+catalog_document._superclassnames = ['text_document']
+catalog_document._privpropdict = {
+ 'inherits' : inherits,
+}
+catalog_document._privelemdict = {
+}
+class_browser._superclassnames = ['text_document']
+class_browser._privpropdict = {
+ 'inherits' : inherits,
+}
+class_browser._privelemdict = {
+}
+class_hierarchy._superclassnames = ['document']
+class_hierarchy._privpropdict = {
+ 'inherits' : inherits,
+}
+class_hierarchy._privelemdict = {
+}
+editor_document._superclassnames = ['text_document']
+editor_document._privpropdict = {
+ 'inherits' : inherits,
+}
+editor_document._privelemdict = {
+}
+file_compare_document._superclassnames = ['text_document']
+file_compare_document._privpropdict = {
+ 'inherits' : inherits,
+}
+file_compare_document._privelemdict = {
+}
+message_document._superclassnames = ['text_document']
+message_document._privpropdict = {
+ 'inherits' : inherits,
+}
+message_document._privelemdict = {
+}
+project_document._superclassnames = ['document']
+project_document._privpropdict = {
+ 'inherits' : inherits,
+ 'current_target' : current_target,
+}
+project_document._privelemdict = {
+ 'target' : target,
+}
+project_inspector._superclassnames = ['document']
+project_inspector._privpropdict = {
+ 'inherits' : inherits,
+}
+project_inspector._privelemdict = {
+}
+single_class_browser._superclassnames = ['text_document']
+single_class_browser._privpropdict = {
+ 'inherits' : inherits,
+}
+single_class_browser._privelemdict = {
+}
+single_class_hierarchy._superclassnames = ['document']
+single_class_hierarchy._privpropdict = {
+ 'inherits' : inherits,
+}
+single_class_hierarchy._privelemdict = {
+}
+subtarget._superclassnames = ['target']
+subtarget._privpropdict = {
+ 'inherits' : inherits,
+ 'target' : target,
+ 'link_against_output' : link_against_output,
+}
+subtarget._privelemdict = {
+}
+symbol_browser._superclassnames = ['text_document']
+symbol_browser._privpropdict = {
+ 'inherits' : inherits,
+}
+symbol_browser._privelemdict = {
+}
+target._superclassnames = []
+target._privpropdict = {
+ 'name' : name,
+ 'project_document' : project_document,
+}
+target._privelemdict = {
+ 'target_file' : target_file,
+ 'subtarget' : subtarget,
+}
+target_file._superclassnames = []
+target_file._privpropdict = {
+ 'id' : id,
+ 'type' : type,
+ 'location' : location,
+ 'path' : path,
+ 'linked' : linked,
+ 'link_index' : link_index,
+ 'modified_date' : modified_date,
+ 'compiled_date' : compiled_date,
+ 'code_size' : code_size,
+ 'data_size' : data_size,
+ 'debug' : debug,
+ 'weak_link' : weak_link,
+ 'init_before' : init_before,
+ 'merge_output' : merge_output,
+ 'prerequisites' : prerequisites,
+ 'dependents' : dependents,
+}
+target_file._privelemdict = {
+}
+text_document._superclassnames = ['document']
+text_document._privpropdict = {
+ 'inherits' : inherits,
+ 'modified' : modified,
+ 'selection' : selection,
+}
+text_document._privelemdict = {
+ 'character' : Standard_Suite.character,
+ 'insertion_point' : Standard_Suite.insertion_point,
+ 'line' : Standard_Suite.line,
+ 'text' : Standard_Suite.text,
+}
+ToolServer_worksheet._superclassnames = ['text_document']
+ToolServer_worksheet._privpropdict = {
+ 'inherits' : inherits,
+}
+ToolServer_worksheet._privelemdict = {
+}
+_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_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_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,
+ '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,
+}
+
+_propdeclarations = {
+ 'CURT' : current_target,
+ 'PrjD' : project_document,
+ 'MRGE' : merge_output,
+ 'WEAK' : weak_link,
+ 'DPND' : dependents,
+ 'c@#^' : inherits,
+ 'ID ' : id,
+ 'CMPD' : compiled_date,
+ 'LIDX' : link_index,
+ 'FILE' : location,
+ 'Path' : path,
+ 'LNKO' : link_against_output,
+ 'imod' : modified,
+ 'sele' : selection,
+ 'DSZE' : data_size,
+ 'INIT' : init_before,
+ 'MODD' : modified_date,
+ 'FTYP' : type,
+ 'TrgT' : target,
+ 'pnam' : name,
+ 'LINK' : linked,
+ 'CSZE' : code_size,
+ 'DBUG' : debug,
+ 'PRER' : prerequisites,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+ 'Inte' : _Enum_Inte,
+ 'DKND' : _Enum_DKND,
+ 'FTYP' : _Enum_FTYP,
+ '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
new file mode 100644
index 0000000..b8a60e2
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Metrowerks_Shell_Suite.py
@@ -0,0 +1,2373 @@
+"""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 != 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 != 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 _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ _argmap_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 != 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 != 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 _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ _argmap_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 != 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 != 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 _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def 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 _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ _argmap_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 _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def Open_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['----']
+
+ 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 != 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['----']
+
+
+class Access_Paths(aetools.ComponentItem):
+ """Access Paths - Contains the definitions of a project\xd5s access (search) paths. """
+ want = 'PATH'
+class User_Paths(aetools.NProperty):
+ """User Paths - To add an access path for the source files. """
+ which = 'PA01'
+ want = 'PInf'
+class System_Paths(aetools.NProperty):
+ """System Paths - To add an access path for the include files. (Not supported in Pascal) """
+ which = 'PA03'
+ want = 'PInf'
+class 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 Convert_Paths(aetools.NProperty):
+ """Convert Paths - Enables conversion of DOS & Unix-style relative paths when searching for files. """
+ which = 'PA04'
+ want = 'bool'
+class 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 Browser_Coloring(aetools.ComponentItem):
+ """Browser Coloring - Colors for Browser symbols. """
+ want = 'BRKW'
+class Browser_Keywords(aetools.NProperty):
+ """Browser Keywords - Mark Browser symbols with color. """
+ which = 'BW00'
+ want = 'bool'
+class Classes_Color(aetools.NProperty):
+ """Classes Color - The color for classes. """
+ which = 'BW01'
+ want = 'cRGB'
+class Constants_Color(aetools.NProperty):
+ """Constants Color - The color for constants. """
+ which = 'BW02'
+ want = 'cRGB'
+class Enums_Color(aetools.NProperty):
+ """Enums Color - The color for enums. """
+ which = 'BW03'
+ want = 'cRGB'
+class Functions_Color(aetools.NProperty):
+ """Functions Color - Set color for functions. """
+ which = 'BW04'
+ want = 'cRGB'
+class Globals_Color(aetools.NProperty):
+ """Globals Color - The color for globals """
+ which = 'BW05'
+ want = 'cRGB'
+class Macros_Color(aetools.NProperty):
+ """Macros Color - The color for macros. """
+ which = 'BW06'
+ want = 'cRGB'
+class Templates_Color(aetools.NProperty):
+ """Templates Color - Set color for templates. """
+ which = 'BW07'
+ want = 'cRGB'
+class Typedefs_Color(aetools.NProperty):
+ """Typedefs Color - The color for typedefs. """
+ which = 'BW08'
+ want = 'cRGB'
+class Template_Commands_in_Menu(aetools.NProperty):
+ """Template Commands in Menu - Include template commands in context menus """
+ which = 'BW10'
+ want = 'bool'
+
+class Build_Extras(aetools.ComponentItem):
+ """Build Extras - """
+ want = 'LXTR'
+class Browser_Active(aetools.NProperty):
+ """Browser Active - Allow the collection of browser information. """
+ which = 'EX09'
+ want = 'bool'
+class Modification_Date_Caching(aetools.NProperty):
+ """Modification Date Caching - """
+ which = 'EX04'
+ want = 'bool'
+class Dump_Browser_Info(aetools.NProperty):
+ """Dump Browser Info - """
+ which = 'EX30'
+ want = 'bool'
+class Cache_Subproject_Data(aetools.NProperty):
+ """Cache Subproject Data - """
+ which = 'EX31'
+ want = 'bool'
+
+class Build_Settings(aetools.ComponentItem):
+ """Build Settings - Build Settings preferences. """
+ want = 'BSTG'
+class Completion_Sound(aetools.NProperty):
+ """Completion Sound - Play a sound when finished a Bring Up To Date or Make command. """
+ which = 'BX01'
+ want = 'bool'
+class 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 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 Save_Before_Building(aetools.NProperty):
+ """Save Before Building - Save open editor files before build operations """
+ which = 'BX07'
+ want = 'bool'
+class Build_Before_Running(aetools.NProperty):
+ """Build Before Running - Build the target before running. """
+ which = 'BX04'
+ want = 'BXbr'
+class Include_Cache_Size(aetools.NProperty):
+ """Include Cache Size - Include file cache size. """
+ which = 'BX05'
+ want = 'long'
+class Compiler_Thread_Stack_Size(aetools.NProperty):
+ """Compiler Thread Stack Size - Compiler Thread Stack Size """
+ which = 'BX06'
+ want = 'long'
+
+class Custom_Keywords(aetools.ComponentItem):
+ """Custom Keywords - """
+ want = 'CUKW'
+class Custom_Color_1(aetools.NProperty):
+ """Custom Color 1 - The color for the first set of custom keywords. """
+ which = 'GH05'
+ want = 'cRGB'
+class Custom_Color_2(aetools.NProperty):
+ """Custom Color 2 - The color for the second set custom keywords. """
+ which = 'GH06'
+ want = 'cRGB'
+class Custom_Color_3(aetools.NProperty):
+ """Custom Color 3 - The color for the third set of custom keywords. """
+ which = 'GH07'
+ want = 'cRGB'
+class Custom_Color_4(aetools.NProperty):
+ """Custom Color 4 - The color for the fourth set of custom keywords. """
+ which = 'GH08'
+ want = 'cRGB'
+
+class Debugger_Display(aetools.ComponentItem):
+ """Debugger Display - Debugger Display preferences """
+ want = 'DbDS'
+class Show_Variable_Types(aetools.NProperty):
+ """Show Variable Types - Show variable types by default. """
+ which = 'Db01'
+ want = 'bool'
+class Show_Locals(aetools.NProperty):
+ """Show Locals - Show locals by default """
+ which = 'Db09'
+ want = 'bool'
+class Sort_By_Method(aetools.NProperty):
+ """Sort By Method - Sort functions by method. """
+ which = 'Db02'
+ want = 'bool'
+class Use_RTTI(aetools.NProperty):
+ """Use RTTI - Enable RunTime Type Information. """
+ which = 'Db03'
+ want = 'bool'
+class Threads_in_Window(aetools.NProperty):
+ """Threads in Window - Show threads in separate windows. """
+ which = 'Db04'
+ want = 'bool'
+class Variable_Hints(aetools.NProperty):
+ """Variable Hints - Show variable hints. """
+ which = 'Db05'
+ want = 'bool'
+class Watchpoint_Hilite(aetools.NProperty):
+ """Watchpoint Hilite - Watchpoint hilite color. """
+ which = 'Db06'
+ want = 'cRGB'
+class Variable_Changed_Hilite(aetools.NProperty):
+ """Variable Changed Hilite - Variable changed hilite color. """
+ which = 'Db07'
+ want = 'cRGB'
+class 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 Show_As_Decimal(aetools.NProperty):
+ """Show As Decimal - Show variable values as decimal by default """
+ which = 'Db10'
+ want = 'bool'
+
+class Debugger_Global(aetools.ComponentItem):
+ """Debugger Global - Debugger Global preferences """
+ want = 'DbGL'
+class Cache_Edited_Files(aetools.NProperty):
+ """Cache Edited Files - Cache edit files between debug sessions """
+ which = 'Dg12'
+ want = 'bool'
+class File_Cache_Duration(aetools.NProperty):
+ """File Cache Duration - Duration to keep files in cache (in days) """
+ which = 'Dg13'
+ want = 'shor'
+class Ignore_Mod_Dates(aetools.NProperty):
+ """Ignore Mod Dates - Ignore modification dates of files. """
+ which = 'Dg01'
+ want = 'bool'
+class Open_All_Classes(aetools.NProperty):
+ """Open All Classes - Open all Java class files. """
+ which = 'Dg02'
+ want = 'bool'
+class Launch_Apps_on_Open(aetools.NProperty):
+ """Launch Apps on Open - Launch applications on the opening of sym files. """
+ which = 'Dg03'
+ want = 'bool'
+class Confirm_Kill(aetools.NProperty):
+ """Confirm Kill - Confirm the \xd4killing\xd5 of the process. """
+ which = 'Dg04'
+ want = 'bool'
+class Stop_at_Main(aetools.NProperty):
+ """Stop at Main - Stop to debug on the main() function. """
+ which = 'Dg05'
+ want = 'bool'
+class Select_Stack_Crawl(aetools.NProperty):
+ """Select Stack Crawl - Select the stack crawl. """
+ which = 'Dg06'
+ want = 'bool'
+class Dont_Step_in_Runtime(aetools.NProperty):
+ """Dont Step in Runtime - Don\xd5t step into runtime code when debugging. """
+ which = 'Dg07'
+ want = 'bool'
+class Auto_Target_Libraries(aetools.NProperty):
+ """Auto Target Libraries - Automatically target libraries when debugging """
+ which = 'Dg11'
+ want = 'bool'
+
+class Debugger_Target(aetools.ComponentItem):
+ """Debugger Target - Debugger Target preferences """
+ want = 'DbTG'
+class Log_System_Messages(aetools.NProperty):
+ """Log System Messages - Log all system messages while debugging. """
+ which = 'Dt02'
+ want = 'bool'
+class 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 Update_Data_While_Running(aetools.NProperty):
+ """Update Data While Running - Should pause to update data while running """
+ which = 'Dt08'
+ want = 'bool'
+class Data_Update_Interval(aetools.NProperty):
+ """Data Update Interval - How often to update the data while running (in seconds) """
+ which = 'Dt09'
+ want = 'long'
+class 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 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 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 Temp_Breakpoint_Type(aetools.NProperty):
+ """Temp Breakpoint Type - Type of temp breakpoint to set on program launch. """
+ which = 'Dt16'
+ want = 'TmpB'
+
+class Debugger_Windowing(aetools.ComponentItem):
+ """Debugger Windowing - """
+ want = 'DbWN'
+class Debugging_Start_Action(aetools.NProperty):
+ """Debugging Start Action - What action to take when debug session starts """
+ which = 'Dw01'
+ want = 'DbSA'
+class Do_Nothing_To_Projects(aetools.NProperty):
+ """Do Nothing To Projects - Suppress debugging start action for project windows """
+ which = 'Dw02'
+ want = 'bool'
+
+class Editor(aetools.ComponentItem):
+ """Editor - """
+ want = 'EDTR'
+class 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 Dynamic_Scroll(aetools.NProperty):
+ """Dynamic Scroll - Display a window\xd5s contents as you move the scroll box. """
+ which = 'ED02'
+ want = 'bool'
+class Balance(aetools.NProperty):
+ """Balance - Flash the matching opening bracket when you type a closing bracket. """
+ which = 'ED03'
+ want = 'bool'
+class Use_Drag__26__Drop_Editing(aetools.NProperty):
+ """Use Drag & Drop Editing - Use Drag & Drop text editing. """
+ which = 'ED04'
+ want = 'bool'
+class Sort_Function_Popup(aetools.NProperty):
+ """Sort Function Popup - """
+ which = 'ED06'
+ want = 'bool'
+class Use_Multiple_Undo(aetools.NProperty):
+ """Use Multiple Undo - """
+ which = 'ED07'
+ want = 'bool'
+class Relaxed_C_Popup_Parsing(aetools.NProperty):
+ """Relaxed C Popup Parsing - Relax the function parser for C source files """
+ which = 'ED15'
+ want = 'bool'
+class Left_Margin_Line_Select(aetools.NProperty):
+ """Left Margin Line Select - Clicking in the left margin selects lines """
+ which = 'ED16'
+ want = 'bool'
+class 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 Remember_Font(aetools.NProperty):
+ """Remember Font - Display a source file with its own font settings. """
+ which = 'ED08'
+ want = 'bool'
+class Remember_Selection(aetools.NProperty):
+ """Remember Selection - Restore the previous selection in a file when you open it. """
+ which = 'ED09'
+ want = 'bool'
+class 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 Main_Text_Color(aetools.NProperty):
+ """Main Text Color - Main, default, color for text. """
+ which = 'ED12'
+ want = 'cRGB'
+class Background_Color(aetools.NProperty):
+ """Background Color - Color of the background of editor windows. """
+ which = 'ED13'
+ want = 'cRGB'
+class 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 Environment_Variable(aetools.ComponentItem):
+ """Environment Variable - Environment variable for host OS """
+ want = 'EnvV'
+class name(aetools.NProperty):
+ """name - """
+ which = 'pnam'
+ want = 'TEXT'
+class 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 messageKind(aetools.NProperty):
+ """messageKind - The type of error or warning. """
+ which = 'ErrT'
+ want = 'ErrT'
+class message(aetools.NProperty):
+ """message - The error or warning message. """
+ which = 'ErrS'
+ want = 'TEXT'
+class 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 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 Extras(aetools.ComponentItem):
+ """Extras - """
+ want = 'GXTR'
+class Automatic_Toolbar_Help(aetools.NProperty):
+ """Automatic Toolbar Help - Automatically show balloon help in toolbar after delay """
+ which = 'EX19'
+ want = 'bool'
+class External_Reference(aetools.NProperty):
+ """External Reference - Which on-line function reference to use. """
+ which = 'EX08'
+ want = 'RefP'
+class Full_Screen_Zoom(aetools.NProperty):
+ """Full Screen Zoom - Zoom windows to the full screen width. """
+ which = 'EX07'
+ want = 'bool'
+class 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 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 Use_Editor_Extensions(aetools.NProperty):
+ """Use Editor Extensions - Controls the use of the Editor Extensions menu """
+ which = 'EX10'
+ want = 'bool'
+class 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 Use_Script_Menu(aetools.NProperty):
+ """Use Script Menu - Controls the use of the AppleScript menu """
+ which = 'EX12'
+ want = 'bool'
+class Use_ToolServer_Menu(aetools.NProperty):
+ """Use ToolServer Menu - Controls the use of the ToolServer menu """
+ which = 'EX18'
+ want = 'bool'
+
+class File_Mapping(aetools.ComponentItem):
+ """File Mapping - """
+ want = 'FMap'
+class File_Type(aetools.NProperty):
+ """File Type - """
+ which = 'PR04'
+ want = 'TEXT'
+class Extension(aetools.NProperty):
+ """Extension - """
+ which = 'TA02'
+ want = 'TEXT'
+class Precompiled(aetools.NProperty):
+ """Precompiled - """
+ which = 'TA03'
+ want = 'bool'
+class Resource_File(aetools.NProperty):
+ """Resource File - """
+ which = 'TA04'
+ want = 'bool'
+class Launchable(aetools.NProperty):
+ """Launchable - """
+ which = 'TA05'
+ want = 'bool'
+class Ignored_by_Make(aetools.NProperty):
+ """Ignored by Make - """
+ which = 'TA06'
+ want = 'bool'
+class Compiler(aetools.NProperty):
+ """Compiler - """
+ which = 'TA07'
+ want = 'TEXT'
+
+class File_Mappings(aetools.ComponentItem):
+ """File Mappings - Mappings of extensions & file types to compilers """
+ want = 'FLMP'
+class Mappings(aetools.NProperty):
+ """Mappings - """
+ which = 'FMps'
+ want = 'FMap'
+
+class Font(aetools.ComponentItem):
+ """Font - """
+ want = 'mFNT'
+class Auto_Indent(aetools.NProperty):
+ """Auto Indent - Indent new lines automatically. """
+ which = 'FN01'
+ want = 'bool'
+class Tab_Size(aetools.NProperty):
+ """Tab Size - """
+ which = 'FN02'
+ want = 'shor'
+class Tab_Indents_Selection(aetools.NProperty):
+ """Tab Indents Selection - Tab indents selection when multiple lines are selected """
+ which = 'FN03'
+ want = 'bool'
+class Tab_Inserts_Spaces(aetools.NProperty):
+ """Tab Inserts Spaces - Insert spaces instead of tab character """
+ which = 'FN04'
+ want = 'bool'
+class Text_Font(aetools.NProperty):
+ """Text Font - The font used in editing windows. """
+ which = 'ptxf'
+ want = 'TEXT'
+class Text_Size(aetools.NProperty):
+ """Text Size - The size of the text in an editing window. """
+ which = 'ptps'
+ want = 'shor'
+
+class Function_Information(aetools.ComponentItem):
+ """Function Information - Describes the location of any function or global data definition within the current project. """
+ want = 'FDef'
+
+class Global_Source_Trees(aetools.ComponentItem):
+ """Global Source Trees - Globally-defined source tree roots """
+ want = 'GSTs'
+class Source_Trees(aetools.NProperty):
+ """Source Trees - List of source tree roots """
+ which = 'ST01'
+ want = 'SrcT'
+
+class Path_Information(aetools.ComponentItem):
+ """Path Information - Contains all of the parameters that describe an access path. """
+ want = 'PInf'
+class format(aetools.NProperty):
+ """format - Format of the a """
+ which = 'Frmt'
+ want = 'PthF'
+class origin(aetools.NProperty):
+ """origin - """
+ which = 'Orig'
+ want = 'PPrm'
+class 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 recursive(aetools.NProperty):
+ """recursive - Will the path be searched recursively? (Default is true) """
+ which = 'Recu'
+ want = 'bool'
+class framework(aetools.NProperty):
+ """framework - Is the path a Mac OS X framework style path? (This flag is readable but not writeable from AppleScript.) """
+ which = 'Frmw'
+ want = 'bool'
+class 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 Plugin_Settings(aetools.ComponentItem):
+ """Plugin Settings - Settings for plugin tools """
+ want = 'PSTG'
+class 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 Disable_Third_Party_COM_Plugins(aetools.NProperty):
+ """Disable Third Party COM Plugins - Disable COM plugins from third parties """
+ which = 'PX02'
+ want = 'bool'
+
+class ProjectFile(aetools.ComponentItem):
+ """ProjectFile - A file contained in a project """
+ want = 'SrcF'
+class filetype(aetools.NProperty):
+ """filetype - What kind of file is this ? """
+ which = 'SrcT'
+ want = 'SrcT'
+class codesize(aetools.NProperty):
+ """codesize - The size of this file\xd5s code. """
+ which = 'CSiz'
+ want = 'long'
+class datasize(aetools.NProperty):
+ """datasize - The size of this file\xd5s data. """
+ which = 'DSiz'
+ want = 'long'
+class up_to_date(aetools.NProperty):
+ """up to date - Has the file been compiled since its last modification ? """
+ which = 'UpTD'
+ want = 'bool'
+class symbols(aetools.NProperty):
+ """symbols - Are debugging symbols generated for this file ? """
+ which = 'SymG'
+ want = 'bool'
+class weak_link(aetools.NProperty):
+ """weak link - Is this file imported weakly into the project ? [PowerPC only] """
+ which = 'Weak'
+ want = 'bool'
+class initialize_before(aetools.NProperty):
+ """initialize before - Initialize the shared library before the main application. """
+ which = 'Bfor'
+ want = 'bool'
+class includes(aetools.NProperty):
+ """includes - """
+ which = 'IncF'
+ want = 'fss '
+
+class Relative_Path(aetools.ComponentItem):
+ """Relative Path - Relative path from some root """
+ want = 'RlPt'
+
+class Runtime_Settings(aetools.ComponentItem):
+ """Runtime Settings - Runtime settings """
+ want = 'RSTG'
+class Host_Application(aetools.NProperty):
+ """Host Application - Host application for running/debugging libraries and code resources """
+ which = 'RS01'
+ want = 'RlPt'
+class Command_Line_Arguments(aetools.NProperty):
+ """Command Line Arguments - Extra command line args to pass to executable """
+ which = 'RS02'
+ want = 'TEXT'
+class Working_Directory(aetools.NProperty):
+ """Working Directory - Working directory to use when running the executable """
+ which = 'RS03'
+ want = 'TEXT'
+class Environment_Variables(aetools.NProperty):
+ """Environment Variables - Environment variables to use when running the executable """
+ which = 'RS04'
+ want = 'EnvV'
+
+class Segment(aetools.ComponentItem):
+ """Segment - A segment or group in the project """
+ want = 'Seg '
+class filecount(aetools.NProperty):
+ """filecount - """
+ which = 'NumF'
+ want = 'shor'
+class seg_2d_preloaded(aetools.NProperty):
+ """seg-preloaded - Is the segment preloaded ? [68K only] """
+ which = 'Prel'
+ want = 'bool'
+class seg_2d_protected(aetools.NProperty):
+ """seg-protected - Is the segment protected ? [68K only] """
+ which = 'Prot'
+ want = 'bool'
+class seg_2d_locked(aetools.NProperty):
+ """seg-locked - Is the segment locked ? [68K only] """
+ which = 'PLck'
+ want = 'bool'
+class seg_2d_purgeable(aetools.NProperty):
+ """seg-purgeable - Is the segment purgeable ? [68K only] """
+ which = 'Purg'
+ want = 'bool'
+class seg_2d_system_heap(aetools.NProperty):
+ """seg-system heap - Is the segment loaded into the system heap ? [68K only] """
+ which = 'SysH'
+ want = 'bool'
+
+class Shielded_Folder(aetools.ComponentItem):
+ """Shielded Folder - """
+ want = 'SFit'
+class Expression_To_Match(aetools.NProperty):
+ """Expression To Match - Regular expression which describes folders to skip """
+ which = 'SF01'
+ want = 'TEXT'
+class Skip_Project_Operations(aetools.NProperty):
+ """Skip Project Operations - Matching folders will be skipped during project operations """
+ which = 'SF02'
+ want = 'bool'
+class 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 Shielded_Folders(aetools.ComponentItem):
+ """Shielded Folders - Folders skipped when performing project and find-and-compare operations """
+ want = 'SHFL'
+class Shielded_Items(aetools.NProperty):
+ """Shielded Items - """
+ which = 'SFis'
+ want = 'SFit'
+
+class Source_Tree(aetools.ComponentItem):
+ """Source Tree - User-defined source tree root """
+ want = 'SrcT'
+class path(aetools.NProperty):
+ """path - path for the user-defined source tree root """
+ which = 'Path'
+ want = 'TEXT'
+class path_kind(aetools.NProperty):
+ """path kind - kind of path """
+ which = 'Kind'
+ want = 'STKd'
+
+class Syntax_Coloring(aetools.ComponentItem):
+ """Syntax Coloring - """
+ want = 'SNTX'
+class Syntax_Coloring(aetools.NProperty):
+ """Syntax Coloring - Mark keywords and comments with color. """
+ which = 'GH01'
+ want = 'bool'
+class Comment_Color(aetools.NProperty):
+ """Comment Color - The color for comments. """
+ which = 'GH02'
+ want = 'cRGB'
+class Keyword_Color(aetools.NProperty):
+ """Keyword Color - The color for language keywords. """
+ which = 'GH03'
+ want = 'cRGB'
+class String_Color(aetools.NProperty):
+ """String Color - The color for strings. """
+ which = 'GH04'
+ want = 'cRGB'
+
+class Target_Settings(aetools.ComponentItem):
+ """Target Settings - Contains the definitions of a project\xd5s target. """
+ want = 'TARG'
+class Linker(aetools.NProperty):
+ """Linker - The name of the current linker. """
+ which = 'TA01'
+ want = 'TEXT'
+class Pre_Linker(aetools.NProperty):
+ """Pre Linker - """
+ which = 'TA13'
+ want = 'TEXT'
+class Post_Linker(aetools.NProperty):
+ """Post Linker - """
+ which = 'TA09'
+ want = 'TEXT'
+class Target_Name(aetools.NProperty):
+ """Target Name - """
+ which = 'TA10'
+ want = 'TEXT'
+class 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 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 Output_Directory_Location(aetools.NProperty):
+ """Output Directory Location - Location of output directory """
+ which = 'TA16'
+ want = 'RlPt'
+class 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 VCS_Active(aetools.NProperty):
+ """VCS Active - Use Version Control """
+ which = 'VC01'
+ want = 'bool'
+class Use_Global_Settings(aetools.NProperty):
+ """Use Global Settings - Use the global VCS settings by default """
+ which = 'VC11'
+ want = 'bool'
+class Connection_Method(aetools.NProperty):
+ """Connection Method - Name of Version Control System to use. """
+ which = 'VC02'
+ want = 'TEXT'
+class Username(aetools.NProperty):
+ """Username - The user name for the VCS. """
+ which = 'VC03'
+ want = 'TEXT'
+class Password(aetools.NProperty):
+ """Password - The password for the VCS. """
+ which = 'VC04'
+ want = 'TEXT'
+class Auto_Connect(aetools.NProperty):
+ """Auto Connect - Automatically connect to database when starting. """
+ which = 'VC05'
+ want = 'bool'
+class Store_Password(aetools.NProperty):
+ """Store Password - Store the password. """
+ which = 'VC06'
+ want = 'bool'
+class Always_Prompt(aetools.NProperty):
+ """Always Prompt - Always show login dialog """
+ which = 'VC07'
+ want = 'bool'
+class Mount_Volume(aetools.NProperty):
+ """Mount Volume - Attempt to mount the database volume if it isn't available. """
+ which = 'VC08'
+ want = 'bool'
+class Database_Path(aetools.NProperty):
+ """Database Path - Path to the VCS database. """
+ which = 'VC09'
+ want = 'RlPt'
+class Local_Path(aetools.NProperty):
+ """Local Path - Path to the local root """
+ which = 'VC10'
+ want = 'RlPt'
+
+class class_(aetools.ComponentItem):
+ """class - A class, struct, or record type in the current project. """
+ want = 'Clas'
+class language(aetools.NProperty):
+ """language - Implementation language of this class """
+ which = 'Lang'
+ want = 'Lang'
+class declaration_file(aetools.NProperty):
+ """declaration file - Source file containing the class declaration """
+ which = 'DcFl'
+ want = 'fss '
+class declaration_start_offset(aetools.NProperty):
+ """declaration start offset - Start of class declaration source code """
+ which = 'DcSt'
+ want = 'long'
+class declaration_end_offset(aetools.NProperty):
+ """declaration end offset - End of class declaration """
+ which = 'DcEn'
+ want = 'long'
+class subclasses(aetools.NProperty):
+ """subclasses - the immediate subclasses of this class """
+ which = 'SubC'
+ want = 'Clas'
+class all_subclasses(aetools.NProperty):
+ """all subclasses - the classes directly or indirectly derived from this class """
+ which = 'SubA'
+ want = 'Clas'
+# element 'BsCl' as ['indx']
+# element 'MbFn' as ['indx', 'name']
+# element 'DtMb' as ['indx', 'name']
+
+classes = class_
+
+class member_function(aetools.ComponentItem):
+ """member function - A class member function or method. """
+ want = 'MbFn'
+class access(aetools.NProperty):
+ """access - """
+ which = 'Acce'
+ want = 'Acce'
+class virtual(aetools.NProperty):
+ """virtual - """
+ which = 'Virt'
+ want = 'bool'
+class static(aetools.NProperty):
+ """static - """
+ which = 'Stat'
+ want = 'bool'
+class implementation_file(aetools.NProperty):
+ """implementation file - Source file containing the member function definition """
+ which = 'DfFl'
+ want = 'fss '
+class implementation_start_offset(aetools.NProperty):
+ """implementation start offset - start of member function definition source code """
+ which = 'DfSt'
+ want = 'long'
+class implementation_end_offset(aetools.NProperty):
+ """implementation end offset - end of member function definition """
+ which = 'DfEn'
+ want = 'long'
+
+member_functions = member_function
+
+class data_member(aetools.ComponentItem):
+ """data member - A class data member or field """
+ want = 'DtMb'
+
+data_members = data_member
+
+class base_class(aetools.ComponentItem):
+ """base class - A base class or super class of a class """
+ want = 'BsCl'
+class class_(aetools.NProperty):
+ """class - The class object corresponding to this base class """
+ which = 'Clas'
+ want = 'obj '
+
+base_classes = base_class
+
+class browser_catalog(aetools.ComponentItem):
+ """browser catalog - The browser symbol catalog for the current project """
+ want = 'Cata'
+# element 'Clas' as ['indx', 'name']
+Access_Paths._superclassnames = []
+Access_Paths._privpropdict = {
+ 'User_Paths' : User_Paths,
+ 'System_Paths' : System_Paths,
+ 'Always_Full_Search' : Always_Full_Search,
+ 'Convert_Paths' : Convert_Paths,
+ 'Require_Framework_Includes' : Require_Framework_Includes,
+}
+Access_Paths._privelemdict = {
+}
+Browser_Coloring._superclassnames = []
+Browser_Coloring._privpropdict = {
+ 'Browser_Keywords' : Browser_Keywords,
+ 'Classes_Color' : Classes_Color,
+ 'Constants_Color' : Constants_Color,
+ 'Enums_Color' : Enums_Color,
+ 'Functions_Color' : Functions_Color,
+ 'Globals_Color' : Globals_Color,
+ 'Macros_Color' : Macros_Color,
+ 'Templates_Color' : Templates_Color,
+ 'Typedefs_Color' : Typedefs_Color,
+ 'Template_Commands_in_Menu' : Template_Commands_in_Menu,
+}
+Browser_Coloring._privelemdict = {
+}
+Build_Extras._superclassnames = []
+Build_Extras._privpropdict = {
+ 'Browser_Active' : Browser_Active,
+ 'Modification_Date_Caching' : Modification_Date_Caching,
+ 'Dump_Browser_Info' : Dump_Browser_Info,
+ 'Cache_Subproject_Data' : Cache_Subproject_Data,
+}
+Build_Extras._privelemdict = {
+}
+Build_Settings._superclassnames = []
+Build_Settings._privpropdict = {
+ 'Completion_Sound' : Completion_Sound,
+ 'Success_Sound' : Success_Sound,
+ 'Failure_Sound' : Failure_Sound,
+ 'Save_Before_Building' : Save_Before_Building,
+ 'Build_Before_Running' : Build_Before_Running,
+ 'Include_Cache_Size' : Include_Cache_Size,
+ 'Compiler_Thread_Stack_Size' : Compiler_Thread_Stack_Size,
+}
+Build_Settings._privelemdict = {
+}
+Custom_Keywords._superclassnames = []
+Custom_Keywords._privpropdict = {
+ 'Custom_Color_1' : Custom_Color_1,
+ 'Custom_Color_2' : Custom_Color_2,
+ 'Custom_Color_3' : Custom_Color_3,
+ 'Custom_Color_4' : Custom_Color_4,
+}
+Custom_Keywords._privelemdict = {
+}
+Debugger_Display._superclassnames = []
+Debugger_Display._privpropdict = {
+ 'Show_Variable_Types' : Show_Variable_Types,
+ 'Show_Locals' : Show_Locals,
+ 'Sort_By_Method' : Sort_By_Method,
+ 'Use_RTTI' : Use_RTTI,
+ 'Threads_in_Window' : Threads_in_Window,
+ 'Variable_Hints' : Variable_Hints,
+ 'Watchpoint_Hilite' : Watchpoint_Hilite,
+ 'Variable_Changed_Hilite' : Variable_Changed_Hilite,
+ 'Default_Array_Size' : Default_Array_Size,
+ 'Show_As_Decimal' : Show_As_Decimal,
+}
+Debugger_Display._privelemdict = {
+}
+Debugger_Global._superclassnames = []
+Debugger_Global._privpropdict = {
+ 'Cache_Edited_Files' : Cache_Edited_Files,
+ 'File_Cache_Duration' : File_Cache_Duration,
+ 'Ignore_Mod_Dates' : Ignore_Mod_Dates,
+ 'Open_All_Classes' : Open_All_Classes,
+ 'Launch_Apps_on_Open' : Launch_Apps_on_Open,
+ 'Confirm_Kill' : Confirm_Kill,
+ 'Stop_at_Main' : Stop_at_Main,
+ 'Select_Stack_Crawl' : Select_Stack_Crawl,
+ 'Dont_Step_in_Runtime' : Dont_Step_in_Runtime,
+ 'Auto_Target_Libraries' : Auto_Target_Libraries,
+}
+Debugger_Global._privelemdict = {
+}
+Debugger_Target._superclassnames = []
+Debugger_Target._privpropdict = {
+ 'Log_System_Messages' : Log_System_Messages,
+ 'Relocated_Executable_Path' : Relocated_Executable_Path,
+ 'Update_Data_While_Running' : Update_Data_While_Running,
+ 'Data_Update_Interval' : Data_Update_Interval,
+ 'Auto_Target_Libraries' : Auto_Target_Libraries,
+ 'Stop_at_temp_breakpoint' : Stop_at_temp_breakpoint,
+ 'Temp_breakpoint_names' : Temp_breakpoint_names,
+ 'Cache_symbolics' : Cache_symbolics,
+ 'Temp_Breakpoint_Type' : Temp_Breakpoint_Type,
+}
+Debugger_Target._privelemdict = {
+}
+Debugger_Windowing._superclassnames = []
+Debugger_Windowing._privpropdict = {
+ 'Debugging_Start_Action' : Debugging_Start_Action,
+ 'Do_Nothing_To_Projects' : Do_Nothing_To_Projects,
+}
+Debugger_Windowing._privelemdict = {
+}
+Editor._superclassnames = []
+Editor._privpropdict = {
+ 'Flash_Delay' : Flash_Delay,
+ 'Dynamic_Scroll' : Dynamic_Scroll,
+ 'Balance' : Balance,
+ 'Use_Drag__26__Drop_Editing' : Use_Drag__26__Drop_Editing,
+ 'Sort_Function_Popup' : Sort_Function_Popup,
+ 'Use_Multiple_Undo' : Use_Multiple_Undo,
+ 'Relaxed_C_Popup_Parsing' : Relaxed_C_Popup_Parsing,
+ 'Left_Margin_Line_Select' : Left_Margin_Line_Select,
+ 'Default_Text_File_Format' : Default_Text_File_Format,
+ 'Remember_Font' : Remember_Font,
+ 'Remember_Selection' : Remember_Selection,
+ 'Remember_Window' : Remember_Window,
+ 'Main_Text_Color' : Main_Text_Color,
+ 'Background_Color' : Background_Color,
+ 'Context_Popup_Delay' : Context_Popup_Delay,
+}
+Editor._privelemdict = {
+}
+Environment_Variable._superclassnames = []
+Environment_Variable._privpropdict = {
+ 'name' : name,
+ 'value' : value,
+}
+Environment_Variable._privelemdict = {
+}
+Error_Information._superclassnames = []
+Error_Information._privpropdict = {
+ 'messageKind' : messageKind,
+ 'message' : message,
+ 'disk_file' : disk_file,
+ 'lineNumber' : lineNumber,
+}
+Error_Information._privelemdict = {
+}
+Extras._superclassnames = []
+Extras._privpropdict = {
+ 'Automatic_Toolbar_Help' : Automatic_Toolbar_Help,
+ 'External_Reference' : External_Reference,
+ 'Full_Screen_Zoom' : Full_Screen_Zoom,
+ 'Recent_Editor_Count' : Recent_Editor_Count,
+ 'Recent_Project_Count' : Recent_Project_Count,
+ 'Use_Editor_Extensions' : Use_Editor_Extensions,
+ 'Use_External_Editor' : Use_External_Editor,
+ 'Use_Script_Menu' : Use_Script_Menu,
+ 'Use_ToolServer_Menu' : Use_ToolServer_Menu,
+}
+Extras._privelemdict = {
+}
+File_Mapping._superclassnames = []
+File_Mapping._privpropdict = {
+ 'File_Type' : File_Type,
+ 'Extension' : Extension,
+ 'Precompiled' : Precompiled,
+ 'Resource_File' : Resource_File,
+ 'Launchable' : Launchable,
+ 'Ignored_by_Make' : Ignored_by_Make,
+ 'Compiler' : Compiler,
+}
+File_Mapping._privelemdict = {
+}
+File_Mappings._superclassnames = []
+File_Mappings._privpropdict = {
+ 'Mappings' : Mappings,
+}
+File_Mappings._privelemdict = {
+}
+Font._superclassnames = []
+Font._privpropdict = {
+ 'Auto_Indent' : Auto_Indent,
+ 'Tab_Size' : Tab_Size,
+ 'Tab_Indents_Selection' : Tab_Indents_Selection,
+ 'Tab_Inserts_Spaces' : Tab_Inserts_Spaces,
+ 'Text_Font' : Text_Font,
+ 'Text_Size' : Text_Size,
+}
+Font._privelemdict = {
+}
+Function_Information._superclassnames = []
+Function_Information._privpropdict = {
+ 'disk_file' : disk_file,
+ 'lineNumber' : lineNumber,
+}
+Function_Information._privelemdict = {
+}
+Global_Source_Trees._superclassnames = []
+Global_Source_Trees._privpropdict = {
+ 'Source_Trees' : Source_Trees,
+}
+Global_Source_Trees._privelemdict = {
+}
+Path_Information._superclassnames = []
+Path_Information._privpropdict = {
+ 'name' : name,
+ 'format' : format,
+ 'origin' : origin,
+ 'root' : root,
+ 'recursive' : recursive,
+ 'framework' : framework,
+ 'host_flags' : host_flags,
+}
+Path_Information._privelemdict = {
+}
+Plugin_Settings._superclassnames = []
+Plugin_Settings._privpropdict = {
+ 'Plugin_Diagnostics_Level' : Plugin_Diagnostics_Level,
+ 'Disable_Third_Party_COM_Plugins' : Disable_Third_Party_COM_Plugins,
+}
+Plugin_Settings._privelemdict = {
+}
+ProjectFile._superclassnames = []
+ProjectFile._privpropdict = {
+ 'filetype' : filetype,
+ 'name' : name,
+ 'disk_file' : disk_file,
+ 'codesize' : codesize,
+ 'datasize' : datasize,
+ 'up_to_date' : up_to_date,
+ 'symbols' : symbols,
+ 'weak_link' : weak_link,
+ 'initialize_before' : initialize_before,
+ 'includes' : includes,
+}
+ProjectFile._privelemdict = {
+}
+Relative_Path._superclassnames = []
+Relative_Path._privpropdict = {
+ 'name' : name,
+ 'format' : format,
+ 'origin' : origin,
+ 'root' : root,
+}
+Relative_Path._privelemdict = {
+}
+Runtime_Settings._superclassnames = []
+Runtime_Settings._privpropdict = {
+ 'Host_Application' : Host_Application,
+ 'Command_Line_Arguments' : Command_Line_Arguments,
+ 'Working_Directory' : Working_Directory,
+ 'Environment_Variables' : Environment_Variables,
+}
+Runtime_Settings._privelemdict = {
+}
+Segment._superclassnames = []
+Segment._privpropdict = {
+ 'name' : name,
+ 'filecount' : filecount,
+ 'seg_2d_preloaded' : seg_2d_preloaded,
+ 'seg_2d_protected' : seg_2d_protected,
+ 'seg_2d_locked' : seg_2d_locked,
+ 'seg_2d_purgeable' : seg_2d_purgeable,
+ 'seg_2d_system_heap' : seg_2d_system_heap,
+}
+Segment._privelemdict = {
+}
+Shielded_Folder._superclassnames = []
+Shielded_Folder._privpropdict = {
+ 'Expression_To_Match' : Expression_To_Match,
+ 'Skip_Project_Operations' : Skip_Project_Operations,
+ 'Skip_Find_And_Compare_Operations' : Skip_Find_And_Compare_Operations,
+}
+Shielded_Folder._privelemdict = {
+}
+Shielded_Folders._superclassnames = []
+Shielded_Folders._privpropdict = {
+ 'Shielded_Items' : Shielded_Items,
+}
+Shielded_Folders._privelemdict = {
+}
+Source_Tree._superclassnames = []
+Source_Tree._privpropdict = {
+ 'name' : name,
+ 'path' : path,
+ 'path_kind' : path_kind,
+ 'format' : format,
+}
+Source_Tree._privelemdict = {
+}
+Syntax_Coloring._superclassnames = []
+Syntax_Coloring._privpropdict = {
+ 'Syntax_Coloring' : Syntax_Coloring,
+ 'Comment_Color' : Comment_Color,
+ 'Keyword_Color' : Keyword_Color,
+ 'String_Color' : String_Color,
+ 'Custom_Color_1' : Custom_Color_1,
+ 'Custom_Color_2' : Custom_Color_2,
+ 'Custom_Color_3' : Custom_Color_3,
+ 'Custom_Color_4' : Custom_Color_4,
+}
+Syntax_Coloring._privelemdict = {
+}
+Target_Settings._superclassnames = []
+Target_Settings._privpropdict = {
+ 'Linker' : Linker,
+ 'Pre_Linker' : Pre_Linker,
+ 'Post_Linker' : Post_Linker,
+ 'Target_Name' : Target_Name,
+ 'Output_Directory_Path' : Output_Directory_Path,
+ 'Output_Directory_Origin' : Output_Directory_Origin,
+ 'Output_Directory_Location' : Output_Directory_Location,
+ 'Use_Relative_Paths' : Use_Relative_Paths,
+}
+Target_Settings._privelemdict = {
+}
+Target_Source_Trees._superclassnames = []
+Target_Source_Trees._privpropdict = {
+ 'Source_Trees' : Source_Trees,
+}
+Target_Source_Trees._privelemdict = {
+}
+VCS_Setup._superclassnames = []
+VCS_Setup._privpropdict = {
+ 'VCS_Active' : VCS_Active,
+ 'Use_Global_Settings' : Use_Global_Settings,
+ 'Connection_Method' : Connection_Method,
+ 'Username' : Username,
+ 'Password' : Password,
+ 'Auto_Connect' : Auto_Connect,
+ 'Store_Password' : Store_Password,
+ 'Always_Prompt' : Always_Prompt,
+ 'Mount_Volume' : Mount_Volume,
+ 'Database_Path' : Database_Path,
+ 'Local_Path' : Local_Path,
+}
+VCS_Setup._privelemdict = {
+}
+class_._superclassnames = []
+class_._privpropdict = {
+ 'name' : name,
+ 'language' : language,
+ 'declaration_file' : declaration_file,
+ 'declaration_start_offset' : declaration_start_offset,
+ 'declaration_end_offset' : declaration_end_offset,
+ 'subclasses' : subclasses,
+ 'all_subclasses' : all_subclasses,
+}
+class_._privelemdict = {
+ 'base_class' : base_class,
+ 'member_function' : member_function,
+ 'data_member' : data_member,
+}
+member_function._superclassnames = []
+member_function._privpropdict = {
+ 'name' : name,
+ 'access' : access,
+ 'virtual' : virtual,
+ 'static' : static,
+ 'declaration_file' : declaration_file,
+ 'declaration_start_offset' : declaration_start_offset,
+ 'declaration_end_offset' : declaration_end_offset,
+ 'implementation_file' : implementation_file,
+ 'implementation_start_offset' : implementation_start_offset,
+ 'implementation_end_offset' : implementation_end_offset,
+}
+member_function._privelemdict = {
+}
+data_member._superclassnames = []
+data_member._privpropdict = {
+ 'name' : name,
+ 'access' : access,
+ 'static' : static,
+ 'declaration_start_offset' : declaration_start_offset,
+ 'declaration_end_offset' : declaration_end_offset,
+}
+data_member._privelemdict = {
+}
+base_class._superclassnames = []
+base_class._privpropdict = {
+ 'class_' : class_,
+ 'access' : access,
+ 'virtual' : virtual,
+}
+base_class._privelemdict = {
+}
+browser_catalog._superclassnames = []
+browser_catalog._privpropdict = {
+}
+browser_catalog._privelemdict = {
+ 'class_' : class_,
+}
+_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
+}
+
+_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_SrcT = {
+ 'source' : 'FTxt', # A source file (.c, .cp, .p, etc).
+ 'unknown' : 'FUnk', # An unknown file type.
+}
+
+_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_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_Lang = {
+ 'C' : 'LC ', #
+ 'C_2b__2b_' : 'LC++', #
+ 'Pascal' : 'LP ', #
+ 'Object_Pascal' : 'LP++', #
+ 'Java' : 'LJav', #
+ 'Assembler' : 'LAsm', #
+ 'Unknown' : 'L? ', #
+}
+
+_Enum_Acce = {
+ 'public' : 'Publ', #
+ 'protected' : 'Prot', #
+ 'private' : 'Priv', #
+}
+
+_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_DgBL = {
+ 'Always' : 'DgB0', # Always build before debugging.
+ 'Never' : 'DgB1', # Never build before debugging.
+ 'Ask' : 'DgB2', # Ask about building before debugging.
+}
+
+_Enum_RefP = {
+ 'Think_Reference' : 'DanR', #
+ 'QuickView' : 'ALTV', #
+}
+
+_Enum_PXdg = {
+ 'Diagnose_None' : 'PXd1', # No Plugin Diagnostics.
+ 'Diagnose_Errors' : 'PXd2', # Plugin Diagnostics for errors only.
+ 'Diagnose_All' : 'PXd3', # Plugin Diagnostics for everything.
+}
+
+_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_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_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
+}
+
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'FMap' : File_Mapping,
+ 'Cata' : browser_catalog,
+ 'BSTG' : Build_Settings,
+ 'SrcF' : ProjectFile,
+ 'BRKW' : Browser_Coloring,
+ 'ErrM' : Error_Information,
+ 'VCSs' : VCS_Setup,
+ 'EDTR' : Editor,
+ 'SHFL' : Shielded_Folders,
+ 'SFit' : Shielded_Folder,
+ 'CUKW' : Custom_Keywords,
+ 'PInf' : Path_Information,
+ 'FLMP' : File_Mappings,
+ 'Seg ' : Segment,
+ 'DbTG' : Debugger_Target,
+ 'FDef' : Function_Information,
+ 'PATH' : Access_Paths,
+ 'GXTR' : Extras,
+ 'DbWN' : Debugger_Windowing,
+ 'GSTs' : Global_Source_Trees,
+ 'SNTX' : Syntax_Coloring,
+ 'BsCl' : base_class,
+ 'RlPt' : Relative_Path,
+ 'TARG' : Target_Settings,
+ 'EnvV' : Environment_Variable,
+ 'SrcT' : Source_Tree,
+ 'DbGL' : Debugger_Global,
+ 'MbFn' : member_function,
+ 'RSTG' : Runtime_Settings,
+ 'PSTG' : Plugin_Settings,
+ 'DtMb' : data_member,
+ 'LXTR' : Build_Extras,
+ 'mFNT' : Font,
+ 'TSTs' : Target_Source_Trees,
+ 'DbDS' : Debugger_Display,
+ 'Clas' : class_,
+}
+
+_propdeclarations = {
+ 'SymG' : symbols,
+ 'BX02' : Success_Sound,
+ 'BX03' : Failure_Sound,
+ 'BX01' : Completion_Sound,
+ 'BX06' : Compiler_Thread_Stack_Size,
+ 'BX07' : Save_Before_Building,
+ 'BX04' : Build_Before_Running,
+ 'BX05' : Include_Cache_Size,
+ 'NumF' : filecount,
+ 'Frmw' : framework,
+ 'Frmt' : format,
+ 'FN01' : Auto_Indent,
+ 'FN02' : Tab_Size,
+ 'FN03' : Tab_Indents_Selection,
+ 'FN04' : Tab_Inserts_Spaces,
+ 'Dg07' : Dont_Step_in_Runtime,
+ 'Dg06' : Select_Stack_Crawl,
+ 'Dg05' : Stop_at_Main,
+ 'Dg04' : Confirm_Kill,
+ 'Dg03' : Launch_Apps_on_Open,
+ 'Dg02' : Open_All_Classes,
+ 'Dg01' : Ignore_Mod_Dates,
+ 'Weak' : weak_link,
+ 'DcFl' : declaration_file,
+ 'Path' : path,
+ 'Recu' : recursive,
+ 'TA16' : Output_Directory_Location,
+ 'Db10' : Show_As_Decimal,
+ 'CSiz' : codesize,
+ 'ErrL' : lineNumber,
+ 'Dt16' : Temp_Breakpoint_Type,
+ 'ErrS' : message,
+ 'BW07' : Templates_Color,
+ 'ErrT' : messageKind,
+ 'EX18' : Use_ToolServer_Menu,
+ 'EX19' : Automatic_Toolbar_Help,
+ 'TA15' : Use_Relative_Paths,
+ 'TA12' : Output_Directory_Origin,
+ 'TA13' : Pre_Linker,
+ 'TA10' : Target_Name,
+ 'TA11' : Output_Directory_Path,
+ 'EX10' : Use_Editor_Extensions,
+ 'EX11' : Use_External_Editor,
+ 'EX12' : Use_Script_Menu,
+ 'EX16' : Recent_Editor_Count,
+ 'EX17' : Recent_Project_Count,
+ 'DfEn' : implementation_end_offset,
+ 'Acce' : access,
+ 'BW02' : Constants_Color,
+ 'Kind' : path_kind,
+ 'Db08' : Default_Array_Size,
+ 'Db09' : Show_Locals,
+ 'SrcT' : filetype,
+ 'Db02' : Sort_By_Method,
+ 'Db03' : Use_RTTI,
+ 'Db01' : Show_Variable_Types,
+ 'Db06' : Watchpoint_Hilite,
+ 'Db07' : Variable_Changed_Hilite,
+ 'Db04' : Threads_in_Window,
+ 'Db05' : Variable_Hints,
+ 'TA01' : Linker,
+ 'EX09' : Browser_Active,
+ 'EX08' : External_Reference,
+ 'TA05' : Launchable,
+ 'TA04' : Resource_File,
+ 'TA07' : Compiler,
+ 'TA06' : Ignored_by_Make,
+ 'RS01' : Host_Application,
+ 'RS03' : Working_Directory,
+ 'RS02' : Command_Line_Arguments,
+ 'EX07' : Full_Screen_Zoom,
+ 'RS04' : Environment_Variables,
+ 'EX04' : Modification_Date_Caching,
+ 'PR04' : File_Type,
+ 'DfSt' : implementation_start_offset,
+ 'pnam' : name,
+ 'GH01' : Syntax_Coloring,
+ 'GH03' : Keyword_Color,
+ 'GH02' : Comment_Color,
+ 'GH05' : Custom_Color_1,
+ 'GH04' : String_Color,
+ 'GH07' : Custom_Color_3,
+ 'GH06' : Custom_Color_2,
+ 'GH08' : Custom_Color_4,
+ 'ST01' : Source_Trees,
+ 'EX30' : Dump_Browser_Info,
+ 'EX31' : Cache_Subproject_Data,
+ 'Clas' : class_,
+ 'DSiz' : datasize,
+ 'ED14' : Context_Popup_Delay,
+ 'ED15' : Relaxed_C_Popup_Parsing,
+ 'ED16' : Left_Margin_Line_Select,
+ 'ED17' : Default_Text_File_Format,
+ 'ED10' : Remember_Window,
+ 'ED12' : Main_Text_Color,
+ 'ED13' : Background_Color,
+ 'Prot' : seg_2d_protected,
+ 'Purg' : seg_2d_purgeable,
+ 'HstF' : host_flags,
+ 'Stat' : static,
+ 'ptps' : Text_Size,
+ 'PA01' : User_Paths,
+ 'DcSt' : declaration_start_offset,
+ 'IncF' : includes,
+ 'Valu' : value,
+ 'ED07' : Use_Multiple_Undo,
+ 'ED06' : Sort_Function_Popup,
+ 'ED04' : Use_Drag__26__Drop_Editing,
+ 'ED03' : Balance,
+ 'ED02' : Dynamic_Scroll,
+ 'ED01' : Flash_Delay,
+ 'ED09' : Remember_Selection,
+ 'ED08' : Remember_Font,
+ 'SF03' : Skip_Find_And_Compare_Operations,
+ 'SF02' : Skip_Project_Operations,
+ 'SF01' : Expression_To_Match,
+ 'SubC' : subclasses,
+ 'SubA' : all_subclasses,
+ 'ptxf' : Text_Font,
+ 'Dg11' : Auto_Target_Libraries,
+ 'PX01' : Plugin_Diagnostics_Level,
+ 'PX02' : Disable_Third_Party_COM_Plugins,
+ 'Lang' : language,
+ 'BW10' : Template_Commands_in_Menu,
+ 'Dt08' : Update_Data_While_Running,
+ 'Dt09' : Data_Update_Interval,
+ 'VC04' : Password,
+ 'Dt02' : Log_System_Messages,
+ 'Orig' : origin,
+ 'Prel' : seg_2d_preloaded,
+ 'UpTD' : up_to_date,
+ 'Dw02' : Do_Nothing_To_Projects,
+ 'SFis' : Shielded_Items,
+ 'SysH' : seg_2d_system_heap,
+ 'file' : disk_file,
+ 'Bfor' : initialize_before,
+ 'VC10' : Local_Path,
+ 'VC11' : Use_Global_Settings,
+ 'PLck' : seg_2d_locked,
+ 'BW06' : Macros_Color,
+ 'BW08' : Typedefs_Color,
+ 'Dw01' : Debugging_Start_Action,
+ 'BW05' : Globals_Color,
+ 'BW04' : Functions_Color,
+ 'Dt15' : Cache_symbolics,
+ 'Dt14' : Temp_breakpoint_names,
+ 'Dt13' : Stop_at_temp_breakpoint,
+ 'BW00' : Browser_Keywords,
+ 'BW03' : Enums_Color,
+ 'Dt10' : Relocated_Executable_Path,
+ 'DfFl' : implementation_file,
+ 'BW01' : Classes_Color,
+ 'TA03' : Precompiled,
+ 'TA02' : Extension,
+ 'PA05' : Require_Framework_Includes,
+ 'PA04' : Convert_Paths,
+ 'Root' : root,
+ 'PA03' : System_Paths,
+ 'PA02' : Always_Full_Search,
+ 'VC09' : Database_Path,
+ 'VC08' : Mount_Volume,
+ 'Dg12' : Cache_Edited_Files,
+ 'Dg13' : File_Cache_Duration,
+ 'VC05' : Auto_Connect,
+ 'Virt' : virtual,
+ 'VC07' : Always_Prompt,
+ 'VC06' : Store_Password,
+ 'VC01' : VCS_Active,
+ 'VC03' : Username,
+ 'VC02' : Connection_Method,
+ 'FMps' : Mappings,
+ 'TA09' : Post_Linker,
+ 'DcEn' : declaration_end_offset,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+ 'Lang' : _Enum_Lang,
+ 'Inte' : _Enum_Inte,
+ 'STKd' : _Enum_STKd,
+ 'DgBL' : _Enum_DgBL,
+ 'Acce' : _Enum_Acce,
+ 'RefP' : _Enum_RefP,
+ 'TxtF' : _Enum_TxtF,
+ 'DbSA' : _Enum_DbSA,
+ 'TmpB' : _Enum_TmpB,
+ 'savo' : _Enum_savo,
+ 'PthF' : _Enum_PthF,
+ 'SrcT' : _Enum_SrcT,
+ 'PXdg' : _Enum_PXdg,
+ 'ErrT' : _Enum_ErrT,
+ 'BXbr' : _Enum_BXbr,
+ 'PPrm' : _Enum_PPrm,
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py
new file mode 100644
index 0000000..779c7d3
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py
@@ -0,0 +1,62 @@
+"""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
new file mode 100644
index 0000000..0213b98
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Standard_Suite.py
@@ -0,0 +1,407 @@
+"""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 != 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 user_interaction(aetools.NProperty):
+ """user interaction - user interaction level """
+ which = 'inte'
+ want = 'Inte'
+# element 'docu' as ['indx', 'name', 'rang']
+# element 'cwin' as ['indx', 'name', 'rang']
+
+class character(aetools.ComponentItem):
+ """character - a character """
+ want = 'cha '
+class 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 length(aetools.NProperty):
+ """length - length in characters of this object """
+ which = 'pLen'
+ want = 'long'
+
+class document(aetools.ComponentItem):
+ """document - a document """
+ want = 'docu'
+class name(aetools.NProperty):
+ """name - the title of the document """
+ which = 'pnam'
+ want = 'itxt'
+class kind(aetools.NProperty):
+ """kind - the kind of document """
+ which = 'DKND'
+ want = 'DKND'
+class index(aetools.NProperty):
+ """index - the number of the document """
+ which = 'pidx'
+ want = 'long'
+class location(aetools.NProperty):
+ """location - the file of the document """
+ which = 'FILE'
+ want = 'fss '
+class file_permissions(aetools.NProperty):
+ """file permissions - the file permissions for the document """
+ which = 'PERM'
+ want = 'PERM'
+class window(aetools.NProperty):
+ """window - the window of the document. """
+ which = 'cwin'
+ want = 'cwin'
+
+documents = document
+
+class file(aetools.ComponentItem):
+ """file - A file """
+ want = 'file'
+
+files = file
+
+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'
+# 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 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 bounds(aetools.NProperty):
+ """bounds - the boundary rectangle for the window """
+ which = 'pbnd'
+ want = 'qdrt'
+class document(aetools.NProperty):
+ """document - the document that owns this window """
+ which = 'docu'
+ want = 'docu'
+class position(aetools.NProperty):
+ """position - upper left coordinates of window """
+ which = 'ppos'
+ want = 'QDpt'
+class visible(aetools.NProperty):
+ """visible - is the window visible? """
+ which = 'pvis'
+ want = 'bool'
+class zoomed(aetools.NProperty):
+ """zoomed - Is the window zoomed? """
+ which = 'pzum'
+ want = 'bool'
+
+windows = window
+application._superclassnames = []
+application._privpropdict = {
+ 'user_interaction' : user_interaction,
+}
+application._privelemdict = {
+ 'document' : document,
+ 'window' : window,
+}
+character._superclassnames = []
+character._privpropdict = {
+ 'offset' : offset,
+ 'length' : length,
+}
+character._privelemdict = {
+}
+document._superclassnames = []
+document._privpropdict = {
+ 'name' : name,
+ 'kind' : kind,
+ 'index' : index,
+ 'location' : location,
+ 'file_permissions' : file_permissions,
+ 'window' : window,
+}
+document._privelemdict = {
+}
+file._superclassnames = []
+file._privpropdict = {
+}
+file._privelemdict = {
+}
+insertion_point._superclassnames = []
+insertion_point._privpropdict = {
+ 'length' : length,
+ 'offset' : offset,
+}
+insertion_point._privelemdict = {
+}
+line._superclassnames = []
+line._privpropdict = {
+ 'index' : index,
+ 'offset' : offset,
+ 'length' : length,
+}
+line._privelemdict = {
+ 'character' : character,
+}
+selection_2d_object._superclassnames = []
+selection_2d_object._privpropdict = {
+ 'contents' : contents,
+ 'length' : length,
+ 'offset' : offset,
+}
+selection_2d_object._privelemdict = {
+ 'character' : character,
+ 'line' : line,
+ 'text' : text,
+}
+text._superclassnames = []
+text._privpropdict = {
+ 'length' : length,
+ 'offset' : offset,
+}
+text._privelemdict = {
+ 'character' : character,
+ 'insertion_point' : insertion_point,
+ 'line' : line,
+ 'text' : text,
+}
+window._superclassnames = []
+window._privpropdict = {
+ 'name' : name,
+ 'index' : index,
+ 'bounds' : bounds,
+ 'document' : document,
+ 'position' : position,
+ 'visible' : visible,
+ 'zoomed' : zoomed,
+}
+window._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'cha ' : character,
+ 'ctxt' : text,
+ 'cwin' : window,
+ 'file' : file,
+ 'clin' : line,
+ 'csel' : selection_2d_object,
+ 'capp' : application,
+ 'cins' : insertion_point,
+ 'docu' : document,
+}
+
+_propdeclarations = {
+ 'inte' : user_interaction,
+ 'pvis' : visible,
+ 'DKND' : kind,
+ 'pbnd' : bounds,
+ 'PERM' : file_permissions,
+ 'docu' : document,
+ 'pidx' : index,
+ 'pOff' : offset,
+ 'cwin' : window,
+ 'FILE' : location,
+ 'pnam' : name,
+ 'pLen' : length,
+ 'ppos' : position,
+ 'pzum' : zoomed,
+ 'pcnt' : contents,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py
new file mode 100644
index 0000000..4b27d96
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py
@@ -0,0 +1,188 @@
+"""
+Package generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
+Resource aete resid 0 AppleEvent Suites
+"""
+import aetools
+Error = aetools.Error
+import Required
+import Standard_Suite
+import CodeWarrior_suite
+import Metrowerks_Shell_Suite
+
+
+_code_to_module = {
+ 'reqd' : Required,
+ 'CoRe' : Standard_Suite,
+ 'CWIE' : CodeWarrior_suite,
+ 'MMPR' : Metrowerks_Shell_Suite,
+}
+
+
+
+_code_to_fullname = {
+ 'reqd' : ('CodeWarrior.Required', 'Required'),
+ 'CoRe' : ('CodeWarrior.Standard_Suite', 'Standard_Suite'),
+ 'CWIE' : ('CodeWarrior.CodeWarrior_suite', 'CodeWarrior_suite'),
+ 'MMPR' : ('CodeWarrior.Metrowerks_Shell_Suite', 'Metrowerks_Shell_Suite'),
+}
+
+from Required import *
+from Standard_Suite import *
+from CodeWarrior_suite import *
+from Metrowerks_Shell_Suite import *
+def getbaseclasses(v):
+ if hasattr(v, '_superclassnames') and not hasattr(v, '_propdict'):
+ v._propdict = {}
+ v._elemdict = {}
+ for superclass in v._superclassnames:
+ v._propdict.update(getattr(eval(superclass), '_privpropdict', {}))
+ v._elemdict.update(getattr(eval(superclass), '_privelemdict', {}))
+ v._propdict.update(v._privpropdict)
+ v._elemdict.update(v._privelemdict)
+
+import StdSuites
+
+#
+# Set property and element dictionaries now that all classes have been defined
+#
+getbaseclasses(character)
+getbaseclasses(text)
+getbaseclasses(window)
+getbaseclasses(file)
+getbaseclasses(line)
+getbaseclasses(selection_2d_object)
+getbaseclasses(application)
+getbaseclasses(insertion_point)
+getbaseclasses(document)
+getbaseclasses(single_class_browser)
+getbaseclasses(project_document)
+getbaseclasses(symbol_browser)
+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(Browser_Coloring)
+getbaseclasses(Error_Information)
+getbaseclasses(VCS_Setup)
+getbaseclasses(Editor)
+getbaseclasses(Shielded_Folders)
+getbaseclasses(Shielded_Folder)
+getbaseclasses(Custom_Keywords)
+getbaseclasses(Path_Information)
+getbaseclasses(File_Mappings)
+getbaseclasses(Segment)
+getbaseclasses(Debugger_Target)
+getbaseclasses(Function_Information)
+getbaseclasses(Access_Paths)
+getbaseclasses(Extras)
+getbaseclasses(Debugger_Windowing)
+getbaseclasses(Global_Source_Trees)
+getbaseclasses(Syntax_Coloring)
+getbaseclasses(base_class)
+getbaseclasses(Relative_Path)
+getbaseclasses(Target_Settings)
+getbaseclasses(Environment_Variable)
+getbaseclasses(Source_Tree)
+getbaseclasses(Debugger_Global)
+getbaseclasses(member_function)
+getbaseclasses(Runtime_Settings)
+getbaseclasses(Plugin_Settings)
+getbaseclasses(data_member)
+getbaseclasses(Build_Extras)
+getbaseclasses(Font)
+getbaseclasses(Target_Source_Trees)
+getbaseclasses(Debugger_Display)
+getbaseclasses(class_)
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'cha ' : character,
+ 'ctxt' : text,
+ 'cwin' : window,
+ 'file' : file,
+ 'clin' : line,
+ 'csel' : selection_2d_object,
+ 'capp' : application,
+ 'cins' : insertion_point,
+ 'docu' : document,
+ '1BRW' : single_class_browser,
+ 'PRJD' : project_document,
+ 'SYMB' : symbol_browser,
+ 'EDIT' : editor_document,
+ 'COMP' : file_compare_document,
+ 'BROW' : class_browser,
+ 'SBTG' : subtarget,
+ 'MSSG' : message_document,
+ 'INSP' : project_inspector,
+ 'TXTD' : text_document,
+ 'CTLG' : catalog_document,
+ 'HIER' : class_hierarchy,
+ 'TRGT' : target,
+ 'PRGS' : build_progress_document,
+ 'SRCF' : target_file,
+ 'TOOL' : ToolServer_worksheet,
+ '1HIR' : single_class_hierarchy,
+ 'FMap' : File_Mapping,
+ 'Cata' : browser_catalog,
+ 'BSTG' : Build_Settings,
+ 'SrcF' : ProjectFile,
+ 'BRKW' : Browser_Coloring,
+ 'ErrM' : Error_Information,
+ 'VCSs' : VCS_Setup,
+ 'EDTR' : Editor,
+ 'SHFL' : Shielded_Folders,
+ 'SFit' : Shielded_Folder,
+ 'CUKW' : Custom_Keywords,
+ 'PInf' : Path_Information,
+ 'FLMP' : File_Mappings,
+ 'Seg ' : Segment,
+ 'DbTG' : Debugger_Target,
+ 'FDef' : Function_Information,
+ 'PATH' : Access_Paths,
+ 'GXTR' : Extras,
+ 'DbWN' : Debugger_Windowing,
+ 'GSTs' : Global_Source_Trees,
+ 'SNTX' : Syntax_Coloring,
+ 'BsCl' : base_class,
+ 'RlPt' : Relative_Path,
+ 'TARG' : Target_Settings,
+ 'EnvV' : Environment_Variable,
+ 'SrcT' : Source_Tree,
+ 'DbGL' : Debugger_Global,
+ 'MbFn' : member_function,
+ 'RSTG' : Runtime_Settings,
+ 'PSTG' : Plugin_Settings,
+ 'DtMb' : data_member,
+ 'LXTR' : Build_Extras,
+ 'mFNT' : Font,
+ 'TSTs' : Target_Source_Trees,
+ 'DbDS' : Debugger_Display,
+ 'Clas' : class_,
+}
+
+
+class CodeWarrior(Required_Events,
+ Standard_Suite_Events,
+ CodeWarrior_suite_Events,
+ Metrowerks_Shell_Suite_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
new file mode 100644
index 0000000..ac8013d
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Microsoft_Internet_Explorer.py
@@ -0,0 +1,96 @@
+"""Suite Microsoft Internet Explorer Suite: Events defined by Internet Explorer
+Level 1, version 1
+
+Generated from /Volumes/Sap/Applications (Mac OS 9)/Internet Explorer 5/Internet Explorer
+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['----']
+
+ _argmap_do_script = {
+ 'window' : 'WIND',
+ }
+
+ def do_script(self, _object, _attributes={}, **_arguments):
+ """do script: Execute script commands
+ Required argument: JavaScript text to execute
+ Keyword argument window: optional Window Identifier (as supplied by the ListWindows event) specifying context in which to execute the script
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ Returns: Return value
+ """
+ _code = 'misc'
+ _subcode = 'dosc'
+
+ aetools.keysubst(_arguments, self._argmap_do_script)
+ _arguments['----'] = _object
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def 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['----']
+
+
+#
+# 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
new file mode 100644
index 0000000..5076ce4
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Netscape_Suite.py
@@ -0,0 +1,49 @@
+"""Suite Netscape Suite: Events defined by Netscape
+Level 1, version 1
+
+Generated from /Volumes/Sap/Applications (Mac OS 9)/Internet Explorer 5/Internet Explorer
+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
new file mode 100644
index 0000000..05cfa19
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Required_Suite.py
@@ -0,0 +1,108 @@
+"""Suite Required Suite: Events that every application should support
+Level 1, version 1
+
+Generated from /Volumes/Sap/Applications (Mac OS 9)/Internet Explorer 5/Internet Explorer
+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 run(self, _no_object=None, _attributes={}, **_arguments):
+ """run:
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'aevt'
+ _subcode = 'oapp'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def open(self, _object, _attributes={}, **_arguments):
+ """open: Open documents
+ Required argument: undocumented, typecode 'alis'
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'aevt'
+ _subcode = 'odoc'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ _arguments['----'] = _object
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def print_(self, _object, _attributes={}, **_arguments):
+ """print: Print documents
+ Required argument: undocumented, typecode 'alis'
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'aevt'
+ _subcode = 'pdoc'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ _arguments['----'] = _object
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def quit(self, _no_object=None, _attributes={}, **_arguments):
+ """quit: Quit application
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'aevt'
+ _subcode = 'quit'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+
+#
+# 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
new file mode 100644
index 0000000..101afe7
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py
@@ -0,0 +1,71 @@
+"""Suite Standard Suite: Common terms for most applications
+Level 1, version 1
+
+Generated from /Volumes/Sap/Applications (Mac OS 9)/Internet Explorer 5/Internet Explorer
+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 selected_text(aetools.NProperty):
+ """selected text - the selected text """
+ which = 'stxt'
+ want = 'TEXT'
+application._superclassnames = []
+application._privpropdict = {
+ 'selected_text' : selected_text,
+}
+application._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'capp' : application,
+}
+
+_propdeclarations = {
+ 'stxt' : 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
new file mode 100644
index 0000000..a89913f
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Explorer/URL_Suite.py
@@ -0,0 +1,54 @@
+"""Suite URL Suite: Standard suite for Uniform Resource Locators
+Level 1, version 1
+
+Generated from /Volumes/Sap/Applications (Mac OS 9)/Internet Explorer 5/Internet Explorer
+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
new file mode 100644
index 0000000..96f4ec0
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py
@@ -0,0 +1,226 @@
+"""Suite Web Browser Suite: Class of events supported by Web Browser applications
+Level 1, version 1
+
+Generated from /Volumes/Sap/Applications (Mac OS 9)/Internet Explorer 5/Internet Explorer
+AETE/AEUT resource version 1/0, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'WWW!'
+
+class Web_Browser_Suite_Events:
+
+ _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_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['----']
+
+ 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 != 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 _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def 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 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 != 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['----']
+
+ _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['----']
+
+
+#
+# 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
new file mode 100644
index 0000000..15e8b21
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Explorer/__init__.py
@@ -0,0 +1,76 @@
+"""
+Package generated from /Volumes/Sap/Applications (Mac OS 9)/Internet Explorer 5/Internet Explorer
+Resource aete resid 0
+"""
+import aetools
+Error = aetools.Error
+import Required_Suite
+import Standard_Suite
+import Web_Browser_Suite
+import URL_Suite
+import Microsoft_Internet_Explorer
+import Netscape_Suite
+
+
+_code_to_module = {
+ 'reqd' : Required_Suite,
+ '****' : Standard_Suite,
+ 'WWW!' : Web_Browser_Suite,
+ 'GURL' : URL_Suite,
+ 'MSIE' : Microsoft_Internet_Explorer,
+ 'MOSS' : Netscape_Suite,
+}
+
+
+
+_code_to_fullname = {
+ 'reqd' : ('Explorer.Required_Suite', 'Required_Suite'),
+ '****' : ('Explorer.Standard_Suite', 'Standard_Suite'),
+ 'WWW!' : ('Explorer.Web_Browser_Suite', 'Web_Browser_Suite'),
+ 'GURL' : ('Explorer.URL_Suite', 'URL_Suite'),
+ 'MSIE' : ('Explorer.Microsoft_Internet_Explorer', 'Microsoft_Internet_Explorer'),
+ 'MOSS' : ('Explorer.Netscape_Suite', 'Netscape_Suite'),
+}
+
+from Required_Suite import *
+from Standard_Suite import *
+from Web_Browser_Suite import *
+from URL_Suite import *
+from Microsoft_Internet_Explorer import *
+from Netscape_Suite import *
+def getbaseclasses(v):
+ if hasattr(v, '_superclassnames') and not hasattr(v, '_propdict'):
+ v._propdict = {}
+ v._elemdict = {}
+ for superclass in v._superclassnames:
+ v._propdict.update(getattr(eval(superclass), '_privpropdict', {}))
+ v._elemdict.update(getattr(eval(superclass), '_privelemdict', {}))
+ v._propdict.update(v._privpropdict)
+ v._elemdict.update(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(Required_Suite_Events,
+ Standard_Suite_Events,
+ Web_Browser_Suite_Events,
+ URL_Suite_Events,
+ Microsoft_Internet_Explorer_Events,
+ Netscape_Suite_Events,
+ aetools.TalkTo):
+ _signature = 'MSIE'
+
+ _moduleName = 'Explorer'
+
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Containers_and_folders.py b/Lib/plat-mac/lib-scriptpackages/Finder/Containers_and_folders.py
new file mode 100644
index 0000000..c3aac16
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Containers_and_folders.py
@@ -0,0 +1,497 @@
+"""Suite Containers and folders: Classes that can contain other file system items
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+AETE/AEUT resource version 0/144, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'fndr'
+
+class Containers_and_folders_Events:
+
+ pass
+
+
+class container(aetools.ComponentItem):
+ """container - An item that contains other items """
+ want = 'ctnr'
+class _3c_Inheritance_3e_(aetools.NProperty):
+ """<Inheritance> - inherits some of its properties from the item class """
+ which = 'c@#^'
+ want = 'cobj'
+class selection(aetools.NProperty):
+ """selection - the selection visible to the user """
+ which = 'sele'
+ want = 'obj '
+class entire_contents(aetools.NProperty):
+ """entire contents - the entire contents of the container, including the contents of its children """
+ which = 'ects'
+ want = 'obj '
+class expandable(aetools.NProperty):
+ """expandable - Is the container capable of being expanded as an outline? """
+ which = 'pexa'
+ want = 'bool'
+class expanded(aetools.NProperty):
+ """expanded - Is the container opened as an outline? (can only be set for containers viewed as lists) """
+ which = 'pexp'
+ want = 'bool'
+class completely_expanded(aetools.NProperty):
+ """completely expanded - 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 icon_size(aetools.NProperty):
+ """icon size - the size of icons displayed in the window. Can be specified as a number, or ... """
+ which = 'lvis'
+ want = 'long'
+class view_options_window(aetools.NProperty):
+ """view options window - the view options window for the container (can only be opened when the container window is open) """
+ which = 'vwnd'
+ want = 'vwnd'
+# element 'cobj' as ['indx', 'name']
+# element 'ctnr' as ['indx', 'name']
+# element 'sctr' as ['indx', 'name']
+# element 'cfol' as ['indx', 'name', 'ID ']
+# element 'file' as ['indx', 'name']
+# element 'alia' as ['indx', 'name']
+# element 'appf' as ['indx', 'name', 'ID ']
+# element 'docf' as ['indx', 'name']
+# element 'fntf' as ['indx', 'name']
+# element 'dafi' as ['indx', 'name']
+# element 'inlf' as ['indx', 'name']
+# element 'sndf' as ['indx', 'name']
+# element 'clpf' as ['indx', 'name']
+# element 'pack' as ['indx', 'name']
+# element 'stcs' as ['indx', 'name']
+# element 'fsut' as ['indx', 'name']
+# element 'dsut' as ['indx', 'name']
+
+containers = container
+
+class sharable_container(aetools.ComponentItem):
+ """sharable container - A container that may be shared (disks and folders) """
+ want = 'sctr'
+class owner(aetools.NProperty):
+ """owner - the user that owns the container (file sharing must be on to use this property) """
+ which = 'sown'
+ want = 'itxt'
+class group(aetools.NProperty):
+ """group - the user or group that has special access to the container (file sharing must be on to use this property) """
+ which = 'sgrp'
+ want = 'itxt'
+class owner_privileges(aetools.NProperty):
+ """owner privileges - the see folders/see files/make changes privileges for the owner (file sharing must be on to use this property) """
+ which = 'ownr'
+ want = 'priv'
+class group_privileges(aetools.NProperty):
+ """group privileges - the see folders/see files/make changes privileges for the group (file sharing must be on to use this property) """
+ which = 'gppr'
+ want = 'priv'
+class guest_privileges(aetools.NProperty):
+ """guest privileges - the see folders/see files/make changes privileges for everyone (file sharing must be on to use this property) """
+ which = 'gstp'
+ want = 'priv'
+class privileges_inherited(aetools.NProperty):
+ """privileges inherited - Are the privileges of the container always the same as the container in which it is stored? (file sharing must be on to use this property) """
+ which = 'iprv'
+ want = 'bool'
+class mounted(aetools.NProperty):
+ """mounted - Is the container mounted on another machine's desktop? (file sharing must be on to use this property) """
+ which = 'smou'
+ want = 'bool'
+class exported(aetools.NProperty):
+ """exported - Is the container a share point or inside a share point, i.e., can the container be shared? (file sharing must be on to use this property) """
+ which = 'sexp'
+ want = 'bool'
+class shared(aetools.NProperty):
+ """shared - Is the container a share point, i.e., is the container currently being shared? (file sharing must be on to use this property) """
+ which = 'shar'
+ want = 'bool'
+class protected(aetools.NProperty):
+ """protected - Is the container protected from being moved, renamed and deleted? (file sharing must be on to use this property) """
+ which = 'spro'
+ want = 'bool'
+# element 'cobj' as ['indx', 'name']
+# element 'ctnr' as ['indx', 'name']
+# element 'sctr' as ['indx', 'name']
+# element 'cfol' as ['indx', 'name', 'ID ']
+# element 'file' as ['indx', 'name']
+# element 'alia' as ['indx', 'name']
+# element 'appf' as ['indx', 'name', 'ID ']
+# element 'docf' as ['indx', 'name']
+# element 'fntf' as ['indx', 'name']
+# element 'dafi' as ['indx', 'name']
+# element 'inlf' as ['indx', 'name']
+# element 'sndf' as ['indx', 'name']
+# element 'clpf' as ['indx', 'name']
+# element 'pack' as ['indx', 'name']
+# element 'stcs' as ['indx', 'name']
+# element 'fsut' as ['indx', 'name']
+# element 'dsut' as ['indx', 'name']
+
+sharable_containers = sharable_container
+
+class sharing_privileges(aetools.ComponentItem):
+ """sharing privileges - A set of sharing properties (used in sharable containers) """
+ want = 'priv'
+class see_folders(aetools.NProperty):
+ """see folders - Can folders be seen? """
+ which = 'prvs'
+ want = 'bool'
+class see_files(aetools.NProperty):
+ """see files - Can files be seen? """
+ which = 'prvr'
+ want = 'bool'
+class make_changes(aetools.NProperty):
+ """make changes - Can changes be made? """
+ which = 'prvw'
+ want = 'bool'
+
+class disk(aetools.ComponentItem):
+ """disk - A disk """
+ want = 'cdis'
+class capacity(aetools.NProperty):
+ """capacity - the total number of bytes (free or used) on the disk """
+ which = 'capa'
+ want = 'long'
+class free_space(aetools.NProperty):
+ """free space - the number of free bytes left on the disk """
+ which = 'frsp'
+ want = 'long'
+class ejectable(aetools.NProperty):
+ """ejectable - Can the media be ejected (floppies, CD's, and so on)? """
+ which = 'isej'
+ want = 'bool'
+class local_volume(aetools.NProperty):
+ """local volume - Is the media a local volume (as opposed to a file server)? """
+ which = 'isrv'
+ want = 'bool'
+class startup(aetools.NProperty):
+ """startup - Is this disk the boot disk? """
+ which = 'istd'
+ want = 'bool'
+# element 'cobj' as ['indx', 'name']
+# element 'ctnr' as ['indx', 'name']
+# element 'sctr' as ['indx', 'name']
+# element 'cfol' as ['indx', 'name', 'ID ']
+# element 'file' as ['indx', 'name']
+# element 'alia' as ['indx', 'name']
+# element 'appf' as ['indx', 'name', 'ID ']
+# element 'docf' as ['indx', 'name']
+# element 'fntf' as ['indx', 'name']
+# element 'dafi' as ['indx', 'name']
+# element 'inlf' as ['indx', 'name']
+# element 'sndf' as ['indx', 'name']
+# element 'clpf' as ['indx', 'name']
+# element 'pack' as ['indx', 'name']
+# element 'stcs' as ['indx', 'name']
+# element 'fsut' as ['indx', 'name']
+# element 'dsut' as ['indx', 'name']
+
+disks = disk
+
+class folder(aetools.ComponentItem):
+ """folder - A folder """
+ want = 'cfol'
+# element 'cobj' as ['indx', 'name']
+# element 'ctnr' as ['indx', 'name']
+# element 'sctr' as ['indx', 'name']
+# element 'cfol' as ['indx', 'name', 'ID ']
+# element 'file' as ['indx', 'name']
+# element 'alia' as ['indx', 'name']
+# element 'appf' as ['indx', 'name', 'ID ']
+# element 'docf' as ['indx', 'name']
+# element 'fntf' as ['indx', 'name']
+# element 'dafi' as ['indx', 'name']
+# element 'inlf' as ['indx', 'name']
+# element 'sndf' as ['indx', 'name']
+# element 'clpf' as ['indx', 'name']
+# element 'pack' as ['indx', 'name']
+# element 'stcs' as ['indx', 'name']
+# element 'fsut' as ['indx', 'name']
+# element 'dsut' as ['indx', 'name']
+
+folders = folder
+
+class desktop_2d_object(aetools.ComponentItem):
+ """desktop-object - Desktop-object is the class of the \xd2desktop\xd3 object """
+ want = 'cdsk'
+class startup_disk(aetools.NProperty):
+ """startup disk - the startup disk """
+ which = 'sdsk'
+ want = 'cdis'
+class trash(aetools.NProperty):
+ """trash - the trash """
+ which = 'trsh'
+ want = 'ctrs'
+# element 'cobj' as ['indx', 'name']
+# element 'ctnr' as ['indx', 'name']
+# element 'sctr' as ['indx', 'name']
+# element 'cdis' as ['indx', 'name']
+# element 'cfol' as ['indx', 'name', 'ID ']
+# element 'file' as ['indx', 'name']
+# element 'alia' as ['indx', 'name']
+# element 'appf' as ['indx', 'name', 'ID ']
+# element 'docf' as ['indx', 'name']
+# element 'fntf' as ['indx', 'name']
+# element 'dafi' as ['indx', 'name']
+# element 'inlf' as ['indx', 'name']
+# element 'sndf' as ['indx', 'name']
+# element 'clpf' as ['indx', 'name']
+# element 'pack' as ['indx', 'name']
+# element 'stcs' as ['indx', 'name']
+# element 'fsut' as ['indx', 'name']
+# element 'dsut' as ['indx', 'name']
+
+class trash_2d_object(aetools.ComponentItem):
+ """trash-object - Trash-object is the class of the \xd2trash\xd3 object """
+ want = 'ctrs'
+class warns_before_emptying(aetools.NProperty):
+ """warns before emptying - Display a dialog when emptying the trash? """
+ which = 'warn'
+ want = 'bool'
+# element 'cobj' as ['indx', 'name']
+# element 'ctnr' as ['indx', 'name']
+# element 'sctr' as ['indx', 'name']
+# element 'cfol' as ['indx', 'name', 'ID ']
+# element 'file' as ['indx', 'name']
+# element 'alia' as ['indx', 'name']
+# element 'appf' as ['indx', 'name', 'ID ']
+# element 'docf' as ['indx', 'name']
+# element 'fntf' as ['indx', 'name']
+# element 'dafi' as ['indx', 'name']
+# element 'inlf' as ['indx', 'name']
+# element 'sndf' as ['indx', 'name']
+# element 'clpf' as ['indx', 'name']
+# element 'pack' as ['indx', 'name']
+# element 'stcs' as ['indx', 'name']
+# element 'fsut' as ['indx', 'name']
+# element 'dsut' as ['indx', 'name']
+import Earlier_terms
+container._superclassnames = ['item']
+import Files_and_suitcases
+container._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'selection' : selection,
+ 'entire_contents' : entire_contents,
+ 'expandable' : expandable,
+ 'expanded' : expanded,
+ 'completely_expanded' : completely_expanded,
+ 'icon_size' : icon_size,
+ 'icon_size' : icon_size,
+ 'view_options_window' : view_options_window,
+}
+container._privelemdict = {
+ 'item' : Earlier_terms.item,
+ 'container' : container,
+ 'sharable_container' : sharable_container,
+ 'folder' : folder,
+ 'file' : Files_and_suitcases.file,
+ 'alias_file' : Files_and_suitcases.alias_file,
+ 'application_file' : Earlier_terms.application_file,
+ 'document_file' : Files_and_suitcases.document_file,
+ 'font_file' : Files_and_suitcases.font_file,
+ 'desk_accessory_file' : Files_and_suitcases.desk_accessory_file,
+ 'internet_location' : Earlier_terms.internet_location,
+ 'sound_file' : Files_and_suitcases.sound_file,
+ 'clipping' : Files_and_suitcases.clipping,
+ 'package' : Files_and_suitcases.package,
+ 'suitcase' : Files_and_suitcases.suitcase,
+ 'font_suitcase' : Files_and_suitcases.font_suitcase,
+ 'accessory_suitcase' : Earlier_terms.accessory_suitcase,
+}
+sharable_container._superclassnames = ['container']
+sharable_container._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'owner' : owner,
+ 'group' : group,
+ 'owner_privileges' : owner_privileges,
+ 'group_privileges' : group_privileges,
+ 'guest_privileges' : guest_privileges,
+ 'privileges_inherited' : privileges_inherited,
+ 'mounted' : mounted,
+ 'exported' : exported,
+ 'shared' : shared,
+ 'protected' : protected,
+}
+sharable_container._privelemdict = {
+ 'item' : Earlier_terms.item,
+ 'container' : container,
+ 'sharable_container' : sharable_container,
+ 'folder' : folder,
+ 'file' : Files_and_suitcases.file,
+ 'alias_file' : Files_and_suitcases.alias_file,
+ 'application_file' : Earlier_terms.application_file,
+ 'document_file' : Files_and_suitcases.document_file,
+ 'font_file' : Files_and_suitcases.font_file,
+ 'desk_accessory_file' : Files_and_suitcases.desk_accessory_file,
+ 'internet_location' : Earlier_terms.internet_location,
+ 'sound_file' : Files_and_suitcases.sound_file,
+ 'clipping' : Files_and_suitcases.clipping,
+ 'package' : Files_and_suitcases.package,
+ 'suitcase' : Files_and_suitcases.suitcase,
+ 'font_suitcase' : Files_and_suitcases.font_suitcase,
+ 'accessory_suitcase' : Earlier_terms.accessory_suitcase,
+}
+sharing_privileges._superclassnames = []
+sharing_privileges._privpropdict = {
+ 'see_folders' : see_folders,
+ 'see_files' : see_files,
+ 'make_changes' : make_changes,
+}
+sharing_privileges._privelemdict = {
+}
+disk._superclassnames = ['sharable_container']
+disk._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'capacity' : capacity,
+ 'free_space' : free_space,
+ 'ejectable' : ejectable,
+ 'local_volume' : local_volume,
+ 'startup' : startup,
+}
+disk._privelemdict = {
+ 'item' : Earlier_terms.item,
+ 'container' : container,
+ 'sharable_container' : sharable_container,
+ 'folder' : folder,
+ 'file' : Files_and_suitcases.file,
+ 'alias_file' : Files_and_suitcases.alias_file,
+ 'application_file' : Earlier_terms.application_file,
+ 'document_file' : Files_and_suitcases.document_file,
+ 'font_file' : Files_and_suitcases.font_file,
+ 'desk_accessory_file' : Files_and_suitcases.desk_accessory_file,
+ 'internet_location' : Earlier_terms.internet_location,
+ 'sound_file' : Files_and_suitcases.sound_file,
+ 'clipping' : Files_and_suitcases.clipping,
+ 'package' : Files_and_suitcases.package,
+ 'suitcase' : Files_and_suitcases.suitcase,
+ 'font_suitcase' : Files_and_suitcases.font_suitcase,
+ 'accessory_suitcase' : Earlier_terms.accessory_suitcase,
+}
+folder._superclassnames = ['sharable_container']
+folder._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+folder._privelemdict = {
+ 'item' : Earlier_terms.item,
+ 'container' : container,
+ 'sharable_container' : sharable_container,
+ 'folder' : folder,
+ 'file' : Files_and_suitcases.file,
+ 'alias_file' : Files_and_suitcases.alias_file,
+ 'application_file' : Earlier_terms.application_file,
+ 'document_file' : Files_and_suitcases.document_file,
+ 'font_file' : Files_and_suitcases.font_file,
+ 'desk_accessory_file' : Files_and_suitcases.desk_accessory_file,
+ 'internet_location' : Earlier_terms.internet_location,
+ 'sound_file' : Files_and_suitcases.sound_file,
+ 'clipping' : Files_and_suitcases.clipping,
+ 'package' : Files_and_suitcases.package,
+ 'suitcase' : Files_and_suitcases.suitcase,
+ 'font_suitcase' : Files_and_suitcases.font_suitcase,
+ 'accessory_suitcase' : Earlier_terms.accessory_suitcase,
+}
+desktop_2d_object._superclassnames = ['container']
+desktop_2d_object._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'startup_disk' : startup_disk,
+ 'trash' : trash,
+}
+desktop_2d_object._privelemdict = {
+ 'item' : Earlier_terms.item,
+ 'container' : container,
+ 'sharable_container' : sharable_container,
+ 'disk' : disk,
+ 'folder' : folder,
+ 'file' : Files_and_suitcases.file,
+ 'alias_file' : Files_and_suitcases.alias_file,
+ 'application_file' : Earlier_terms.application_file,
+ 'document_file' : Files_and_suitcases.document_file,
+ 'font_file' : Files_and_suitcases.font_file,
+ 'desk_accessory_file' : Files_and_suitcases.desk_accessory_file,
+ 'internet_location' : Earlier_terms.internet_location,
+ 'sound_file' : Files_and_suitcases.sound_file,
+ 'clipping' : Files_and_suitcases.clipping,
+ 'package' : Files_and_suitcases.package,
+ 'suitcase' : Files_and_suitcases.suitcase,
+ 'font_suitcase' : Files_and_suitcases.font_suitcase,
+ 'accessory_suitcase' : Earlier_terms.accessory_suitcase,
+}
+trash_2d_object._superclassnames = ['container']
+trash_2d_object._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'warns_before_emptying' : warns_before_emptying,
+}
+trash_2d_object._privelemdict = {
+ 'item' : Earlier_terms.item,
+ 'container' : container,
+ 'sharable_container' : sharable_container,
+ 'folder' : folder,
+ 'file' : Files_and_suitcases.file,
+ 'alias_file' : Files_and_suitcases.alias_file,
+ 'application_file' : Earlier_terms.application_file,
+ 'document_file' : Files_and_suitcases.document_file,
+ 'font_file' : Files_and_suitcases.font_file,
+ 'desk_accessory_file' : Files_and_suitcases.desk_accessory_file,
+ 'internet_location' : Earlier_terms.internet_location,
+ 'sound_file' : Files_and_suitcases.sound_file,
+ 'clipping' : Files_and_suitcases.clipping,
+ 'package' : Files_and_suitcases.package,
+ 'suitcase' : Files_and_suitcases.suitcase,
+ 'font_suitcase' : Files_and_suitcases.font_suitcase,
+ 'accessory_suitcase' : Earlier_terms.accessory_suitcase,
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'ctrs' : trash_2d_object,
+ 'cdsk' : desktop_2d_object,
+ 'sctr' : sharable_container,
+ 'priv' : sharing_privileges,
+ 'cdis' : disk,
+ 'cfol' : folder,
+ 'ctnr' : container,
+}
+
+_propdeclarations = {
+ 'pexp' : expanded,
+ 'gppr' : group_privileges,
+ 'prvr' : see_files,
+ 'ects' : entire_contents,
+ 'lvis' : icon_size,
+ 'iprv' : privileges_inherited,
+ 'isrv' : local_volume,
+ 'frsp' : free_space,
+ 'pexa' : expandable,
+ 'pexc' : completely_expanded,
+ 'vwnd' : view_options_window,
+ 'warn' : warns_before_emptying,
+ 'sown' : owner,
+ 'prvw' : make_changes,
+ 'isej' : ejectable,
+ 'capa' : capacity,
+ 'shar' : shared,
+ 'sexp' : exported,
+ 'sdsk' : startup_disk,
+ 'istd' : startup,
+ 'gstp' : guest_privileges,
+ 'trsh' : trash,
+ 'smou' : mounted,
+ 'sele' : selection,
+ 'prvs' : see_folders,
+ 'sgrp' : group,
+ 'c@#^' : _3c_Inheritance_3e_,
+ 'spro' : protected,
+ 'ownr' : owner_privileges,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Earlier_terms.py b/Lib/plat-mac/lib-scriptpackages/Finder/Earlier_terms.py
new file mode 100644
index 0000000..2f72d0f
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Earlier_terms.py
@@ -0,0 +1,746 @@
+"""Suite Earlier terms: Terms that have been renamed
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+AETE/AEUT resource version 0/144, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'tpnm'
+
+from StdSuites.Type_Names_Suite import *
+class Earlier_terms_Events(Type_Names_Suite_Events):
+
+ pass
+
+
+class application(aetools.ComponentItem):
+ """application - The Finder """
+ want = 'capp'
+class properties(aetools.NProperty):
+ """properties - property that allows getting and setting of multiple properties """
+ which = 'qpro'
+ want = 'reco'
+class clipboard(aetools.NProperty):
+ """clipboard - the Finder\xd5s clipboard window """
+ which = 'pcli'
+ want = 'obj '
+class largest_free_block(aetools.NProperty):
+ """largest free block - the largest free block of process memory available to launch an application """
+ which = 'mfre'
+ want = 'long'
+class name(aetools.NProperty):
+ """name - the Finder\xd5s name """
+ which = 'pnam'
+ want = 'itxt'
+class visible(aetools.NProperty):
+ """visible - Is the Finder\xd5s layer visible? """
+ which = 'pvis'
+ want = 'bool'
+class frontmost(aetools.NProperty):
+ """frontmost - Is the Finder the frontmost process? """
+ which = 'pisf'
+ want = 'bool'
+class selection(aetools.NProperty):
+ """selection - the selection visible to the user """
+ which = 'sele'
+ want = 'obj '
+class 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 '
+class file_sharing(aetools.NProperty):
+ """file sharing - Is file sharing on? """
+ which = 'fshr'
+ want = 'bool'
+class sharing_starting_up(aetools.NProperty):
+ """sharing starting up - Is file sharing in the process of starting up? """
+ which = 'fsup'
+ want = 'bool'
+class product_version(aetools.NProperty):
+ """product version - the version of the System software running on this computer """
+ which = 'ver2'
+ want = 'itxt'
+class version(aetools.NProperty):
+ """version - the version of the Finder """
+ which = 'vers'
+ want = 'itxt'
+class about_this_computer(aetools.NProperty):
+ """about this computer - the \xd2About this Computer\xd3 dialog and the list of running processes displayed in it """
+ which = 'abbx'
+ want = 'obj '
+class desktop(aetools.NProperty):
+ """desktop - the desktop """
+ which = 'desk'
+ want = 'cdsk'
+class Finder_preferences(aetools.NProperty):
+ """Finder preferences - Various preferences that apply to the Finder as a whole """
+ which = 'pfrp'
+ want = 'obj '
+
+class application_file(aetools.ComponentItem):
+ """application file - An application's file on disk """
+ want = 'appf'
+class _3c_Inheritance_3e_(aetools.NProperty):
+ """<Inheritance> - inherits some of its properties from the file class """
+ which = 'c@#^'
+ want = 'file'
+class minimum_partition_size(aetools.NProperty):
+ """minimum partition size - the smallest memory size with which the application can be launched """
+ which = 'mprt'
+ want = 'long'
+class partition_size(aetools.NProperty):
+ """partition size - the memory size with which the application will be launched """
+ which = 'appt'
+ want = 'long'
+class suggested_partition_size(aetools.NProperty):
+ """suggested partition size - the memory size with which the developer recommends the application be launched """
+ which = 'sprt'
+ want = 'long'
+class scriptable(aetools.NProperty):
+ """scriptable - Is the application high-level event aware? """
+ which = 'isab'
+ want = 'bool'
+
+class container_window(aetools.ComponentItem):
+ """container window - A window that contains items """
+ want = 'cwnd'
+class container(aetools.NProperty):
+ """container - the container from which the window was opened """
+ which = 'ctnr'
+ want = 'obj '
+class item(aetools.NProperty):
+ """item - the item from which the window was opened (always returns something) """
+ which = 'cobj'
+ want = 'obj '
+class has_custom_view_settings(aetools.NProperty):
+ """has custom view settings - Does the folder have custom view settings or is it using the default global settings? """
+ which = 'cuss'
+ want = 'long'
+class view(aetools.NProperty):
+ """view - the current view for the window (icon, name, date, etc.) """
+ which = 'pvew'
+ want = 'long'
+class previous_list_view(aetools.NProperty):
+ """previous list view - the last non-icon view (by name, by date, etc.) selected for the container (forgotten as soon as the window is closed and only available when the window is open) """
+ which = 'svew'
+ want = 'enum'
+class button_view_arrangement(aetools.NProperty):
+ """button view arrangement - the property by which to keep icons arranged within a button view window """
+ which = 'barr'
+ want = 'earr'
+class spatial_view_arrangement(aetools.NProperty):
+ """spatial view arrangement - the property by which to keep icons arranged within a spatial view window """
+ which = 'iarr'
+ want = 'earr'
+class sort_direction(aetools.NProperty):
+ """sort direction - The direction in which the window is sorted """
+ which = 'sord'
+ want = 'sodr'
+class calculate_folder_sizes(aetools.NProperty):
+ """calculate folder sizes - Are folder sizes calculated and displayed in the window? (does not apply to suitcase windows) """
+ which = 'sfsz'
+ want = 'bool'
+class show_comments(aetools.NProperty):
+ """show comments - Are comments displayed in the window? (does not apply to suitcases) """
+ which = 'scom'
+ want = 'bool'
+class show_creation_date(aetools.NProperty):
+ """show creation date - Are creation dates displayed in the window? """
+ which = 'scda'
+ want = 'bool'
+class show_kind(aetools.NProperty):
+ """show kind - Are document kinds displayed in the window? """
+ which = 'sknd'
+ want = 'bool'
+class show_label(aetools.NProperty):
+ """show label - Are labels displayed in the window? """
+ which = 'slbl'
+ want = 'bool'
+class show_modification_date(aetools.NProperty):
+ """show modification date - Are modification dates displayed in the window? """
+ which = 'sdat'
+ want = 'bool'
+class show_size(aetools.NProperty):
+ """show size - Are file sizes displayed in the window? """
+ which = 'ssiz'
+ want = 'bool'
+class show_version(aetools.NProperty):
+ """show version - Are file versions displayed in the window? (does not apply to suitcase windows) """
+ which = 'svrs'
+ want = 'bool'
+class use_relative_dates(aetools.NProperty):
+ """use relative dates - Are relative dates (e.g., today, yesterday) shown in the window? """
+ which = 'urdt'
+ want = 'bool'
+
+class accessory_process(aetools.ComponentItem):
+ """accessory process - A process launched from a desk accessory file """
+ want = 'pcda'
+
+accessory_processes = accessory_process
+
+class accessory_suitcase(aetools.ComponentItem):
+ """accessory suitcase - A desk accessory suitcase """
+ want = 'dsut'
+
+accessory_suitcases = accessory_suitcase
+
+class internet_location(aetools.ComponentItem):
+ """internet location - An file containing an internet location """
+ want = 'inlf'
+
+internet_locations = internet_location
+
+class information_window(aetools.ComponentItem):
+ """information window - An information window (opened by \xd2Get Info\xd3) """
+ want = 'iwnd'
+class comment(aetools.NProperty):
+ """comment - the comment """
+ which = 'comt'
+ want = 'itxt'
+class size(aetools.NProperty):
+ """size - the logical size of the item """
+ which = 'ptsz'
+ want = 'long'
+class physical_size(aetools.NProperty):
+ """physical size - the actual space used by the item on disk """
+ which = 'phys'
+ want = 'long'
+class creation_date(aetools.NProperty):
+ """creation date - the date on which the item was created """
+ which = 'ascd'
+ want = 'ldt '
+class modification_date(aetools.NProperty):
+ """modification date - the date on which the item was last modified """
+ which = 'asmo'
+ want = 'ldt '
+class icon(aetools.NProperty):
+ """icon - the icon bitmap of the item """
+ which = 'iimg'
+ want = 'ifam'
+class locked(aetools.NProperty):
+ """locked - Is the item locked (applies only to file and application information windows)? """
+ which = 'aslk'
+ want = 'bool'
+class stationery(aetools.NProperty):
+ """stationery - Is the item a stationery pad? """
+ which = 'pspd'
+ want = 'bool'
+class warn_before_emptying(aetools.NProperty):
+ """warn before emptying - Display a dialog when emptying the trash (only valid for trash info window)? """
+ which = 'warn'
+ want = 'bool'
+
+class item(aetools.ComponentItem):
+ """item - An item """
+ want = 'cobj'
+class index(aetools.NProperty):
+ """index - the index in the front-to-back ordering within its container """
+ which = 'pidx'
+ want = 'long'
+class id(aetools.NProperty):
+ """id - an id that identifies the item """
+ which = 'ID '
+ want = 'long'
+class disk(aetools.NProperty):
+ """disk - the disk on which the item is stored """
+ which = 'cdis'
+ want = 'obj '
+class folder(aetools.NProperty):
+ """folder - the folder in which the item is stored """
+ which = 'asdr'
+ want = 'obj '
+class 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 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 label_index(aetools.NProperty):
+ """label index - the label of the item """
+ which = 'labi'
+ want = 'long'
+class kind(aetools.NProperty):
+ """kind - the kind of the item """
+ which = 'kind'
+ want = 'itxt'
+class description(aetools.NProperty):
+ """description - a description of the item """
+ which = 'dscr'
+ want = 'itxt'
+class selected(aetools.NProperty):
+ """selected - Is the item selected? """
+ which = 'issl'
+ want = 'bool'
+class content_space(aetools.NProperty):
+ """content space - the window that would open if the item was opened """
+ which = 'dwnd'
+ want = 'obj '
+class window(aetools.NProperty):
+ """window - the window that would open if the item was opened """
+ which = 'cwin'
+ want = 'obj '
+class information_window(aetools.NProperty):
+ """information window - the information window for the item """
+ which = 'iwnd'
+ want = 'obj '
+
+class process(aetools.ComponentItem):
+ """process - A process running on this computer """
+ want = 'prcs'
+class file(aetools.NProperty):
+ """file - the file from which the process was launched """
+ which = 'file'
+ want = 'obj '
+class file_type(aetools.NProperty):
+ """file type - the OSType of the file type of the process """
+ which = 'asty'
+ want = 'type'
+class creator_type(aetools.NProperty):
+ """creator type - the OSType of the creator of the process (the signature) """
+ which = 'fcrt'
+ want = 'type'
+class remote_events(aetools.NProperty):
+ """remote events - Does the process accept remote events? """
+ which = 'revt'
+ want = 'bool'
+class partition_space_used(aetools.NProperty):
+ """partition space used - the number of bytes currently used in the process' partition """
+ which = 'pusd'
+ want = 'long'
+
+class sharable_container(aetools.ComponentItem):
+ """sharable container - A container that may be shared (disks and folders) """
+ want = 'sctr'
+class owner(aetools.NProperty):
+ """owner - the user that owns the container (file sharing must be on to use this property) """
+ which = 'sown'
+ want = 'itxt'
+class group(aetools.NProperty):
+ """group - the user or group that has special access to the container (file sharing must be on to use this property) """
+ which = 'sgrp'
+ want = 'itxt'
+class owner_privileges(aetools.NProperty):
+ """owner privileges - the see folders/see files/make changes privileges for the owner (file sharing must be on to use this property) """
+ which = 'ownr'
+ want = 'priv'
+class group_privileges(aetools.NProperty):
+ """group privileges - the see folders/see files/make changes privileges for the group (file sharing must be on to use this property) """
+ which = 'gppr'
+ want = 'priv'
+class guest_privileges(aetools.NProperty):
+ """guest privileges - the see folders/see files/make changes privileges for everyone (file sharing must be on to use this property) """
+ which = 'gstp'
+ want = 'priv'
+class inherited_privileges(aetools.NProperty):
+ """inherited privileges - Are the privileges of the container always the same as the container in which it is stored? (file sharing must be on to use this property) """
+ which = 'iprv'
+ want = 'bool'
+class mounted(aetools.NProperty):
+ """mounted - Is the container mounted on another machine's desktop? (file sharing must be on to use this property) """
+ which = 'smou'
+ want = 'bool'
+class exported(aetools.NProperty):
+ """exported - Is the container a share point or inside a share point, i.e., can the container be shared? (file sharing must be on to use this property) """
+ which = 'sexp'
+ want = 'bool'
+class shared(aetools.NProperty):
+ """shared - Is the container a share point, i.e., is the container currently being shared? (file sharing must be on to use this property) """
+ which = 'shar'
+ want = 'bool'
+class protected(aetools.NProperty):
+ """protected - Is the container protected from being moved, renamed and deleted? (file sharing must be on to use this property) """
+ which = 'spro'
+ want = 'bool'
+
+class trash_2d_object(aetools.ComponentItem):
+ """trash-object - Trash-object is the class of the \xd2trash\xd3 object """
+ want = 'ctrs'
+
+class preferences(aetools.ComponentItem):
+ """preferences - The Finder Preferences """
+ want = 'cprf'
+class 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 spring_open_folders(aetools.NProperty):
+ """spring open folders - Spring open folders after the specified delay? """
+ which = 'sprg'
+ want = 'bool'
+class use_simple_menus(aetools.NProperty):
+ """use simple menus - Use simplified Finder menus? """
+ which = 'usme'
+ want = 'bool'
+class use_wide_grid(aetools.NProperty):
+ """use wide grid - Space icons on a wide grid? """
+ which = 'uswg'
+ want = 'bool'
+
+class window(aetools.ComponentItem):
+ """window - A window """
+ want = 'cwin'
+class titled(aetools.NProperty):
+ """titled - Does the window have a title bar? """
+ which = 'ptit'
+ want = 'bool'
+class closeable(aetools.NProperty):
+ """closeable - Does the window have a close box? """
+ which = 'hclb'
+ want = 'bool'
+class floating(aetools.NProperty):
+ """floating - Does the window have a title bar? """
+ which = 'isfl'
+ want = 'bool'
+class modal(aetools.NProperty):
+ """modal - Is the window modal? """
+ which = 'pmod'
+ want = 'bool'
+class resizable(aetools.NProperty):
+ """resizable - Is the window resizable? """
+ which = 'prsz'
+ want = 'bool'
+class zoomable(aetools.NProperty):
+ """zoomable - Is the window zoomable? """
+ which = 'iszm'
+ want = 'bool'
+class zoomed(aetools.NProperty):
+ """zoomed - Is the window zoomed? """
+ which = 'pzum'
+ want = 'bool'
+class 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, and only applies to open non-pop-up windows) """
+ which = 'zumf'
+ want = 'bool'
+class popup(aetools.NProperty):
+ """popup - Is the window is a pop-up window? (only applies to open container windows in the Finder and can only be set when the Finder is the front application) """
+ which = 'drwr'
+ want = 'bool'
+class pulled_open(aetools.NProperty):
+ """pulled open - Is the window pulled open (only applies to pop-up windows and can only be set when the Finder is the front application)? """
+ which = 'pull'
+ want = 'bool'
+class collapsed(aetools.NProperty):
+ """collapsed - Is the window collapsed (only applies to open non-pop-up windows)? """
+ which = 'wshd'
+ want = 'bool'
+application._superclassnames = []
+application._privpropdict = {
+ 'properties' : properties,
+ 'clipboard' : clipboard,
+ 'largest_free_block' : largest_free_block,
+ 'name' : name,
+ 'visible' : visible,
+ 'frontmost' : frontmost,
+ 'selection' : selection,
+ 'insertion_location' : insertion_location,
+ 'file_sharing' : file_sharing,
+ 'sharing_starting_up' : sharing_starting_up,
+ 'product_version' : product_version,
+ 'version' : version,
+ 'about_this_computer' : about_this_computer,
+ 'desktop' : desktop,
+ 'Finder_preferences' : Finder_preferences,
+}
+application._privelemdict = {
+}
+import Files_and_suitcases
+application_file._superclassnames = ['file']
+application_file._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'minimum_partition_size' : minimum_partition_size,
+ 'partition_size' : partition_size,
+ 'suggested_partition_size' : suggested_partition_size,
+ 'scriptable' : scriptable,
+}
+application_file._privelemdict = {
+}
+container_window._superclassnames = ['window']
+container_window._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'container' : container,
+ 'item' : item,
+ 'has_custom_view_settings' : has_custom_view_settings,
+ 'view' : view,
+ 'previous_list_view' : previous_list_view,
+ 'button_view_arrangement' : button_view_arrangement,
+ 'spatial_view_arrangement' : spatial_view_arrangement,
+ 'sort_direction' : sort_direction,
+ 'calculate_folder_sizes' : calculate_folder_sizes,
+ 'show_comments' : show_comments,
+ 'show_creation_date' : show_creation_date,
+ 'show_kind' : show_kind,
+ 'show_label' : show_label,
+ 'show_modification_date' : show_modification_date,
+ 'show_size' : show_size,
+ 'show_version' : show_version,
+ 'use_relative_dates' : use_relative_dates,
+}
+container_window._privelemdict = {
+}
+accessory_process._superclassnames = []
+accessory_process._privpropdict = {
+}
+accessory_process._privelemdict = {
+}
+accessory_suitcase._superclassnames = []
+accessory_suitcase._privpropdict = {
+}
+accessory_suitcase._privelemdict = {
+}
+internet_location._superclassnames = []
+internet_location._privpropdict = {
+}
+internet_location._privelemdict = {
+}
+information_window._superclassnames = ['window']
+information_window._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'item' : item,
+ 'comment' : comment,
+ 'size' : size,
+ 'physical_size' : physical_size,
+ 'creation_date' : creation_date,
+ 'modification_date' : modification_date,
+ 'suggested_partition_size' : suggested_partition_size,
+ 'minimum_partition_size' : minimum_partition_size,
+ 'partition_size' : partition_size,
+ 'icon' : icon,
+ 'locked' : locked,
+ 'stationery' : stationery,
+ 'warn_before_emptying' : warn_before_emptying,
+ 'product_version' : product_version,
+ 'version' : version,
+}
+information_window._privelemdict = {
+}
+item._superclassnames = []
+item._privpropdict = {
+ 'properties' : properties,
+ 'name' : name,
+ 'index' : index,
+ 'id' : id,
+ 'container' : container,
+ 'disk' : disk,
+ 'folder' : folder,
+ 'position' : position,
+ 'bounds' : bounds,
+ 'label_index' : label_index,
+ 'kind' : kind,
+ 'description' : description,
+ 'comment' : comment,
+ 'size' : size,
+ 'physical_size' : physical_size,
+ 'creation_date' : creation_date,
+ 'modification_date' : modification_date,
+ 'icon' : icon,
+ 'selected' : selected,
+ 'content_space' : content_space,
+ 'window' : window,
+ 'information_window' : information_window,
+}
+item._privelemdict = {
+}
+process._superclassnames = []
+process._privpropdict = {
+ 'properties' : properties,
+ 'name' : name,
+ 'visible' : visible,
+ 'frontmost' : frontmost,
+ 'file' : file,
+ 'file_type' : file_type,
+ 'creator_type' : creator_type,
+ 'scriptable' : scriptable,
+ 'remote_events' : remote_events,
+ 'partition_size' : partition_size,
+ 'partition_space_used' : partition_space_used,
+}
+process._privelemdict = {
+}
+import Containers_and_folders
+sharable_container._superclassnames = ['container']
+sharable_container._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'owner' : owner,
+ 'group' : group,
+ 'owner_privileges' : owner_privileges,
+ 'group_privileges' : group_privileges,
+ 'guest_privileges' : guest_privileges,
+ 'inherited_privileges' : inherited_privileges,
+ 'mounted' : mounted,
+ 'exported' : exported,
+ 'shared' : shared,
+ 'protected' : protected,
+}
+sharable_container._privelemdict = {
+}
+trash_2d_object._superclassnames = ['container']
+trash_2d_object._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'warn_before_emptying' : warn_before_emptying,
+}
+trash_2d_object._privelemdict = {
+}
+preferences._superclassnames = []
+preferences._privpropdict = {
+ 'window' : window,
+ 'calculate_folder_sizes' : calculate_folder_sizes,
+ 'delay_before_springing' : delay_before_springing,
+ 'show_comments' : show_comments,
+ 'show_creation_date' : show_creation_date,
+ 'show_kind' : show_kind,
+ 'show_label' : show_label,
+ 'show_modification_date' : show_modification_date,
+ 'show_size' : show_size,
+ 'show_version' : show_version,
+ 'spring_open_folders' : spring_open_folders,
+ 'use_relative_dates' : use_relative_dates,
+ 'use_simple_menus' : use_simple_menus,
+ 'use_wide_grid' : use_wide_grid,
+}
+preferences._privelemdict = {
+}
+window._superclassnames = []
+window._privpropdict = {
+ 'properties' : properties,
+ 'position' : position,
+ 'bounds' : bounds,
+ 'titled' : titled,
+ 'name' : name,
+ 'index' : index,
+ 'closeable' : closeable,
+ 'floating' : floating,
+ 'modal' : modal,
+ 'resizable' : resizable,
+ 'zoomable' : zoomable,
+ 'zoomed' : zoomed,
+ 'zoomed_full_size' : zoomed_full_size,
+ 'visible' : visible,
+ 'popup' : popup,
+ 'pulled_open' : pulled_open,
+ 'collapsed' : collapsed,
+}
+window._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'dsut' : accessory_suitcase,
+ 'cprf' : preferences,
+ 'sctr' : sharable_container,
+ 'capp' : application,
+ 'ctrs' : trash_2d_object,
+ 'pcda' : accessory_process,
+ 'cwin' : window,
+ 'iwnd' : information_window,
+ 'prcs' : process,
+ 'appf' : application_file,
+ 'inlf' : internet_location,
+ 'cwnd' : container_window,
+ 'cobj' : item,
+}
+
+_propdeclarations = {
+ 'ver2' : product_version,
+ 'pbnd' : bounds,
+ 'asdr' : folder,
+ 'gppr' : group_privileges,
+ 'pidx' : index,
+ 'isfl' : floating,
+ 'sown' : owner,
+ 'fsup' : sharing_starting_up,
+ 'urdt' : use_relative_dates,
+ 'scom' : show_comments,
+ 'appt' : partition_size,
+ 'iimg' : icon,
+ 'asty' : file_type,
+ 'uswg' : use_wide_grid,
+ 'ptit' : titled,
+ 'dela' : delay_before_springing,
+ 'cuss' : has_custom_view_settings,
+ 'gstp' : guest_privileges,
+ 'isab' : scriptable,
+ 'iszm' : zoomable,
+ 'sord' : sort_direction,
+ 'pins' : insertion_location,
+ 'pspd' : stationery,
+ 'desk' : desktop,
+ 'ascd' : creation_date,
+ 'ctnr' : container,
+ 'abbx' : about_this_computer,
+ 'pull' : pulled_open,
+ 'kind' : kind,
+ 'ptsz' : size,
+ 'hclb' : closeable,
+ 'sgrp' : group,
+ 'mfre' : largest_free_block,
+ 'revt' : remote_events,
+ 'drwr' : popup,
+ 'iwnd' : information_window,
+ 'ownr' : owner_privileges,
+ 'pzum' : zoomed,
+ 'prsz' : resizable,
+ 'barr' : button_view_arrangement,
+ 'pfrp' : Finder_preferences,
+ 'zumf' : zoomed_full_size,
+ 'iprv' : inherited_privileges,
+ 'vers' : version,
+ 'c@#^' : _3c_Inheritance_3e_,
+ 'ID ' : id,
+ 'sfsz' : calculate_folder_sizes,
+ 'file' : file,
+ 'dwnd' : content_space,
+ 'shar' : shared,
+ 'pmod' : modal,
+ 'sele' : selection,
+ 'pisf' : frontmost,
+ 'sprt' : suggested_partition_size,
+ 'spro' : protected,
+ 'pcli' : clipboard,
+ 'cwin' : window,
+ 'mprt' : minimum_partition_size,
+ 'sprg' : spring_open_folders,
+ 'ssiz' : show_size,
+ 'asmo' : modification_date,
+ 'svrs' : show_version,
+ 'cobj' : item,
+ 'posn' : position,
+ 'iarr' : spatial_view_arrangement,
+ 'phys' : physical_size,
+ 'sknd' : show_kind,
+ 'labi' : label_index,
+ 'svew' : previous_list_view,
+ 'dscr' : description,
+ 'comt' : comment,
+ 'sexp' : exported,
+ 'usme' : use_simple_menus,
+ 'cdis' : disk,
+ 'wshd' : collapsed,
+ 'slbl' : show_label,
+ 'warn' : warn_before_emptying,
+ 'scda' : show_creation_date,
+ 'pvis' : visible,
+ 'issl' : selected,
+ 'smou' : mounted,
+ 'sdat' : show_modification_date,
+ 'fcrt' : creator_type,
+ 'pusd' : partition_space_used,
+ 'pvew' : view,
+ 'fshr' : file_sharing,
+ 'qpro' : properties,
+ 'aslk' : locked,
+ 'pnam' : name,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Enumerations.py b/Lib/plat-mac/lib-scriptpackages/Finder/Enumerations.py
new file mode 100644
index 0000000..97cfbfb
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Enumerations.py
@@ -0,0 +1,117 @@
+"""Suite Enumerations: Enumerations for the Finder
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+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_ipnl = {
+ 'General_Information_panel' : 'gpnl', #
+ 'Sharing_panel' : 'spnl', #
+ 'Memory_panel' : 'mpnl', #
+ 'Status_and_Configuration_panel' : 'scnl', #
+ 'Fonts_panel' : 'fpnl', #
+}
+
+_Enum_pple = {
+ 'General_Preferences_panel' : 'pgnp', #
+ 'Label_Preferences_panel' : 'plbp', #
+ 'Icon_View_Preferences_panel' : 'pivp', #
+ 'Button_View_Preferences_panel' : 'pbvp', #
+ 'List_View_Preferences_panel' : 'plvp', #
+}
+
+_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_sodr = {
+ 'normal' : 'snrm', #
+ 'reversed' : 'srvs', #
+}
+
+_Enum_isiz = {
+ 'mini' : 'miic', #
+ 'small' : 'smic', #
+ 'large' : 'lgic', #
+}
+
+_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', #
+}
+
+_Enum_gsen = {
+ 'CPU' : 'proc', #
+ 'FPU' : 'fpu ', #
+ 'MMU' : 'mmu ', #
+ 'hardware' : 'hdwr', #
+ 'operating_system' : 'os ', #
+ 'sound_system' : 'snd ', #
+ 'memory_available' : 'lram', #
+ 'memory_installed' : 'ram ', #
+}
+
+_Enum_ese0 = {
+ 'starting_up' : 'ese2', #
+ 'running' : 'ese3', #
+ 'rebuilding_desktop' : 'ese5', #
+ 'copying' : 'ese4', #
+ 'restarting' : 'ese6', #
+ 'quitting' : 'ese7', #
+}
+
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+}
+
+_propdeclarations = {
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+ 'sodr' : _Enum_sodr,
+ 'ipnl' : _Enum_ipnl,
+ 'ese0' : _Enum_ese0,
+ 'vwby' : _Enum_vwby,
+ 'gsen' : _Enum_gsen,
+ 'isiz' : _Enum_isiz,
+ 'earr' : _Enum_earr,
+ 'pple' : _Enum_pple,
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Files_and_suitcases.py b/Lib/plat-mac/lib-scriptpackages/Finder/Files_and_suitcases.py
new file mode 100644
index 0000000..0e85539
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Files_and_suitcases.py
@@ -0,0 +1,296 @@
+"""Suite Files and suitcases: Classes representing files and suitcases
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+AETE/AEUT resource version 0/144, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'fndr'
+
+class Files_and_suitcases_Events:
+
+ pass
+
+
+class file(aetools.ComponentItem):
+ """file - A file """
+ want = 'file'
+class _3c_Inheritance_3e_(aetools.NProperty):
+ """<Inheritance> - inherits some of its properties from the item class """
+ which = 'c@#^'
+ want = 'cobj'
+class file_type(aetools.NProperty):
+ """file type - the OSType identifying the type of data contained in the item """
+ which = 'asty'
+ want = 'type'
+class creator_type(aetools.NProperty):
+ """creator type - the OSType identifying the application that created the item """
+ which = 'fcrt'
+ want = 'type'
+class locked(aetools.NProperty):
+ """locked - Is the file locked? """
+ which = 'aslk'
+ want = 'bool'
+class stationery(aetools.NProperty):
+ """stationery - Is the file a stationery pad? """
+ which = 'pspd'
+ want = 'bool'
+class product_version(aetools.NProperty):
+ """product version - the version of the product (visible at the top of the \xd2Get Info\xd3 window) """
+ which = 'ver2'
+ want = 'itxt'
+class version(aetools.NProperty):
+ """version - the version of the file (visible at the bottom of the \xd2Get Info\xd3 window) """
+ which = 'vers'
+ want = 'itxt'
+
+files = file
+
+class alias_file(aetools.ComponentItem):
+ """alias file - An alias file (created with \xd2Make Alias\xd3) """
+ want = 'alia'
+class 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 suggested_size(aetools.NProperty):
+ """suggested size - the memory size with which the developer recommends the application be launched """
+ which = 'sprt'
+ want = 'long'
+class minimum_size(aetools.NProperty):
+ """minimum size - the smallest memory size with which the application can be launched """
+ which = 'mprt'
+ want = 'long'
+class preferred_size(aetools.NProperty):
+ """preferred size - the memory size with which the application will be launched """
+ which = 'appt'
+ want = 'long'
+class accepts_high_level_events(aetools.NProperty):
+ """accepts high level events - Is the application high-level event aware? """
+ which = 'isab'
+ want = 'bool'
+class 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'
+
+application_files = application_file
+
+class document_file(aetools.ComponentItem):
+ """document file - A document file """
+ want = 'docf'
+
+document_files = document_file
+
+class font_file(aetools.ComponentItem):
+ """font file - A font file """
+ want = 'fntf'
+
+font_files = font_file
+
+class desk_accessory_file(aetools.ComponentItem):
+ """desk accessory file - A desk accessory file """
+ want = 'dafi'
+
+desk_accessory_files = desk_accessory_file
+
+class internet_location_file(aetools.ComponentItem):
+ """internet location file - An file containing an internet location """
+ want = 'inlf'
+class location(aetools.NProperty):
+ """location - the internet location """
+ which = 'iloc'
+ want = 'itxt'
+
+internet_location_files = internet_location_file
+
+class sound_file(aetools.ComponentItem):
+ """sound file - A sound file """
+ want = 'sndf'
+class sound(aetools.NProperty):
+ """sound - the sound data """
+ which = 'snd '
+ want = 'snd '
+
+sound_files = sound_file
+
+class clipping(aetools.ComponentItem):
+ """clipping - A clipping """
+ want = 'clpf'
+
+clippings = clipping
+
+class package(aetools.ComponentItem):
+ """package - A package """
+ want = 'pack'
+
+packages = package
+
+class suitcase(aetools.ComponentItem):
+ """suitcase - A font or desk accessory suitcase """
+ want = 'stcs'
+# element 'cobj' as ['indx', 'name']
+
+suitcases = suitcase
+
+class font_suitcase(aetools.ComponentItem):
+ """font suitcase - A font suitcase """
+ want = 'fsut'
+# element 'cobj' as ['indx', 'name']
+
+font_suitcases = font_suitcase
+
+class desk_accessory_suitcase(aetools.ComponentItem):
+ """desk accessory suitcase - A desk accessory suitcase """
+ want = 'dsut'
+# element 'cobj' as ['indx', 'name']
+
+desk_accessory_suitcases = desk_accessory_suitcase
+import Earlier_terms
+file._superclassnames = ['item']
+file._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'file_type' : file_type,
+ 'creator_type' : creator_type,
+ 'locked' : locked,
+ 'stationery' : stationery,
+ 'product_version' : product_version,
+ 'version' : version,
+}
+file._privelemdict = {
+}
+alias_file._superclassnames = ['file']
+alias_file._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'original_item' : original_item,
+}
+alias_file._privelemdict = {
+}
+application_file._superclassnames = ['file']
+application_file._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'suggested_size' : suggested_size,
+ 'minimum_size' : minimum_size,
+ 'preferred_size' : preferred_size,
+ 'accepts_high_level_events' : accepts_high_level_events,
+ 'has_scripting_terminology' : has_scripting_terminology,
+}
+application_file._privelemdict = {
+}
+document_file._superclassnames = ['file']
+document_file._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+document_file._privelemdict = {
+}
+font_file._superclassnames = ['file']
+font_file._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+font_file._privelemdict = {
+}
+desk_accessory_file._superclassnames = ['file']
+desk_accessory_file._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+desk_accessory_file._privelemdict = {
+}
+internet_location_file._superclassnames = ['file']
+internet_location_file._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'location' : location,
+}
+internet_location_file._privelemdict = {
+}
+sound_file._superclassnames = ['file']
+sound_file._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'sound' : sound,
+}
+sound_file._privelemdict = {
+}
+clipping._superclassnames = ['file']
+clipping._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+clipping._privelemdict = {
+}
+package._superclassnames = ['item']
+package._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+package._privelemdict = {
+}
+suitcase._superclassnames = ['file']
+suitcase._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+suitcase._privelemdict = {
+ 'item' : Earlier_terms.item,
+}
+font_suitcase._superclassnames = ['suitcase']
+font_suitcase._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+font_suitcase._privelemdict = {
+ 'item' : Earlier_terms.item,
+}
+desk_accessory_suitcase._superclassnames = ['suitcase']
+desk_accessory_suitcase._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+desk_accessory_suitcase._privelemdict = {
+ 'item' : Earlier_terms.item,
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'sndf' : sound_file,
+ 'fntf' : font_file,
+ 'inlf' : internet_location_file,
+ 'clpf' : clipping,
+ 'alia' : alias_file,
+ 'dafi' : desk_accessory_file,
+ 'dsut' : desk_accessory_suitcase,
+ 'fsut' : font_suitcase,
+ 'file' : file,
+ 'appf' : application_file,
+ 'stcs' : suitcase,
+ 'docf' : document_file,
+ 'pack' : package,
+}
+
+_propdeclarations = {
+ 'vers' : version,
+ 'ver2' : product_version,
+ 'snd ' : sound,
+ 'appt' : preferred_size,
+ 'sprt' : suggested_size,
+ 'isab' : accepts_high_level_events,
+ 'hscr' : has_scripting_terminology,
+ 'asty' : file_type,
+ 'c@#^' : _3c_Inheritance_3e_,
+ 'fcrt' : creator_type,
+ 'mprt' : minimum_size,
+ 'pspd' : stationery,
+ 'iloc' : location,
+ 'aslk' : locked,
+ 'orig' : original_item,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py
new file mode 100644
index 0000000..3589126
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_Basics.py
@@ -0,0 +1,380 @@
+"""Suite Finder Basics: Commonly-used Finder commands and object classes
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+AETE/AEUT resource version 0/144, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'fndr'
+
+class Finder_Basics_Events:
+
+ _argmap_computer = {
+ 'has' : 'has ',
+ }
+
+ def computer(self, _object, _attributes={}, **_arguments):
+ """computer: Test attributes of this computer
+ Required argument: the attribute to test
+ Keyword argument has: test specific bits of response
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ Returns: the result of the query
+ """
+ _code = 'fndr'
+ _subcode = 'gstl'
+
+ aetools.keysubst(_arguments, self._argmap_computer)
+ _arguments['----'] = _object
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def copy(self, _no_object=None, _attributes={}, **_arguments):
+ """copy: Copy the selected items to the clipboard (the Finder must be the front application)
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'misc'
+ _subcode = 'copy'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ 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 != 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 != 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 != 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: 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 clipboard(aetools.NProperty):
+ """clipboard - the Finder\xd5s clipboard window """
+ which = 'pcli'
+ want = 'obj '
+class largest_free_block(aetools.NProperty):
+ """largest free block - the largest free block of process memory available to launch an application """
+ which = 'mfre'
+ want = 'long'
+class name(aetools.NProperty):
+ """name - the Finder\xd5s name """
+ which = 'pnam'
+ want = 'itxt'
+class visible(aetools.NProperty):
+ """visible - Is the Finder\xd5s layer visible? """
+ which = 'pvis'
+ want = 'bool'
+class frontmost(aetools.NProperty):
+ """frontmost - Is the Finder the frontmost process? """
+ which = 'pisf'
+ want = 'bool'
+class selection(aetools.NProperty):
+ """selection - the selection visible to the user """
+ which = 'sele'
+ want = 'obj '
+class 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 '
+class file_sharing(aetools.NProperty):
+ """file sharing - Is file sharing on? """
+ which = 'fshr'
+ want = 'bool'
+class sharing_starting_up(aetools.NProperty):
+ """sharing starting up - Is file sharing in the process of starting up? """
+ which = 'fsup'
+ want = 'bool'
+class product_version(aetools.NProperty):
+ """product version - the version of the System software running on this computer """
+ which = 'ver2'
+ want = 'itxt'
+class version(aetools.NProperty):
+ """version - the version of the Finder """
+ which = 'vers'
+ want = 'itxt'
+class about_this_computer(aetools.NProperty):
+ """about this computer - the \xd2About this Computer\xd3 dialog and the list of running processes displayed in it """
+ which = 'abbx'
+ want = 'obj '
+class desktop(aetools.NProperty):
+ """desktop - the desktop """
+ which = 'desk'
+ want = 'cdsk'
+class execution_state(aetools.NProperty):
+ """execution state - the current execution state of the Finder """
+ which = 'exec'
+ want = 'ese0'
+class Finder_preferences(aetools.NProperty):
+ """Finder preferences - Various preferences that apply to the Finder as a whole """
+ which = 'pfrp'
+ want = 'cprf'
+# element 'cobj' as ['indx', 'name']
+# element 'ctnr' as ['indx', 'name']
+# element 'sctr' as ['indx', 'name']
+# element 'cdis' as ['indx', 'name', 'ID ']
+# element 'cfol' as ['indx', 'name', 'ID ']
+# element 'file' as ['indx', 'name']
+# element 'alia' as ['indx', 'name']
+# element 'appf' as ['indx', 'name', 'ID ']
+# element 'docf' as ['indx', 'name']
+# element 'fntf' as ['indx', 'name']
+# element 'dafi' as ['indx', 'name']
+# element 'inlf' as ['indx', 'name']
+# element 'sndf' as ['indx', 'name']
+# element 'clpf' as ['indx', 'name']
+# element 'pack' as ['indx', 'name']
+# element 'stcs' as ['indx', 'name']
+# element 'fsut' as ['indx', 'name']
+# element 'dsut' as ['indx', 'name']
+# element 'prcs' as ['indx', 'name']
+# element 'pcap' as ['indx', 'name']
+# element 'pcda' as ['indx', 'name']
+# element 'cwin' as ['indx', 'name']
+# element 'cwnd' as ['indx', 'name']
+# element 'iwnd' as ['indx', 'name']
+# element 'vwnd' as ['indx', 'name']
+# element 'lwnd' as ['indx', 'name']
+# element 'dwnd' as ['indx', 'name']
+
+class special_folders(aetools.ComponentItem):
+ """special folders - The special folders used by the Mac OS """
+ want = 'spfl'
+class system_folder(aetools.NProperty):
+ """system folder - the System folder """
+ which = 'macs'
+ want = 'obj '
+class apple_menu_items_folder(aetools.NProperty):
+ """apple menu items folder - the special folder named \xd2Apple Menu Items,\xd3 the contents of which appear in the Apple menu """
+ which = 'amnu'
+ want = 'obj '
+class control_panels_folder(aetools.NProperty):
+ """control panels folder - the special folder named \xd2Control Panels\xd3 """
+ which = 'ctrl'
+ want = 'obj '
+class extensions_folder(aetools.NProperty):
+ """extensions folder - the special folder named \xd2Extensions\xd3 """
+ which = 'extn'
+ want = 'obj '
+class fonts_folder(aetools.NProperty):
+ """fonts folder - the special folder named \xd2Fonts\xd3 """
+ which = 'font'
+ want = 'obj '
+class preferences_folder(aetools.NProperty):
+ """preferences folder - the special folder named \xd2Preferences\xd3 """
+ which = 'pref'
+ want = 'obj '
+class shutdown_items_folder(aetools.NProperty):
+ """shutdown items folder - the special folder named \xd2Shutdown Items\xd3 """
+ which = 'shdf'
+ want = 'obj '
+class startup_items_folder(aetools.NProperty):
+ """startup items folder - the special folder named \xd2Startup Items\xd3 """
+ which = 'strt'
+ want = 'obj '
+class temporary_items_folder(aetools.NProperty):
+ """temporary items folder - the special folder named \xd2Temporary Items\xd3 (invisible) """
+ which = 'temp'
+ want = 'obj '
+application._superclassnames = []
+import Earlier_terms
+import Containers_and_folders
+import Files_and_suitcases
+import Process_classes
+import Window_classes
+application._privpropdict = {
+ 'clipboard' : clipboard,
+ 'largest_free_block' : largest_free_block,
+ 'name' : name,
+ 'visible' : visible,
+ 'frontmost' : frontmost,
+ 'selection' : selection,
+ 'insertion_location' : insertion_location,
+ 'file_sharing' : file_sharing,
+ 'sharing_starting_up' : sharing_starting_up,
+ 'product_version' : product_version,
+ 'version' : version,
+ 'about_this_computer' : about_this_computer,
+ 'desktop' : desktop,
+ 'execution_state' : execution_state,
+ 'Finder_preferences' : Finder_preferences,
+}
+application._privelemdict = {
+ 'item' : Earlier_terms.item,
+ 'container' : Containers_and_folders.container,
+ 'sharable_container' : Earlier_terms.sharable_container,
+ 'disk' : Containers_and_folders.disk,
+ 'folder' : Containers_and_folders.folder,
+ 'file' : Files_and_suitcases.file,
+ 'alias_file' : Files_and_suitcases.alias_file,
+ 'application_file' : Earlier_terms.application_file,
+ 'document_file' : Files_and_suitcases.document_file,
+ 'font_file' : Files_and_suitcases.font_file,
+ 'desk_accessory_file' : Files_and_suitcases.desk_accessory_file,
+ 'internet_location' : Earlier_terms.internet_location,
+ 'sound_file' : Files_and_suitcases.sound_file,
+ 'clipping' : Files_and_suitcases.clipping,
+ 'package' : Files_and_suitcases.package,
+ 'suitcase' : Files_and_suitcases.suitcase,
+ 'font_suitcase' : Files_and_suitcases.font_suitcase,
+ 'accessory_suitcase' : Earlier_terms.accessory_suitcase,
+ 'process' : Earlier_terms.process,
+ 'application_process' : Process_classes.application_process,
+ 'accessory_process' : Earlier_terms.accessory_process,
+ 'window' : Earlier_terms.window,
+ 'container_window' : Earlier_terms.container_window,
+ 'information_window' : Earlier_terms.information_window,
+ 'view_options_window' : Window_classes.view_options_window,
+ 'clipping_window' : Window_classes.clipping_window,
+ 'content_space' : Window_classes.content_space,
+}
+special_folders._superclassnames = []
+special_folders._privpropdict = {
+ 'system_folder' : system_folder,
+ 'apple_menu_items_folder' : apple_menu_items_folder,
+ 'control_panels_folder' : control_panels_folder,
+ 'extensions_folder' : extensions_folder,
+ 'fonts_folder' : fonts_folder,
+ 'preferences_folder' : preferences_folder,
+ 'shutdown_items_folder' : shutdown_items_folder,
+ 'startup_items_folder' : startup_items_folder,
+ 'temporary_items_folder' : temporary_items_folder,
+}
+special_folders._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'capp' : application,
+ 'spfl' : special_folders,
+}
+
+_propdeclarations = {
+ 'vers' : version,
+ 'ver2' : product_version,
+ 'pfrp' : Finder_preferences,
+ 'exec' : execution_state,
+ 'pins' : insertion_location,
+ 'mfre' : largest_free_block,
+ 'fsup' : sharing_starting_up,
+ 'desk' : desktop,
+ 'ctrl' : control_panels_folder,
+ 'macs' : system_folder,
+ 'font' : fonts_folder,
+ 'abbx' : about_this_computer,
+ 'shdf' : shutdown_items_folder,
+ 'temp' : temporary_items_folder,
+ 'pvis' : visible,
+ 'sele' : selection,
+ 'pisf' : frontmost,
+ 'pref' : preferences_folder,
+ 'strt' : startup_items_folder,
+ 'pcli' : clipboard,
+ 'fshr' : file_sharing,
+ 'pnam' : name,
+ 'extn' : extensions_folder,
+ 'amnu' : apple_menu_items_folder,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py
new file mode 100644
index 0000000..1475fa6
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py
@@ -0,0 +1,340 @@
+"""Suite Finder items: Commands used with file system items, and basic item definition
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+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: Add the items to the Favorites menu in the Apple Menu and in Open and Save dialogs
+ 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: Arrange items in window nicely (only applies to open windows in icon or button views 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), or every ejectable disk if no parameter is specified
+ Required argument: the items 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: 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['----']
+
+ _argmap_put_away = {
+ 'asking' : 'fask',
+ }
+
+ def put_away(self, _object, _attributes={}, **_arguments):
+ """put away: Put away the specified object(s)
+ Required argument: the items to put away
+ Keyword argument asking: Specifies whether or not to present a dialog to confirm putting this item away.
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ Returns: the object put away in its put-away location
+ """
+ _code = 'fndr'
+ _subcode = 'ptwy'
+
+ aetools.keysubst(_arguments, self._argmap_put_away)
+ _arguments['----'] = _object
+
+ aetools.enumsubst(_arguments, 'fask', _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 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['----']
+
+ 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 _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'fndr'
+ _subcode = 'fupd'
+
+ 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 item(aetools.ComponentItem):
+ """item - An item """
+ want = 'cobj'
+class name(aetools.NProperty):
+ """name - the name of the item """
+ which = 'pnam'
+ want = 'itxt'
+class index(aetools.NProperty):
+ """index - the index in the front-to-back ordering within its container """
+ which = 'pidx'
+ want = 'long'
+class id(aetools.NProperty):
+ """id - an id that identifies the item """
+ which = 'ID '
+ want = 'long'
+class container(aetools.NProperty):
+ """container - the container of the item """
+ which = 'ctnr'
+ want = 'obj '
+class disk(aetools.NProperty):
+ """disk - the disk on which the item is stored """
+ which = 'cdis'
+ want = 'obj '
+class folder(aetools.NProperty):
+ """folder - the folder in which the item is stored """
+ which = 'asdr'
+ want = 'obj '
+class 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 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 label_index(aetools.NProperty):
+ """label index - the label of the item """
+ which = 'labi'
+ want = 'long'
+class kind(aetools.NProperty):
+ """kind - the kind of the item """
+ which = 'kind'
+ want = 'itxt'
+class description(aetools.NProperty):
+ """description - a description of the item """
+ which = 'dscr'
+ want = 'itxt'
+class comment(aetools.NProperty):
+ """comment - the comment of the item, displayed in the \xd2Get Info\xd3 window """
+ which = 'comt'
+ want = 'itxt'
+class size(aetools.NProperty):
+ """size - the logical size of the item """
+ which = 'ptsz'
+ want = 'long'
+class physical_size(aetools.NProperty):
+ """physical size - the actual space used by the item on disk """
+ which = 'phys'
+ want = 'long'
+class creation_date(aetools.NProperty):
+ """creation date - the date on which the item was created """
+ which = 'ascd'
+ want = 'ldt '
+class modification_date(aetools.NProperty):
+ """modification date - the date on which the item was last modified """
+ which = 'asmo'
+ want = 'ldt '
+class icon(aetools.NProperty):
+ """icon - the icon bitmap of the item """
+ which = 'iimg'
+ want = 'ifam'
+class selected(aetools.NProperty):
+ """selected - Is the item selected? """
+ which = 'issl'
+ want = 'bool'
+class content_space(aetools.NProperty):
+ """content space - the window that would open if the item was opened """
+ which = 'dwnd'
+ want = 'obj '
+class window(aetools.NProperty):
+ """window - the window that would open if the item was opened """
+ which = 'cwin'
+ want = 'obj '
+class information_window(aetools.NProperty):
+ """information window - the information window for the item """
+ which = 'iwnd'
+ want = 'obj '
+
+items = item
+item._superclassnames = []
+item._privpropdict = {
+ 'name' : name,
+ 'index' : index,
+ 'id' : id,
+ 'container' : container,
+ 'disk' : disk,
+ 'folder' : folder,
+ 'position' : position,
+ 'bounds' : bounds,
+ 'label_index' : label_index,
+ 'kind' : kind,
+ 'description' : description,
+ 'comment' : comment,
+ 'size' : size,
+ 'physical_size' : physical_size,
+ 'creation_date' : creation_date,
+ 'modification_date' : modification_date,
+ 'icon' : icon,
+ 'selected' : selected,
+ 'content_space' : content_space,
+ 'window' : window,
+ 'information_window' : information_window,
+}
+item._privelemdict = {
+}
+_Enum_bool = None # XXXX enum bool not found!!
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'cobj' : item,
+}
+
+_propdeclarations = {
+ 'posn' : position,
+ 'kind' : kind,
+ 'ptsz' : size,
+ 'phys' : physical_size,
+ 'dwnd' : content_space,
+ 'pbnd' : bounds,
+ 'issl' : selected,
+ 'labi' : label_index,
+ 'dscr' : description,
+ 'comt' : comment,
+ 'ctnr' : container,
+ 'pidx' : index,
+ 'iimg' : icon,
+ 'ID ' : id,
+ 'cwin' : window,
+ 'pnam' : name,
+ 'ascd' : creation_date,
+ 'cdis' : disk,
+ 'asmo' : modification_date,
+ 'asdr' : folder,
+ 'iwnd' : information_window,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Obsolete_terms.py b/Lib/plat-mac/lib-scriptpackages/Finder/Obsolete_terms.py
new file mode 100644
index 0000000..58db611
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Obsolete_terms.py
@@ -0,0 +1,220 @@
+"""Suite Obsolete terms: Terms that have been deprecated
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+AETE/AEUT resource version 0/144, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'tpnm'
+
+from StdSuites.Type_Names_Suite import *
+class Obsolete_terms_Events(Type_Names_Suite_Events):
+
+ pass
+
+
+class application(aetools.ComponentItem):
+ """application - The Finder """
+ want = 'capp'
+class view_preferences(aetools.NProperty):
+ """view preferences - backwards compatibility with Finder Scripting Extension. DEPRECATED -- not supported after Finder 8.0 """
+ which = 'pvwp'
+ want = 'obj '
+
+class container(aetools.ComponentItem):
+ """container - An item that contains other items """
+ want = 'ctnr'
+class container_window(aetools.NProperty):
+ """container window - the main window for the container """
+ which = 'cwnd'
+ want = 'obj '
+
+class container_window(aetools.ComponentItem):
+ """container window - A window that contains items """
+ want = 'cwnd'
+class folder_obsolete(aetools.NProperty):
+ """folder obsolete - the folder from which the window was opened (DEPRECATED - for use with scripts compiled before Finder 8.0. Will be removed in the next release.) """
+ which = 'cfol'
+ want = 'obj '
+
+class control_panel(aetools.ComponentItem):
+ """control panel - A control panel """
+ want = 'ccdv'
+
+control_panels = control_panel
+
+class file(aetools.ComponentItem):
+ """file - A file """
+ want = 'file'
+class file_type_obsolete(aetools.NProperty):
+ """file type obsolete - the OSType identifying the type of data contained in the item (DEPRECATED - for use with scripts compiled before Finder 8.0. Will be removed in the next release) """
+ which = 'fitp'
+ want = 'type'
+class locked_obsolete(aetools.NProperty):
+ """locked obsolete - Is the file locked? (DEPRECATED - for use with scripts compiled before Finder 8.0. Will be removed in the next release) """
+ which = 'islk'
+ want = 'bool'
+
+class information_window(aetools.ComponentItem):
+ """information window - An information window (opened by \xd2Get Info\xd3) """
+ want = 'iwnd'
+class creation_date_obsolete(aetools.NProperty):
+ """creation date obsolete - the date on which the item was created (DEPRECATED - for use with scripts compiled before Finder 8.0. Will be removed in the next release) """
+ which = 'crtd'
+ want = 'ldt '
+class modification_date_obsolete(aetools.NProperty):
+ """modification date obsolete - the date on which the item was last modified (DEPRECATED - for use with scripts compiled before Finder 8.0. Will be removed in the next release) """
+ which = 'modd'
+ want = 'ldt '
+
+class item(aetools.ComponentItem):
+ """item - An item """
+ want = 'cobj'
+
+class process(aetools.ComponentItem):
+ """process - A process running on this computer """
+ want = 'prcs'
+
+class sharable_container(aetools.ComponentItem):
+ """sharable container - A container that may be shared (disks and folders) """
+ want = 'sctr'
+class sharing_window(aetools.NProperty):
+ """sharing window - the sharing window for the container (file sharing must be on to use this property) """
+ which = 'swnd'
+ want = 'obj '
+
+class sharing_window(aetools.ComponentItem):
+ """sharing window - A sharing window (opened by \xd2Sharing\xc9\xd3) """
+ want = 'swnd'
+class sharable_container(aetools.NProperty):
+ """sharable container - the sharable container from which the window was opened """
+ which = 'sctr'
+ want = 'obj '
+class item(aetools.NProperty):
+ """item - the item from which this window was opened """
+ which = 'cobj'
+ want = 'obj '
+class container(aetools.NProperty):
+ """container - the container from which this window was opened """
+ which = 'ctnr'
+ want = 'obj '
+
+sharing_windows = sharing_window
+
+class status_window(aetools.ComponentItem):
+ """status window - Progress dialogs (e.g., copy window, rebuild desktop database, empty trash) """
+ want = 'qwnd'
+
+status_windows = status_window
+application._superclassnames = []
+application._privpropdict = {
+ 'view_preferences' : view_preferences,
+}
+application._privelemdict = {
+}
+container._superclassnames = []
+container._privpropdict = {
+ 'container_window' : container_window,
+}
+container._privelemdict = {
+}
+container_window._superclassnames = []
+container_window._privpropdict = {
+ 'folder_obsolete' : folder_obsolete,
+}
+container_window._privelemdict = {
+}
+control_panel._superclassnames = []
+control_panel._privpropdict = {
+}
+control_panel._privelemdict = {
+}
+file._superclassnames = []
+file._privpropdict = {
+ 'file_type_obsolete' : file_type_obsolete,
+ 'locked_obsolete' : locked_obsolete,
+}
+file._privelemdict = {
+}
+information_window._superclassnames = []
+information_window._privpropdict = {
+ 'creation_date_obsolete' : creation_date_obsolete,
+ 'locked_obsolete' : locked_obsolete,
+ 'modification_date_obsolete' : modification_date_obsolete,
+}
+information_window._privelemdict = {
+}
+item._superclassnames = []
+item._privpropdict = {
+ 'creation_date_obsolete' : creation_date_obsolete,
+ 'folder_obsolete' : folder_obsolete,
+ 'modification_date_obsolete' : modification_date_obsolete,
+}
+item._privelemdict = {
+}
+process._superclassnames = []
+process._privpropdict = {
+ 'file_type_obsolete' : file_type_obsolete,
+}
+process._privelemdict = {
+}
+sharable_container._superclassnames = []
+sharable_container._privpropdict = {
+ 'sharing_window' : sharing_window,
+}
+sharable_container._privelemdict = {
+}
+sharing_window._superclassnames = []
+sharing_window._privpropdict = {
+ 'sharable_container' : sharable_container,
+ 'item' : item,
+ 'container' : container,
+ 'folder_obsolete' : folder_obsolete,
+}
+sharing_window._privelemdict = {
+}
+status_window._superclassnames = []
+status_window._privpropdict = {
+}
+status_window._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'qwnd' : status_window,
+ 'capp' : application,
+ 'swnd' : sharing_window,
+ 'ccdv' : control_panel,
+ 'prcs' : process,
+ 'cobj' : item,
+ 'file' : file,
+ 'sctr' : sharable_container,
+ 'cwnd' : container_window,
+ 'ctnr' : container,
+ 'iwnd' : information_window,
+}
+
+_propdeclarations = {
+ 'fitp' : file_type_obsolete,
+ 'swnd' : sharing_window,
+ 'cfol' : folder_obsolete,
+ 'crtd' : creation_date_obsolete,
+ 'islk' : locked_obsolete,
+ 'modd' : modification_date_obsolete,
+ 'sctr' : sharable_container,
+ 'pvwp' : view_preferences,
+ 'cwnd' : container_window,
+ 'ctnr' : container,
+ 'cobj' : item,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Process_classes.py b/Lib/plat-mac/lib-scriptpackages/Finder/Process_classes.py
new file mode 100644
index 0000000..a54741c
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Process_classes.py
@@ -0,0 +1,152 @@
+"""Suite Process classes: Classes representing processes that are running
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+AETE/AEUT resource version 0/144, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'fndr'
+
+class Process_classes_Events:
+
+ pass
+
+
+class process(aetools.ComponentItem):
+ """process - A process running on this computer """
+ want = 'prcs'
+class name(aetools.NProperty):
+ """name - the name of the process """
+ which = 'pnam'
+ want = 'itxt'
+class visible(aetools.NProperty):
+ """visible - Is the process' layer visible? """
+ which = 'pvis'
+ want = 'bool'
+class frontmost(aetools.NProperty):
+ """frontmost - Is the process the frontmost process? """
+ which = 'pisf'
+ want = 'bool'
+class file(aetools.NProperty):
+ """file - the file from which the process was launched """
+ which = 'file'
+ want = 'obj '
+class file_type(aetools.NProperty):
+ """file type - the OSType of the file type of the process """
+ which = 'asty'
+ want = 'type'
+class creator_type(aetools.NProperty):
+ """creator type - the OSType of the creator of the process (the signature) """
+ which = 'fcrt'
+ want = 'type'
+class 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 accepts_remote_events(aetools.NProperty):
+ """accepts remote events - Does the process accept remote events? """
+ which = 'revt'
+ want = 'bool'
+class 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 total_partition_size(aetools.NProperty):
+ """total partition size - the size of the partition with which the process was launched """
+ which = 'appt'
+ want = 'long'
+class partition_space_used(aetools.NProperty):
+ """partition space used - the number of bytes currently used in the process' partition """
+ which = 'pusd'
+ want = 'long'
+
+processes = process
+
+class application_process(aetools.ComponentItem):
+ """application process - A process launched from an application file """
+ want = 'pcap'
+class _3c_Inheritance_3e_(aetools.NProperty):
+ """<Inheritance> - inherits some of its properties from the process class """
+ which = 'c@#^'
+ want = 'prcs'
+class 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 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
+process._superclassnames = []
+process._privpropdict = {
+ 'name' : name,
+ 'visible' : visible,
+ 'frontmost' : frontmost,
+ 'file' : file,
+ 'file_type' : file_type,
+ 'creator_type' : creator_type,
+ 'accepts_high_level_events' : accepts_high_level_events,
+ 'accepts_remote_events' : accepts_remote_events,
+ 'has_scripting_terminology' : has_scripting_terminology,
+ 'total_partition_size' : total_partition_size,
+ 'partition_space_used' : partition_space_used,
+}
+process._privelemdict = {
+}
+application_process._superclassnames = ['process']
+application_process._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'application_file' : application_file,
+}
+application_process._privelemdict = {
+}
+desk_accessory_process._superclassnames = ['process']
+desk_accessory_process._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'desk_accessory_file' : desk_accessory_file,
+}
+desk_accessory_process._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'prcs' : process,
+ 'pcda' : desk_accessory_process,
+ 'pcap' : application_process,
+}
+
+_propdeclarations = {
+ 'pvis' : visible,
+ 'pisf' : frontmost,
+ 'appt' : total_partition_size,
+ 'isab' : accepts_high_level_events,
+ 'dafi' : desk_accessory_file,
+ 'hscr' : has_scripting_terminology,
+ 'asty' : file_type,
+ 'c@#^' : _3c_Inheritance_3e_,
+ 'fcrt' : creator_type,
+ 'pusd' : partition_space_used,
+ 'file' : file,
+ 'pnam' : name,
+ 'appf' : application_file,
+ 'revt' : 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
new file mode 100644
index 0000000..df23487
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py
@@ -0,0 +1,335 @@
+"""Suite Standard Suite: Common terms that most applications should support
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+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):
+
+ _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 != 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 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
+ 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 != 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['----']
+
+ 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
new file mode 100644
index 0000000..0445c2c
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Type_Definitions.py
@@ -0,0 +1,274 @@
+"""Suite Type Definitions: Definitions of records used in scripting the Finder
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+AETE/AEUT resource version 0/144, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'tpdf'
+
+class Type_Definitions_Events:
+
+ pass
+
+
+class preferences(aetools.ComponentItem):
+ """preferences - The Finder Preferences """
+ want = 'cprf'
+class window(aetools.NProperty):
+ """window - the window that would open if Finder preferences was opened """
+ which = 'cwin'
+ want = 'pwnd'
+class 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 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 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 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 calculates_folder_sizes(aetools.NProperty):
+ """calculates folder sizes - Are folder sizes calculated and displayed in Finder list view windows? """
+ which = 'sfsz'
+ want = 'bool'
+class 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 shows_comments(aetools.NProperty):
+ """shows comments - Are comments displayed in default Finder list view windows? """
+ which = 'scom'
+ want = 'bool'
+class shows_creation_date(aetools.NProperty):
+ """shows creation date - Are creation dates displayed in default Finder list view windows? """
+ which = 'scda'
+ want = 'bool'
+class shows_kind(aetools.NProperty):
+ """shows kind - Are document kinds displayed in default Finder list view windows? """
+ which = 'sknd'
+ want = 'bool'
+class shows_label(aetools.NProperty):
+ """shows label - Are labels displayed in default Finder list view windows? """
+ which = 'slbl'
+ want = 'bool'
+class shows_modification_date(aetools.NProperty):
+ """shows modification date - Are modification dates displayed in default Finder list view windows? """
+ which = 'sdat'
+ want = 'bool'
+class shows_size(aetools.NProperty):
+ """shows size - Are file sizes displayed in default Finder list view windows? """
+ which = 'ssiz'
+ want = 'bool'
+class shows_version(aetools.NProperty):
+ """shows version - Are file versions displayed in default Finder list view windows? """
+ which = 'svrs'
+ want = 'bool'
+class 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 uses_simple_menus(aetools.NProperty):
+ """uses simple menus - Use simplified Finder menus? """
+ which = 'usme'
+ want = 'bool'
+class uses_wide_grid(aetools.NProperty):
+ """uses wide grid - Space icons on a wide grid? """
+ which = 'uswg'
+ want = 'bool'
+class spring_open_folders(aetools.NProperty):
+ """spring open folders - Spring open folders after the specified delay? """
+ which = 'sprg'
+ want = 'bool'
+class 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 view_font(aetools.NProperty):
+ """view font - the id of the font used in Finder views. """
+ which = 'vfnt'
+ want = 'long'
+class view_font_size(aetools.NProperty):
+ """view font size - the size of the font used in Finder views """
+ which = 'vfsz'
+ want = 'long'
+# element 'clbl' as ['indx', 'name']
+
+class label(aetools.ComponentItem):
+ """label - A Finder label (name and color) """
+ want = 'clbl'
+class name(aetools.NProperty):
+ """name - the name associated with the label """
+ which = 'pnam'
+ want = 'itxt'
+class index(aetools.NProperty):
+ """index - the index in the front-to-back ordering within its container """
+ which = 'pidx'
+ want = 'long'
+class color(aetools.NProperty):
+ """color - the color associated with the label """
+ which = 'colr'
+ want = 'cRGB'
+
+class icon_family(aetools.ComponentItem):
+ """icon family - A family of icons """
+ want = 'ifam'
+class 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 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 large_32_bit_icon(aetools.NProperty):
+ """large 32 bit icon - the large 32-bit color icon """
+ which = 'il32'
+ want = 'il32'
+class large_8_bit_icon(aetools.NProperty):
+ """large 8 bit icon - the large 8-bit color icon """
+ which = 'icl8'
+ want = 'icl8'
+class large_4_bit_icon(aetools.NProperty):
+ """large 4 bit icon - the large 4-bit color icon """
+ which = 'icl4'
+ want = 'icl4'
+class 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 small_8_bit_mask(aetools.NProperty):
+ """small 8 bit mask - the small 8-bit mask for small 32-bit icons """
+ which = 'ics8'
+ want = 's8mk'
+class small_32_bit_icon(aetools.NProperty):
+ """small 32 bit icon - the small 32-bit color icon """
+ which = 'is32'
+ want = 'is32'
+
+small_8_bit_icon = small_8_bit_mask
+class small_4_bit_icon(aetools.NProperty):
+ """small 4 bit icon - the small 4-bit color icon """
+ which = 'ics4'
+ want = 'ics4'
+
+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'
+preferences._superclassnames = []
+preferences._privpropdict = {
+ 'window' : window,
+ 'button_view_arrangement' : button_view_arrangement,
+ 'button_view_icon_size' : button_view_icon_size,
+ 'spatial_view_arrangement' : spatial_view_arrangement,
+ 'spatial_view_icon_size' : spatial_view_icon_size,
+ 'calculates_folder_sizes' : calculates_folder_sizes,
+ 'list_view_icon_size' : list_view_icon_size,
+ 'shows_comments' : shows_comments,
+ 'shows_creation_date' : shows_creation_date,
+ 'shows_kind' : shows_kind,
+ 'shows_label' : shows_label,
+ 'shows_modification_date' : shows_modification_date,
+ 'shows_size' : shows_size,
+ 'shows_version' : shows_version,
+ 'uses_relative_dates' : uses_relative_dates,
+ 'uses_simple_menus' : uses_simple_menus,
+ 'uses_wide_grid' : uses_wide_grid,
+ 'spring_open_folders' : spring_open_folders,
+ 'delay_before_springing' : delay_before_springing,
+ 'view_font' : view_font,
+ 'view_font_size' : view_font_size,
+}
+preferences._privelemdict = {
+ 'label' : label,
+}
+label._superclassnames = []
+label._privpropdict = {
+ 'name' : name,
+ 'index' : index,
+ 'color' : color,
+}
+label._privelemdict = {
+}
+icon_family._superclassnames = []
+icon_family._privpropdict = {
+ 'large_monochrome_icon_and_mask' : large_monochrome_icon_and_mask,
+ 'large_8_bit_mask' : large_8_bit_mask,
+ 'large_32_bit_icon' : large_32_bit_icon,
+ 'large_8_bit_icon' : large_8_bit_icon,
+ 'large_4_bit_icon' : large_4_bit_icon,
+ 'small_monochrome_icon_and_mask' : small_monochrome_icon_and_mask,
+ 'small_8_bit_mask' : small_8_bit_mask,
+ 'small_32_bit_icon' : small_32_bit_icon,
+ 'small_8_bit_icon' : small_8_bit_icon,
+ 'small_4_bit_icon' : small_4_bit_icon,
+}
+icon_family._privelemdict = {
+}
+alias_list._superclassnames = []
+alias_list._privpropdict = {
+}
+alias_list._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'cprf' : preferences,
+ 'alst' : alias_list,
+ 'ifam' : icon_family,
+ 'clbl' : label,
+}
+
+_propdeclarations = {
+ 'dela' : delay_before_springing,
+ 'ics4' : small_4_bit_icon,
+ 'iarr' : spatial_view_arrangement,
+ 'barr' : button_view_arrangement,
+ 'ics#' : small_monochrome_icon_and_mask,
+ 'sknd' : shows_kind,
+ 'svrs' : shows_version,
+ 'colr' : color,
+ 'ics8' : small_8_bit_mask,
+ 'icl8' : large_8_bit_icon,
+ 'sprg' : spring_open_folders,
+ 'vfsz' : view_font_size,
+ 'sfsz' : calculates_folder_sizes,
+ 'l8mk' : large_8_bit_mask,
+ 'vfnt' : view_font,
+ 'urdt' : uses_relative_dates,
+ 'usme' : uses_simple_menus,
+ 'icl4' : large_4_bit_icon,
+ 'slbl' : shows_label,
+ 'lisz' : list_view_icon_size,
+ 'scda' : shows_creation_date,
+ 'bisz' : button_view_icon_size,
+ 'pidx' : index,
+ 'scom' : shows_comments,
+ 'iisz' : spatial_view_icon_size,
+ 'sdat' : shows_modification_date,
+ 'cwin' : window,
+ 'ICN#' : large_monochrome_icon_and_mask,
+ 'is32' : small_32_bit_icon,
+ 'pnam' : name,
+ 'il32' : large_32_bit_icon,
+ 'uswg' : uses_wide_grid,
+ 'ssiz' : shows_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
new file mode 100644
index 0000000..bbfc46e
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/Window_classes.py
@@ -0,0 +1,414 @@
+"""Suite Window classes: Classes representing windows
+Level 1, version 1
+
+Generated from /Volumes/Sap/System Folder/Finder
+AETE/AEUT resource version 0/144, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'fndr'
+
+class Window_classes_Events:
+
+ pass
+
+
+class window(aetools.ComponentItem):
+ """window - A window """
+ want = 'cwin'
+class position(aetools.NProperty):
+ """position - the upper left position of the window """
+ which = 'posn'
+ want = 'QDpt'
+class bounds(aetools.NProperty):
+ """bounds - the boundary rectangle for the window """
+ which = 'pbnd'
+ want = 'qdrt'
+class titled(aetools.NProperty):
+ """titled - Does the window have a title bar? """
+ which = 'ptit'
+ want = 'bool'
+class name(aetools.NProperty):
+ """name - the name of the window """
+ which = 'pnam'
+ want = 'itxt'
+class index(aetools.NProperty):
+ """index - the number of the window in the front-to-back layer ordering """
+ which = 'pidx'
+ want = 'long'
+class closeable(aetools.NProperty):
+ """closeable - Does the window have a close box? """
+ which = 'hclb'
+ want = 'bool'
+class floating(aetools.NProperty):
+ """floating - Does the window have a title bar? """
+ which = 'isfl'
+ want = 'bool'
+class modal(aetools.NProperty):
+ """modal - Is the window modal? """
+ which = 'pmod'
+ want = 'bool'
+class resizable(aetools.NProperty):
+ """resizable - Is the window resizable? """
+ which = 'prsz'
+ want = 'bool'
+class zoomable(aetools.NProperty):
+ """zoomable - Is the window zoomable? """
+ which = 'iszm'
+ want = 'bool'
+class zoomed(aetools.NProperty):
+ """zoomed - Is the window zoomed? """
+ which = 'pzum'
+ want = 'bool'
+class 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, and only applies to open non-pop-up windows) """
+ which = 'zumf'
+ want = 'bool'
+class visible(aetools.NProperty):
+ """visible - Is the window visible (always true for open Finder windows)? """
+ which = 'pvis'
+ want = 'bool'
+class popup(aetools.NProperty):
+ """popup - Is the window is a pop-up window? (only applies to open container windows in the Finder and can only be set when the Finder is the front application) """
+ which = 'drwr'
+ want = 'bool'
+class pulled_open(aetools.NProperty):
+ """pulled open - Is the window pulled open (only applies to pop-up windows and can only be set when the Finder is the front application)? """
+ which = 'pull'
+ want = 'bool'
+class collapsed(aetools.NProperty):
+ """collapsed - Is the window collapsed (only applies to open non-pop-up windows)? """
+ which = 'wshd'
+ want = 'bool'
+
+windows = window
+
+class container_window(aetools.ComponentItem):
+ """container window - A window that contains items """
+ want = 'cwnd'
+class _3c_Inheritance_3e_(aetools.NProperty):
+ """<Inheritance> - inherits some of its properties from the window class """
+ which = 'c@#^'
+ want = 'cwin'
+class container(aetools.NProperty):
+ """container - the container from which the window was opened """
+ which = 'ctnr'
+ want = 'obj '
+class item(aetools.NProperty):
+ """item - the item from which the window was opened (always returns something) """
+ which = 'cobj'
+ want = 'obj '
+class has_custom_view_settings(aetools.NProperty):
+ """has custom view settings - Does the folder have custom view settings or is it using the default global settings? """
+ which = 'cuss'
+ want = 'bool'
+class view(aetools.NProperty):
+ """view - the current view for the window (icon, name, date, etc.) """
+ which = 'pvew'
+ want = 'long'
+class previous_list_view(aetools.NProperty):
+ """previous list view - the last non-icon view (by name, by date, etc.) selected for the container (forgotten as soon as the window is closed and only available when the window is open) """
+ which = 'svew'
+ want = 'enum'
+class button_view_arrangement(aetools.NProperty):
+ """button view arrangement - the property by which to keep icons arranged within a button view window """
+ which = 'barr'
+ want = 'earr'
+class spatial_view_arrangement(aetools.NProperty):
+ """spatial view arrangement - the property by which to keep icons arranged within a spatial view window """
+ which = 'iarr'
+ want = 'earr'
+class sort_direction(aetools.NProperty):
+ """sort direction - The direction in which the window is sorted """
+ which = 'sord'
+ want = 'sodr'
+class calculates_folder_sizes(aetools.NProperty):
+ """calculates folder sizes - Are folder sizes calculated and displayed in the window? (does not apply to suitcase windows) """
+ which = 'sfsz'
+ want = 'bool'
+class shows_comments(aetools.NProperty):
+ """shows comments - Are comments displayed in the window? (does not apply to suitcases) """
+ which = 'scom'
+ want = 'bool'
+class shows_creation_date(aetools.NProperty):
+ """shows creation date - Are creation dates displayed in the window? """
+ which = 'scda'
+ want = 'bool'
+class shows_kind(aetools.NProperty):
+ """shows kind - Are document kinds displayed in the window? """
+ which = 'sknd'
+ want = 'bool'
+class shows_label(aetools.NProperty):
+ """shows label - Are labels displayed in the window? """
+ which = 'slbl'
+ want = 'bool'
+class shows_modification_date(aetools.NProperty):
+ """shows modification date - Are modification dates displayed in the window? """
+ which = 'sdat'
+ want = 'bool'
+class shows_size(aetools.NProperty):
+ """shows size - Are file sizes displayed in the window? """
+ which = 'ssiz'
+ want = 'bool'
+class shows_version(aetools.NProperty):
+ """shows version - Are file versions displayed in the window? (does not apply to suitcase windows) """
+ which = 'svrs'
+ want = 'bool'
+class uses_relative_dates(aetools.NProperty):
+ """uses relative dates - Are relative dates (e.g., today, yesterday) shown in the window? """
+ which = 'urdt'
+ want = 'bool'
+
+container_windows = container_window
+
+class information_window(aetools.ComponentItem):
+ """information window - An information window (opened by \xd2Get Info\xd3) """
+ want = 'iwnd'
+class current_panel(aetools.NProperty):
+ """current panel - the current panel in the information window """
+ which = 'panl'
+ want = 'ipnl'
+class comment(aetools.NProperty):
+ """comment - the comment """
+ which = 'comt'
+ want = 'itxt'
+class size(aetools.NProperty):
+ """size - the logical size of the item """
+ which = 'ptsz'
+ want = 'long'
+class physical_size(aetools.NProperty):
+ """physical size - the actual space used by the item on disk """
+ which = 'phys'
+ want = 'long'
+class creation_date(aetools.NProperty):
+ """creation date - the date on which the item was created """
+ which = 'ascd'
+ want = 'ldt '
+class modification_date(aetools.NProperty):
+ """modification date - the date on which the item was last modified """
+ which = 'asmo'
+ want = 'ldt '
+class suggested_size(aetools.NProperty):
+ """suggested size - the memory size with which the developer recommends the application be launched """
+ which = 'sprt'
+ want = 'long'
+class minimum_size(aetools.NProperty):
+ """minimum size - the smallest memory size with which the application can be launched (only applies to information windows for applications) """
+ which = 'mprt'
+ want = 'long'
+class preferred_size(aetools.NProperty):
+ """preferred size - the memory size with which the application will be launched (only applies to information windows for applications) """
+ which = 'appt'
+ want = 'long'
+class icon(aetools.NProperty):
+ """icon - the icon bitmap of the item """
+ which = 'iimg'
+ want = 'ifam'
+class locked(aetools.NProperty):
+ """locked - Is the item locked (applies only to file and application information windows)? """
+ which = 'aslk'
+ want = 'bool'
+class stationery(aetools.NProperty):
+ """stationery - Is the item a stationery pad? """
+ which = 'pspd'
+ want = 'bool'
+class warns_before_emptying(aetools.NProperty):
+ """warns before emptying - Display a dialog when emptying the trash (only valid for trash info window)? """
+ which = 'warn'
+ want = 'bool'
+class product_version(aetools.NProperty):
+ """product version - the version of the product (visible at the top of the \xd2Get Info\xd3 window) """
+ which = 'ver2'
+ want = 'itxt'
+class version(aetools.NProperty):
+ """version - the version of the file (visible at the bottom of the \xd2Get Info\xd3 window) """
+ which = 'vers'
+ want = 'itxt'
+
+information_windows = information_window
+
+class view_options_window(aetools.ComponentItem):
+ """view options window - A View Options window """
+ want = 'vwnd'
+
+view_options_windows = view_options_window
+
+class preferences_window(aetools.ComponentItem):
+ """preferences window - The Finder Preferences window """
+ want = 'pwnd'
+
+class clipping_window(aetools.ComponentItem):
+ """clipping window - The window containing a clipping """
+ want = 'lwnd'
+
+clipping_windows = clipping_window
+
+class content_space(aetools.ComponentItem):
+ """content space - All windows, including the desktop window (\xd2Window\xd3 does not include the desktop window) """
+ want = 'dwnd'
+
+content_spaces = content_space
+window._superclassnames = []
+window._privpropdict = {
+ 'position' : position,
+ 'bounds' : bounds,
+ 'titled' : titled,
+ 'name' : name,
+ 'index' : index,
+ 'closeable' : closeable,
+ 'floating' : floating,
+ 'modal' : modal,
+ 'resizable' : resizable,
+ 'zoomable' : zoomable,
+ 'zoomed' : zoomed,
+ 'zoomed_full_size' : zoomed_full_size,
+ 'visible' : visible,
+ 'popup' : popup,
+ 'pulled_open' : pulled_open,
+ 'collapsed' : collapsed,
+}
+window._privelemdict = {
+}
+container_window._superclassnames = ['window']
+container_window._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'container' : container,
+ 'item' : item,
+ 'has_custom_view_settings' : has_custom_view_settings,
+ 'view' : view,
+ 'previous_list_view' : previous_list_view,
+ 'button_view_arrangement' : button_view_arrangement,
+ 'spatial_view_arrangement' : spatial_view_arrangement,
+ 'sort_direction' : sort_direction,
+ 'calculates_folder_sizes' : calculates_folder_sizes,
+ 'shows_comments' : shows_comments,
+ 'shows_creation_date' : shows_creation_date,
+ 'shows_kind' : shows_kind,
+ 'shows_label' : shows_label,
+ 'shows_modification_date' : shows_modification_date,
+ 'shows_size' : shows_size,
+ 'shows_version' : shows_version,
+ 'uses_relative_dates' : uses_relative_dates,
+}
+container_window._privelemdict = {
+}
+information_window._superclassnames = ['window']
+information_window._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'item' : item,
+ 'current_panel' : current_panel,
+ 'comment' : comment,
+ 'size' : size,
+ 'physical_size' : physical_size,
+ 'creation_date' : creation_date,
+ 'modification_date' : modification_date,
+ 'suggested_size' : suggested_size,
+ 'minimum_size' : minimum_size,
+ 'preferred_size' : preferred_size,
+ 'icon' : icon,
+ 'locked' : locked,
+ 'stationery' : stationery,
+ 'warns_before_emptying' : warns_before_emptying,
+ 'product_version' : product_version,
+ 'version' : version,
+}
+information_window._privelemdict = {
+}
+view_options_window._superclassnames = ['window']
+view_options_window._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'item' : item,
+}
+view_options_window._privelemdict = {
+}
+preferences_window._superclassnames = ['window']
+preferences_window._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+ 'current_panel' : current_panel,
+}
+preferences_window._privelemdict = {
+}
+clipping_window._superclassnames = ['window']
+clipping_window._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+clipping_window._privelemdict = {
+}
+content_space._superclassnames = []
+content_space._privpropdict = {
+}
+content_space._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'pwnd' : preferences_window,
+ 'vwnd' : view_options_window,
+ 'cwin' : window,
+ 'cwnd' : container_window,
+ 'dwnd' : content_space,
+ 'iwnd' : information_window,
+ 'lwnd' : clipping_window,
+}
+
+_propdeclarations = {
+ 'prsz' : resizable,
+ 'barr' : button_view_arrangement,
+ 'pzum' : zoomed,
+ 'iarr' : spatial_view_arrangement,
+ 'hclb' : closeable,
+ 'c@#^' : _3c_Inheritance_3e_,
+ 'ver2' : product_version,
+ 'sfsz' : calculates_folder_sizes,
+ 'sprt' : suggested_size,
+ 'zumf' : zoomed_full_size,
+ 'urdt' : uses_relative_dates,
+ 'panl' : current_panel,
+ 'pmod' : modal,
+ 'pspd' : stationery,
+ 'scom' : shows_comments,
+ 'appt' : preferred_size,
+ 'aslk' : locked,
+ 'pbnd' : bounds,
+ 'iimg' : icon,
+ 'mprt' : minimum_size,
+ 'pnam' : name,
+ 'ssiz' : shows_size,
+ 'asmo' : modification_date,
+ 'cobj' : item,
+ 'ptit' : titled,
+ 'posn' : position,
+ 'cuss' : has_custom_view_settings,
+ 'phys' : physical_size,
+ 'sknd' : shows_kind,
+ 'svrs' : shows_version,
+ 'svew' : previous_list_view,
+ 'comt' : comment,
+ 'iszm' : zoomable,
+ 'sord' : sort_direction,
+ 'ascd' : creation_date,
+ 'ctnr' : container,
+ 'wshd' : collapsed,
+ 'slbl' : shows_label,
+ 'pull' : pulled_open,
+ 'ptsz' : size,
+ 'pvis' : visible,
+ 'pidx' : index,
+ 'isfl' : floating,
+ 'warn' : warns_before_emptying,
+ 'drwr' : popup,
+ 'sdat' : shows_modification_date,
+ 'pvew' : view,
+ 'scda' : shows_creation_date,
+ 'vers' : version,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py b/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py
new file mode 100644
index 0000000..8ea742f
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py
@@ -0,0 +1,461 @@
+"""
+Package generated from /Volumes/Sap/System Folder/Finder
+Resource aete resid 0
+"""
+import aetools
+Error = aetools.Error
+import Standard_Suite
+import Earlier_terms
+import Finder_Basics
+import Finder_items
+import Containers_and_folders
+import Files_and_suitcases
+import Window_classes
+import Process_classes
+import Type_Definitions
+import Enumerations
+import Obsolete_terms
+
+
+_code_to_module = {
+ 'CoRe' : Standard_Suite,
+ 'tpnm' : Earlier_terms,
+ 'fndr' : Finder_Basics,
+ 'fndr' : Finder_items,
+ 'fndr' : Containers_and_folders,
+ 'fndr' : Files_and_suitcases,
+ 'fndr' : Window_classes,
+ 'fndr' : Process_classes,
+ 'tpdf' : Type_Definitions,
+ 'tpnm' : Enumerations,
+ 'tpnm' : Obsolete_terms,
+}
+
+
+
+_code_to_fullname = {
+ 'CoRe' : ('Finder.Standard_Suite', 'Standard_Suite'),
+ 'tpnm' : ('Finder.Earlier_terms', 'Earlier_terms'),
+ 'fndr' : ('Finder.Finder_Basics', 'Finder_Basics'),
+ 'fndr' : ('Finder.Finder_items', 'Finder_items'),
+ 'fndr' : ('Finder.Containers_and_folders', 'Containers_and_folders'),
+ 'fndr' : ('Finder.Files_and_suitcases', 'Files_and_suitcases'),
+ 'fndr' : ('Finder.Window_classes', 'Window_classes'),
+ 'fndr' : ('Finder.Process_classes', 'Process_classes'),
+ 'tpdf' : ('Finder.Type_Definitions', 'Type_Definitions'),
+ 'tpnm' : ('Finder.Enumerations', 'Enumerations'),
+ 'tpnm' : ('Finder.Obsolete_terms', 'Obsolete_terms'),
+}
+
+from Standard_Suite import *
+from Earlier_terms import *
+from Finder_Basics import *
+from Finder_items import *
+from Containers_and_folders import *
+from Files_and_suitcases import *
+from Window_classes import *
+from Process_classes import *
+from Type_Definitions import *
+from Enumerations import *
+from Obsolete_terms import *
+def getbaseclasses(v):
+ if hasattr(v, '_superclassnames') and not hasattr(v, '_propdict'):
+ v._propdict = {}
+ v._elemdict = {}
+ for superclass in v._superclassnames:
+ v._propdict.update(getattr(eval(superclass), '_privpropdict', {}))
+ v._elemdict.update(getattr(eval(superclass), '_privelemdict', {}))
+ v._propdict.update(v._privpropdict)
+ v._elemdict.update(v._privelemdict)
+
+import StdSuites
+
+#
+# Set property and element dictionaries now that all classes have been defined
+#
+getbaseclasses(accessory_suitcase)
+getbaseclasses(preferences)
+getbaseclasses(sharable_container)
+getbaseclasses(application)
+getbaseclasses(trash_2d_object)
+getbaseclasses(accessory_process)
+getbaseclasses(window)
+getbaseclasses(information_window)
+getbaseclasses(process)
+getbaseclasses(application_file)
+getbaseclasses(internet_location)
+getbaseclasses(container_window)
+getbaseclasses(item)
+getbaseclasses(StdSuites.Type_Names_Suite.small_integer)
+getbaseclasses(StdSuites.Type_Names_Suite.RGB16_color)
+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.plain_text)
+getbaseclasses(StdSuites.Type_Names_Suite.type_element_info)
+getbaseclasses(StdSuites.Type_Names_Suite.location_reference)
+getbaseclasses(StdSuites.Type_Names_Suite.version)
+getbaseclasses(StdSuites.Type_Names_Suite.PostScript_picture)
+getbaseclasses(StdSuites.Type_Names_Suite.machine_location)
+getbaseclasses(StdSuites.Type_Names_Suite.menu_item)
+getbaseclasses(StdSuites.Type_Names_Suite.pixel_map_record)
+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.fixed_rectangle)
+getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_rectangle)
+getbaseclasses(StdSuites.Type_Names_Suite.type_event_info)
+getbaseclasses(StdSuites.Type_Names_Suite.small_real)
+getbaseclasses(StdSuites.Type_Names_Suite.type_suite_info)
+getbaseclasses(StdSuites.Type_Names_Suite.rotation)
+getbaseclasses(StdSuites.Type_Names_Suite.fixed)
+getbaseclasses(StdSuites.Type_Names_Suite.scrap_styles)
+getbaseclasses(StdSuites.Type_Names_Suite.long_point)
+getbaseclasses(StdSuites.Type_Names_Suite.type_class_info)
+getbaseclasses(StdSuites.Type_Names_Suite.TIFF_picture)
+getbaseclasses(StdSuites.Type_Names_Suite.RGB96_color)
+getbaseclasses(StdSuites.Type_Names_Suite.dash_style)
+getbaseclasses(StdSuites.Type_Names_Suite.type_property_info)
+getbaseclasses(StdSuites.Type_Names_Suite.type_parameter_info)
+getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_point)
+getbaseclasses(StdSuites.Type_Names_Suite.long_rectangle)
+getbaseclasses(StdSuites.Type_Names_Suite.extended_real)
+getbaseclasses(StdSuites.Type_Names_Suite.double_integer)
+getbaseclasses(StdSuites.Type_Names_Suite.long_fixed)
+getbaseclasses(StdSuites.Type_Names_Suite.null)
+getbaseclasses(StdSuites.Type_Names_Suite.target_id)
+getbaseclasses(StdSuites.Type_Names_Suite.point)
+getbaseclasses(StdSuites.Type_Names_Suite.bounding_rectangle)
+getbaseclasses(application)
+getbaseclasses(special_folders)
+getbaseclasses(item)
+getbaseclasses(trash_2d_object)
+getbaseclasses(desktop_2d_object)
+getbaseclasses(sharable_container)
+getbaseclasses(sharing_privileges)
+getbaseclasses(disk)
+getbaseclasses(folder)
+getbaseclasses(container)
+getbaseclasses(sound_file)
+getbaseclasses(font_file)
+getbaseclasses(internet_location_file)
+getbaseclasses(clipping)
+getbaseclasses(alias_file)
+getbaseclasses(desk_accessory_file)
+getbaseclasses(desk_accessory_suitcase)
+getbaseclasses(font_suitcase)
+getbaseclasses(file)
+getbaseclasses(application_file)
+getbaseclasses(suitcase)
+getbaseclasses(document_file)
+getbaseclasses(package)
+getbaseclasses(preferences_window)
+getbaseclasses(view_options_window)
+getbaseclasses(window)
+getbaseclasses(container_window)
+getbaseclasses(content_space)
+getbaseclasses(information_window)
+getbaseclasses(clipping_window)
+getbaseclasses(process)
+getbaseclasses(desk_accessory_process)
+getbaseclasses(application_process)
+getbaseclasses(preferences)
+getbaseclasses(alias_list)
+getbaseclasses(icon_family)
+getbaseclasses(label)
+getbaseclasses(StdSuites.Type_Names_Suite.small_integer)
+getbaseclasses(StdSuites.Type_Names_Suite.RGB16_color)
+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.plain_text)
+getbaseclasses(StdSuites.Type_Names_Suite.type_element_info)
+getbaseclasses(StdSuites.Type_Names_Suite.location_reference)
+getbaseclasses(StdSuites.Type_Names_Suite.version)
+getbaseclasses(StdSuites.Type_Names_Suite.PostScript_picture)
+getbaseclasses(StdSuites.Type_Names_Suite.machine_location)
+getbaseclasses(StdSuites.Type_Names_Suite.menu_item)
+getbaseclasses(StdSuites.Type_Names_Suite.pixel_map_record)
+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.fixed_rectangle)
+getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_rectangle)
+getbaseclasses(StdSuites.Type_Names_Suite.type_event_info)
+getbaseclasses(StdSuites.Type_Names_Suite.small_real)
+getbaseclasses(StdSuites.Type_Names_Suite.type_suite_info)
+getbaseclasses(StdSuites.Type_Names_Suite.rotation)
+getbaseclasses(StdSuites.Type_Names_Suite.fixed)
+getbaseclasses(StdSuites.Type_Names_Suite.scrap_styles)
+getbaseclasses(StdSuites.Type_Names_Suite.long_point)
+getbaseclasses(StdSuites.Type_Names_Suite.type_class_info)
+getbaseclasses(StdSuites.Type_Names_Suite.TIFF_picture)
+getbaseclasses(StdSuites.Type_Names_Suite.RGB96_color)
+getbaseclasses(StdSuites.Type_Names_Suite.dash_style)
+getbaseclasses(StdSuites.Type_Names_Suite.type_property_info)
+getbaseclasses(StdSuites.Type_Names_Suite.type_parameter_info)
+getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_point)
+getbaseclasses(StdSuites.Type_Names_Suite.long_rectangle)
+getbaseclasses(StdSuites.Type_Names_Suite.extended_real)
+getbaseclasses(StdSuites.Type_Names_Suite.double_integer)
+getbaseclasses(StdSuites.Type_Names_Suite.long_fixed)
+getbaseclasses(StdSuites.Type_Names_Suite.null)
+getbaseclasses(StdSuites.Type_Names_Suite.target_id)
+getbaseclasses(StdSuites.Type_Names_Suite.point)
+getbaseclasses(StdSuites.Type_Names_Suite.bounding_rectangle)
+getbaseclasses(status_window)
+getbaseclasses(application)
+getbaseclasses(sharing_window)
+getbaseclasses(control_panel)
+getbaseclasses(process)
+getbaseclasses(item)
+getbaseclasses(file)
+getbaseclasses(sharable_container)
+getbaseclasses(container_window)
+getbaseclasses(container)
+getbaseclasses(information_window)
+getbaseclasses(StdSuites.Type_Names_Suite.small_integer)
+getbaseclasses(StdSuites.Type_Names_Suite.RGB16_color)
+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.plain_text)
+getbaseclasses(StdSuites.Type_Names_Suite.type_element_info)
+getbaseclasses(StdSuites.Type_Names_Suite.location_reference)
+getbaseclasses(StdSuites.Type_Names_Suite.version)
+getbaseclasses(StdSuites.Type_Names_Suite.PostScript_picture)
+getbaseclasses(StdSuites.Type_Names_Suite.machine_location)
+getbaseclasses(StdSuites.Type_Names_Suite.menu_item)
+getbaseclasses(StdSuites.Type_Names_Suite.pixel_map_record)
+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.fixed_rectangle)
+getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_rectangle)
+getbaseclasses(StdSuites.Type_Names_Suite.type_event_info)
+getbaseclasses(StdSuites.Type_Names_Suite.small_real)
+getbaseclasses(StdSuites.Type_Names_Suite.type_suite_info)
+getbaseclasses(StdSuites.Type_Names_Suite.rotation)
+getbaseclasses(StdSuites.Type_Names_Suite.fixed)
+getbaseclasses(StdSuites.Type_Names_Suite.scrap_styles)
+getbaseclasses(StdSuites.Type_Names_Suite.long_point)
+getbaseclasses(StdSuites.Type_Names_Suite.type_class_info)
+getbaseclasses(StdSuites.Type_Names_Suite.TIFF_picture)
+getbaseclasses(StdSuites.Type_Names_Suite.RGB96_color)
+getbaseclasses(StdSuites.Type_Names_Suite.dash_style)
+getbaseclasses(StdSuites.Type_Names_Suite.type_property_info)
+getbaseclasses(StdSuites.Type_Names_Suite.type_parameter_info)
+getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_point)
+getbaseclasses(StdSuites.Type_Names_Suite.long_rectangle)
+getbaseclasses(StdSuites.Type_Names_Suite.extended_real)
+getbaseclasses(StdSuites.Type_Names_Suite.double_integer)
+getbaseclasses(StdSuites.Type_Names_Suite.long_fixed)
+getbaseclasses(StdSuites.Type_Names_Suite.null)
+getbaseclasses(StdSuites.Type_Names_Suite.target_id)
+getbaseclasses(StdSuites.Type_Names_Suite.point)
+getbaseclasses(StdSuites.Type_Names_Suite.bounding_rectangle)
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'dsut' : accessory_suitcase,
+ 'cprf' : preferences,
+ 'sctr' : sharable_container,
+ 'capp' : application,
+ 'ctrs' : trash_2d_object,
+ 'pcda' : accessory_process,
+ 'cwin' : window,
+ 'iwnd' : information_window,
+ 'prcs' : process,
+ 'appf' : application_file,
+ 'inlf' : internet_location,
+ 'cwnd' : container_window,
+ 'cobj' : item,
+ 'shor' : StdSuites.Type_Names_Suite.small_integer,
+ 'tr16' : StdSuites.Type_Names_Suite.RGB16_color,
+ '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.plain_text,
+ 'elin' : StdSuites.Type_Names_Suite.type_element_info,
+ 'insl' : StdSuites.Type_Names_Suite.location_reference,
+ 'vers' : StdSuites.Type_Names_Suite.version,
+ 'EPS ' : StdSuites.Type_Names_Suite.PostScript_picture,
+ 'mLoc' : StdSuites.Type_Names_Suite.machine_location,
+ 'cmen' : StdSuites.Type_Names_Suite.menu_item,
+ 'tpmm' : StdSuites.Type_Names_Suite.pixel_map_record,
+ 'aete' : StdSuites.Type_Names_Suite.application_dictionary,
+ 'magn' : StdSuites.Type_Names_Suite.unsigned_integer,
+ 'cmnu' : StdSuites.Type_Names_Suite.menu,
+ 'frct' : StdSuites.Type_Names_Suite.fixed_rectangle,
+ 'lfrc' : StdSuites.Type_Names_Suite.long_fixed_rectangle,
+ 'evin' : StdSuites.Type_Names_Suite.type_event_info,
+ 'sing' : StdSuites.Type_Names_Suite.small_real,
+ 'suin' : StdSuites.Type_Names_Suite.type_suite_info,
+ 'trot' : StdSuites.Type_Names_Suite.rotation,
+ 'fixd' : StdSuites.Type_Names_Suite.fixed,
+ 'styl' : StdSuites.Type_Names_Suite.scrap_styles,
+ 'lpnt' : StdSuites.Type_Names_Suite.long_point,
+ 'gcli' : StdSuites.Type_Names_Suite.type_class_info,
+ 'TIFF' : StdSuites.Type_Names_Suite.TIFF_picture,
+ 'tr96' : StdSuites.Type_Names_Suite.RGB96_color,
+ 'tdas' : StdSuites.Type_Names_Suite.dash_style,
+ 'pinf' : StdSuites.Type_Names_Suite.type_property_info,
+ 'pmin' : StdSuites.Type_Names_Suite.type_parameter_info,
+ 'lfpt' : StdSuites.Type_Names_Suite.long_fixed_point,
+ 'lrct' : StdSuites.Type_Names_Suite.long_rectangle,
+ 'exte' : StdSuites.Type_Names_Suite.extended_real,
+ 'comp' : StdSuites.Type_Names_Suite.double_integer,
+ 'lfxd' : StdSuites.Type_Names_Suite.long_fixed,
+ 'null' : StdSuites.Type_Names_Suite.null,
+ 'targ' : StdSuites.Type_Names_Suite.target_id,
+ 'QDpt' : StdSuites.Type_Names_Suite.point,
+ 'qdrt' : StdSuites.Type_Names_Suite.bounding_rectangle,
+ 'capp' : application,
+ 'spfl' : special_folders,
+ 'cobj' : item,
+ 'ctrs' : trash_2d_object,
+ 'cdsk' : desktop_2d_object,
+ 'sctr' : sharable_container,
+ 'priv' : sharing_privileges,
+ 'cdis' : disk,
+ 'cfol' : folder,
+ 'ctnr' : container,
+ 'sndf' : sound_file,
+ 'fntf' : font_file,
+ 'inlf' : internet_location_file,
+ 'clpf' : clipping,
+ 'alia' : alias_file,
+ 'dafi' : desk_accessory_file,
+ 'dsut' : desk_accessory_suitcase,
+ 'fsut' : font_suitcase,
+ 'file' : file,
+ 'appf' : application_file,
+ 'stcs' : suitcase,
+ 'docf' : document_file,
+ 'pack' : package,
+ 'pwnd' : preferences_window,
+ 'vwnd' : view_options_window,
+ 'cwin' : window,
+ 'cwnd' : container_window,
+ 'dwnd' : content_space,
+ 'iwnd' : information_window,
+ 'lwnd' : clipping_window,
+ 'prcs' : process,
+ 'pcda' : desk_accessory_process,
+ 'pcap' : application_process,
+ 'cprf' : preferences,
+ 'alst' : alias_list,
+ 'ifam' : icon_family,
+ 'clbl' : label,
+ 'shor' : StdSuites.Type_Names_Suite.small_integer,
+ 'tr16' : StdSuites.Type_Names_Suite.RGB16_color,
+ '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.plain_text,
+ 'elin' : StdSuites.Type_Names_Suite.type_element_info,
+ 'insl' : StdSuites.Type_Names_Suite.location_reference,
+ 'vers' : StdSuites.Type_Names_Suite.version,
+ 'EPS ' : StdSuites.Type_Names_Suite.PostScript_picture,
+ 'mLoc' : StdSuites.Type_Names_Suite.machine_location,
+ 'cmen' : StdSuites.Type_Names_Suite.menu_item,
+ 'tpmm' : StdSuites.Type_Names_Suite.pixel_map_record,
+ 'aete' : StdSuites.Type_Names_Suite.application_dictionary,
+ 'magn' : StdSuites.Type_Names_Suite.unsigned_integer,
+ 'cmnu' : StdSuites.Type_Names_Suite.menu,
+ 'frct' : StdSuites.Type_Names_Suite.fixed_rectangle,
+ 'lfrc' : StdSuites.Type_Names_Suite.long_fixed_rectangle,
+ 'evin' : StdSuites.Type_Names_Suite.type_event_info,
+ 'sing' : StdSuites.Type_Names_Suite.small_real,
+ 'suin' : StdSuites.Type_Names_Suite.type_suite_info,
+ 'trot' : StdSuites.Type_Names_Suite.rotation,
+ 'fixd' : StdSuites.Type_Names_Suite.fixed,
+ 'styl' : StdSuites.Type_Names_Suite.scrap_styles,
+ 'lpnt' : StdSuites.Type_Names_Suite.long_point,
+ 'gcli' : StdSuites.Type_Names_Suite.type_class_info,
+ 'TIFF' : StdSuites.Type_Names_Suite.TIFF_picture,
+ 'tr96' : StdSuites.Type_Names_Suite.RGB96_color,
+ 'tdas' : StdSuites.Type_Names_Suite.dash_style,
+ 'pinf' : StdSuites.Type_Names_Suite.type_property_info,
+ 'pmin' : StdSuites.Type_Names_Suite.type_parameter_info,
+ 'lfpt' : StdSuites.Type_Names_Suite.long_fixed_point,
+ 'lrct' : StdSuites.Type_Names_Suite.long_rectangle,
+ 'exte' : StdSuites.Type_Names_Suite.extended_real,
+ 'comp' : StdSuites.Type_Names_Suite.double_integer,
+ 'lfxd' : StdSuites.Type_Names_Suite.long_fixed,
+ 'null' : StdSuites.Type_Names_Suite.null,
+ 'targ' : StdSuites.Type_Names_Suite.target_id,
+ 'QDpt' : StdSuites.Type_Names_Suite.point,
+ 'qdrt' : StdSuites.Type_Names_Suite.bounding_rectangle,
+ 'qwnd' : status_window,
+ 'capp' : application,
+ 'swnd' : sharing_window,
+ 'ccdv' : control_panel,
+ 'prcs' : process,
+ 'cobj' : item,
+ 'file' : file,
+ 'sctr' : sharable_container,
+ 'cwnd' : container_window,
+ 'ctnr' : container,
+ 'iwnd' : information_window,
+ 'shor' : StdSuites.Type_Names_Suite.small_integer,
+ 'tr16' : StdSuites.Type_Names_Suite.RGB16_color,
+ '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.plain_text,
+ 'elin' : StdSuites.Type_Names_Suite.type_element_info,
+ 'insl' : StdSuites.Type_Names_Suite.location_reference,
+ 'vers' : StdSuites.Type_Names_Suite.version,
+ 'EPS ' : StdSuites.Type_Names_Suite.PostScript_picture,
+ 'mLoc' : StdSuites.Type_Names_Suite.machine_location,
+ 'cmen' : StdSuites.Type_Names_Suite.menu_item,
+ 'tpmm' : StdSuites.Type_Names_Suite.pixel_map_record,
+ 'aete' : StdSuites.Type_Names_Suite.application_dictionary,
+ 'magn' : StdSuites.Type_Names_Suite.unsigned_integer,
+ 'cmnu' : StdSuites.Type_Names_Suite.menu,
+ 'frct' : StdSuites.Type_Names_Suite.fixed_rectangle,
+ 'lfrc' : StdSuites.Type_Names_Suite.long_fixed_rectangle,
+ 'evin' : StdSuites.Type_Names_Suite.type_event_info,
+ 'sing' : StdSuites.Type_Names_Suite.small_real,
+ 'suin' : StdSuites.Type_Names_Suite.type_suite_info,
+ 'trot' : StdSuites.Type_Names_Suite.rotation,
+ 'fixd' : StdSuites.Type_Names_Suite.fixed,
+ 'styl' : StdSuites.Type_Names_Suite.scrap_styles,
+ 'lpnt' : StdSuites.Type_Names_Suite.long_point,
+ 'gcli' : StdSuites.Type_Names_Suite.type_class_info,
+ 'TIFF' : StdSuites.Type_Names_Suite.TIFF_picture,
+ 'tr96' : StdSuites.Type_Names_Suite.RGB96_color,
+ 'tdas' : StdSuites.Type_Names_Suite.dash_style,
+ 'pinf' : StdSuites.Type_Names_Suite.type_property_info,
+ 'pmin' : StdSuites.Type_Names_Suite.type_parameter_info,
+ 'lfpt' : StdSuites.Type_Names_Suite.long_fixed_point,
+ 'lrct' : StdSuites.Type_Names_Suite.long_rectangle,
+ 'exte' : StdSuites.Type_Names_Suite.extended_real,
+ 'comp' : StdSuites.Type_Names_Suite.double_integer,
+ 'lfxd' : StdSuites.Type_Names_Suite.long_fixed,
+ 'null' : StdSuites.Type_Names_Suite.null,
+ 'targ' : StdSuites.Type_Names_Suite.target_id,
+ 'QDpt' : StdSuites.Type_Names_Suite.point,
+ 'qdrt' : StdSuites.Type_Names_Suite.bounding_rectangle,
+}
+
+
+class Finder(Standard_Suite_Events,
+ Earlier_terms_Events,
+ Finder_Basics_Events,
+ Finder_items_Events,
+ Containers_and_folders_Events,
+ Files_and_suitcases_Events,
+ Window_classes_Events,
+ Process_classes_Events,
+ Type_Definitions_Events,
+ Enumerations_Events,
+ Obsolete_terms_Events,
+ aetools.TalkTo):
+ _signature = 'MACS'
+
+ _moduleName = 'Finder'
+
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py
new file mode 100644
index 0000000..45f8ffd
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py
@@ -0,0 +1,269 @@
+"""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:
+
+ _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['----']
+
+ 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_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 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 != 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_Profile_Manager(self, _no_object=None, _attributes={}, **_arguments):
+ """Open Profile Manager: Open the user profile manager (obsolete)
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'MOSS'
+ _subcode = 'prfl'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def Get_Import_Data(self, _no_object=None, _attributes={}, **_arguments):
+ """Get Import Data: Returns a structure containing information that is of use to an external module in importing data from an external mail application into Communicator.
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ Returns: vRefNum and dirID of profile folder (2+4 bytes), vRefNum and DirID of the local mail folder (2+4 bytes), window type of front window (0 if none, \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 != 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 != 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_Address_Book(self, _no_object=None, _attributes={}, **_arguments):
+ """Open Address Book: Opens the address book
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'MOSS'
+ _subcode = 'addr'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.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 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['----']
+
+_Enum_dire = {
+ 'again' : 'agai', # Again (reload)
+ 'home' : 'home', # Home
+ 'backward' : 'prev', # Previous page
+ 'forward' : 'next', # Next page
+}
+
+_Enum_comp = {
+ 'Navigator' : 'navg', # The Navigator component
+ 'InBox' : 'inbx', # The InBox component
+ 'Newsgroups' : 'colb', # The Newsgroups component
+ 'Composer' : 'cpsr', # The Page Composer component
+ 'Conference' : 'conf', # The Conference Component
+ 'Calendar' : 'cald', # The Calendar Component
+}
+
+_Enum_ncmd = {
+ 'Get_new_mail' : '\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,
+ 'ncmd' : _Enum_ncmd,
+ 'dire' : _Enum_dire,
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py b/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py
new file mode 100644
index 0000000..e21242b
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py
@@ -0,0 +1,86 @@
+"""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_select = {
+ 'data' : 'data',
+ }
+
+ def select(self, _object, _attributes={}, **_arguments):
+ """select: Sets the present selection
+ Required argument: object to select or container of sub-objects to select
+ Keyword argument data: sub-object(s) to select
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'misc'
+ _subcode = 'slct'
+
+ aetools.keysubst(_arguments, self._argmap_select)
+ _arguments['----'] = _object
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ _argmap_SwitchTellTarget = {
+ 'to' : 'data',
+ }
+
+ def SwitchTellTarget(self, _no_object=None, _attributes={}, **_arguments):
+ """SwitchTellTarget: Makes an object the \xd2focus\xd3 of AppleEvents
+ Keyword argument to: reference to new focus of AppleEvents
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'ppnt'
+ _subcode = 'sttg'
+
+ aetools.keysubst(_arguments, self._argmap_SwitchTellTarget)
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+_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
new file mode 100644
index 0000000..8da57b6
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Required_suite.py
@@ -0,0 +1,108 @@
+"""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 != 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 != 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
new file mode 100644
index 0000000..5bf2d18
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py
@@ -0,0 +1,241 @@
+"""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 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'
+class kiosk_mode(aetools.NProperty):
+ """kiosk mode - Kiosk mode leaves very few menus enabled """
+ which = 'KOSK'
+ want = 'long'
+# element 'cwin' as ['indx', 'name', 'ID ']
+
+class window(aetools.ComponentItem):
+ """window - A Window """
+ want = 'cwin'
+class bounds(aetools.NProperty):
+ """bounds - the boundary rectangle for the window """
+ which = 'pbnd'
+ want = 'qdrt'
+class closeable(aetools.NProperty):
+ """closeable - Does the window have a close box? """
+ which = 'hclb'
+ want = 'bool'
+class titled(aetools.NProperty):
+ """titled - Does the window have a title bar? """
+ which = 'ptit'
+ want = 'bool'
+class index(aetools.NProperty):
+ """index - the number of the window """
+ which = 'pidx'
+ want = 'long'
+class floating(aetools.NProperty):
+ """floating - Does the window float? """
+ which = 'isfl'
+ want = 'bool'
+class modal(aetools.NProperty):
+ """modal - Is the window modal? """
+ which = 'pmod'
+ want = 'bool'
+class resizable(aetools.NProperty):
+ """resizable - Is the window resizable? """
+ which = 'prsz'
+ want = 'bool'
+class zoomable(aetools.NProperty):
+ """zoomable - Is the window zoomable? """
+ which = 'iszm'
+ want = 'bool'
+class zoomed(aetools.NProperty):
+ """zoomed - Is the window zoomed? """
+ which = 'pzum'
+ want = 'bool'
+class name(aetools.NProperty):
+ """name - the title of the window """
+ which = 'pnam'
+ want = 'itxt'
+class visible(aetools.NProperty):
+ """visible - is the window visible? """
+ which = 'pvis'
+ want = 'bool'
+class position(aetools.NProperty):
+ """position - upper left coordinates of window """
+ which = 'ppos'
+ want = 'QDpt'
+class URL(aetools.NProperty):
+ """URL - Current URL """
+ which = 'curl'
+ want = 'TEXT'
+class unique_ID(aetools.NProperty):
+ """unique ID - Window\xd5s unique ID (a bridge between WWW! suite window id\xd5s and standard AE windows) """
+ which = 'wiid'
+ want = 'long'
+class busy(aetools.NProperty):
+ """busy - Is window loading something right now. 2, window is busy and will reject load requests. 1, window is busy, but will interrupt outstanding loads """
+ which = 'busy'
+ want = 'long'
+application._superclassnames = []
+application._privpropdict = {
+ 'alert_application' : alert_application,
+ 'kiosk_mode' : kiosk_mode,
+}
+application._privelemdict = {
+ 'window' : window,
+}
+window._superclassnames = []
+window._privpropdict = {
+ 'bounds' : bounds,
+ 'closeable' : closeable,
+ 'titled' : titled,
+ 'index' : index,
+ 'floating' : floating,
+ 'modal' : modal,
+ 'resizable' : resizable,
+ 'zoomable' : zoomable,
+ 'zoomed' : zoomed,
+ 'name' : name,
+ 'visible' : visible,
+ 'position' : position,
+ 'URL' : URL,
+ 'unique_ID' : unique_ID,
+ 'busy' : busy,
+}
+window._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'cwin' : window,
+ 'capp' : application,
+}
+
+_propdeclarations = {
+ 'prsz' : resizable,
+ 'busy' : busy,
+ 'KOSK' : kiosk_mode,
+ 'pvis' : visible,
+ 'hclb' : closeable,
+ 'pmod' : modal,
+ 'wiid' : unique_ID,
+ 'pbnd' : bounds,
+ 'iszm' : zoomable,
+ 'ALAP' : alert_application,
+ 'pidx' : index,
+ 'isfl' : floating,
+ 'pnam' : name,
+ 'ppos' : position,
+ 'curl' : URL,
+ 'pzum' : zoomed,
+ 'ptit' : titled,
+}
+
+_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
new file mode 100644
index 0000000..66d359e
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py
@@ -0,0 +1,60 @@
+"""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
new file mode 100644
index 0000000..1620c8c
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Text.py
@@ -0,0 +1,122 @@
+"""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 updateLevel(aetools.NProperty):
+ """updateLevel - updating level. Can only be incremented or decremented. Do so only in a try block -- if the level is greater than zero, visual text updating will cease. """
+ which = 'pUpL'
+ want = 'long'
+class beginning(aetools.NProperty):
+ """beginning - Beginning of element """
+ which = 'bgng'
+ want = 'obj '
+class end(aetools.NProperty):
+ """end - Ending of element """
+ which = 'end '
+ want = 'obj '
+class infront(aetools.NProperty):
+ """infront - Immediately before element """
+ which = 'pBef'
+ want = 'obj '
+class justbehind(aetools.NProperty):
+ """justbehind - Immediately after element """
+ which = 'pAft'
+ want = 'obj '
+# element 'stys' as ['indx', 'name']
+
+class styleset(aetools.ComponentItem):
+ """styleset - A style \xd2set\xd3 that may be used repeatedly in text objects. """
+ want = 'stys'
+class name(aetools.NProperty):
+ """name - style name """
+ which = 'pnam'
+ want = 'TEXT'
+class color(aetools.NProperty):
+ """color - the color """
+ which = 'colr'
+ want = 'RGB '
+class font(aetools.NProperty):
+ """font - font name """
+ which = 'font'
+ want = 'TEXT'
+class size(aetools.NProperty):
+ """size - the size in points """
+ which = 'ptsz'
+ want = 'long'
+class writing_code(aetools.NProperty):
+ """writing code - the script system and language """
+ which = 'psct'
+ want = 'tsty'
+class style(aetools.NProperty):
+ """style - the text styles or face attributes """
+ which = 'txst'
+ want = 'tsty'
+
+stylesets = styleset
+text._superclassnames = []
+text._privpropdict = {
+ 'updateLevel' : updateLevel,
+ 'beginning' : beginning,
+ 'end' : end,
+ 'infront' : infront,
+ 'justbehind' : justbehind,
+}
+text._privelemdict = {
+ 'styleset' : styleset,
+}
+styleset._superclassnames = []
+styleset._privpropdict = {
+ 'name' : name,
+ 'color' : color,
+ 'font' : font,
+ 'size' : size,
+ 'writing_code' : writing_code,
+ 'style' : style,
+}
+styleset._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'ctxt' : text,
+ 'stys' : styleset,
+}
+
+_propdeclarations = {
+ 'pBef' : infront,
+ 'bgng' : beginning,
+ 'colr' : color,
+ 'txst' : style,
+ 'psct' : writing_code,
+ 'pAft' : justbehind,
+ 'end ' : end,
+ 'ptsz' : size,
+ 'pUpL' : updateLevel,
+ 'pnam' : name,
+ 'font' : font,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py
new file mode 100644
index 0000000..c9c4fde
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py
@@ -0,0 +1,426 @@
+"""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_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['----']
+
+ _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 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['----']
+
+ def list_windows(self, _no_object=None, _attributes={}, **_arguments):
+ """list windows: Lists the IDs of all the hypertext windows
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ Returns: List of unique IDs of all the hypertext windows
+ """
+ _code = 'WWW!'
+ _subcode = 'LSTW'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.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 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['----']
+
+ 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_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_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_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_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_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['----']
+
+ _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['----']
+
+
+#
+# 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
new file mode 100644
index 0000000..40cca88
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py
@@ -0,0 +1,101 @@
+"""
+Package generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicatorâ„¢ Folder/Netscape Communicatorâ„¢
+Resource aete resid 0
+"""
+import aetools
+Error = aetools.Error
+import Required_suite
+import Standard_Suite
+import Standard_URL_suite
+import WorldWideWeb_suite
+import Mozilla_suite
+import PowerPlant
+import Text
+
+
+_code_to_module = {
+ 'reqd' : Required_suite,
+ 'CoRe' : Standard_Suite,
+ 'GURL' : Standard_URL_suite,
+ 'WWW!' : WorldWideWeb_suite,
+ 'MOSS' : Mozilla_suite,
+ 'ppnt' : PowerPlant,
+ 'TEXT' : Text,
+}
+
+
+
+_code_to_fullname = {
+ 'reqd' : ('Netscape.Required_suite', 'Required_suite'),
+ 'CoRe' : ('Netscape.Standard_Suite', 'Standard_Suite'),
+ 'GURL' : ('Netscape.Standard_URL_suite', 'Standard_URL_suite'),
+ 'WWW!' : ('Netscape.WorldWideWeb_suite', 'WorldWideWeb_suite'),
+ 'MOSS' : ('Netscape.Mozilla_suite', 'Mozilla_suite'),
+ 'ppnt' : ('Netscape.PowerPlant', 'PowerPlant'),
+ 'TEXT' : ('Netscape.Text', 'Text'),
+}
+
+from Required_suite import *
+from Standard_Suite import *
+from Standard_URL_suite import *
+from WorldWideWeb_suite import *
+from Mozilla_suite import *
+from PowerPlant import *
+from Text import *
+def getbaseclasses(v):
+ if hasattr(v, '_superclassnames') and not hasattr(v, '_propdict'):
+ v._propdict = {}
+ v._elemdict = {}
+ for superclass in v._superclassnames:
+ v._propdict.update(getattr(eval(superclass), '_privpropdict', {}))
+ v._elemdict.update(getattr(eval(superclass), '_privelemdict', {}))
+ v._propdict.update(v._privpropdict)
+ v._elemdict.update(v._privelemdict)
+
+import StdSuites
+
+#
+# Set property and element dictionaries now that all classes have been defined
+#
+getbaseclasses(window)
+getbaseclasses(application)
+getbaseclasses(text)
+getbaseclasses(styleset)
+getbaseclasses(StdSuites.Text_Suite.paragraph)
+getbaseclasses(StdSuites.Text_Suite.character)
+getbaseclasses(StdSuites.Text_Suite.text_style_info)
+getbaseclasses(StdSuites.Text_Suite.word)
+getbaseclasses(StdSuites.Text_Suite.text_flow)
+getbaseclasses(StdSuites.Text_Suite.line)
+getbaseclasses(StdSuites.Text_Suite.text)
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'cwin' : window,
+ 'capp' : application,
+ 'ctxt' : text,
+ 'stys' : styleset,
+ 'cpar' : StdSuites.Text_Suite.paragraph,
+ 'cha ' : StdSuites.Text_Suite.character,
+ 'tsty' : StdSuites.Text_Suite.text_style_info,
+ 'cwor' : StdSuites.Text_Suite.word,
+ 'cflo' : StdSuites.Text_Suite.text_flow,
+ 'clin' : StdSuites.Text_Suite.line,
+ 'ctxt' : StdSuites.Text_Suite.text,
+}
+
+
+class Netscape(Required_suite_Events,
+ Standard_Suite_Events,
+ Standard_URL_suite_Events,
+ WorldWideWeb_suite_Events,
+ Mozilla_suite_Events,
+ PowerPlant_Events,
+ Text_Events,
+ aetools.TalkTo):
+ _signature = 'MOSS'
+
+ _moduleName = 'Netscape'
+
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py
new file mode 100644
index 0000000..51d4212
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py
@@ -0,0 +1,2182 @@
+"""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 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 != 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 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 != 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 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 != 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 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 != 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 != 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 != 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 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 != 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_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['----']
+
+ _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 _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 _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 _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 _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 _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['----']
+
+ 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 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 _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 _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['----']
+
+ 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 _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 _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 _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 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 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['----']
+
+ 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 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 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 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 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 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['----']
+
+
+class boolean(aetools.ComponentItem):
+ """boolean - A true or false value """
+ want = 'bool'
+
+booleans = boolean
+
+class integer(aetools.ComponentItem):
+ """integer - An integral number """
+ want = 'long'
+
+integers = integer
+
+class real(aetools.ComponentItem):
+ """real - A real number """
+ want = 'doub'
+
+reals = real
+
+class number(aetools.ComponentItem):
+ """number - an integer or real number """
+ want = 'nmbr'
+
+numbers = number
+
+class list(aetools.ComponentItem):
+ """list - An ordered collection of items """
+ want = 'list'
+class length(aetools.NProperty):
+ """length - the length of a list """
+ which = 'leng'
+ want = 'long'
+class reverse(aetools.NProperty):
+ """reverse - the items of the list in reverse order """
+ which = 'rvse'
+ want = 'list'
+class rest(aetools.NProperty):
+ """rest - all items of the list excluding first """
+ which = 'rest'
+ want = 'list'
+
+lists = list
+
+class linked_list(aetools.ComponentItem):
+ """linked list - An ordered collection of items """
+ want = 'llst'
+
+linked_lists = linked_list
+
+class vector(aetools.ComponentItem):
+ """vector - An ordered collection of items """
+ want = 'vect'
+
+vectors = vector
+
+class record(aetools.ComponentItem):
+ """record - A set of labeled items """
+ want = 'reco'
+
+records = record
+
+class item(aetools.ComponentItem):
+ """item - An item of any type """
+ want = 'cobj'
+class id(aetools.NProperty):
+ """id - the unique ID number of this object """
+ which = 'ID '
+ want = 'long'
+
+items = item
+
+class script(aetools.ComponentItem):
+ """script - An AppleScript script """
+ want = 'scpt'
+class name(aetools.NProperty):
+ """name - the name of the script """
+ which = 'pnam'
+ want = 'TEXT'
+class 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 list_or_record(aetools.ComponentItem):
+ """list or record - a list or record """
+ want = 'lr '
+
+class list_or_string(aetools.ComponentItem):
+ """list or string - a list or string """
+ want = 'ls '
+
+class number_or_string(aetools.ComponentItem):
+ """number or string - a number or string """
+ want = 'ns '
+
+class alias_or_string(aetools.ComponentItem):
+ """alias or string - an alias or string """
+ want = 'sf '
+
+class list_2c__record_or_text(aetools.ComponentItem):
+ """list, record or text - a list, record or text """
+ want = 'lrs '
+
+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 class_(aetools.ComponentItem):
+ """class - the type of a value """
+ want = 'pcls'
+class _3c_Inheritance_3e_(aetools.NProperty):
+ """<Inheritance> - inherits some of its properties from this class """
+ which = 'c@#^'
+ want = 'type'
+
+classes = class_
+
+class event(aetools.ComponentItem):
+ """event - an AppleEvents event """
+ want = 'evnt'
+
+events = event
+
+class property(aetools.ComponentItem):
+ """property - an AppleEvents property """
+ want = 'prop'
+
+properties = property
+
+class constant(aetools.ComponentItem):
+ """constant - A constant value """
+ want = 'enum'
+
+constants = constant
+
+class preposition(aetools.ComponentItem):
+ """preposition - an AppleEvents preposition """
+ want = 'prep'
+
+prepositions = preposition
+
+class reference_form(aetools.ComponentItem):
+ """reference form - an AppleEvents key form """
+ want = 'kfrm'
+
+reference_forms = reference_form
+
+class handler(aetools.ComponentItem):
+ """handler - an AppleScript event or subroutine handler """
+ want = 'hand'
+
+handlers = handler
+
+class data(aetools.ComponentItem):
+ """data - an AppleScript raw data object """
+ want = 'rdat'
+
+class text(aetools.ComponentItem):
+ """text - text with language and style information """
+ want = 'ctxt'
+
+class international_text(aetools.ComponentItem):
+ """international text - """
+ want = 'itxt'
+
+international_text = international_text
+
+class string(aetools.ComponentItem):
+ """string - text in 8-bit Macintosh Roman format """
+ want = 'TEXT'
+
+strings = string
+
+class styled_text(aetools.ComponentItem):
+ """styled text - """
+ want = 'STXT'
+
+styled_text = styled_text
+
+class styled_Clipboard_text(aetools.ComponentItem):
+ """styled Clipboard text - """
+ want = 'styl'
+
+styled_Clipboard_text = styled_Clipboard_text
+
+class Unicode_text(aetools.ComponentItem):
+ """Unicode text - """
+ want = 'utxt'
+
+Unicode_text = Unicode_text
+
+class styled_Unicode_text(aetools.ComponentItem):
+ """styled Unicode text - """
+ want = 'sutx'
+
+styled_Unicode_text = styled_Unicode_text
+
+class encoded_string(aetools.ComponentItem):
+ """encoded string - text encoded using the Text Encoding Converter """
+ want = 'encs'
+
+encoded_strings = encoded_string
+
+class C_string(aetools.ComponentItem):
+ """C string - text followed by a null """
+ want = 'cstr'
+
+C_strings = C_string
+
+class Pascal_string(aetools.ComponentItem):
+ """Pascal string - text up to 255 characters preceded by a length byte """
+ want = 'pstr'
+
+Pascal_strings = Pascal_string
+
+class character(aetools.ComponentItem):
+ """character - an individual text character """
+ want = 'cha '
+
+characters = character
+
+class text_item(aetools.ComponentItem):
+ """text item - text between delimiters """
+ want = 'citm'
+
+text_items = text_item
+
+class writing_code(aetools.ComponentItem):
+ """writing code - codes that identify the language and script system """
+ want = 'psct'
+
+class writing_code_info(aetools.ComponentItem):
+ """writing code info - script code and language code of text run """
+ want = 'citl'
+class script_code(aetools.NProperty):
+ """script code - the script code for the text """
+ which = 'pscd'
+ want = 'shor'
+class language_code(aetools.NProperty):
+ """language code - the language code for the text """
+ which = 'plcd'
+ want = 'shor'
+
+writing_code_infos = writing_code_info
+
+class empty_ae_name_(aetools.ComponentItem):
+ """ - the undefined value """
+ want = 'undf'
+
+class missing_value(aetools.ComponentItem):
+ """missing value - unavailable value, such as properties missing from heterogeneous classes in a Whose clause """
+ want = 'msng'
+
+missing_values = missing_value
+
+class reference(aetools.ComponentItem):
+ """reference - an AppleScript reference """
+ want = 'obj '
+
+references = reference
+
+class anything(aetools.ComponentItem):
+ """anything - any class or reference """
+ want = '****'
+
+class type_class(aetools.ComponentItem):
+ """type class - the name of a particular class (or any four-character code) """
+ want = 'type'
+
+class RGB_color(aetools.ComponentItem):
+ """RGB color - Three integers specifying red, green, blue color values """
+ want = 'cRGB'
+
+RGB_colors = RGB_color
+
+class picture(aetools.ComponentItem):
+ """picture - A QuickDraw picture object """
+ want = 'PICT'
+
+pictures = picture
+
+class sound(aetools.ComponentItem):
+ """sound - a sound object on the clipboard """
+ want = 'snd '
+
+sounds = sound
+
+class version(aetools.ComponentItem):
+ """version - a version value """
+ want = 'vers'
+
+class file_specification(aetools.ComponentItem):
+ """file specification - a file specification as used by the operating system """
+ want = 'fss '
+
+file_specifications = file_specification
+
+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'
+
+aliases = alias
+
+class machine(aetools.ComponentItem):
+ """machine - a computer """
+ want = 'mach'
+
+machines = machine
+
+class zone(aetools.ComponentItem):
+ """zone - an AppleTalk zone """
+ want = 'zone'
+
+zones = zone
+
+class keystroke(aetools.ComponentItem):
+ """keystroke - a press of a key combination on a Macintosh keyboard """
+ want = 'kprs'
+class key(aetools.NProperty):
+ """key - the character for the key was pressed (ignoring modifiers) """
+ which = 'kMsg'
+ want = 'cha '
+class modifiers(aetools.NProperty):
+ """modifiers - the modifier keys pressed in combination """
+ which = 'kMod'
+ want = 'eMds'
+class key_kind(aetools.NProperty):
+ """key kind - the kind of key that was pressed """
+ which = 'kknd'
+ want = 'ekst'
+
+keystrokes = keystroke
+
+class seconds(aetools.ComponentItem):
+ """seconds - more than one second """
+ want = 'scnd'
+
+class date(aetools.ComponentItem):
+ """date - Absolute date and time values """
+ want = 'ldt '
+class weekday(aetools.NProperty):
+ """weekday - the day of a week of a date """
+ which = 'wkdy'
+ want = 'wkdy'
+class month(aetools.NProperty):
+ """month - the month of a date """
+ which = 'mnth'
+ want = 'mnth'
+class day(aetools.NProperty):
+ """day - the day of the month of a date """
+ which = 'day '
+ want = 'long'
+class year(aetools.NProperty):
+ """year - the year of a date """
+ which = 'year'
+ want = 'long'
+class time(aetools.NProperty):
+ """time - the time since midnight of a date """
+ which = 'time'
+ want = 'long'
+class date_string(aetools.NProperty):
+ """date string - the date portion of a date-time value as text """
+ which = 'dstr'
+ want = 'TEXT'
+class time_string(aetools.NProperty):
+ """time string - the time portion of a date-time value as text """
+ which = 'tstr'
+ want = 'TEXT'
+
+dates = date
+
+class month(aetools.ComponentItem):
+ """month - a month """
+ want = 'mnth'
+
+months = month
+
+class January(aetools.ComponentItem):
+ """January - the month of January """
+ want = 'jan '
+
+class February(aetools.ComponentItem):
+ """February - the month of February """
+ want = 'feb '
+
+class March(aetools.ComponentItem):
+ """March - the month of March """
+ want = 'mar '
+
+class April(aetools.ComponentItem):
+ """April - the month of April """
+ want = 'apr '
+
+class May(aetools.ComponentItem):
+ """May - the month of May """
+ want = 'may '
+
+class June(aetools.ComponentItem):
+ """June - the month of June """
+ want = 'jun '
+
+class July(aetools.ComponentItem):
+ """July - the month of July """
+ want = 'jul '
+
+class August(aetools.ComponentItem):
+ """August - the month of August """
+ want = 'aug '
+
+class September(aetools.ComponentItem):
+ """September - the month of September """
+ want = 'sep '
+
+class October(aetools.ComponentItem):
+ """October - the month of October """
+ want = 'oct '
+
+class November(aetools.ComponentItem):
+ """November - the month of November """
+ want = 'nov '
+
+class December(aetools.ComponentItem):
+ """December - the month of December """
+ want = 'dec '
+
+class weekday(aetools.ComponentItem):
+ """weekday - a weekday """
+ want = 'wkdy'
+
+weekdays = weekday
+
+class Sunday(aetools.ComponentItem):
+ """Sunday - Sunday """
+ want = 'sun '
+
+class Monday(aetools.ComponentItem):
+ """Monday - Monday """
+ want = 'mon '
+
+class Tuesday(aetools.ComponentItem):
+ """Tuesday - Tuesday """
+ want = 'tue '
+
+class Wednesday(aetools.ComponentItem):
+ """Wednesday - Wednesday """
+ want = 'wed '
+
+class Thursday(aetools.ComponentItem):
+ """Thursday - Thursday """
+ want = 'thu '
+
+class Friday(aetools.ComponentItem):
+ """Friday - Friday """
+ want = 'fri '
+
+class Saturday(aetools.ComponentItem):
+ """Saturday - Saturday """
+ want = 'sat '
+
+class metres(aetools.ComponentItem):
+ """metres - a distance measurement in SI meters """
+ want = 'metr'
+
+meters = metres
+
+class inches(aetools.ComponentItem):
+ """inches - a distance measurement in Imperial inches """
+ want = 'inch'
+
+class feet(aetools.ComponentItem):
+ """feet - a distance measurement in Imperial feet """
+ want = 'feet'
+
+class yards(aetools.ComponentItem):
+ """yards - a distance measurement in Imperial yards """
+ want = 'yard'
+
+class miles(aetools.ComponentItem):
+ """miles - a distance measurement in Imperial miles """
+ want = 'mile'
+
+class kilometres(aetools.ComponentItem):
+ """kilometres - a distance measurement in SI kilometers """
+ want = 'kmtr'
+
+kilometers = kilometres
+
+class centimetres(aetools.ComponentItem):
+ """centimetres - a distance measurement in SI centimeters """
+ want = 'cmtr'
+
+centimeters = centimetres
+
+class square_metres(aetools.ComponentItem):
+ """square metres - an area measurement in SI square meters """
+ want = 'sqrm'
+
+square_meters = square_metres
+
+class square_feet(aetools.ComponentItem):
+ """square feet - an area measurement in Imperial square feet """
+ want = 'sqft'
+
+class square_yards(aetools.ComponentItem):
+ """square yards - an area measurement in Imperial square yards """
+ want = 'sqyd'
+
+class square_miles(aetools.ComponentItem):
+ """square miles - an area measurement in Imperial square miles """
+ want = 'sqmi'
+
+class square_kilometres(aetools.ComponentItem):
+ """square kilometres - an area measurement in SI square kilometers """
+ want = 'sqkm'
+
+square_kilometers = square_kilometres
+
+class litres(aetools.ComponentItem):
+ """litres - a volume measurement in SI liters """
+ want = 'litr'
+
+liters = litres
+
+class gallons(aetools.ComponentItem):
+ """gallons - a volume measurement in Imperial gallons """
+ want = 'galn'
+
+class quarts(aetools.ComponentItem):
+ """quarts - a volume measurement in Imperial quarts """
+ want = 'qrts'
+
+class cubic_metres(aetools.ComponentItem):
+ """cubic metres - a volume measurement in SI cubic meters """
+ want = 'cmet'
+
+cubic_meters = cubic_metres
+
+class cubic_centimetres(aetools.ComponentItem):
+ """cubic centimetres - a volume measurement in SI cubic centimeters """
+ want = 'ccmt'
+
+cubic_centimeters = cubic_centimetres
+
+class cubic_feet(aetools.ComponentItem):
+ """cubic feet - a volume measurement in Imperial cubic feet """
+ want = 'cfet'
+
+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 kilograms(aetools.ComponentItem):
+ """kilograms - a mass measurement in SI kilograms """
+ want = 'kgrm'
+
+class grams(aetools.ComponentItem):
+ """grams - a mass measurement in SI meters """
+ want = 'gram'
+
+class ounces(aetools.ComponentItem):
+ """ounces - a weight measurement in SI meters """
+ want = 'ozs '
+
+class pounds(aetools.ComponentItem):
+ """pounds - a weight measurement in SI meters """
+ want = 'lbs '
+
+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 upper_case(aetools.ComponentItem):
+ """upper case - Text with lower case converted to upper case """
+ want = 'case'
+
+class app(aetools.ComponentItem):
+ """app - Short name for application """
+ want = 'capp'
+
+application = app
+class result(aetools.NProperty):
+ """result - the last result of evaluation """
+ which = 'rslt'
+ want = '****'
+class space(aetools.NProperty):
+ """space - a space character """
+ which = 'spac'
+ want = 'cha '
+class return_(aetools.NProperty):
+ """return - a return character """
+ which = 'ret '
+ want = 'cha '
+class tab(aetools.NProperty):
+ """tab - a tab character """
+ which = 'tab '
+ want = 'cha '
+class minutes(aetools.NProperty):
+ """minutes - the number of seconds in a minute """
+ which = 'min '
+ want = 'long'
+class hours(aetools.NProperty):
+ """hours - the number of seconds in an hour """
+ which = 'hour'
+ want = 'long'
+class days(aetools.NProperty):
+ """days - the number of seconds in a day """
+ which = 'days'
+ want = 'long'
+class weeks(aetools.NProperty):
+ """weeks - the number of seconds in a week """
+ which = 'week'
+ want = 'long'
+class pi(aetools.NProperty):
+ """pi - the constant pi """
+ which = 'pi '
+ want = 'doub'
+class print_length(aetools.NProperty):
+ """print length - the maximum length to print """
+ which = 'prln'
+ want = 'long'
+class print_depth(aetools.NProperty):
+ """print depth - the maximum depth to print """
+ which = 'prdp'
+ want = 'long'
+class text_item_delimiters(aetools.NProperty):
+ """text item delimiters - the text item delimiters of a string """
+ which = 'txdl'
+ want = 'list'
+class AppleScript(aetools.NProperty):
+ """AppleScript - the top-level script object """
+ which = 'ascr'
+ want = 'scpt'
+
+applications = app
+boolean._superclassnames = []
+boolean._privpropdict = {
+}
+boolean._privelemdict = {
+}
+integer._superclassnames = []
+integer._privpropdict = {
+}
+integer._privelemdict = {
+}
+real._superclassnames = []
+real._privpropdict = {
+}
+real._privelemdict = {
+}
+number._superclassnames = []
+number._privpropdict = {
+}
+number._privelemdict = {
+}
+list._superclassnames = []
+list._privpropdict = {
+ 'length' : length,
+ 'reverse' : reverse,
+ 'rest' : rest,
+}
+list._privelemdict = {
+}
+linked_list._superclassnames = []
+linked_list._privpropdict = {
+ 'length' : length,
+}
+linked_list._privelemdict = {
+}
+vector._superclassnames = []
+vector._privpropdict = {
+ 'length' : length,
+}
+vector._privelemdict = {
+}
+record._superclassnames = []
+record._privpropdict = {
+}
+record._privelemdict = {
+}
+item._superclassnames = []
+item._privpropdict = {
+ 'id' : id,
+}
+item._privelemdict = {
+}
+script._superclassnames = []
+script._privpropdict = {
+ 'name' : name,
+ 'parent' : parent,
+}
+script._privelemdict = {
+}
+list_or_record._superclassnames = []
+list_or_record._privpropdict = {
+}
+list_or_record._privelemdict = {
+}
+list_or_string._superclassnames = []
+list_or_string._privpropdict = {
+}
+list_or_string._privelemdict = {
+}
+number_or_string._superclassnames = []
+number_or_string._privpropdict = {
+}
+number_or_string._privelemdict = {
+}
+alias_or_string._superclassnames = []
+alias_or_string._privpropdict = {
+}
+alias_or_string._privelemdict = {
+}
+list_2c__record_or_text._superclassnames = []
+list_2c__record_or_text._privpropdict = {
+}
+list_2c__record_or_text._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 = {
+}
+class_._superclassnames = ['type_class']
+class_._privpropdict = {
+ '_3c_Inheritance_3e_' : _3c_Inheritance_3e_,
+}
+class_._privelemdict = {
+}
+event._superclassnames = []
+event._privpropdict = {
+}
+event._privelemdict = {
+}
+property._superclassnames = []
+property._privpropdict = {
+}
+property._privelemdict = {
+}
+constant._superclassnames = []
+constant._privpropdict = {
+}
+constant._privelemdict = {
+}
+preposition._superclassnames = []
+preposition._privpropdict = {
+}
+preposition._privelemdict = {
+}
+reference_form._superclassnames = []
+reference_form._privpropdict = {
+}
+reference_form._privelemdict = {
+}
+handler._superclassnames = []
+handler._privpropdict = {
+}
+handler._privelemdict = {
+}
+data._superclassnames = []
+data._privpropdict = {
+}
+data._privelemdict = {
+}
+text._superclassnames = []
+text._privpropdict = {
+}
+text._privelemdict = {
+}
+international_text._superclassnames = []
+international_text._privpropdict = {
+}
+international_text._privelemdict = {
+}
+international_text._superclassnames = []
+international_text._privpropdict = {
+}
+international_text._privelemdict = {
+}
+string._superclassnames = []
+string._privpropdict = {
+}
+string._privelemdict = {
+}
+styled_text._superclassnames = []
+styled_text._privpropdict = {
+}
+styled_text._privelemdict = {
+}
+styled_text._superclassnames = []
+styled_text._privpropdict = {
+}
+styled_text._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 = {
+}
+Unicode_text._superclassnames = []
+Unicode_text._privpropdict = {
+}
+Unicode_text._privelemdict = {
+}
+Unicode_text._superclassnames = []
+Unicode_text._privpropdict = {
+}
+Unicode_text._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 = {
+}
+encoded_string._superclassnames = []
+encoded_string._privpropdict = {
+}
+encoded_string._privelemdict = {
+}
+C_string._superclassnames = []
+C_string._privpropdict = {
+}
+C_string._privelemdict = {
+}
+Pascal_string._superclassnames = []
+Pascal_string._privpropdict = {
+}
+Pascal_string._privelemdict = {
+}
+character._superclassnames = []
+character._privpropdict = {
+}
+character._privelemdict = {
+}
+text_item._superclassnames = []
+text_item._privpropdict = {
+}
+text_item._privelemdict = {
+}
+writing_code._superclassnames = []
+writing_code._privpropdict = {
+}
+writing_code._privelemdict = {
+}
+writing_code_info._superclassnames = []
+writing_code_info._privpropdict = {
+ 'script_code' : script_code,
+ 'language_code' : language_code,
+}
+writing_code_info._privelemdict = {
+}
+empty_ae_name_._superclassnames = []
+empty_ae_name_._privpropdict = {
+}
+empty_ae_name_._privelemdict = {
+}
+missing_value._superclassnames = []
+missing_value._privpropdict = {
+}
+missing_value._privelemdict = {
+}
+reference._superclassnames = []
+reference._privpropdict = {
+}
+reference._privelemdict = {
+}
+anything._superclassnames = []
+anything._privpropdict = {
+}
+anything._privelemdict = {
+}
+type_class._superclassnames = []
+type_class._privpropdict = {
+}
+type_class._privelemdict = {
+}
+RGB_color._superclassnames = []
+RGB_color._privpropdict = {
+}
+RGB_color._privelemdict = {
+}
+picture._superclassnames = []
+picture._privpropdict = {
+}
+picture._privelemdict = {
+}
+sound._superclassnames = []
+sound._privpropdict = {
+}
+sound._privelemdict = {
+}
+version._superclassnames = []
+version._privpropdict = {
+}
+version._privelemdict = {
+}
+file_specification._superclassnames = []
+file_specification._privpropdict = {
+}
+file_specification._privelemdict = {
+}
+alias._superclassnames = []
+alias._privpropdict = {
+}
+alias._privelemdict = {
+}
+machine._superclassnames = []
+machine._privpropdict = {
+}
+machine._privelemdict = {
+}
+zone._superclassnames = []
+zone._privpropdict = {
+}
+zone._privelemdict = {
+}
+keystroke._superclassnames = []
+keystroke._privpropdict = {
+ 'key' : key,
+ 'modifiers' : modifiers,
+ 'key_kind' : key_kind,
+}
+keystroke._privelemdict = {
+}
+seconds._superclassnames = []
+seconds._privpropdict = {
+}
+seconds._privelemdict = {
+}
+date._superclassnames = []
+date._privpropdict = {
+ 'weekday' : weekday,
+ 'month' : month,
+ 'day' : day,
+ 'year' : year,
+ 'time' : time,
+ 'date_string' : date_string,
+ 'time_string' : time_string,
+}
+date._privelemdict = {
+}
+month._superclassnames = []
+month._privpropdict = {
+}
+month._privelemdict = {
+}
+January._superclassnames = []
+January._privpropdict = {
+}
+January._privelemdict = {
+}
+February._superclassnames = []
+February._privpropdict = {
+}
+February._privelemdict = {
+}
+March._superclassnames = []
+March._privpropdict = {
+}
+March._privelemdict = {
+}
+April._superclassnames = []
+April._privpropdict = {
+}
+April._privelemdict = {
+}
+May._superclassnames = []
+May._privpropdict = {
+}
+May._privelemdict = {
+}
+June._superclassnames = []
+June._privpropdict = {
+}
+June._privelemdict = {
+}
+July._superclassnames = []
+July._privpropdict = {
+}
+July._privelemdict = {
+}
+August._superclassnames = []
+August._privpropdict = {
+}
+August._privelemdict = {
+}
+September._superclassnames = []
+September._privpropdict = {
+}
+September._privelemdict = {
+}
+October._superclassnames = []
+October._privpropdict = {
+}
+October._privelemdict = {
+}
+November._superclassnames = []
+November._privpropdict = {
+}
+November._privelemdict = {
+}
+December._superclassnames = []
+December._privpropdict = {
+}
+December._privelemdict = {
+}
+weekday._superclassnames = []
+weekday._privpropdict = {
+}
+weekday._privelemdict = {
+}
+Sunday._superclassnames = []
+Sunday._privpropdict = {
+}
+Sunday._privelemdict = {
+}
+Monday._superclassnames = []
+Monday._privpropdict = {
+}
+Monday._privelemdict = {
+}
+Tuesday._superclassnames = []
+Tuesday._privpropdict = {
+}
+Tuesday._privelemdict = {
+}
+Wednesday._superclassnames = []
+Wednesday._privpropdict = {
+}
+Wednesday._privelemdict = {
+}
+Thursday._superclassnames = []
+Thursday._privpropdict = {
+}
+Thursday._privelemdict = {
+}
+Friday._superclassnames = []
+Friday._privpropdict = {
+}
+Friday._privelemdict = {
+}
+Saturday._superclassnames = []
+Saturday._privpropdict = {
+}
+Saturday._privelemdict = {
+}
+metres._superclassnames = []
+metres._privpropdict = {
+}
+metres._privelemdict = {
+}
+inches._superclassnames = []
+inches._privpropdict = {
+}
+inches._privelemdict = {
+}
+feet._superclassnames = []
+feet._privpropdict = {
+}
+feet._privelemdict = {
+}
+yards._superclassnames = []
+yards._privpropdict = {
+}
+yards._privelemdict = {
+}
+miles._superclassnames = []
+miles._privpropdict = {
+}
+miles._privelemdict = {
+}
+kilometres._superclassnames = []
+kilometres._privpropdict = {
+}
+kilometres._privelemdict = {
+}
+centimetres._superclassnames = []
+centimetres._privpropdict = {
+}
+centimetres._privelemdict = {
+}
+square_metres._superclassnames = []
+square_metres._privpropdict = {
+}
+square_metres._privelemdict = {
+}
+square_feet._superclassnames = []
+square_feet._privpropdict = {
+}
+square_feet._privelemdict = {
+}
+square_yards._superclassnames = []
+square_yards._privpropdict = {
+}
+square_yards._privelemdict = {
+}
+square_miles._superclassnames = []
+square_miles._privpropdict = {
+}
+square_miles._privelemdict = {
+}
+square_kilometres._superclassnames = []
+square_kilometres._privpropdict = {
+}
+square_kilometres._privelemdict = {
+}
+litres._superclassnames = []
+litres._privpropdict = {
+}
+litres._privelemdict = {
+}
+gallons._superclassnames = []
+gallons._privpropdict = {
+}
+gallons._privelemdict = {
+}
+quarts._superclassnames = []
+quarts._privpropdict = {
+}
+quarts._privelemdict = {
+}
+cubic_metres._superclassnames = []
+cubic_metres._privpropdict = {
+}
+cubic_metres._privelemdict = {
+}
+cubic_centimetres._superclassnames = []
+cubic_centimetres._privpropdict = {
+}
+cubic_centimetres._privelemdict = {
+}
+cubic_feet._superclassnames = []
+cubic_feet._privpropdict = {
+}
+cubic_feet._privelemdict = {
+}
+cubic_inches._superclassnames = []
+cubic_inches._privpropdict = {
+}
+cubic_inches._privelemdict = {
+}
+cubic_yards._superclassnames = []
+cubic_yards._privpropdict = {
+}
+cubic_yards._privelemdict = {
+}
+kilograms._superclassnames = []
+kilograms._privpropdict = {
+}
+kilograms._privelemdict = {
+}
+grams._superclassnames = []
+grams._privpropdict = {
+}
+grams._privelemdict = {
+}
+ounces._superclassnames = []
+ounces._privpropdict = {
+}
+ounces._privelemdict = {
+}
+pounds._superclassnames = []
+pounds._privpropdict = {
+}
+pounds._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 = {
+}
+upper_case._superclassnames = []
+upper_case._privpropdict = {
+}
+upper_case._privelemdict = {
+}
+app._superclassnames = []
+app._privpropdict = {
+}
+app._privelemdict = {
+}
+_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_boov = {
+ 'true' : 'true', # the true boolean value
+ 'false' : 'fals', # the false boolean value
+}
+
+_Enum_misc = {
+ 'current_application' : 'cura', # the current application
+}
+
+_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', #
+}
+
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'jul ' : July,
+ 'may ' : May,
+ 'TEXT' : string,
+ 'cmet' : cubic_metres,
+ 'STXT' : styled_text,
+ 'nds ' : number_2c__date_or_text,
+ 'feet' : feet,
+ 'feb ' : February,
+ 'nmbr' : number,
+ 'mile' : miles,
+ 'kprs' : keystroke,
+ 'psct' : writing_code,
+ 'degf' : degrees_Fahrenheit,
+ 'lrs ' : list_2c__record_or_text,
+ 'ldt ' : date,
+ 'litr' : litres,
+ 'nd ' : number_or_date,
+ 'cmtr' : centimetres,
+ 'evnt' : event,
+ 'pstr' : Pascal_string,
+ 'zone' : zone,
+ 'PICT' : picture,
+ 'ls ' : list_or_string,
+ 'long' : integer,
+ 'sf ' : alias_or_string,
+ 'citl' : writing_code_info,
+ 'citm' : text_item,
+ 'mach' : machine,
+ 'type' : type_class,
+ 'prep' : preposition,
+ 'tue ' : Tuesday,
+ 'case' : upper_case,
+ 'vers' : version,
+ 'wed ' : Wednesday,
+ 'dec ' : December,
+ 'sqkm' : square_kilometres,
+ 'obj ' : reference,
+ 'vect' : vector,
+ 'wkdy' : weekday,
+ 'cRGB' : RGB_color,
+ 'sun ' : Sunday,
+ 'itxt' : international_text,
+ 'scnd' : seconds,
+ 'mar ' : March,
+ 'kmtr' : kilometres,
+ 'sqft' : square_feet,
+ 'list' : list,
+ 'doub' : real,
+ 'nov ' : November,
+ 'qrts' : quarts,
+ 'degc' : degrees_Celsius,
+ 'msng' : missing_value,
+ 'alis' : alias,
+ 'jan ' : January,
+ 'metr' : metres,
+ 'mnth' : month,
+ 'ns ' : number_or_string,
+ 'jun ' : June,
+ 'aug ' : August,
+ 'llst' : linked_list,
+ 'styl' : styled_Clipboard_text,
+ 'encs' : encoded_string,
+ 'galn' : gallons,
+ 'cuin' : cubic_inches,
+ 'fri ' : Friday,
+ 'sutx' : styled_Unicode_text,
+ 'lr ' : list_or_record,
+ 'degk' : degrees_Kelvin,
+ 'mon ' : Monday,
+ 'snd ' : sound,
+ 'pcls' : class_,
+ 'kgrm' : kilograms,
+ 'scpt' : script,
+ '****' : anything,
+ 'prop' : property,
+ 'reco' : record,
+ 'bool' : boolean,
+ 'oct ' : October,
+ 'sqrm' : square_metres,
+ 'inch' : inches,
+ 'kfrm' : reference_form,
+ 'cobj' : item,
+ 'gram' : grams,
+ 'cha ' : character,
+ 'apr ' : April,
+ 'undf' : empty_ae_name_,
+ 'capp' : app,
+ 'enum' : constant,
+ 'hand' : handler,
+ 'sqmi' : square_miles,
+ 'rdat' : data,
+ 'cstr' : C_string,
+ 'utxt' : Unicode_text,
+ 'thu ' : Thursday,
+ 'sqyd' : square_yards,
+ 'yard' : yards,
+ 'cyrd' : cubic_yards,
+ 'ozs ' : ounces,
+ 'lbs ' : pounds,
+ 'cfet' : cubic_feet,
+ 'ccmt' : cubic_centimetres,
+ 'sat ' : Saturday,
+ 'sep ' : September,
+ 'fss ' : file_specification,
+ 'ctxt' : text,
+}
+
+_propdeclarations = {
+ 'week' : weeks,
+ 'kMod' : modifiers,
+ 'pare' : parent,
+ 'leng' : length,
+ 'hour' : hours,
+ 'mnth' : month,
+ 'min ' : minutes,
+ 'wkdy' : weekday,
+ 'dstr' : date_string,
+ 'rest' : rest,
+ 'ascr' : AppleScript,
+ 'kknd' : key_kind,
+ 'c@#^' : _3c_Inheritance_3e_,
+ 'ID ' : id,
+ 'year' : year,
+ 'rvse' : reverse,
+ 'tab ' : tab,
+ 'tstr' : time_string,
+ 'pi ' : pi,
+ 'ret ' : return_,
+ 'plcd' : language_code,
+ 'kMsg' : key,
+ 'spac' : space,
+ 'days' : days,
+ 'txdl' : text_item_delimiters,
+ 'prdp' : print_depth,
+ 'prln' : print_length,
+ 'pscd' : script_code,
+ 'time' : time,
+ 'pnam' : name,
+ 'rslt' : result,
+ 'day ' : day,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+ 'eMds' : _Enum_eMds,
+ 'cons' : _Enum_cons,
+ 'misc' : _Enum_misc,
+ 'ekst' : _Enum_ekst,
+ 'boov' : _Enum_boov,
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Macintosh_Connectivity_Clas.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Macintosh_Connectivity_Clas.py
new file mode 100644
index 0000000..8dbd6e0
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/Macintosh_Connectivity_Clas.py
@@ -0,0 +1,373 @@
+"""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 device_specification(aetools.ComponentItem):
+ """device specification - A device connected to a computer """
+ want = 'cdev'
+class properties(aetools.NProperty):
+ """properties - property that allows getting and setting of multiple properties """
+ which = 'pALL'
+ want = 'reco'
+class device_type(aetools.NProperty):
+ """device type - the kind of device """
+ which = 'pdvt'
+ want = 'edvt'
+class device_address(aetools.NProperty):
+ """device address - the address of the device """
+ which = 'pdva'
+ want = 'cadr'
+
+device_specifications = device_specification
+
+class address_specification(aetools.ComponentItem):
+ """address specification - Unique designation of a device or service connected to this computer """
+ want = 'cadr'
+class conduit(aetools.NProperty):
+ """conduit - How the addressee is physically connected """
+ which = 'pcon'
+ want = 'econ'
+class protocol(aetools.NProperty):
+ """protocol - How to talk to this addressee """
+ which = 'pprt'
+ want = 'epro'
+
+address_specifications = address_specification
+
+class ADB_address(aetools.ComponentItem):
+ """ADB address - Addresses a device connected via Apple Desktop Bus """
+ want = 'cadb'
+class _3c_inheritance_3e_(aetools.NProperty):
+ """<inheritance> - inherits some of its properties from this class """
+ which = 'c@#^'
+ want = 'cadr'
+class ID(aetools.NProperty):
+ """ID - the Apple Desktop Bus device ID """
+ which = 'ID '
+ want = 'shor'
+
+ADB_addresses = ADB_address
+
+class AppleTalk_address(aetools.ComponentItem):
+ """AppleTalk address - Addresses a device or service connected via the AppleTalk protocol """
+ want = 'cat '
+class AppleTalk_machine(aetools.NProperty):
+ """AppleTalk machine - the machine name part of the address """
+ which = 'patm'
+ want = 'TEXT'
+class AppleTalk_zone(aetools.NProperty):
+ """AppleTalk zone - the zone part of the address """
+ which = 'patz'
+ want = 'TEXT'
+class AppleTalk_type(aetools.NProperty):
+ """AppleTalk type - the type part of the AppleTalk address """
+ which = 'patt'
+ 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 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 DNS_form(aetools.NProperty):
+ """DNS form - the address in the form "apple.com" """
+ which = 'pdns'
+ want = 'TEXT'
+class 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 network(aetools.NProperty):
+ """network - the LocalTalk network number """
+ which = 'pnet'
+ want = 'shor'
+class node(aetools.NProperty):
+ """node - the LocalTalk node number """
+ which = 'pnod'
+ want = 'shor'
+class 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 SCSI_bus(aetools.NProperty):
+ """SCSI bus - the SCSI bus number """
+ which = 'pscb'
+ want = 'shor'
+class LUN(aetools.NProperty):
+ """LUN - the SCSI logical unit number """
+ which = 'pslu'
+ 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 name(aetools.NProperty):
+ """name - the USB device name """
+ which = 'pnam'
+ want = 'TEXT'
+
+USB_Addresses = USB_address
+device_specification._superclassnames = []
+device_specification._privpropdict = {
+ 'properties' : properties,
+ 'device_type' : device_type,
+ 'device_address' : device_address,
+}
+device_specification._privelemdict = {
+}
+address_specification._superclassnames = []
+address_specification._privpropdict = {
+ 'properties' : properties,
+ 'conduit' : conduit,
+ 'protocol' : protocol,
+}
+address_specification._privelemdict = {
+}
+ADB_address._superclassnames = ['address_specification']
+ADB_address._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'ID' : ID,
+}
+ADB_address._privelemdict = {
+}
+AppleTalk_address._superclassnames = ['address_specification']
+AppleTalk_address._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'AppleTalk_machine' : AppleTalk_machine,
+ 'AppleTalk_zone' : AppleTalk_zone,
+ 'AppleTalk_type' : AppleTalk_type,
+}
+AppleTalk_address._privelemdict = {
+}
+bus_slot._superclassnames = ['address_specification']
+bus_slot._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'ID' : ID,
+}
+bus_slot._privelemdict = {
+}
+Ethernet_address._superclassnames = ['address_specification']
+Ethernet_address._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'ID' : ID,
+}
+Ethernet_address._privelemdict = {
+}
+FireWire_address._superclassnames = ['address_specification']
+FireWire_address._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'ID' : ID,
+}
+FireWire_address._privelemdict = {
+}
+IP_address._superclassnames = ['address_specification']
+IP_address._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'ID' : ID,
+ 'DNS_form' : DNS_form,
+ 'port' : port,
+}
+IP_address._privelemdict = {
+}
+LocalTalk_address._superclassnames = ['address_specification']
+LocalTalk_address._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'network' : network,
+ 'node' : node,
+ 'socket' : socket,
+}
+LocalTalk_address._privelemdict = {
+}
+SCSI_address._superclassnames = ['address_specification']
+SCSI_address._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'SCSI_bus' : SCSI_bus,
+ 'ID' : ID,
+ 'LUN' : LUN,
+}
+SCSI_address._privelemdict = {
+}
+Token_Ring_address._superclassnames = ['address_specification']
+Token_Ring_address._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'ID' : ID,
+}
+Token_Ring_address._privelemdict = {
+}
+USB_address._superclassnames = ['address_specification']
+USB_address._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'name' : name,
+}
+USB_address._privelemdict = {
+}
+_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_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_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 = {
+ '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,
+}
+
+_propdeclarations = {
+ 'pdns' : DNS_form,
+ 'ppor' : port,
+ 'patt' : AppleTalk_type,
+ 'pprt' : protocol,
+ 'pcon' : conduit,
+ 'patz' : AppleTalk_zone,
+ 'pnet' : network,
+ 'pdvt' : device_type,
+ 'pnam' : name,
+ 'c@#^' : _3c_inheritance_3e_,
+ 'ID ' : ID,
+ 'pALL' : properties,
+ 'pscb' : SCSI_bus,
+ 'pdva' : device_address,
+ 'patm' : AppleTalk_machine,
+ 'psoc' : socket,
+ 'pslu' : LUN,
+ 'pnod' : node,
+}
+
+_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
new file mode 100644
index 0000000..253cf0b
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suite.py
@@ -0,0 +1,417 @@
+"""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 arc_angle(aetools.NProperty):
+ """arc angle - the angle of the arc in degrees """
+ which = 'parc'
+ want = 'fixd'
+class bounds(aetools.NProperty):
+ """bounds - the smallest rectangle that contains the entire arc """
+ which = 'pbnd'
+ want = 'qdrt'
+class definition_rect(aetools.NProperty):
+ """definition rect - the rectangle that contains the circle or oval used to define the arc """
+ which = 'pdrt'
+ want = 'qdrt'
+class fill_color(aetools.NProperty):
+ """fill color - the fill color """
+ which = 'flcl'
+ want = 'cRGB'
+class fill_pattern(aetools.NProperty):
+ """fill pattern - the fill pattern """
+ which = 'flpt'
+ want = 'cpix'
+class pen_color(aetools.NProperty):
+ """pen color - the pen color """
+ which = 'ppcl'
+ want = 'cRGB'
+class pen_pattern(aetools.NProperty):
+ """pen pattern - the pen pattern """
+ which = 'pppa'
+ want = 'cpix'
+class pen_width(aetools.NProperty):
+ """pen width - the pen width """
+ which = 'ppwd'
+ want = 'shor'
+class start_angle(aetools.NProperty):
+ """start angle - the angle that defines the start of the arc, in degrees """
+ which = 'pang'
+ want = 'fixd'
+class 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 background_color(aetools.NProperty):
+ """background color - the color used to fill in unoccupied areas """
+ which = 'pbcl'
+ want = 'cRGB'
+class background_pattern(aetools.NProperty):
+ """background pattern - the pattern used to fill in unoccupied areas """
+ which = 'pbpt'
+ want = 'cpix'
+class color_table(aetools.NProperty):
+ """color table - the color table """
+ which = 'cltb'
+ want = 'clrt'
+class ordering(aetools.NProperty):
+ """ordering - the ordered list of graphic objects in the drawing area """
+ which = 'gobs'
+ want = 'obj '
+class name(aetools.NProperty):
+ """name - the name """
+ which = 'pnam'
+ want = 'itxt'
+class default_location(aetools.NProperty):
+ """default location - the default location of each new graphic object """
+ which = 'pnel'
+ want = 'QDpt'
+class pixel_depth(aetools.NProperty):
+ """pixel depth - the number of bits per pixel """
+ which = 'pdpt'
+ want = 'shor'
+class writing_code(aetools.NProperty):
+ """writing code - the script system and language of text objects in the drawing area """
+ which = 'psct'
+ want = 'intl'
+class text_color(aetools.NProperty):
+ """text color - the default color for text objects """
+ which = 'ptxc'
+ want = 'cRGB'
+class default_font(aetools.NProperty):
+ """default font - the name of the default font for text objects """
+ which = 'ptxf'
+ want = 'itxt'
+class default_size(aetools.NProperty):
+ """default size - the default size for text objects """
+ which = 'ptps'
+ want = 'fixd'
+class style(aetools.NProperty):
+ """style - the default text style for text objects """
+ which = 'txst'
+ want = 'tsty'
+class update_on_change(aetools.NProperty):
+ """update on change - Redraw after each change? """
+ which = 'pupd'
+ want = 'bool'
+
+drawing_areas = drawing_area
+
+class graphic_line(aetools.ComponentItem):
+ """graphic line - A graphic line """
+ want = 'glin'
+class start_point(aetools.NProperty):
+ """start point - the starting point of the line """
+ which = 'pstp'
+ want = 'QDpt'
+class end_point(aetools.NProperty):
+ """end point - the ending point of the line """
+ which = 'pend'
+ want = 'QDpt'
+class dash_style(aetools.NProperty):
+ """dash style - the dash style """
+ which = 'pdst'
+ want = 'tdas'
+class arrow_style(aetools.NProperty):
+ """arrow style - the arrow style """
+ which = 'arro'
+ want = 'arro'
+
+graphic_lines = graphic_line
+
+class graphic_object(aetools.ComponentItem):
+ """graphic object - A graphic object """
+ want = 'cgob'
+
+graphic_objects = graphic_object
+
+class graphic_shape(aetools.ComponentItem):
+ """graphic shape - A graphic shape """
+ want = 'cgsh'
+
+graphic_shapes = graphic_shape
+
+class graphic_text(aetools.ComponentItem):
+ """graphic text - A series of characters within a drawing area """
+ want = 'cgtx'
+class color(aetools.NProperty):
+ """color - the color of the first character """
+ which = 'colr'
+ want = 'cRGB'
+class font(aetools.NProperty):
+ """font - the name of the font of the first character """
+ which = 'font'
+ want = 'ctxt'
+class size(aetools.NProperty):
+ """size - the size in points of the first character """
+ which = 'ptsz'
+ want = 'fixd'
+class uniform_styles(aetools.NProperty):
+ """uniform styles - the text styles that are uniform throughout the text """
+ which = 'ustl'
+ want = 'tsty'
+
+class graphic_group(aetools.ComponentItem):
+ """graphic group - Group of graphics """
+ want = 'cpic'
+
+graphic_groups = graphic_group
+
+class oval(aetools.ComponentItem):
+ """oval - An oval """
+ want = 'covl'
+
+ovals = oval
+
+class pixel(aetools.ComponentItem):
+ """pixel - A pixel """
+ want = 'cpxl'
+
+pixels = pixel
+
+class pixel_map(aetools.ComponentItem):
+ """pixel map - A pixel map """
+ want = 'cpix'
+
+pixel_maps = pixel_map
+
+class polygon(aetools.ComponentItem):
+ """polygon - A polygon """
+ want = 'cpgn'
+class point_list(aetools.NProperty):
+ """point list - the list of points that define the polygon """
+ which = 'ptlt'
+ want = 'QDpt'
+
+polygons = polygon
+
+class rectangle(aetools.ComponentItem):
+ """rectangle - A rectangle """
+ want = 'crec'
+
+rectangles = rectangle
+
+class rounded_rectangle(aetools.ComponentItem):
+ """rounded rectangle - A rounded rectangle """
+ want = 'crrc'
+class 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 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
+arc._superclassnames = []
+arc._privpropdict = {
+ 'arc_angle' : arc_angle,
+ 'bounds' : bounds,
+ 'definition_rect' : definition_rect,
+ 'fill_color' : fill_color,
+ 'fill_pattern' : fill_pattern,
+ 'pen_color' : pen_color,
+ 'pen_pattern' : pen_pattern,
+ 'pen_width' : pen_width,
+ 'start_angle' : start_angle,
+ 'transfer_mode' : transfer_mode,
+}
+arc._privelemdict = {
+}
+drawing_area._superclassnames = []
+drawing_area._privpropdict = {
+ 'background_color' : background_color,
+ 'background_pattern' : background_pattern,
+ 'color_table' : color_table,
+ 'ordering' : ordering,
+ 'name' : name,
+ 'default_location' : default_location,
+ 'pixel_depth' : pixel_depth,
+ 'writing_code' : writing_code,
+ 'text_color' : text_color,
+ 'default_font' : default_font,
+ 'default_size' : default_size,
+ 'style' : style,
+ 'update_on_change' : update_on_change,
+}
+drawing_area._privelemdict = {
+}
+graphic_line._superclassnames = []
+graphic_line._privpropdict = {
+ 'start_point' : start_point,
+ 'end_point' : end_point,
+ 'dash_style' : dash_style,
+ 'arrow_style' : arrow_style,
+}
+graphic_line._privelemdict = {
+}
+graphic_object._superclassnames = []
+graphic_object._privpropdict = {
+}
+graphic_object._privelemdict = {
+}
+graphic_shape._superclassnames = []
+graphic_shape._privpropdict = {
+}
+graphic_shape._privelemdict = {
+}
+graphic_text._superclassnames = []
+graphic_text._privpropdict = {
+ 'color' : color,
+ 'font' : font,
+ 'size' : size,
+ 'uniform_styles' : uniform_styles,
+}
+graphic_text._privelemdict = {
+}
+graphic_group._superclassnames = []
+graphic_group._privpropdict = {
+}
+graphic_group._privelemdict = {
+}
+oval._superclassnames = []
+oval._privpropdict = {
+}
+oval._privelemdict = {
+}
+pixel._superclassnames = []
+pixel._privpropdict = {
+ 'color' : color,
+}
+pixel._privelemdict = {
+}
+pixel_map._superclassnames = []
+pixel_map._privpropdict = {
+}
+pixel_map._privelemdict = {
+}
+polygon._superclassnames = []
+polygon._privpropdict = {
+ 'point_list' : point_list,
+}
+polygon._privelemdict = {
+}
+rectangle._superclassnames = []
+rectangle._privpropdict = {
+}
+rectangle._privelemdict = {
+}
+rounded_rectangle._superclassnames = []
+rounded_rectangle._privpropdict = {
+ 'corner_curve_height' : corner_curve_height,
+ 'corner_curve_width' : corner_curve_width,
+}
+rounded_rectangle._privelemdict = {
+}
+_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', #
+}
+
+_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
+}
+
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'cpic' : graphic_group,
+ 'covl' : oval,
+ 'cgtx' : graphic_text,
+ 'cgsh' : graphic_shape,
+ 'glin' : graphic_line,
+ 'cgob' : graphic_object,
+ 'cdrw' : drawing_area,
+ 'cpgn' : polygon,
+ 'cpxl' : pixel,
+ 'crrc' : rounded_rectangle,
+ 'carc' : arc,
+ 'cpix' : pixel_map,
+ 'crec' : rectangle,
+}
+
+_propdeclarations = {
+ 'pbpt' : background_pattern,
+ 'flcl' : fill_color,
+ 'parc' : arc_angle,
+ 'pbnd' : bounds,
+ 'colr' : color,
+ 'flpt' : fill_pattern,
+ 'ustl' : uniform_styles,
+ 'font' : font,
+ 'pend' : end_point,
+ 'pstp' : start_point,
+ 'pang' : start_angle,
+ 'pptm' : transfer_mode,
+ 'cltb' : color_table,
+ 'ptxc' : text_color,
+ 'ptxf' : default_font,
+ 'ppcl' : pen_color,
+ 'ptps' : default_size,
+ 'ppwd' : pen_width,
+ 'arro' : arrow_style,
+ 'pcwd' : corner_curve_width,
+ 'txst' : style,
+ 'psct' : writing_code,
+ 'pdst' : dash_style,
+ 'ptlt' : point_list,
+ 'gobs' : ordering,
+ 'pdpt' : pixel_depth,
+ 'pnel' : default_location,
+ 'pchd' : corner_curve_height,
+ 'pbcl' : background_color,
+ 'pnam' : name,
+ 'pdrt' : definition_rect,
+ 'ptsz' : size,
+ 'pupd' : update_on_change,
+ 'pppa' : pen_pattern,
+}
+
+_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
new file mode 100644
index 0000000..b640cdc
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/QuickDraw_Graphics_Suppleme.py
@@ -0,0 +1,73 @@
+"""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 rotation(aetools.NProperty):
+ """rotation - the default rotation for objects in the drawing area """
+ which = 'prot'
+ want = 'trot'
+class scale(aetools.NProperty):
+ """scale - the default scaling for objects in the drawing area """
+ which = 'pscl'
+ want = 'fixd'
+class translation(aetools.NProperty):
+ """translation - the default repositioning for objects in the drawing area """
+ which = 'ptrs'
+ want = 'QDpt'
+
+drawing_areas = drawing_area
+
+class graphic_group(aetools.ComponentItem):
+ """graphic group - Group of graphics """
+ want = 'cpic'
+
+graphic_groups = graphic_group
+drawing_area._superclassnames = []
+drawing_area._privpropdict = {
+ 'rotation' : rotation,
+ 'scale' : scale,
+ 'translation' : translation,
+}
+drawing_area._privelemdict = {
+}
+graphic_group._superclassnames = []
+graphic_group._privpropdict = {
+}
+graphic_group._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'cpic' : graphic_group,
+ 'cdrw' : drawing_area,
+}
+
+_propdeclarations = {
+ 'prot' : rotation,
+ 'ptrs' : translation,
+ 'pscl' : scale,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Required_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Required_Suite.py
new file mode 100644
index 0000000..be26c92
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/Required_Suite.py
@@ -0,0 +1,32 @@
+"""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
new file mode 100644
index 0000000..444a0f0
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py
@@ -0,0 +1,711 @@
+"""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):
+
+ 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 != 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 != 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 != 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',
+ }
+
+ 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 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['----']
+
+ 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['----']
+
+ 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',
+ '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 != 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['----']
+
+ _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 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_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['----']
+
+ _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['----']
+
+ _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['----']
+
+ _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['----']
+
+
+class application(aetools.ComponentItem):
+ """application - An application program """
+ want = 'capp'
+class name(aetools.NProperty):
+ """name - the name of the application """
+ which = 'pnam'
+ want = 'itxt'
+class frontmost(aetools.NProperty):
+ """frontmost - Is this the frontmost application? """
+ which = 'pisf'
+ want = 'bool'
+class 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'
+class clipboard(aetools.NProperty):
+ """clipboard - the contents of the clipboard for this application """
+ which = 'pcli'
+ want = '****'
+class version(aetools.NProperty):
+ """version - the version of the application """
+ which = 'vers'
+ want = 'vers'
+
+applications = application
+
+class document(aetools.ComponentItem):
+ """document - A document of a scriptable application """
+ want = 'docu'
+class 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 (or a file yet to be created) """
+ want = 'file'
+class stationery(aetools.NProperty):
+ """stationery - Is the file a stationery file? """
+ which = 'pspd'
+ want = 'bool'
+
+files = file
+
+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'
+
+aliases = alias
+
+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 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 bounds(aetools.NProperty):
+ """bounds - the boundary rectangle for the window """
+ which = 'pbnd'
+ want = 'qdrt'
+class closeable(aetools.NProperty):
+ """closeable - Does the window have a close box? """
+ which = 'hclb'
+ want = 'bool'
+class titled(aetools.NProperty):
+ """titled - Does the window have a title bar? """
+ which = 'ptit'
+ want = 'bool'
+class index(aetools.NProperty):
+ """index - the number of the window """
+ which = 'pidx'
+ want = 'long'
+class floating(aetools.NProperty):
+ """floating - Does the window float? """
+ which = 'isfl'
+ want = 'bool'
+class modal(aetools.NProperty):
+ """modal - Is the window modal? """
+ which = 'pmod'
+ want = 'bool'
+class resizable(aetools.NProperty):
+ """resizable - Is the window resizable? """
+ which = 'prsz'
+ want = 'bool'
+class zoomable(aetools.NProperty):
+ """zoomable - Is the window zoomable? """
+ which = 'iszm'
+ want = 'bool'
+class zoomed(aetools.NProperty):
+ """zoomed - Is the window zoomed? """
+ which = 'pzum'
+ want = 'bool'
+class visible(aetools.NProperty):
+ """visible - Is the window visible? """
+ which = 'pvis'
+ want = 'bool'
+
+windows = window
+
+class insertion_point(aetools.ComponentItem):
+ """insertion point - An insertion location between two objects """
+ want = 'cins'
+
+insertion_points = insertion_point
+application._superclassnames = []
+application._privpropdict = {
+ 'name' : name,
+ 'frontmost' : frontmost,
+ 'selection' : selection,
+ 'clipboard' : clipboard,
+ 'version' : version,
+}
+application._privelemdict = {
+}
+document._superclassnames = []
+document._privpropdict = {
+ 'modified' : modified,
+}
+document._privelemdict = {
+}
+file._superclassnames = []
+file._privpropdict = {
+ 'stationery' : stationery,
+}
+file._privelemdict = {
+}
+alias._superclassnames = []
+alias._privpropdict = {
+}
+alias._privelemdict = {
+}
+selection_2d_object._superclassnames = []
+selection_2d_object._privpropdict = {
+ 'contents' : contents,
+}
+selection_2d_object._privelemdict = {
+}
+window._superclassnames = []
+window._privpropdict = {
+ 'bounds' : bounds,
+ 'closeable' : closeable,
+ 'titled' : titled,
+ 'index' : index,
+ 'floating' : floating,
+ 'modal' : modal,
+ 'resizable' : resizable,
+ 'zoomable' : zoomable,
+ 'zoomed' : zoomed,
+ 'visible' : visible,
+}
+window._privelemdict = {
+}
+insertion_point._superclassnames = []
+insertion_point._privpropdict = {
+}
+insertion_point._privelemdict = {
+}
+class starts_with(aetools.NComparison):
+ """starts with - Starts with """
+class contains(aetools.NComparison):
+ """contains - Contains """
+class ends_with(aetools.NComparison):
+ """ends with - Ends with """
+class _3d_(aetools.NComparison):
+ """= - Equal """
+class _3e_(aetools.NComparison):
+ """> - Greater than """
+class _b3_(aetools.NComparison):
+ """\xb3 - Greater than or equal to """
+class _3c_(aetools.NComparison):
+ """< - Less than """
+class _b2_(aetools.NComparison):
+ """\xb2 - Less than or equal to """
+_Enum_savo = {
+ 'yes' : 'yes ', # Save objects now
+ 'no' : 'no ', # Do not save objects
+ 'ask' : 'ask ', # Ask the user whether to save
+}
+
+_Enum_kfrm = {
+ 'index' : 'indx', # keyform designating indexed access
+ 'named' : 'name', # keyform designating named access
+ 'id' : 'ID ', # keyform designating access by unique identifier
+}
+
+_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 = {
+ 'cwin' : window,
+ 'file' : file,
+ 'csel' : selection_2d_object,
+ 'alis' : alias,
+ 'capp' : application,
+ 'cins' : insertion_point,
+ 'docu' : document,
+}
+
+_propdeclarations = {
+ 'prsz' : resizable,
+ 'vers' : version,
+ 'pidx' : index,
+ 'pvis' : visible,
+ 'imod' : modified,
+ 'pbnd' : bounds,
+ 'sele' : selection,
+ 'pisf' : frontmost,
+ 'pspd' : stationery,
+ 'isfl' : floating,
+ 'iszm' : zoomable,
+ 'hclb' : closeable,
+ 'pcli' : clipboard,
+ 'pmod' : modal,
+ 'pcnt' : contents,
+ 'pnam' : name,
+ 'pzum' : zoomed,
+ 'ptit' : titled,
+}
+
+_compdeclarations = {
+ '< ' : _3c_,
+ 'ends' : ends_with,
+ '>= ' : _b3_,
+ 'cont' : contains,
+ '<= ' : _b2_,
+ '= ' : _3d_,
+ 'bgwt' : starts_with,
+ '> ' : _3e_,
+}
+
+_enumdeclarations = {
+ 'savo' : _Enum_savo,
+ 'styl' : _Enum_styl,
+ 'kfrm' : _Enum_kfrm,
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Table_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Table_Suite.py
new file mode 100644
index 0000000..cfeee32
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/Table_Suite.py
@@ -0,0 +1,104 @@
+"""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 formula(aetools.NProperty):
+ """formula - the formula of the cell """
+ which = 'pfor'
+ want = 'ctxt'
+class 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 name(aetools.NProperty):
+ """name - the name of the column """
+ which = 'pnam'
+ want = 'itxt'
+
+columns = column
+
+class row(aetools.ComponentItem):
+ """row - A row """
+ want = 'crow'
+
+rows = row
+
+class table(aetools.ComponentItem):
+ """table - A table """
+ want = 'ctbl'
+
+tables = table
+cell._superclassnames = []
+cell._privpropdict = {
+ 'formula' : formula,
+ 'protection' : protection,
+}
+cell._privelemdict = {
+}
+column._superclassnames = []
+column._privpropdict = {
+ 'name' : name,
+}
+column._privelemdict = {
+}
+row._superclassnames = []
+row._privpropdict = {
+}
+row._privelemdict = {
+}
+table._superclassnames = []
+table._privpropdict = {
+}
+table._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,
+ 'ctbl' : table,
+ 'crow' : row,
+}
+
+_propdeclarations = {
+ 'pnam' : name,
+ 'pfor' : formula,
+ 'ppro' : 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
new file mode 100644
index 0000000..9b7f5d5
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/Text_Suite.py
@@ -0,0 +1,218 @@
+"""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 character(aetools.ComponentItem):
+ """character - A character """
+ want = 'cha '
+class _3c_inheritance_3e_(aetools.NProperty):
+ """<inheritance> - inherits some of its properties from this class """
+ which = 'c@#^'
+ want = 'ctxt'
+
+class line(aetools.ComponentItem):
+ """line - A line of text """
+ want = 'clin'
+class 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 color(aetools.NProperty):
+ """color - the color of the first character """
+ which = 'colr'
+ want = 'cRGB'
+class font(aetools.NProperty):
+ """font - the name of the font of the first character """
+ which = 'font'
+ want = 'ctxt'
+class size(aetools.NProperty):
+ """size - the size in points of the first character """
+ which = 'ptsz'
+ want = 'fixd'
+class writing_code(aetools.NProperty):
+ """writing code - the script system and language """
+ which = 'psct'
+ want = 'intl'
+class style(aetools.NProperty):
+ """style - the text style of the first character of the first character """
+ which = 'txst'
+ want = 'tsty'
+class uniform_styles(aetools.NProperty):
+ """uniform styles - the text styles that are uniform throughout the text """
+ which = 'ustl'
+ want = 'tsty'
+# element 'cha ' as ['indx']
+# element 'clin' as ['indx']
+# element 'cpar' as ['indx']
+# element 'ctxt' as ['indx']
+# element 'cwor' as ['indx']
+
+class text_flow(aetools.ComponentItem):
+ """text flow - A contiguous block of text. Page layout applications call this a \xd4story.\xd5 """
+ want = 'cflo'
+class name(aetools.NProperty):
+ """name - the name """
+ which = 'pnam'
+ want = 'itxt'
+
+text_flows = text_flow
+
+class text_style_info(aetools.ComponentItem):
+ """text style info - On and Off styles of text run """
+ want = 'tsty'
+class on_styles(aetools.NProperty):
+ """on styles - the styles that are on for the text """
+ which = 'onst'
+ want = 'styl'
+class off_styles(aetools.NProperty):
+ """off styles - the styles that are off for the text """
+ which = 'ofst'
+ want = 'styl'
+
+text_style_infos = text_style_info
+
+class word(aetools.ComponentItem):
+ """word - A word """
+ want = 'cwor'
+
+words = word
+character._superclassnames = ['text']
+character._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+}
+character._privelemdict = {
+}
+line._superclassnames = ['text']
+line._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'justification' : justification,
+}
+line._privelemdict = {
+}
+paragraph._superclassnames = ['text']
+paragraph._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+}
+paragraph._privelemdict = {
+}
+text._superclassnames = []
+text._privpropdict = {
+ 'color' : color,
+ 'font' : font,
+ 'size' : size,
+ 'writing_code' : writing_code,
+ 'style' : style,
+ 'uniform_styles' : uniform_styles,
+}
+text._privelemdict = {
+ 'character' : character,
+ 'line' : line,
+ 'paragraph' : paragraph,
+ 'text' : text,
+ 'word' : word,
+}
+text_flow._superclassnames = ['text']
+text_flow._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+ 'name' : name,
+}
+text_flow._privelemdict = {
+}
+text_style_info._superclassnames = []
+text_style_info._privpropdict = {
+ 'on_styles' : on_styles,
+ 'off_styles' : off_styles,
+}
+text_style_info._privelemdict = {
+}
+word._superclassnames = ['text']
+word._privpropdict = {
+ '_3c_inheritance_3e_' : _3c_inheritance_3e_,
+}
+word._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 = {
+ 'cpar' : paragraph,
+ 'cha ' : character,
+ 'cflo' : text_flow,
+ 'tsty' : text_style_info,
+ 'clin' : line,
+ 'cwor' : word,
+ 'ctxt' : text,
+}
+
+_propdeclarations = {
+ 'ptsz' : size,
+ 'ofst' : off_styles,
+ 'pjst' : justification,
+ 'colr' : color,
+ 'txst' : style,
+ 'psct' : writing_code,
+ 'ustl' : uniform_styles,
+ 'c@#^' : _3c_inheritance_3e_,
+ 'pnam' : name,
+ 'font' : font,
+ 'onst' : on_styles,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+ 'styl' : _Enum_styl,
+ 'just' : _Enum_just,
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/Type_Names_Suite.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/Type_Names_Suite.py
new file mode 100644
index 0000000..939c6ee
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/Type_Names_Suite.py
@@ -0,0 +1,440 @@
+"""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 type_class_info(aetools.ComponentItem):
+ """type class info - information about properties and elements of a class """
+ want = 'gcli'
+
+class type_event_info(aetools.ComponentItem):
+ """type event info - information about an event """
+ want = 'evin'
+
+class plain_text(aetools.ComponentItem):
+ """plain text - """
+ want = 'TEXT'
+
+plain_text = plain_text
+
+string = plain_text
+
+class bounding_rectangle(aetools.ComponentItem):
+ """bounding rectangle - bounding rectangle """
+ want = 'qdrt'
+
+class point(aetools.ComponentItem):
+ """point - point coordinates """
+ want = 'QDpt'
+
+class fixed(aetools.ComponentItem):
+ """fixed - a real number """
+ want = 'fixd'
+
+class location_reference(aetools.ComponentItem):
+ """location reference - """
+ want = 'insl'
+
+class application_dictionary(aetools.ComponentItem):
+ """application dictionary - """
+ want = 'aete'
+
+class color_table(aetools.ComponentItem):
+ """color table - """
+ want = 'clrt'
+
+class dash_style(aetools.ComponentItem):
+ """dash style - """
+ want = 'tdas'
+
+class double_integer(aetools.ComponentItem):
+ """double integer - """
+ want = 'comp'
+
+class extended_real(aetools.ComponentItem):
+ """extended real - """
+ want = 'exte'
+
+class fixed_point(aetools.ComponentItem):
+ """fixed point - """
+ want = 'fpnt'
+
+class fixed_rectangle(aetools.ComponentItem):
+ """fixed rectangle - """
+ want = 'frct'
+
+class long_fixed(aetools.ComponentItem):
+ """long fixed - """
+ want = 'lfxd'
+
+class long_fixed_point(aetools.ComponentItem):
+ """long fixed point - """
+ want = 'lfpt'
+
+class long_fixed_rectangle(aetools.ComponentItem):
+ """long fixed rectangle - """
+ want = 'lfrc'
+
+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 menu(aetools.ComponentItem):
+ """menu - """
+ want = 'cmnu'
+
+class menu_item(aetools.ComponentItem):
+ """menu item - """
+ want = 'cmen'
+
+class null(aetools.ComponentItem):
+ """null - """
+ want = 'null'
+
+class pixel_map_record(aetools.ComponentItem):
+ """pixel map record - """
+ want = 'tpmm'
+
+class PostScript_picture(aetools.ComponentItem):
+ """PostScript picture - """
+ want = 'EPS '
+
+class RGB16_color(aetools.ComponentItem):
+ """RGB16 color - """
+ want = 'tr16'
+
+class RGB96_color(aetools.ComponentItem):
+ """RGB96 color - """
+ want = 'tr96'
+
+class small_integer(aetools.ComponentItem):
+ """small integer - """
+ want = 'shor'
+
+class small_real(aetools.ComponentItem):
+ """small real - """
+ want = 'sing'
+
+class system_dictionary(aetools.ComponentItem):
+ """system dictionary - """
+ want = 'aeut'
+
+class rotation(aetools.ComponentItem):
+ """rotation - """
+ want = 'trot'
+
+class scrap_styles(aetools.ComponentItem):
+ """scrap styles - """
+ want = 'styl'
+
+class TIFF_picture(aetools.ComponentItem):
+ """TIFF picture - """
+ want = 'TIFF'
+
+class version(aetools.ComponentItem):
+ """version - """
+ want = 'vers'
+
+class unsigned_integer(aetools.ComponentItem):
+ """unsigned integer - """
+ want = 'magn'
+
+class type_property_info(aetools.ComponentItem):
+ """type property info - """
+ want = 'pinf'
+
+class type_element_info(aetools.ComponentItem):
+ """type element info - """
+ want = 'elin'
+
+class type_parameter_info(aetools.ComponentItem):
+ """type parameter info - """
+ want = 'pmin'
+
+class type_suite_info(aetools.ComponentItem):
+ """type suite info - """
+ want = 'suin'
+
+class target_id(aetools.ComponentItem):
+ """target id - """
+ want = 'targ'
+type_class_info._superclassnames = []
+type_class_info._privpropdict = {
+}
+type_class_info._privelemdict = {
+}
+type_event_info._superclassnames = []
+type_event_info._privpropdict = {
+}
+type_event_info._privelemdict = {
+}
+plain_text._superclassnames = []
+plain_text._privpropdict = {
+}
+plain_text._privelemdict = {
+}
+plain_text._superclassnames = []
+plain_text._privpropdict = {
+}
+plain_text._privelemdict = {
+}
+bounding_rectangle._superclassnames = []
+bounding_rectangle._privpropdict = {
+}
+bounding_rectangle._privelemdict = {
+}
+point._superclassnames = []
+point._privpropdict = {
+}
+point._privelemdict = {
+}
+fixed._superclassnames = []
+fixed._privpropdict = {
+}
+fixed._privelemdict = {
+}
+location_reference._superclassnames = []
+location_reference._privpropdict = {
+}
+location_reference._privelemdict = {
+}
+application_dictionary._superclassnames = []
+application_dictionary._privpropdict = {
+}
+application_dictionary._privelemdict = {
+}
+color_table._superclassnames = []
+color_table._privpropdict = {
+}
+color_table._privelemdict = {
+}
+dash_style._superclassnames = []
+dash_style._privpropdict = {
+}
+dash_style._privelemdict = {
+}
+double_integer._superclassnames = []
+double_integer._privpropdict = {
+}
+double_integer._privelemdict = {
+}
+extended_real._superclassnames = []
+extended_real._privpropdict = {
+}
+extended_real._privelemdict = {
+}
+fixed_point._superclassnames = []
+fixed_point._privpropdict = {
+}
+fixed_point._privelemdict = {
+}
+fixed_rectangle._superclassnames = []
+fixed_rectangle._privpropdict = {
+}
+fixed_rectangle._privelemdict = {
+}
+long_fixed._superclassnames = []
+long_fixed._privpropdict = {
+}
+long_fixed._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_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 = {
+}
+menu._superclassnames = []
+menu._privpropdict = {
+}
+menu._privelemdict = {
+}
+menu_item._superclassnames = []
+menu_item._privpropdict = {
+}
+menu_item._privelemdict = {
+}
+null._superclassnames = []
+null._privpropdict = {
+}
+null._privelemdict = {
+}
+pixel_map_record._superclassnames = []
+pixel_map_record._privpropdict = {
+}
+pixel_map_record._privelemdict = {
+}
+PostScript_picture._superclassnames = []
+PostScript_picture._privpropdict = {
+}
+PostScript_picture._privelemdict = {
+}
+RGB16_color._superclassnames = []
+RGB16_color._privpropdict = {
+}
+RGB16_color._privelemdict = {
+}
+RGB96_color._superclassnames = []
+RGB96_color._privpropdict = {
+}
+RGB96_color._privelemdict = {
+}
+small_integer._superclassnames = []
+small_integer._privpropdict = {
+}
+small_integer._privelemdict = {
+}
+small_real._superclassnames = []
+small_real._privpropdict = {
+}
+small_real._privelemdict = {
+}
+system_dictionary._superclassnames = []
+system_dictionary._privpropdict = {
+}
+system_dictionary._privelemdict = {
+}
+rotation._superclassnames = []
+rotation._privpropdict = {
+}
+rotation._privelemdict = {
+}
+scrap_styles._superclassnames = []
+scrap_styles._privpropdict = {
+}
+scrap_styles._privelemdict = {
+}
+TIFF_picture._superclassnames = []
+TIFF_picture._privpropdict = {
+}
+TIFF_picture._privelemdict = {
+}
+version._superclassnames = []
+version._privpropdict = {
+}
+version._privelemdict = {
+}
+unsigned_integer._superclassnames = []
+unsigned_integer._privpropdict = {
+}
+unsigned_integer._privelemdict = {
+}
+type_property_info._superclassnames = []
+type_property_info._privpropdict = {
+}
+type_property_info._privelemdict = {
+}
+type_element_info._superclassnames = []
+type_element_info._privpropdict = {
+}
+type_element_info._privelemdict = {
+}
+type_parameter_info._superclassnames = []
+type_parameter_info._privpropdict = {
+}
+type_parameter_info._privelemdict = {
+}
+type_suite_info._superclassnames = []
+type_suite_info._privpropdict = {
+}
+type_suite_info._privelemdict = {
+}
+target_id._superclassnames = []
+target_id._privpropdict = {
+}
+target_id._privelemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'shor' : small_integer,
+ 'tr16' : RGB16_color,
+ 'vers' : version,
+ 'aeut' : system_dictionary,
+ 'clrt' : color_table,
+ 'fpnt' : fixed_point,
+ 'TEXT' : plain_text,
+ 'elin' : type_element_info,
+ 'insl' : location_reference,
+ 'mLoc' : machine_location,
+ 'EPS ' : PostScript_picture,
+ 'QDpt' : point,
+ 'cmen' : menu_item,
+ 'tpmm' : pixel_map_record,
+ 'aete' : application_dictionary,
+ 'magn' : unsigned_integer,
+ 'cmnu' : menu,
+ 'frct' : fixed_rectangle,
+ 'lfrc' : long_fixed_rectangle,
+ 'evin' : type_event_info,
+ 'sing' : small_real,
+ 'suin' : type_suite_info,
+ 'trot' : rotation,
+ 'pmin' : type_parameter_info,
+ 'fixd' : fixed,
+ 'styl' : scrap_styles,
+ 'lpnt' : long_point,
+ 'gcli' : type_class_info,
+ 'TIFF' : TIFF_picture,
+ 'tr96' : RGB96_color,
+ 'tdas' : dash_style,
+ 'exte' : extended_real,
+ 'pinf' : type_property_info,
+ 'lfpt' : long_fixed_point,
+ 'lrct' : long_rectangle,
+ 'qdrt' : bounding_rectangle,
+ 'comp' : double_integer,
+ 'lfxd' : long_fixed,
+ 'null' : null,
+ 'targ' : target_id,
+}
+
+_propdeclarations = {
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py
new file mode 100644
index 0000000..09667f8
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py
@@ -0,0 +1,469 @@
+"""
+Package generated from /Volumes/Sap/System Folder/Extensions/AppleScript
+Resource aeut resid 0 Standard Event Suites for English
+"""
+import aetools
+Error = aetools.Error
+import AppleScript_Suite
+import Required_Suite
+import Standard_Suite
+import Text_Suite
+import QuickDraw_Graphics_Suite
+import QuickDraw_Graphics_Suppleme
+import Table_Suite
+import Macintosh_Connectivity_Clas
+import Type_Names_Suite
+
+
+_code_to_module = {
+ 'ascr' : AppleScript_Suite,
+ 'reqd' : Required_Suite,
+ 'core' : Standard_Suite,
+ 'TEXT' : Text_Suite,
+ 'qdrw' : QuickDraw_Graphics_Suite,
+ 'qdsp' : QuickDraw_Graphics_Suppleme,
+ 'tbls' : Table_Suite,
+ 'macc' : Macintosh_Connectivity_Clas,
+ 'tpnm' : Type_Names_Suite,
+}
+
+
+
+_code_to_fullname = {
+ 'ascr' : ('StdSuites.AppleScript_Suite', 'AppleScript_Suite'),
+ 'reqd' : ('StdSuites.Required_Suite', 'Required_Suite'),
+ 'core' : ('StdSuites.Standard_Suite', 'Standard_Suite'),
+ 'TEXT' : ('StdSuites.Text_Suite', 'Text_Suite'),
+ 'qdrw' : ('StdSuites.QuickDraw_Graphics_Suite', 'QuickDraw_Graphics_Suite'),
+ 'qdsp' : ('StdSuites.QuickDraw_Graphics_Suppleme', 'QuickDraw_Graphics_Suppleme'),
+ 'tbls' : ('StdSuites.Table_Suite', 'Table_Suite'),
+ 'macc' : ('StdSuites.Macintosh_Connectivity_Clas', 'Macintosh_Connectivity_Clas'),
+ 'tpnm' : ('StdSuites.Type_Names_Suite', 'Type_Names_Suite'),
+}
+
+from AppleScript_Suite import *
+from Required_Suite import *
+from Standard_Suite import *
+from Text_Suite import *
+from QuickDraw_Graphics_Suite import *
+from QuickDraw_Graphics_Suppleme import *
+from Table_Suite import *
+from Macintosh_Connectivity_Clas import *
+from Type_Names_Suite import *
+def getbaseclasses(v):
+ if hasattr(v, '_superclassnames') and not hasattr(v, '_propdict'):
+ v._propdict = {}
+ v._elemdict = {}
+ for superclass in v._superclassnames:
+ v._propdict.update(getattr(eval(superclass), '_privpropdict', {}))
+ v._elemdict.update(getattr(eval(superclass), '_privelemdict', {}))
+ v._propdict.update(v._privpropdict)
+ v._elemdict.update(v._privelemdict)
+
+import StdSuites
+
+#
+# Set property and element dictionaries now that all classes have been defined
+#
+getbaseclasses(July)
+getbaseclasses(May)
+getbaseclasses(string)
+getbaseclasses(cubic_metres)
+getbaseclasses(styled_text)
+getbaseclasses(number_2c__date_or_text)
+getbaseclasses(feet)
+getbaseclasses(February)
+getbaseclasses(number)
+getbaseclasses(miles)
+getbaseclasses(keystroke)
+getbaseclasses(writing_code)
+getbaseclasses(degrees_Fahrenheit)
+getbaseclasses(list_2c__record_or_text)
+getbaseclasses(date)
+getbaseclasses(litres)
+getbaseclasses(number_or_date)
+getbaseclasses(centimetres)
+getbaseclasses(event)
+getbaseclasses(Pascal_string)
+getbaseclasses(zone)
+getbaseclasses(picture)
+getbaseclasses(list_or_string)
+getbaseclasses(integer)
+getbaseclasses(alias_or_string)
+getbaseclasses(writing_code_info)
+getbaseclasses(text_item)
+getbaseclasses(machine)
+getbaseclasses(type_class)
+getbaseclasses(preposition)
+getbaseclasses(Tuesday)
+getbaseclasses(upper_case)
+getbaseclasses(version)
+getbaseclasses(Wednesday)
+getbaseclasses(December)
+getbaseclasses(square_kilometres)
+getbaseclasses(reference)
+getbaseclasses(vector)
+getbaseclasses(weekday)
+getbaseclasses(RGB_color)
+getbaseclasses(Sunday)
+getbaseclasses(international_text)
+getbaseclasses(seconds)
+getbaseclasses(March)
+getbaseclasses(kilometres)
+getbaseclasses(square_feet)
+getbaseclasses(list)
+getbaseclasses(real)
+getbaseclasses(November)
+getbaseclasses(quarts)
+getbaseclasses(degrees_Celsius)
+getbaseclasses(missing_value)
+getbaseclasses(alias)
+getbaseclasses(January)
+getbaseclasses(metres)
+getbaseclasses(month)
+getbaseclasses(number_or_string)
+getbaseclasses(June)
+getbaseclasses(August)
+getbaseclasses(linked_list)
+getbaseclasses(styled_Clipboard_text)
+getbaseclasses(encoded_string)
+getbaseclasses(gallons)
+getbaseclasses(cubic_inches)
+getbaseclasses(Friday)
+getbaseclasses(styled_Unicode_text)
+getbaseclasses(list_or_record)
+getbaseclasses(degrees_Kelvin)
+getbaseclasses(Monday)
+getbaseclasses(sound)
+getbaseclasses(class_)
+getbaseclasses(kilograms)
+getbaseclasses(script)
+getbaseclasses(anything)
+getbaseclasses(property)
+getbaseclasses(record)
+getbaseclasses(boolean)
+getbaseclasses(October)
+getbaseclasses(square_metres)
+getbaseclasses(inches)
+getbaseclasses(reference_form)
+getbaseclasses(item)
+getbaseclasses(grams)
+getbaseclasses(character)
+getbaseclasses(April)
+getbaseclasses(empty_ae_name_)
+getbaseclasses(app)
+getbaseclasses(constant)
+getbaseclasses(handler)
+getbaseclasses(square_miles)
+getbaseclasses(data)
+getbaseclasses(C_string)
+getbaseclasses(Unicode_text)
+getbaseclasses(Thursday)
+getbaseclasses(square_yards)
+getbaseclasses(yards)
+getbaseclasses(cubic_yards)
+getbaseclasses(ounces)
+getbaseclasses(pounds)
+getbaseclasses(cubic_feet)
+getbaseclasses(cubic_centimetres)
+getbaseclasses(Saturday)
+getbaseclasses(September)
+getbaseclasses(file_specification)
+getbaseclasses(text)
+getbaseclasses(window)
+getbaseclasses(file)
+getbaseclasses(selection_2d_object)
+getbaseclasses(alias)
+getbaseclasses(application)
+getbaseclasses(insertion_point)
+getbaseclasses(document)
+getbaseclasses(paragraph)
+getbaseclasses(character)
+getbaseclasses(text_flow)
+getbaseclasses(text_style_info)
+getbaseclasses(line)
+getbaseclasses(word)
+getbaseclasses(text)
+getbaseclasses(graphic_group)
+getbaseclasses(oval)
+getbaseclasses(graphic_text)
+getbaseclasses(graphic_shape)
+getbaseclasses(graphic_line)
+getbaseclasses(graphic_object)
+getbaseclasses(drawing_area)
+getbaseclasses(polygon)
+getbaseclasses(pixel)
+getbaseclasses(rounded_rectangle)
+getbaseclasses(arc)
+getbaseclasses(pixel_map)
+getbaseclasses(rectangle)
+getbaseclasses(graphic_group)
+getbaseclasses(drawing_area)
+getbaseclasses(cell)
+getbaseclasses(column)
+getbaseclasses(table)
+getbaseclasses(row)
+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(small_integer)
+getbaseclasses(RGB16_color)
+getbaseclasses(version)
+getbaseclasses(system_dictionary)
+getbaseclasses(color_table)
+getbaseclasses(fixed_point)
+getbaseclasses(plain_text)
+getbaseclasses(type_element_info)
+getbaseclasses(location_reference)
+getbaseclasses(machine_location)
+getbaseclasses(PostScript_picture)
+getbaseclasses(point)
+getbaseclasses(menu_item)
+getbaseclasses(pixel_map_record)
+getbaseclasses(application_dictionary)
+getbaseclasses(unsigned_integer)
+getbaseclasses(menu)
+getbaseclasses(fixed_rectangle)
+getbaseclasses(long_fixed_rectangle)
+getbaseclasses(type_event_info)
+getbaseclasses(small_real)
+getbaseclasses(type_suite_info)
+getbaseclasses(rotation)
+getbaseclasses(type_parameter_info)
+getbaseclasses(fixed)
+getbaseclasses(scrap_styles)
+getbaseclasses(long_point)
+getbaseclasses(type_class_info)
+getbaseclasses(TIFF_picture)
+getbaseclasses(RGB96_color)
+getbaseclasses(dash_style)
+getbaseclasses(extended_real)
+getbaseclasses(type_property_info)
+getbaseclasses(long_fixed_point)
+getbaseclasses(long_rectangle)
+getbaseclasses(bounding_rectangle)
+getbaseclasses(double_integer)
+getbaseclasses(long_fixed)
+getbaseclasses(null)
+getbaseclasses(target_id)
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'jul ' : July,
+ 'may ' : May,
+ 'TEXT' : string,
+ 'cmet' : cubic_metres,
+ 'STXT' : styled_text,
+ 'nds ' : number_2c__date_or_text,
+ 'feet' : feet,
+ 'feb ' : February,
+ 'nmbr' : number,
+ 'mile' : miles,
+ 'kprs' : keystroke,
+ 'psct' : writing_code,
+ 'degf' : degrees_Fahrenheit,
+ 'lrs ' : list_2c__record_or_text,
+ 'ldt ' : date,
+ 'litr' : litres,
+ 'nd ' : number_or_date,
+ 'cmtr' : centimetres,
+ 'evnt' : event,
+ 'pstr' : Pascal_string,
+ 'zone' : zone,
+ 'PICT' : picture,
+ 'ls ' : list_or_string,
+ 'long' : integer,
+ 'sf ' : alias_or_string,
+ 'citl' : writing_code_info,
+ 'citm' : text_item,
+ 'mach' : machine,
+ 'type' : type_class,
+ 'prep' : preposition,
+ 'tue ' : Tuesday,
+ 'case' : upper_case,
+ 'vers' : version,
+ 'wed ' : Wednesday,
+ 'dec ' : December,
+ 'sqkm' : square_kilometres,
+ 'obj ' : reference,
+ 'vect' : vector,
+ 'wkdy' : weekday,
+ 'cRGB' : RGB_color,
+ 'sun ' : Sunday,
+ 'itxt' : international_text,
+ 'scnd' : seconds,
+ 'mar ' : March,
+ 'kmtr' : kilometres,
+ 'sqft' : square_feet,
+ 'list' : list,
+ 'doub' : real,
+ 'nov ' : November,
+ 'qrts' : quarts,
+ 'degc' : degrees_Celsius,
+ 'msng' : missing_value,
+ 'alis' : alias,
+ 'jan ' : January,
+ 'metr' : metres,
+ 'mnth' : month,
+ 'ns ' : number_or_string,
+ 'jun ' : June,
+ 'aug ' : August,
+ 'llst' : linked_list,
+ 'styl' : styled_Clipboard_text,
+ 'encs' : encoded_string,
+ 'galn' : gallons,
+ 'cuin' : cubic_inches,
+ 'fri ' : Friday,
+ 'sutx' : styled_Unicode_text,
+ 'lr ' : list_or_record,
+ 'degk' : degrees_Kelvin,
+ 'mon ' : Monday,
+ 'snd ' : sound,
+ 'pcls' : class_,
+ 'kgrm' : kilograms,
+ 'scpt' : script,
+ '****' : anything,
+ 'prop' : property,
+ 'reco' : record,
+ 'bool' : boolean,
+ 'oct ' : October,
+ 'sqrm' : square_metres,
+ 'inch' : inches,
+ 'kfrm' : reference_form,
+ 'cobj' : item,
+ 'gram' : grams,
+ 'cha ' : character,
+ 'apr ' : April,
+ 'undf' : empty_ae_name_,
+ 'capp' : app,
+ 'enum' : constant,
+ 'hand' : handler,
+ 'sqmi' : square_miles,
+ 'rdat' : data,
+ 'cstr' : C_string,
+ 'utxt' : Unicode_text,
+ 'thu ' : Thursday,
+ 'sqyd' : square_yards,
+ 'yard' : yards,
+ 'cyrd' : cubic_yards,
+ 'ozs ' : ounces,
+ 'lbs ' : pounds,
+ 'cfet' : cubic_feet,
+ 'ccmt' : cubic_centimetres,
+ 'sat ' : Saturday,
+ 'sep ' : September,
+ 'fss ' : file_specification,
+ 'ctxt' : text,
+ 'cwin' : window,
+ 'file' : file,
+ 'csel' : selection_2d_object,
+ 'alis' : alias,
+ 'capp' : application,
+ 'cins' : insertion_point,
+ 'docu' : document,
+ 'cpar' : paragraph,
+ 'cha ' : character,
+ 'cflo' : text_flow,
+ 'tsty' : text_style_info,
+ 'clin' : line,
+ 'cwor' : word,
+ 'ctxt' : text,
+ 'cpic' : graphic_group,
+ 'covl' : oval,
+ 'cgtx' : graphic_text,
+ 'cgsh' : graphic_shape,
+ 'glin' : graphic_line,
+ 'cgob' : graphic_object,
+ 'cdrw' : drawing_area,
+ 'cpgn' : polygon,
+ 'cpxl' : pixel,
+ 'crrc' : rounded_rectangle,
+ 'carc' : arc,
+ 'cpix' : pixel_map,
+ 'crec' : rectangle,
+ 'cpic' : graphic_group,
+ 'cdrw' : drawing_area,
+ 'ccel' : cell,
+ 'ccol' : column,
+ 'ctbl' : table,
+ 'crow' : row,
+ '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,
+ 'shor' : small_integer,
+ 'tr16' : RGB16_color,
+ 'vers' : version,
+ 'aeut' : system_dictionary,
+ 'clrt' : color_table,
+ 'fpnt' : fixed_point,
+ 'TEXT' : plain_text,
+ 'elin' : type_element_info,
+ 'insl' : location_reference,
+ 'mLoc' : machine_location,
+ 'EPS ' : PostScript_picture,
+ 'QDpt' : point,
+ 'cmen' : menu_item,
+ 'tpmm' : pixel_map_record,
+ 'aete' : application_dictionary,
+ 'magn' : unsigned_integer,
+ 'cmnu' : menu,
+ 'frct' : fixed_rectangle,
+ 'lfrc' : long_fixed_rectangle,
+ 'evin' : type_event_info,
+ 'sing' : small_real,
+ 'suin' : type_suite_info,
+ 'trot' : rotation,
+ 'pmin' : type_parameter_info,
+ 'fixd' : fixed,
+ 'styl' : scrap_styles,
+ 'lpnt' : long_point,
+ 'gcli' : type_class_info,
+ 'TIFF' : TIFF_picture,
+ 'tr96' : RGB96_color,
+ 'tdas' : dash_style,
+ 'exte' : extended_real,
+ 'pinf' : type_property_info,
+ 'lfpt' : long_fixed_point,
+ 'lrct' : long_rectangle,
+ 'qdrt' : bounding_rectangle,
+ 'comp' : double_integer,
+ 'lfxd' : long_fixed,
+ 'null' : null,
+ 'targ' : target_id,
+}
+
+
+class StdSuites(AppleScript_Suite_Events,
+ Required_Suite_Events,
+ Standard_Suite_Events,
+ Text_Suite_Events,
+ QuickDraw_Graphics_Suite_Events,
+ QuickDraw_Graphics_Suppleme_Events,
+ Table_Suite_Events,
+ Macintosh_Connectivity_Clas_Events,
+ Type_Names_Suite_Events,
+ aetools.TalkTo):
+ _signature = 'ascr'
+
+ _moduleName = 'StdSuites'
+
diff --git a/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py b/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py
new file mode 100644
index 0000000..17aaf47
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py
@@ -0,0 +1,317 @@
+"""Suite Terminal Suite: Terms and Events for controlling the Terminal application
+Level 1, version 1
+
+Generated from /Applications/Utilities/Terminal.app/Contents/Resources/Terminal.rsrc
+AETE/AEUT resource version 1/0, language 0, script 0
+"""
+
+import aetools
+import MacOS
+
+_code = 'trmx'
+
+class Terminal_Suite_Events:
+
+ def run(self, _no_object=None, _attributes={}, **_arguments):
+ """run: Run the Terminal application
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'core'
+ _subcode = 'oapp'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def quit(self, _no_object=None, _attributes={}, **_arguments):
+ """quit: Quit the Terminal application
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'core'
+ _subcode = 'quit'
+
+ if _arguments: raise TypeError, 'No optional args expected'
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+ def count(self, _object=None, _attributes={}, **_arguments):
+ """count: Return the number of elements of a particular class within an object
+ Required argument: a reference to the objects to be counted
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ Returns: the number of objects counted
+ """
+ _code = 'core'
+ _subcode = 'cnte'
+
+ 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 = {
+ 'with_command' : 'cmnd',
+ }
+
+ def do_script(self, _no_object=None, _attributes={}, **_arguments):
+ """do script: Run a UNIX shell script or command
+ Keyword argument with_command: data to be passed to the Terminal application as the command line
+ Keyword argument _attributes: AppleEvent attribute dictionary
+ """
+ _code = 'core'
+ _subcode = 'dosc'
+
+ aetools.keysubst(_arguments, self._argmap_do_script)
+ if _no_object != None: raise TypeError, 'No direct arg expected'
+
+
+ _reply, _arguments, _attributes = self.send(_code, _subcode,
+ _arguments, _attributes)
+ if _arguments.get('errn', 0):
+ raise aetools.Error, aetools.decodeerror(_arguments)
+ # XXXX Optionally decode result
+ if _arguments.has_key('----'):
+ return _arguments['----']
+
+
+class application(aetools.ComponentItem):
+ """application - The Terminal program """
+ want = 'capp'
+class name(aetools.NProperty):
+ """name - the name of the application """
+ which = 'pnam'
+ want = 'TEXT'
+class version(aetools.NProperty):
+ """version - the version of the application """
+ which = 'vers'
+ want = 'vers'
+class frontmost(aetools.NProperty):
+ """frontmost - Is this the active application? """
+ which = 'pisf'
+ want = 'bool'
+# element 'cwin' as ['name', 'indx']
+
+applications = application
+
+class window(aetools.ComponentItem):
+ """window - A Terminal window """
+ want = 'cwin'
+class index(aetools.NProperty):
+ """index - the number of the window """
+ which = 'pidx'
+ want = 'long'
+class visible(aetools.NProperty):
+ """visible - Is the window visible? """
+ which = 'pvis'
+ want = 'bool'
+class has_close_box(aetools.NProperty):
+ """has close box - Does the window have a close box? """
+ which = 'hclb'
+ want = 'bool'
+class has_title_bar(aetools.NProperty):
+ """has title bar - Does the window have a title bar? """
+ which = 'ptit'
+ want = 'bool'
+class floating(aetools.NProperty):
+ """floating - Does the window float? """
+ which = 'isfl'
+ want = 'bool'
+class modal(aetools.NProperty):
+ """modal - Is the window modal? """
+ which = 'pmod'
+ want = 'bool'
+class resizable(aetools.NProperty):
+ """resizable - Is the window resizable? """
+ which = 'prsz'
+ want = 'bool'
+class zoomable(aetools.NProperty):
+ """zoomable - Is the window zoomable? """
+ which = 'iszm'
+ want = 'bool'
+class zoomed(aetools.NProperty):
+ """zoomed - Is the window zoomed? """
+ which = 'pzum'
+ want = 'bool'
+class miniaturizable(aetools.NProperty):
+ """miniaturizable - Is the window miniaturizable? """
+ which = 'mini'
+ want = 'bool'
+class miniaturized(aetools.NProperty):
+ """miniaturized - Is the window miniaturized? """
+ which = 'mina'
+ want = 'bool'
+class position(aetools.NProperty):
+ """position - the upper left coordinates of window """
+ which = 'ppos'
+ want = 'QDpt'
+class bounds(aetools.NProperty):
+ """bounds - the boundary rectangle for the window """
+ which = 'pbnd'
+ want = 'qdrt'
+class 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 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 title_displays_window_size(aetools.NProperty):
+ """title displays window size - Does the title for the window contain the window size? """
+ which = 'tdws'
+ want = 'bool'
+class 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 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 custom_title(aetools.NProperty):
+ """custom title - the custom title for the window """
+ which = 'titl'
+ want = 'TEXT'
+class contents(aetools.NProperty):
+ """contents - the currently visible contents of the window """
+ which = 'pcnt'
+ want = 'TEXT'
+class history(aetools.NProperty):
+ """history - the contents of the entire scrolling buffer of the window """
+ which = 'hist'
+ want = 'TEXT'
+class number_of_rows(aetools.NProperty):
+ """number of rows - the number of rows in the window """
+ which = 'crow'
+ want = 'long'
+class number_of_columns(aetools.NProperty):
+ """number of columns - the number of columns in the window """
+ which = 'ccol'
+ want = 'long'
+class cursor_color(aetools.NProperty):
+ """cursor color - the cursor color for the window """
+ which = 'pcuc'
+ want = 'TEXT'
+class background_color(aetools.NProperty):
+ """background color - the background color for the window """
+ which = 'pbcl'
+ want = 'TEXT'
+class normal_text_color(aetools.NProperty):
+ """normal text color - the normal text color for the window """
+ which = 'ptxc'
+ want = 'TEXT'
+class bold_text_color(aetools.NProperty):
+ """bold text color - the bold text color for the window """
+ which = 'pbtc'
+ want = 'TEXT'
+
+windows = window
+application._propdict = {
+ 'name' : name,
+ 'version' : version,
+ 'frontmost' : frontmost,
+}
+application._elemdict = {
+ 'window' : window,
+}
+window._propdict = {
+ 'name' : name,
+ 'index' : index,
+ 'visible' : visible,
+ 'has_close_box' : has_close_box,
+ 'has_title_bar' : has_title_bar,
+ 'floating' : floating,
+ 'modal' : modal,
+ 'resizable' : resizable,
+ 'zoomable' : zoomable,
+ 'zoomed' : zoomed,
+ 'miniaturizable' : miniaturizable,
+ 'miniaturized' : miniaturized,
+ 'position' : position,
+ 'bounds' : bounds,
+ 'title_displays_device_name' : title_displays_device_name,
+ 'title_displays_shell_path' : title_displays_shell_path,
+ 'title_displays_window_size' : title_displays_window_size,
+ 'title_displays_file_name' : title_displays_file_name,
+ 'title_displays_custom_title' : title_displays_custom_title,
+ 'custom_title' : custom_title,
+ 'contents' : contents,
+ 'history' : history,
+ 'number_of_rows' : number_of_rows,
+ 'number_of_columns' : number_of_columns,
+ 'cursor_color' : cursor_color,
+ 'background_color' : background_color,
+ 'normal_text_color' : normal_text_color,
+ 'bold_text_color' : bold_text_color,
+}
+window._elemdict = {
+}
+
+#
+# Indices of types declared in this module
+#
+_classdeclarations = {
+ 'cwin' : window,
+ 'capp' : application,
+}
+
+_propdeclarations = {
+ 'tdfn' : title_displays_file_name,
+ 'mini' : miniaturizable,
+ 'vers' : version,
+ 'pidx' : index,
+ 'prsz' : resizable,
+ 'pbnd' : bounds,
+ 'mina' : miniaturized,
+ 'pbcl' : background_color,
+ 'tddn' : title_displays_device_name,
+ 'iszm' : zoomable,
+ 'hclb' : has_close_box,
+ 'isfl' : floating,
+ 'pcnt' : contents,
+ 'ppos' : position,
+ 'ptxc' : normal_text_color,
+ 'pcuc' : cursor_color,
+ 'tdsp' : title_displays_shell_path,
+ 'pvis' : visible,
+ 'tdct' : title_displays_custom_title,
+ 'pmod' : modal,
+ 'titl' : custom_title,
+ 'pisf' : frontmost,
+ 'hist' : history,
+ 'pzum' : zoomed,
+ 'crow' : number_of_rows,
+ 'pnam' : name,
+ 'ccol' : number_of_columns,
+ 'tdws' : title_displays_window_size,
+ 'pbtc' : bold_text_color,
+ 'ptit' : has_title_bar,
+}
+
+_compdeclarations = {
+}
+
+_enumdeclarations = {
+}
diff --git a/Lib/plat-mac/lib-scriptpackages/Terminal/__init__.py b/Lib/plat-mac/lib-scriptpackages/Terminal/__init__.py
new file mode 100644
index 0000000..af92467
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/Terminal/__init__.py
@@ -0,0 +1,28 @@
+"""
+Package generated from /Applications/Utilities/Terminal.app/Contents/Resources/Terminal.rsrc
+Resource aete resid 0 Terminal Terminology
+"""
+# Note: hand-edited _signature to 'trmx'.
+
+import aetools
+Error = aetools.Error
+import Terminal_Suite
+
+
+_code_to_module = {
+ 'trmx' : Terminal_Suite,
+}
+
+
+
+_code_to_fullname = {
+ 'trmx' : ('Terminal.Terminal_Suite', 'Terminal_Suite'),
+}
+
+from Terminal_Suite import *
+
+
+class Terminal(Terminal_Suite_Events,
+ aetools.TalkTo):
+ _signature = 'trmx'
+
diff --git a/Lib/plat-mac/lib-scriptpackages/_builtinSuites/__init__.py b/Lib/plat-mac/lib-scriptpackages/_builtinSuites/__init__.py
new file mode 100644
index 0000000..ac3c0ba
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/_builtinSuites/__init__.py
@@ -0,0 +1,28 @@
+"""
+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
+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 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
new file mode 100644
index 0000000..117eedd
--- /dev/null
+++ b/Lib/plat-mac/lib-scriptpackages/_builtinSuites/builtin_Suite.py
@@ -0,0 +1,140 @@
+"""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 != 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 != 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 != 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
new file mode 100644
index 0000000..32f00a1
--- /dev/null
+++ b/Lib/plat-mac/macerrors.py
@@ -0,0 +1,1852 @@
+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 € 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 #‚‚‚ fill out missing codes ‚‚‚
+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 –Extensions Disabled”
+dsHD20Installed = -12 #say –HD20 Startup”
+dsDisassemblerInstalled = -11 #say –Disassembler Installed”
+dsMacsBugInstalled = -10 #say –MacsBug Installed”
+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/macfs.py b/Lib/plat-mac/macfs.py
new file mode 100644
index 0000000..3cf56d0
--- /dev/null
+++ b/Lib/plat-mac/macfs.py
@@ -0,0 +1,231 @@
+"""macfs - Pure Python module designed to be backward compatible with
+macfs and MACFS.
+"""
+import sys
+import struct
+import Carbon.Res
+import Carbon.File
+import Nav
+
+# First step: ensure we also emulate the MACFS module, which contained
+# all the constants
+
+sys.modules['MACFS'] = sys.modules[__name__]
+
+# Import all those constants
+from Carbon.Files import *
+from Carbon.Folders import *
+
+# For some obscure historical reason these are here too:
+READ = 1
+WRITE = 2
+smAllScripts = -3
+
+# The old name of the error object:
+error = Carbon.File.Error
+
+#
+# The various objects macfs used to export. We override them here, because some
+# of the method names are subtly different.
+#
+class FSSpec(Carbon.File.FSSpec):
+ def as_fsref(self):
+ return FSRef(self)
+
+ def NewAlias(self, src=None):
+ return Alias(Carbon.File.NewAlias(src, self))
+
+ def GetCreatorType(self):
+ finfo = self.FSpGetFInfo()
+ return finfo.Creator, finfo.Type
+
+ def SetCreatorType(self, ctor, tp):
+ finfo = self.FSpGetFInfo()
+ finfo.Creator = ctor
+ finfo.Type = tp
+ self.FSpSetFInfo(finfo)
+
+ def GetFInfo(self):
+ return self.FSpGetFInfo()
+
+ def SetFInfo(self, info):
+ return self.FSpSetFInfo(info)
+
+ def GetDates(self):
+ import os
+ statb = os.stat(self.as_pathname())
+ return statb.st_ctime, statb.st_mtime, 0
+
+ def SetDates(self, *dates):
+ print "FSSpec.SetDates no longer implemented"
+
+class FSRef(Carbon.File.FSRef):
+ def as_fsspec(self):
+ return FSSpec(self)
+
+class Alias(Carbon.File.Alias):
+
+ def GetInfo(self, index):
+ return self.GetAliasInfo(index)
+
+ def Update(self, *args):
+ print "Alias.Update not yet implemented"
+
+ def Resolve(self, src=None):
+ fss, changed = self.ResolveAlias(src)
+ return FSSpec(fss), changed
+
+from Carbon.File import FInfo
+
+# Backward-compatible type names:
+FSSpecType = FSSpec
+FSRefType = FSRef
+AliasType = Alias
+FInfoType = FInfo
+
+# Global functions:
+def ResolveAliasFile(fss, chain=1):
+ fss, isdir, isalias = Carbon.File.ResolveAliasFile(fss, chain)
+ return FSSpec(fss), isdir, isalias
+
+def RawFSSpec(data):
+ return FSSpec(rawdata=data)
+
+def RawAlias(data):
+ return Alias(rawdata=data)
+
+def FindApplication(*args):
+ raise NotImplementedError, "FindApplication no longer implemented"
+
+def NewAliasMinimalFromFullPath(path):
+ return Alias(Carbon.File.NewAliasMinimalFromFullPath(path, '', ''))
+
+# Another global function:
+from Carbon.Folder import FindFolder
+
+#
+# Finally the old Standard File routine emulators.
+#
+
+_movablemodal = 0
+_curfolder = None
+
+def _mktypelist(typelist):
+ # Workaround for OSX typeless files:
+ if 'TEXT' in typelist and not '\0\0\0\0' in typelist:
+ typelist = typelist + ('\0\0\0\0',)
+ if not typelist:
+ return None
+ data = 'Pyth' + struct.pack("hh", 0, len(typelist))
+ for type in typelist:
+ data = data+type
+ return Carbon.Res.Handle(data)
+
+def StandardGetFile(*typelist):
+ """Ask for an input file, optionally specifying 4-char file types that are
+ allowable"""
+ return apply(PromptGetFile, (None,)+typelist)
+
+def PromptGetFile(prompt, *typelist):
+ """Ask for an input file giving the user a prompt message. Optionally you can
+ specifying 4-char file types that are allowable"""
+ args = {}
+ flags = 0x56
+ typehandle = _mktypelist(typelist)
+ if typehandle:
+ args['typeList'] = typehandle
+ else:
+ flags = flags | 0x01
+ if prompt:
+ args['message'] = prompt
+ args['preferenceKey'] = 'PyMC'
+ if _movablemodal:
+ args['eventProc'] = None
+ args['dialogOptionFlags'] = flags
+ _handleSetFolder(args)
+ try:
+ rr = Nav.NavChooseFile(args)
+ good = 1
+ except Nav.error, arg:
+ if arg[0] != -128: # userCancelledErr
+ raise Nav.error, arg
+ good = 0
+ fss = None
+ else:
+ if rr.selection:
+ fss = FSSpec(rr.selection[0])
+ else:
+ fss = None
+ good = 0
+## if typehandle:
+## typehandle.DisposeHandle()
+ return fss, good
+
+def StandardPutFile(prompt, default=None):
+ """Ask the user for an output file, with a prompt. Optionally you cn supply a
+ default output filename"""
+ args = {}
+ flags = 0x07
+ if prompt:
+ args['message'] = prompt
+ args['preferenceKey'] = 'PyMC'
+ if _movablemodal:
+ args['eventProc'] = None
+ if default:
+ args['savedFileName'] = default
+ args['dialogOptionFlags'] = flags
+ _handleSetFolder(args)
+ try:
+ rr = Nav.NavPutFile(args)
+ good = 1
+ except Nav.error, arg:
+ if arg[0] != -128: # userCancelledErr
+ raise Nav.error, arg
+ good = 0
+ fss = None
+ else:
+ fss = FSSpec(rr.selection[0])
+ return fss, good
+
+def SetFolder(folder):
+ global _curfolder
+ if _curfolder:
+ rv = _curfolder
+ else:
+ rv = None
+ _curfolder = FSSpec(folder)
+ return rv
+
+def _handleSetFolder(args):
+ global _curfolder
+ if not _curfolder:
+ return
+ import aepack
+ fss = _curfolder
+ aedesc = aepack.pack(fss)
+ args['defaultLocation'] = aedesc
+ _curfolder = None
+
+def GetDirectory(prompt=None):
+ """Ask the user to select a folder. Optionally you can give a prompt."""
+ args = {}
+ flags = 0x17
+ if prompt:
+ args['message'] = prompt
+ args['preferenceKey'] = 'PyMC'
+ if _movablemodal:
+ args['eventProc'] = None
+ args['dialogOptionFlags'] = flags
+ _handleSetFolder(args)
+ try:
+ rr = Nav.NavChooseFolder(args)
+ good = 1
+ except Nav.error, arg:
+ if arg[0] != -128: # userCancelledErr
+ raise Nav.error, arg
+ good = 0
+ fss = None
+ else:
+ fss = FSSpec(rr.selection[0])
+ return fss, good
+
diff --git a/Lib/plat-mac/macostools.py b/Lib/plat-mac/macostools.py
new file mode 100644
index 0000000..8822ab8
--- /dev/null
+++ b/Lib/plat-mac/macostools.py
@@ -0,0 +1,137 @@
+"""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'
+"""
+
+import macfs
+from Carbon import Res
+import os
+from MACFS import *
+import MacOS
+import time
+try:
+ openrf = MacOS.openrf
+except AttributeError:
+ # Backward compatability
+ openrf = open
+
+Error = 'macostools.Error'
+
+BUFSIZ=0x80000 # Copy in 0.5Mb chunks
+
+#
+# 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"""
+ srcfss = macfs.FSSpec(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.
+ dstfss = macfs.FSSpec(dst)
+ if relative:
+ relativefss = macfs.FSSpec(relative)
+ # ik mag er geen None in stoppen :-(
+ alias = srcfss.NewAlias(relativefss)
+ else:
+ alias = srcfss.NewAlias()
+
+ if os.path.isdir(src):
+ cr, tp = 'MACS', 'fdrp'
+ else:
+ cr, tp = srcfss.GetCreatorType()
+
+ Res.FSpCreateResFile(dstfss, cr, tp, -1)
+ h = Res.FSpOpenResFile(dstfss, 3)
+ resource = Res.Resource(alias.data)
+ resource.AddResource('alis', 0, '')
+ Res.CloseResFile(h)
+
+ dstfinfo = dstfss.GetFInfo()
+ dstfinfo.Flags = dstfinfo.Flags|0x8000 # Alias flag
+ dstfss.SetFInfo(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, 0777)
+
+def touched(dst):
+ """Tell the finder a file has changed"""
+ file_fss = macfs.FSSpec(dst)
+ vRefNum, dirID, name = file_fss.as_tuple()
+ dir_fss = macfs.FSSpec((vRefNum, dirID, ''))
+ crdate, moddate, bkdate = dir_fss.GetDates()
+ now = time.time()
+ if now == moddate:
+ now = now + 1
+ try:
+ dir_fss.SetDates(crdate, now, bkdate)
+ except macfs.error:
+ pass
+
+def touched_ae(dst):
+ """Tell the finder a file has changed"""
+ import Finder
+ f = Finder.Finder()
+ file_fss = macfs.FSSpec(dst)
+ vRefNum, dirID, name = file_fss.as_tuple()
+ dir_fss = macfs.FSSpec((vRefNum, dirID, ''))
+ f.update(dir_fss)
+
+def copy(src, dst, createpath=0, copydates=1, forcetype=None):
+ """Copy a file, including finder info, resource fork, etc"""
+ if hasattr(src, 'as_pathname'):
+ src = src.as_pathname()
+ if hasattr(dst, 'as_pathname'):
+ dst = dst.as_pathname()
+ 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 = macfs.FSSpec(src)
+ dstfss = macfs.FSSpec(dst)
+ sf = srcfss.GetFInfo()
+ df = dstfss.GetFInfo()
+ df.Creator, df.Type = sf.Creator, sf.Type
+ if forcetype != None:
+ df.Type = forcetype
+ df.Flags = (sf.Flags & (kIsStationary|kNameLocked|kHasBundle|kIsInvisible|kIsAlias))
+ dstfss.SetFInfo(df)
+ if copydates:
+ crdate, mddate, bkdate = srcfss.GetDates()
+ dstfss.SetDates(crdate, mddate, bkdate)
+ touched(dstfss)
+
+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
new file mode 100644
index 0000000..26f90940
--- /dev/null
+++ b/Lib/plat-mac/macresource.py
@@ -0,0 +1,115 @@
+"""macresource - Locate and open the resources needed for a script."""
+
+from Carbon import Res
+import os
+import sys
+
+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 sys.modules.has_key(modname):
+ mod = sys.modules[modname]
+ if hasattr(mod, '__file__'):
+ searchdirs = [os.path.split(mod.__file__)[0]]
+ if not searchdirs:
+ searchdirs = 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, arg:
+ if arg[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, u'', 1)
+ except Res.Error, arg:
+ if arg[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, u'', 1)
+ else:
+ raise
+ return refno
+
+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 verbose:
+ print 'Decoding', pathname
+ import applesingle
+ applesingle.decode(pathname, newpathname, resonly=1)
+ return newpathname
+
+ \ No newline at end of file
diff --git a/Lib/plat-mac/plistlib.py b/Lib/plat-mac/plistlib.py
new file mode 100644
index 0000000..9c914d2
--- /dev/null
+++ b/Lib/plat-mac/plistlib.py
@@ -0,0 +1,436 @@
+"""plistlib.py -- a tool to generate and parse MacOSX .plist files.
+
+The main class in this module is Plist. It takes a set of arbitrary
+keyword arguments, which will be the top level elements of the plist
+dictionary. After instantiation you can add more elements by assigning
+new attributes to the Plist instance.
+
+To write out a plist file, call the write() method of the Plist
+instance with a filename or a file object.
+
+To parse a plist from a file, use the Plist.fromFile(pathOrFile)
+classmethod, with a file name or a file object as the only argument.
+(Warning: you need pyexpat installed for this to work, ie. it doesn't
+work with a vanilla Python 2.2 as shipped with MacOS X.2.)
+
+Values can be strings, integers, floats, booleans, tuples, lists,
+dictionaries, Data or Date objects. String values (including dictionary
+keys) may be unicode strings -- they will be written out as UTF-8.
+
+For convenience, this module exports a class named Dict(), which
+allows you to easily construct (nested) dicts using keyword arguments.
+But regular dicts work, too.
+
+To support Boolean values in plists with Python < 2.3, "bool", "True"
+and "False" are exported. Use these symbols from this module if you
+want to be compatible with Python 2.2.x (strongly recommended).
+
+The <data> plist type is supported through the Data class. This is a
+thin wrapper around a Python string.
+
+The <date> plist data has (limited) support through the Date class.
+(Warning: Dates are only supported if the PyXML package is installed.)
+
+Generate Plist example:
+
+ pl = Plist(
+ aString="Doodah",
+ aList=["A", "B", 12, 32.1, [1, 2, 3]],
+ aFloat = 0.1,
+ anInt = 728,
+ aDict=Dict(
+ anotherString="<hello & hi there!>",
+ aUnicodeValue=u'M\xe4ssig, Ma\xdf',
+ aTrueValue=True,
+ aFalseValue=False,
+ ),
+ someData = Data("<binary gunk>"),
+ someMoreData = Data("<lots of binary gunk>" * 10),
+ aDate = Date(time.mktime(time.gmtime())),
+ )
+ # unicode keys are possible, but a little awkward to use:
+ pl[u'\xc5benraa'] = "That was a unicode key."
+ pl.write(fileName)
+
+Parse Plist example:
+
+ pl = Plist.fromFile(pathOrFile)
+ print pl.aKey
+
+
+"""
+
+# written by Just van Rossum (just@letterror.com), 2002-11-19
+
+
+__all__ = ["Plist", "Data", "Date", "Dict", "False", "True", "bool"]
+
+
+INDENT = "\t"
+
+
+class DumbXMLWriter:
+
+ def __init__(self, file):
+ self.file = file
+ self.stack = []
+ self.indentLevel = 0
+
+ def beginElement(self, element):
+ self.stack.append(element)
+ self.writeln("<%s>" % element)
+ self.indentLevel += 1
+
+ def endElement(self, element):
+ assert self.indentLevel > 0
+ assert self.stack.pop() == element
+ self.indentLevel -= 1
+ self.writeln("</%s>" % element)
+
+ def simpleElement(self, element, value=None):
+ if value:
+ value = _encode(value)
+ self.writeln("<%s>%s</%s>" % (element, value, element))
+ else:
+ self.writeln("<%s/>" % element)
+
+ def writeln(self, line):
+ if line:
+ self.file.write(self.indentLevel * INDENT + line + "\n")
+ else:
+ self.file.write("\n")
+
+
+def _encode(text):
+ text = text.replace("&", "&amp;")
+ text = text.replace("<", "&lt;")
+ return text.encode("utf-8")
+
+
+PLISTHEADER = """\
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+"""
+
+class PlistWriter(DumbXMLWriter):
+
+ def __init__(self, file):
+ file.write(PLISTHEADER)
+ DumbXMLWriter.__init__(self, file)
+
+ def writeValue(self, value):
+ if isinstance(value, (str, unicode)):
+ self.simpleElement("string", value)
+ elif isinstance(value, bool):
+ # must switch for bool before int, as bool is a
+ # subclass of int...
+ if value:
+ self.simpleElement("true")
+ else:
+ self.simpleElement("false")
+ elif isinstance(value, int):
+ self.simpleElement("integer", str(value))
+ elif isinstance(value, float):
+ # should perhaps use repr() for better precision?
+ self.simpleElement("real", str(value))
+ elif isinstance(value, (dict, Dict)):
+ self.writeDict(value)
+ elif isinstance(value, Data):
+ self.writeData(value)
+ elif isinstance(value, Date):
+ self.simpleElement("date", value.toString())
+ elif isinstance(value, (tuple, list)):
+ self.writeArray(value)
+ else:
+ assert 0, "unsuported type: %s" % type(value)
+
+ def writeData(self, data):
+ self.beginElement("data")
+ for line in data.asBase64().split("\n"):
+ if line:
+ self.writeln(line)
+ self.endElement("data")
+
+ def writeDict(self, d):
+ self.beginElement("dict")
+ items = d.items()
+ items.sort()
+ for key, value in items:
+ assert isinstance(key, (str, unicode)), "keys must be strings"
+ self.simpleElement("key", key)
+ self.writeValue(value)
+ self.endElement("dict")
+
+ def writeArray(self, array):
+ self.beginElement("array")
+ for value in array:
+ self.writeValue(value)
+ self.endElement("array")
+
+
+class Dict:
+
+ """Dict wrapper for convenient access of values through attributes."""
+
+ def __init__(self, **kwargs):
+ self.__dict__.update(kwargs)
+
+ def __cmp__(self, other):
+ if isinstance(other, self.__class__):
+ return cmp(self.__dict__, other.__dict__)
+ elif isinstance(other, dict):
+ return cmp(self.__dict__, other)
+ else:
+ return cmp(id(self), id(other))
+
+ def __str__(self):
+ return "%s(**%s)" % (self.__class__.__name__, self.__dict__)
+ __repr__ = __str__
+
+ def copy(self):
+ return self.__class__(**self.__dict__)
+
+ def __getattr__(self, attr):
+ """Delegate everything else to the dict object."""
+ return getattr(self.__dict__, attr)
+
+
+class Plist(Dict):
+
+ """The main Plist object. Basically a dict (the toplevel object
+ of a plist is a dict) with two additional methods to read from
+ and write to files.
+ """
+
+ def fromFile(cls, pathOrFile):
+ didOpen = 0
+ if not hasattr(pathOrFile, "write"):
+ pathOrFile = open(pathOrFile)
+ didOpen = 1
+ p = PlistParser()
+ plist = p.parse(pathOrFile)
+ if didOpen:
+ pathOrFile.close()
+ return plist
+ fromFile = classmethod(fromFile)
+
+ def write(self, pathOrFile):
+ if not hasattr(pathOrFile, "write"):
+ pathOrFile = open(pathOrFile, "w")
+ didOpen = 1
+ else:
+ didOpen = 0
+
+ writer = PlistWriter(pathOrFile)
+ writer.writeln("<plist version=\"1.0\">")
+ writer.writeDict(self.__dict__)
+ writer.writeln("</plist>")
+
+ if didOpen:
+ pathOrFile.close()
+
+
+class Data:
+
+ """Wrapper for binary data."""
+
+ def __init__(self, data):
+ self.data = data
+
+ def fromBase64(cls, data):
+ import base64
+ return cls(base64.decodestring(data))
+ fromBase64 = classmethod(fromBase64)
+
+ def asBase64(self):
+ import base64
+ return base64.encodestring(self.data)
+
+ def __cmp__(self, other):
+ if isinstance(other, self.__class__):
+ return cmp(self.data, other.data)
+ elif isinstance(other, str):
+ return cmp(self.data, other)
+ else:
+ return cmp(id(self), id(other))
+
+ def __repr__(self):
+ return "%s(%s)" % (self.__class__.__name__, repr(self.data))
+
+
+class Date:
+
+ """Primitive date wrapper, uses time floats internally, is agnostic
+ about time zones.
+ """
+
+ def __init__(self, date):
+ if isinstance(date, str):
+ from xml.utils.iso8601 import parse
+ date = parse(date)
+ self.date = date
+
+ def toString(self):
+ from xml.utils.iso8601 import tostring
+ return tostring(self.date)
+
+ def __cmp__(self, other):
+ if isinstance(other, self.__class__):
+ return cmp(self.date, other.date)
+ elif isinstance(other, (int, float)):
+ return cmp(self.date, other)
+ else:
+ return cmp(id(self), id(other))
+
+ def __repr__(self):
+ return "%s(%s)" % (self.__class__.__name__, repr(self.toString()))
+
+
+class PlistParser:
+
+ def __init__(self):
+ self.stack = []
+ self.currentKey = None
+ self.root = None
+
+ def parse(self, file):
+ from xml.parsers.expat import ParserCreate
+ parser = ParserCreate()
+ parser.StartElementHandler = self.handleBeginElement
+ parser.EndElementHandler = self.handleEndElement
+ parser.CharacterDataHandler = self.handleData
+ parser.ParseFile(file)
+ return self.root
+
+ def handleBeginElement(self, element, attrs):
+ self.data = []
+ handler = getattr(self, "begin_" + element, None)
+ if handler is not None:
+ handler(attrs)
+
+ def handleEndElement(self, element):
+ handler = getattr(self, "end_" + element, None)
+ if handler is not None:
+ handler()
+
+ def handleData(self, data):
+ self.data.append(data)
+
+ def addObject(self, value):
+ if self.currentKey is not None:
+ self.stack[-1][self.currentKey] = value
+ self.currentKey = None
+ elif not self.stack:
+ # this is the root object
+ assert self.root is value
+ else:
+ self.stack[-1].append(value)
+
+ def getData(self):
+ data = "".join(self.data)
+ try:
+ data = data.encode("ascii")
+ except UnicodeError:
+ pass
+ self.data = []
+ return data
+
+ # element handlers
+
+ def begin_dict(self, attrs):
+ if self.root is None:
+ self.root = d = Plist()
+ else:
+ d = Dict()
+ self.addObject(d)
+ self.stack.append(d)
+ def end_dict(self):
+ self.stack.pop()
+
+ def end_key(self):
+ self.currentKey = self.getData()
+
+ def begin_array(self, attrs):
+ a = []
+ self.addObject(a)
+ self.stack.append(a)
+ def end_array(self):
+ self.stack.pop()
+
+ def end_true(self):
+ self.addObject(True)
+ def end_false(self):
+ self.addObject(False)
+ def end_integer(self):
+ self.addObject(int(self.getData()))
+ def end_real(self):
+ self.addObject(float(self.getData()))
+ def end_string(self):
+ self.addObject(self.getData())
+ def end_data(self):
+ self.addObject(Data.fromBase64(self.getData()))
+ def end_date(self):
+ self.addObject(Date(self.getData()))
+
+
+# cruft to support booleans in Python <= 2.3
+import sys
+if sys.version_info[:2] < (2, 3):
+ # Python 2.2 and earlier: no booleans
+ # Python 2.2.x: booleans are ints
+ class bool(int):
+ """Imitation of the Python 2.3 bool object."""
+ def __new__(cls, value):
+ return int.__new__(cls, not not value)
+ def __repr__(self):
+ if self:
+ return "True"
+ else:
+ return "False"
+ True = bool(1)
+ False = bool(0)
+else:
+ # Bind the boolean builtins to local names
+ True = True
+ False = False
+ bool = bool
+
+
+if __name__ == "__main__":
+ from StringIO import StringIO
+ import time
+ if len(sys.argv) == 1:
+ pl = Plist(
+ aString="Doodah",
+ aList=["A", "B", 12, 32.1, [1, 2, 3]],
+ aFloat = 0.1,
+ anInt = 728,
+ aDict=Dict(
+ anotherString="<hello & hi there!>",
+ aUnicodeValue=u'M\xe4ssig, Ma\xdf',
+ aTrueValue=True,
+ aFalseValue=False,
+ ),
+ someData = Data("<binary gunk>"),
+ someMoreData = Data("<lots of binary gunk>" * 10),
+ aDate = Date(time.mktime(time.gmtime())),
+ )
+ elif len(sys.argv) == 2:
+ pl = Plist.fromFile(sys.argv[1])
+ else:
+ print "Too many arguments: at most 1 plist file can be given."
+ sys.exit(1)
+
+ # unicode keys are possible, but a little awkward to use:
+ pl[u'\xc5benraa'] = "That was a unicode key."
+ f = StringIO()
+ pl.write(f)
+ xml = f.getvalue()
+ print xml
+ f.seek(0)
+ pl2 = Plist.fromFile(f)
+ assert pl == pl2
+ f = StringIO()
+ pl2.write(f)
+ assert xml == f.getvalue()
+ #print repr(pl2)
diff --git a/Lib/plat-mac/videoreader.py b/Lib/plat-mac/videoreader.py
new file mode 100644
index 0000000..7b776f2
--- /dev/null
+++ b/Lib/plat-mac/videoreader.py
@@ -0,0 +1,276 @@
+# 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
+import MediaDescr
+import imgformat
+import os
+# import audio.format
+import macfs
+
+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):
+ fsspec = macfs.FSSpec(path)
+ fd = Qt.OpenMovieFile(fsspec, 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 = MediaDescr.SoundDescription.decode(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):
+ 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):
+ 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, imgformat.macrgb)
+
+ def GetVideoFrameRate(self):
+ tv = self.videocurtime
+ if tv == 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 == 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 == 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 img
+ import MacOS
+ Qt.EnterMovies()
+ fss, ok = macfs.PromptGetFile('Video to convert')
+ if not ok: sys.exit(0)
+ path = fss.as_pathname()
+ rdr = reader(path)
+ if not rdr:
+ sys.exit(1)
+ dstfss, ok = macfs.StandardPutFile('Name for output folder')
+ if not ok: sys.exit(0)
+ dstdir = dstfss.as_pathname()
+ 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)
+ print 'Writing', fname, imgw, imgh, len(data)
+ 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)
+