summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1999-12-12 21:41:51 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1999-12-12 21:41:51 (GMT)
commita05ac607d720727bc0d3799b7bea7a81e02ea561 (patch)
treec000d84ecf27d68dcdcbfa954b2d03e0f3566800 /Mac
parent608b3fa801303332de71ef6bad696e9a8b7b00f3 (diff)
downloadcpython-a05ac607d720727bc0d3799b7bea7a81e02ea561.zip
cpython-a05ac607d720727bc0d3799b7bea7a81e02ea561.tar.gz
cpython-a05ac607d720727bc0d3799b7bea7a81e02ea561.tar.bz2
Regenerated with CW Pro 5.2, which has MacOS 8.6 and Appearance 1.1 support.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/lib-toolbox/Appearance.py532
-rw-r--r--Mac/Lib/lib-toolbox/Balloons.py2
-rw-r--r--Mac/Lib/lib-toolbox/Components.py3
-rw-r--r--Mac/Lib/lib-toolbox/Controls.py4
-rw-r--r--Mac/Lib/lib-toolbox/Dialogs.py6
-rw-r--r--Mac/Lib/lib-toolbox/Dragconst.py4
-rw-r--r--Mac/Lib/lib-toolbox/Events.py2
-rw-r--r--Mac/Lib/lib-toolbox/Fonts.py2
-rw-r--r--Mac/Lib/lib-toolbox/Icons.py346
-rw-r--r--Mac/Lib/lib-toolbox/Lists.py2
-rw-r--r--Mac/Lib/lib-toolbox/Menus.py26
-rw-r--r--Mac/Lib/lib-toolbox/QDOffscreen.py2
-rw-r--r--Mac/Lib/lib-toolbox/QuickDraw.py6
-rw-r--r--Mac/Lib/lib-toolbox/QuickTime.py11
-rw-r--r--Mac/Lib/lib-toolbox/Resources.py2
-rw-r--r--Mac/Lib/lib-toolbox/Sound.py8
-rw-r--r--Mac/Lib/lib-toolbox/TextEdit.py2
-rw-r--r--Mac/Lib/lib-toolbox/Windows.py47
-rw-r--r--Mac/Modules/app/Appmodule.c4
-rw-r--r--Mac/Modules/app/appsupport.py4
-rw-r--r--Mac/Modules/cm/Cmmodule.c24
-rw-r--r--Mac/Modules/ctl/Ctlmodule.c221
-rw-r--r--Mac/Modules/ctl/ctlscan.py28
-rw-r--r--Mac/Modules/dlg/Dlgmodule.c130
-rw-r--r--Mac/Modules/dlg/dlgscan.py6
-rw-r--r--Mac/Modules/dlg/dlgsupport.py1
-rw-r--r--Mac/Modules/fm/Fmmodule.c40
-rw-r--r--Mac/Modules/fm/fmscan.py2
-rw-r--r--Mac/Modules/icn/Icnmodule.c743
-rw-r--r--Mac/Modules/icn/icnscan.py1
-rw-r--r--Mac/Modules/icn/icnsupport.py3
-rw-r--r--Mac/Modules/menu/Menumodule.c839
-rw-r--r--Mac/Modules/menu/menuscan.py8
-rw-r--r--Mac/Modules/qd/Qdmodule.c36
-rw-r--r--Mac/Modules/qdoffs/Qdoffsmodule.c30
-rw-r--r--Mac/Modules/qdoffs/qdoffsscan.py2
-rw-r--r--Mac/Modules/qt/Qtmodule.c113
-rw-r--r--Mac/Modules/qt/qtscan.py30
-rw-r--r--Mac/Modules/res/Resmodule.c12
-rw-r--r--Mac/Modules/scrap/scrapscan.py2
-rw-r--r--Mac/Modules/snd/Sndmodule.c170
-rw-r--r--Mac/Modules/snd/sndscan.py12
-rw-r--r--Mac/Modules/te/TEmodule.c32
-rw-r--r--Mac/Modules/te/tescan.py2
-rw-r--r--Mac/Modules/win/Winmodule.c1024
-rw-r--r--Mac/Modules/win/winscan.py6
-rw-r--r--Mac/Modules/win/winsupport.py14
47 files changed, 4048 insertions, 498 deletions
diff --git a/Mac/Lib/lib-toolbox/Appearance.py b/Mac/Lib/lib-toolbox/Appearance.py
index 877e33f..3d03e69 100644
--- a/Mac/Lib/lib-toolbox/Appearance.py
+++ b/Mac/Lib/lib-toolbox/Appearance.py
@@ -1,4 +1,4 @@
-# Generated from 'Moes:Codewarrior Pro 4:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Appearance.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Appearance.h'
def FOUR_CHAR_CODE(x): return x
_AppearanceDispatch = 0xAA74
@@ -7,79 +7,485 @@ gestaltAppearanceExists = 0
gestaltAppearanceCompatMode = 1
gestaltAppearanceVersion = FOUR_CHAR_CODE('apvr')
kAppearanceEventClass = FOUR_CHAR_CODE('appr')
-kAEThemeSwitch = FOUR_CHAR_CODE('thme')
-appearanceBadBrushIndexErr = -30560
-appearanceProcessRegisteredErr = -30561
-appearanceProcessNotRegisteredErr = -30562
-appearanceBadTextColorIndexErr = -30563
-appearanceThemeHasNoAccents = -30564
-appearanceBadCursorIndexErr = -30565
-kThemeActiveDialogBackgroundBrush = 1
-kThemeInactiveDialogBackgroundBrush = 2
-kThemeActiveAlertBackgroundBrush = 3
-kThemeInactiveAlertBackgroundBrush = 4
-kThemeActiveModelessDialogBackgroundBrush = 5
-kThemeInactiveModelessDialogBackgroundBrush = 6
-kThemeActiveUtilityWindowBackgroundBrush = 7
-kThemeInactiveUtilityWindowBackgroundBrush = 8
-kThemeListViewSortColumnBackgroundBrush = 9
-kThemeListViewBackgroundBrush = 10
-kThemeIconLabelBackgroundBrush = 11
-kThemeListViewSeparatorBrush = 12
-kThemeChasingArrowsBrush = 13
-kThemeDragHiliteBrush = 14
-kThemeDocumentWindowBackgroundBrush = 15
-kThemeFinderWindowBackgroundBrush = 16
-kThemeActiveDialogTextColor = 1
-kThemeInactiveDialogTextColor = 2
-kThemeActiveAlertTextColor = 3
-kThemeInactiveAlertTextColor = 4
-kThemeActiveModelessDialogTextColor = 5
-kThemeInactiveModelessDialogTextColor = 6
-kThemeActiveWindowHeaderTextColor = 7
-kThemeInactiveWindowHeaderTextColor = 8
-kThemeActivePlacardTextColor = 9
-kThemeInactivePlacardTextColor = 10
-kThemePressedPlacardTextColor = 11
-kThemeActivePushButtonTextColor = 12
-kThemeInactivePushButtonTextColor = 13
-kThemePressedPushButtonTextColor = 14
-kThemeActiveBevelButtonTextColor = 15
-kThemeInactiveBevelButtonTextColor = 16
-kThemePressedBevelButtonTextColor = 17
-kThemeActivePopupButtonTextColor = 18
-kThemeInactivePopupButtonTextColor = 19
-kThemePressedPopupButtonTextColor = 20
-kThemeIconLabelTextColor = 21
-kThemeListViewTextColor = 22
-kThemeActiveDocumentWindowTitleTextColor = 23
-kThemeInactiveDocumentWindowTitleTextColor = 24
-kThemeActiveMovableModalWindowTitleTextColor = 25
-kThemeInactiveMovableModalWindowTitleTextColor = 26
-kThemeActiveUtilityWindowTitleTextColor = 27
-kThemeInactiveUtilityWindowTitleTextColor = 28
-kThemeActivePopupWindowTitleColor = 29
-kThemeInactivePopupWindowTitleColor = 30
-kThemeActiveRootMenuTextColor = 31
-kThemeSelectedRootMenuTextColor = 32
-kThemeDisabledRootMenuTextColor = 33
-kThemeActiveMenuItemTextColor = 34
-kThemeSelectedMenuItemTextColor = 35
-kThemeDisabledMenuItemTextColor = 36
-kThemeActivePopupLabelTextColor = 37
-kThemeInactivePopupLabelTextColor = 38
-kThemeStateDisabled = 0
+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')
+themeInvalidBrushErr = -30560
+themeProcessRegisteredErr = -30561
+themeProcessNotRegisteredErr = -30562
+themeBadTextColorErr = -30563
+themeHasNoAccentsErr = -30564
+themeBadCursorIndexErr = -30565
+themeScriptFontNotFoundErr = -30566
+themeMonitorDepthNotSupportedErr = -30567
+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
+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
+kThemeTextColorBlack = -1
+kThemeTextColorWhite = -2
+kThemeStateInactive = 0
kThemeStateActive = 1
kThemeStatePressed = 2
+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
kThemeMenuActive = 0
kThemeMenuSelected = 1
+kThemeMenuInactive = 3
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
+kThemeNameTag = FOUR_CHAR_CODE('name')
+kThemeAppearanceFileNameTag = FOUR_CHAR_CODE('thme')
+kThemeVariantNameTag = FOUR_CHAR_CODE('varn')
+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')
+kThemeHighlightColorTag = FOUR_CHAR_CODE('hcol')
+kThemeExamplePictureIDTag = FOUR_CHAR_CODE('epic')
+kThemeSoundsEnabledTag = FOUR_CHAR_CODE('snds')
+kThemeSoundTrackNameTag = FOUR_CHAR_CODE('sndt')
+kThemeSoundMaskTag = FOUR_CHAR_CODE('smsk')
+kThemeUserDefinedTag = FOUR_CHAR_CODE('user')
+kThemeScrollBarArrowStyleTag = FOUR_CHAR_CODE('sbar')
+kThemeScrollBarThumbStyleTag = FOUR_CHAR_CODE('sbth')
+kThemeSmoothFontEnabledTag = FOUR_CHAR_CODE('smoo')
+kThemeSmoothFontMinSizeTag = FOUR_CHAR_CODE('smos')
+kThemeDblClickCollapseTag = FOUR_CHAR_CODE('coll')
+kThemeCheckBoxClassicX = 0
+kThemeCheckBoxCheckMark = 1
+kThemeScrollBarArrowsSingle = 0
+kThemeScrollBarArrowsLowerRight = 1
+kThemeScrollBarThumbNormal = 0
+kThemeScrollBarThumbProportional = 1
+kThemeSystemFont = 0
+kThemeSmallSystemFont = 1
+kThemeSmallEmphasizedSystemFont = 2
+kThemeViewsFont = 3
+kThemeTabNonFront = 0
+kThemeTabNonFrontPressed = 1
+kThemeTabNonFrontInactive = 2
+kThemeTabFront = 3
+kThemeTabFrontInactive = 4
+kThemeTabNorth = 0
+kThemeTabSouth = 1
+kThemeTabEast = 2
+kThemeTabWest = 3
+kThemeSmallTabHeight = 16
+kThemeLargeTabHeight = 21
+kThemeTabPaneOverlap = 3
+kThemeSmallTabHeightMax = 19
+kThemeLargeTabHeightMax = 24
+kThemeScrollBar = 0
+kThemeSmallScrollBar = 1
+kThemeSlider = 2
+kThemeProgressBar = 3
+kThemeIndeterminateBar = 4
+kThemeTrackActive = 0
+kThemeTrackDisabled = 1
+kThemeTrackNothingToScroll = 2
+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
+kThemeWindowHasFullZoom = kThemeWindowHasHorizontalZoom + kThemeWindowHasVerticalZoom
+kThemeDocumentWindow = 0
+kThemeDialogWindow = 1
+kThemeMovableDialogWindow = 2
+kThemeAlertWindow = 3
+kThemeMovableAlertWindow = 4
+kThemePlainDialogWindow = 5
+kThemeShadowDialogWindow = 6
+kThemePopupWindow = 7
+kThemeUtilityWindow = 8
+kThemeUtilitySideWindow = 9
+kThemeWidgetCloseBox = 0
+kThemeWidgetZoomBox = 1
+kThemeWidgetCollapseBox = 2
+kThemeArrowLeft = 0
+kThemeArrowDown = 1
+kThemeArrowRight = 2
+kThemeArrowUp = 3
+kThemeArrow3pt = 0
+kThemeArrow5pt = 1
+kThemeArrow7pt = 2
+kThemeArrow9pt = 3
+kThemePushButton = 0
+kThemeCheckBox = 1
+kThemeRadioButton = 2
+kThemeBevelButton = 3
+kThemeArrowButton = 4
+kThemePopupButton = 5
+kThemeDisclosureButton = 6
+kThemeIncDecButton = 7
+kThemeSmallBevelButton = 8
+kThemeMediumBevelButton = 3
+kThemeLargeBevelButton = 9
+kThemeButtonOff = 0
+kThemeButtonOn = 1
+kThemeButtonMixed = 2
+kThemeDisclosureRight = 0
+kThemeDisclosureDown = 1
+kThemeDisclosureLeft = 2
+kThemeAdornmentNone = 0
+kThemeNoSounds = 0
+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
+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
diff --git a/Mac/Lib/lib-toolbox/Balloons.py b/Mac/Lib/lib-toolbox/Balloons.py
index a9018aa..34755be 100644
--- a/Mac/Lib/lib-toolbox/Balloons.py
+++ b/Mac/Lib/lib-toolbox/Balloons.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Balloons.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Balloons.h'
def FOUR_CHAR_CODE(x): return x
kTopLeftTipPointsLeftVariant = 0
diff --git a/Mac/Lib/lib-toolbox/Components.py b/Mac/Lib/lib-toolbox/Components.py
index e8f501d..5bac9d2 100644
--- a/Mac/Lib/lib-toolbox/Components.py
+++ b/Mac/Lib/lib-toolbox/Components.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Components.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Components.h'
def FOUR_CHAR_CODE(x): return x
kAppleManufacturer = FOUR_CHAR_CODE('appl')
@@ -9,7 +9,6 @@ kAnyComponentSubType = 0
kAnyComponentManufacturer = 0
kAnyComponentFlagsMask = 0
cmpWantsRegisterMessage = 1L << 31
-cmpIsComponentAlias = 1L << 28
kComponentOpenSelect = -1
kComponentCloseSelect = -2
kComponentCanDoSelect = -3
diff --git a/Mac/Lib/lib-toolbox/Controls.py b/Mac/Lib/lib-toolbox/Controls.py
index 040b9b0..7bb320c 100644
--- a/Mac/Lib/lib-toolbox/Controls.py
+++ b/Mac/Lib/lib-toolbox/Controls.py
@@ -62,7 +62,7 @@ kControlKeyFilterBlockKey = 0
kControlKeyFilterPassKey = 1
kControlKeyScriptBehaviorAllowAnyScript = FOUR_CHAR_CODE('any ')
kControlKeyScriptBehaviorPrefersRoman = FOUR_CHAR_CODE('prmn')
-kControlKeyScriptBehaviorRequiresRoman = FOUR_CHAR_CODE('rrmn')
+kControlKeyScriptBehaviorRequiresRoman = FOUR_CHAR_CODE('rrmn') /* switches the keyboard to roman and prevents the user from changing it.*/
kControlFontBigSystemFont = -1
kControlFontSmallSystemFont = -2
kControlFontSmallBoldSystemFont = -3
@@ -239,7 +239,7 @@ 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')
+kControlEditTextInlinePostUpdateProcTag = FOUR_CHAR_CODE('poup') /* ...The refCon parameter will contain the ControlHandle.*/
kControlStaticTextProc = 288
kControlStaticTextStyleTag = kControlFontStyleTag
kControlStaticTextTextTag = FOUR_CHAR_CODE('text')
diff --git a/Mac/Lib/lib-toolbox/Dialogs.py b/Mac/Lib/lib-toolbox/Dialogs.py
index a07729e..9089cfb 100644
--- a/Mac/Lib/lib-toolbox/Dialogs.py
+++ b/Mac/Lib/lib-toolbox/Dialogs.py
@@ -1,5 +1,8 @@
-# Generated from 'moes:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Dialogs.h'
+def FOUR_CHAR_CODE(x): return x
+gestaltDialogMgrAttr = FOUR_CHAR_CODE('dlog')
+dialogNoTimeoutErr = -5640
kControlDialogItem = 4
kButtonDialogItem = kControlDialogItem | 0
kCheckBoxDialogItem = kControlDialogItem | 1
@@ -59,3 +62,4 @@ kDialogFontUseJustMask = 0x0040
kDialogFontUseAllMask = 0x00FF
kDialogFontAddFontSizeMask = 0x0100
kDialogFontUseFontNameMask = 0x0200
+kDialogFontAddToMetaFontMask = 0x0400
diff --git a/Mac/Lib/lib-toolbox/Dragconst.py b/Mac/Lib/lib-toolbox/Dragconst.py
index 2a89711..00f90bc 100644
--- a/Mac/Lib/lib-toolbox/Dragconst.py
+++ b/Mac/Lib/lib-toolbox/Dragconst.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:CodeWarrior Pro 4:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Drag.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Drag.h'
def FOUR_CHAR_CODE(x): return x
from TextEdit import *
@@ -31,7 +31,7 @@ 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')
+kFlavorTypeFinderNoTrackingBehavior = FOUR_CHAR_CODE('fntb') /* Finder completely ignores any drag containing this flavor*/
kDragTrackingEnterHandler = 1
kDragTrackingEnterWindow = 2
kDragTrackingInWindow = 3
diff --git a/Mac/Lib/lib-toolbox/Events.py b/Mac/Lib/lib-toolbox/Events.py
index 2e6eb9f..2683481 100644
--- a/Mac/Lib/lib-toolbox/Events.py
+++ b/Mac/Lib/lib-toolbox/Events.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Events.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Events.h'
nullEvent = 0
mouseDown = 1
diff --git a/Mac/Lib/lib-toolbox/Fonts.py b/Mac/Lib/lib-toolbox/Fonts.py
index 93d98f9..706042d 100644
--- a/Mac/Lib/lib-toolbox/Fonts.py
+++ b/Mac/Lib/lib-toolbox/Fonts.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Fonts.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Fonts.h'
systemFont = 0
applFont = 1
diff --git a/Mac/Lib/lib-toolbox/Icons.py b/Mac/Lib/lib-toolbox/Icons.py
new file mode 100644
index 0000000..4af37bc
--- /dev/null
+++ b/Mac/Lib/lib-toolbox/Icons.py
@@ -0,0 +1,346 @@
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Icons.h'
+
+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
+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')
+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
+kSelectorAll1BitData = kSelectorLarge1Bit | kSelectorSmall1Bit | kSelectorMini1Bit | kSelectorHuge1Bit
+kSelectorAll4BitData = kSelectorLarge4Bit | kSelectorSmall4Bit | kSelectorMini4Bit | kSelectorHuge4Bit
+kSelectorAll8BitData = kSelectorLarge8Bit | kSelectorSmall8Bit | kSelectorMini8Bit | kSelectorHuge8Bit
+kSelectorAll32BitData = kSelectorLarge32Bit | kSelectorSmall32Bit | kSelectorHuge32Bit
+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')
+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')
+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')
+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')
+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Ÿ')
+kAppleMenuFolderIcon = FOUR_CHAR_CODE('amnu')
+kApplicationsFolderIcon = FOUR_CHAR_CODE('apps')
+kApplicationSupportFolderIcon = FOUR_CHAR_CODE('asup')
+kAssistantsFolderIcon = FOUR_CHAR_CODE('astŸ')
+kContextualMenuItemsFolderIcon = FOUR_CHAR_CODE('cmnu')
+kControlPanelDisabledFolderIcon = FOUR_CHAR_CODE('ctrD')
+kControlPanelFolderIcon = FOUR_CHAR_CODE('ctrl')
+kControlStripModulesFolderIcon = FOUR_CHAR_CODE('sdvŸ')
+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('Ÿhlp')
+kInternetFolderIcon = FOUR_CHAR_CODE('intŸ')
+kInternetPlugInFolderIcon = FOUR_CHAR_CODE('Ÿnet')
+kMacOSReadMeFolderIcon = FOUR_CHAR_CODE('morŸ')
+kPreferencesFolderIcon = FOUR_CHAR_CODE('prfŸ')
+kPrinterDescriptionFolderIcon = FOUR_CHAR_CODE('ppdf')
+kPrinterDriverFolderIcon = FOUR_CHAR_CODE('Ÿprd')
+kPrintMonitorFolderIcon = FOUR_CHAR_CODE('prnt')
+kRecentApplicationsFolderIcon = FOUR_CHAR_CODE('rapp')
+kRecentDocumentsFolderIcon = FOUR_CHAR_CODE('rdoc')
+kRecentServersFolderIcon = FOUR_CHAR_CODE('rsrv')
+kScriptingAdditionsFolderIcon = FOUR_CHAR_CODE('Ÿscr')
+kSharedLibrariesFolderIcon = FOUR_CHAR_CODE('Ÿlib')
+kScriptsFolderIcon = FOUR_CHAR_CODE('scrŸ')
+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('Ÿtex')
+kAppearanceFolderIcon = FOUR_CHAR_CODE('appr')
+kUtilitiesFolderIcon = FOUR_CHAR_CODE('utiŸ')
+kVoicesFolderIcon = FOUR_CHAR_CODE('fvoc')
+kColorSyncFolderIcon = FOUR_CHAR_CODE('prof')
+kInternetSearchSitesFolderIcon = FOUR_CHAR_CODE('issf')
+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')
+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')
+invalidIconRefErr = -2580
+noSuchIconErr = -2581
+noIconDataAvailableErr = -2582
+kIconServicesNormalUsageFlag = 0
+kIconFamilyType = FOUR_CHAR_CODE('icns')
diff --git a/Mac/Lib/lib-toolbox/Lists.py b/Mac/Lib/lib-toolbox/Lists.py
index d7bd810..d28db79 100644
--- a/Mac/Lib/lib-toolbox/Lists.py
+++ b/Mac/Lib/lib-toolbox/Lists.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Lists.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Lists.h'
def FOUR_CHAR_CODE(x): return x
listNotifyNothing = FOUR_CHAR_CODE('nada')
diff --git a/Mac/Lib/lib-toolbox/Menus.py b/Mac/Lib/lib-toolbox/Menus.py
index 66ce742..40230b8 100644
--- a/Mac/Lib/lib-toolbox/Menus.py
+++ b/Mac/Lib/lib-toolbox/Menus.py
@@ -1,16 +1,10 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Menus.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Menus.h'
def FOUR_CHAR_CODE(x): return x
-kMenuStdMenuProc = 63
-kMenuStdMenuBarProc = 63
-kMenuNoModifiers = 0
-kMenuNoIcon = 0
-kMenuIconType = 1
-kMenuShrinkIconType = 2
-kMenuSmallIconType = 3
-kMenuColorIconType = 4
-kMenuIconSuiteType = 5
-kMenuIconRefType = 6
+gestaltMenuMgrAttr = FOUR_CHAR_CODE('menu')
+gestaltMenuMgrPresent = 1
+menuPropertyInvalid = -5603
+menuPropertyNotFoundErr = -5604
noMark = 0
kMenuDrawMsg = 0
kMenuChooseMsg = 1
@@ -30,6 +24,16 @@ hierMenu = -1
mPopUpMsg = 3
mctAllItems = -98
mctLastIDIndic = -99
+kMenuStdMenuProc = 63
+kMenuStdMenuBarProc = 63
+kMenuNoModifiers = 0
+kMenuNoIcon = 0
+kMenuIconType = 1
+kMenuShrinkIconType = 2
+kMenuSmallIconType = 3
+kMenuColorIconType = 4
+kMenuIconSuiteType = 5
+kMenuIconRefType = 6
gestaltContextualMenuAttr = FOUR_CHAR_CODE('cmnu')
gestaltContextualMenuUnusedBit = 0
gestaltContextualMenuTrapAvailable = 1
diff --git a/Mac/Lib/lib-toolbox/QDOffscreen.py b/Mac/Lib/lib-toolbox/QDOffscreen.py
index 8e50688..affc705 100644
--- a/Mac/Lib/lib-toolbox/QDOffscreen.py
+++ b/Mac/Lib/lib-toolbox/QDOffscreen.py
@@ -1,4 +1,4 @@
-# Generated from 'Moes:Codewarrior Pro 4:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:QDOffscreen.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:QDOffscreen.h'
def FOUR_CHAR_CODE(x): return x
pixPurgeBit = 0
diff --git a/Mac/Lib/lib-toolbox/QuickDraw.py b/Mac/Lib/lib-toolbox/QuickDraw.py
index 8983cca..d75d524 100644
--- a/Mac/Lib/lib-toolbox/QuickDraw.py
+++ b/Mac/Lib/lib-toolbox/QuickDraw.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:CodeWarrior Pro 4:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:QuickDraw.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:QuickDraw.h'
def FOUR_CHAR_CODE(x): return x
@@ -109,6 +109,8 @@ allDevicesBit = 2
singleDevices = 1 << singleDevicesBit
dontMatchSeeds = 1 << dontMatchSeedsBit
allDevices = 1 << allDevicesBit
+kPrinterFontStatus = 0
+kPrinterScalingStatus = 1
kNoConstraint = 0
kVerticalConstraint = 1
kHorizontalConstraint = 2
@@ -139,7 +141,7 @@ kUYVY422PixelFormat = FOUR_CHAR_CODE('UYVY')
kYUV211PixelFormat = FOUR_CHAR_CODE('Y211')
kCursorImageMajorVersion = 0x0001
kCursorImageMinorVersion = 0x0000
-# Generated from 'flap:CodeWarrior Pro 4:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:QuickDrawText.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:QuickDrawText.h'
def FOUR_CHAR_CODE(x): return x
diff --git a/Mac/Lib/lib-toolbox/QuickTime.py b/Mac/Lib/lib-toolbox/QuickTime.py
index 5ec8429..01bd55e 100644
--- a/Mac/Lib/lib-toolbox/QuickTime.py
+++ b/Mac/Lib/lib-toolbox/QuickTime.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Movies.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Movies.h'
def FOUR_CHAR_CODE(x): return x
MovieFileType = FOUR_CHAR_CODE('MooV')
@@ -29,6 +29,7 @@ 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')
kUserDataMovieControllerType = FOUR_CHAR_CODE('ctyp')
kUserDataName = FOUR_CHAR_CODE('name')
kUserDataTextFullName = FOUR_CHAR_CODE('©nam')
@@ -118,7 +119,6 @@ kActionQTVRShowDefaultView = 4099
kActionQTVRGoToNodeID = 4100
kActionMusicPlayNote = 5120
kActionMusicSetController = 5121
-kActionMusicPlayTune = 5122
kActionCase = 6144
kActionWhile = 6145
kActionGoToURL = 6146
@@ -182,7 +182,7 @@ kLastSpriteAction = kActionSpriteStretch
kFirstQTVRAction = kActionQTVRSetPanAngle
kLastQTVRAction = kActionQTVRGoToNodeID
kFirstMusicAction = kActionMusicPlayNote
-kLastMusicAction = kActionMusicPlayTune
+kLastMusicAction = kActionMusicSetController
kFirstSystemAction = kActionCase
kLastSystemAction = kActionPopAndGotoLabeledTime
kFirstSpriteTrackAction = kActionSpriteTrackSetVariable
@@ -241,6 +241,8 @@ kOperatorModulo = FOUR_CHAR_CODE('mod ')
kOperatorIntegerDivide = FOUR_CHAR_CODE('idiv')
kOperatorAbsoluteValue = FOUR_CHAR_CODE('abs ')
kOperatorNegate = FOUR_CHAR_CODE('neg ')
+kMediaPropertyNonLinearAtomType = FOUR_CHAR_CODE('nonl')
+kMediaPropertyHasActions = 105
loopTimeBase = 1
palindromeLoopTimeBase = 2
maintainTimeBaseZero = 4
@@ -372,6 +374,7 @@ 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
@@ -383,6 +386,7 @@ pdActionSetDialogTitle = 8
pdActionGetSubPanelMenu = 9
pdActionActivateSubPanel = 10
pdActionConductStopAlert = 11
+pdActionModelessCallback = 12
elOptionsIncludeNoneInList = 0x00000001
pdOptionsCollectOneValue = 0x00000001
pdOptionsAllowOptionalInterpolations = 0x00000002
@@ -573,6 +577,7 @@ mcActionExecuteOneActionForQTEvent = 64
mcActionAdjustCursor = 65
mcActionUseTrackForTimeTable = 66
mcActionClickAndHoldPoint = 67
+mcActionShowMessageString = 68
mcFlagSuppressMovieFrame = 1 << 0
mcFlagSuppressStepButtons = 1 << 1
mcFlagSuppressSpeakerButton = 1 << 2
diff --git a/Mac/Lib/lib-toolbox/Resources.py b/Mac/Lib/lib-toolbox/Resources.py
index 989e700..614f777 100644
--- a/Mac/Lib/lib-toolbox/Resources.py
+++ b/Mac/Lib/lib-toolbox/Resources.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Resources.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Resources.h'
resSysHeap = 64
resPurgeable = 32
diff --git a/Mac/Lib/lib-toolbox/Sound.py b/Mac/Lib/lib-toolbox/Sound.py
index 344738a..395df45 100644
--- a/Mac/Lib/lib-toolbox/Sound.py
+++ b/Mac/Lib/lib-toolbox/Sound.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Sound.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Sound.h'
def FOUR_CHAR_CODE(x): return x
soundListRsrc = FOUR_CHAR_CODE('snd ')
@@ -115,10 +115,12 @@ 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')
@@ -186,6 +188,7 @@ siUserInterruptProc = FOUR_CHAR_CODE('user')
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')
@@ -248,6 +251,8 @@ kALawCompression = FOUR_CHAR_CODE('alaw')
kMicrosoftADPCMFormat = 0x6D730002
kDVIIntelIMAFormat = 0x6D730011
kDVAudioFormat = FOUR_CHAR_CODE('dvca')
+kQDesignCompression = FOUR_CHAR_CODE('QDMC')
+kQUALCOMMCompression = FOUR_CHAR_CODE('Qclp')
kOffsetBinary = k8BitOffsetBinaryFormat
kTwosComplement = k16BitBigEndianFormat
kLittleEndianFormat = k16BitLittleEndianFormat
@@ -276,6 +281,7 @@ 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
diff --git a/Mac/Lib/lib-toolbox/TextEdit.py b/Mac/Lib/lib-toolbox/TextEdit.py
index f6cff54..960bcd6 100644
--- a/Mac/Lib/lib-toolbox/TextEdit.py
+++ b/Mac/Lib/lib-toolbox/TextEdit.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:TextEdit.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:TextEdit.h'
teJustLeft = 0
teJustCenter = 1
diff --git a/Mac/Lib/lib-toolbox/Windows.py b/Mac/Lib/lib-toolbox/Windows.py
index b7e697b..0bd36b2 100644
--- a/Mac/Lib/lib-toolbox/Windows.py
+++ b/Mac/Lib/lib-toolbox/Windows.py
@@ -1,6 +1,24 @@
-# Generated from 'flap:Metrowerks:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:MacWindows.h'
+# Generated from 'SWDev:Codewarrior Pro 5:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:MacWindows.h'
def FOUR_CHAR_CODE(x): return x
+kAlertWindowClass = 1L
+kMovableAlertWindowClass = 2L
+kModalWindowClass = 3L
+kMovableModalWindowClass = 4L
+kFloatingWindowClass = 5L
+kDocumentWindowClass = 6L
+kWindowNoAttributes = 0L
+gestaltWindowMgrAttr = FOUR_CHAR_CODE('wind')
+errInvalidWindowPtr = -5600
+errUnsupportedWindowAttributesForClass = -5601
+errWindowDoesNotHaveProxy = -5602
+errInvalidWindowProperty = -5603
+errWindowPropertyNotFound = -5604
+errUnrecognizedWindowClass = -5605
+errCorruptWindowDescription = -5606
+errUserWantsToDragWindow = -5607
+errWindowsAlreadyInitialized = -5608
+errFloatingWindowsNotInitialized = -5609
kWindowDefProcType = FOUR_CHAR_CODE('WDEF')
kStandardWindowDefinition = 0
kRoundWindowDefinition = 1
@@ -76,6 +94,15 @@ 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
@@ -83,6 +110,7 @@ kWindowZoomBoxRgn = 3
kWindowDragRgn = 5
kWindowGrowRgn = 6
kWindowCollapseBoxRgn = 7
+kWindowTitleProxyIconRgn = 8
kWindowStructureRgn = 32
kWindowContentRgn = 33
dialogKind = 2
@@ -100,6 +128,7 @@ inGoAway = 6
inZoomIn = 7
inZoomOut = 8
inCollapseBox = 11
+inProxyIcon = 12
wNoHit = 0
wInContent = 1
wInDrag = 2
@@ -108,6 +137,7 @@ wInGoAway = 4
wInZoomIn = 5
wInZoomOut = 6
wInCollapseBox = 9
+wInProxyIcon = 10
kWindowMsgDraw = 0
kWindowMsgHitTest = 1
kWindowMsgCalculateShape = 2
@@ -117,6 +147,12 @@ kWindowMsgDrawGrowOutline = 5
kWindowMsgDrawGrowBox = 6
kWindowMsgGetFeatures = 7
kWindowMsgGetRegion = 8
+kWindowMsgDragHilite = 9
+kWindowMsgModified = 10
+kWindowMsgDrawInCurrentPort = 11
+kWindowMsgSetupProxyDragImage = 12
+kWindowMsgStateChanged = 13
+kWindowMsgMeasureTitle = 14
wDraw = 0
wHit = 1
wCalcRgns = 2
@@ -130,4 +166,11 @@ wFrameColor = 1
wTextColor = 2
wHiliteColor = 3
wTitleBarColor = 4
-kLastWindowOfClass = 0
+kWindowDefinitionVersionOne = 1
+kWindowDefinitionVersionTwo = 2
+kStoredWindowSystemTag = FOUR_CHAR_CODE('appl')
+kStoredBasicWindowDescriptionID = FOUR_CHAR_CODE('sbas')
+kStoredWindowPascalTitleID = FOUR_CHAR_CODE('s255')
+kWindowZoomTransitionEffect = 1
+kWindowShowTransitionAction = 1
+kWindowHideTransitionAction = 2
diff --git a/Mac/Modules/app/Appmodule.c b/Mac/Modules/app/Appmodule.c
index 0379471..d047476 100644
--- a/Mac/Modules/app/Appmodule.c
+++ b/Mac/Modules/app/Appmodule.c
@@ -44,6 +44,10 @@ extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Appearance.h>
+/* Exported by Qdmodule.c: */
+extern PyObject *QdRGB_New(RGBColor *);
+extern int QdRGB_Convert(PyObject *, RGBColor *);
+
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
static PyObject *App_Error;
diff --git a/Mac/Modules/app/appsupport.py b/Mac/Modules/app/appsupport.py
index 325cb37..a90aa52 100644
--- a/Mac/Modules/app/appsupport.py
+++ b/Mac/Modules/app/appsupport.py
@@ -70,6 +70,10 @@ RGBColor = OpaqueType("RGBColor", "QdRGB")
includestuff = includestuff + """
#include <%s>""" % MACHEADERFILE + """
+/* Exported by Qdmodule.c: */
+extern PyObject *QdRGB_New(RGBColor *);
+extern int QdRGB_Convert(PyObject *, RGBColor *);
+
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
"""
diff --git a/Mac/Modules/cm/Cmmodule.c b/Mac/Modules/cm/Cmmodule.c
index 4eb0be3..ab293d9 100644
--- a/Mac/Modules/cm/Cmmodule.c
+++ b/Mac/Modules/cm/Cmmodule.c
@@ -305,6 +305,12 @@ static PyObject *CmpInstObj_getattr(self, name)
#define CmpInstObj_setattr NULL
+#define CmpInstObj_compare NULL
+
+#define CmpInstObj_repr NULL
+
+#define CmpInstObj_hash NULL
+
PyTypeObject ComponentInstance_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -316,6 +322,12 @@ PyTypeObject ComponentInstance_Type = {
0, /*tp_print*/
(getattrfunc) CmpInstObj_getattr, /*tp_getattr*/
(setattrfunc) CmpInstObj_setattr, /*tp_setattr*/
+ (cmpfunc) CmpInstObj_compare, /*tp_compare*/
+ (reprfunc) CmpInstObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CmpInstObj_hash, /*tp_hash*/
};
/* --------------- End object type ComponentInstance ---------------- */
@@ -654,6 +666,12 @@ static PyObject *CmpObj_getattr(self, name)
#define CmpObj_setattr NULL
+#define CmpObj_compare NULL
+
+#define CmpObj_repr NULL
+
+#define CmpObj_hash NULL
+
PyTypeObject Component_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -665,6 +683,12 @@ PyTypeObject Component_Type = {
0, /*tp_print*/
(getattrfunc) CmpObj_getattr, /*tp_getattr*/
(setattrfunc) CmpObj_setattr, /*tp_setattr*/
+ (cmpfunc) CmpObj_compare, /*tp_compare*/
+ (reprfunc) CmpObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CmpObj_hash, /*tp_hash*/
};
/* ------------------- End object type Component -------------------- */
diff --git a/Mac/Modules/ctl/Ctlmodule.c b/Mac/Modules/ctl/Ctlmodule.c
index 627ca8f..071e140 100644
--- a/Mac/Modules/ctl/Ctlmodule.c
+++ b/Mac/Modules/ctl/Ctlmodule.c
@@ -337,6 +337,27 @@ static PyObject *CtlObj_SetUpControlBackground(_self, _args)
return _res;
}
+static PyObject *CtlObj_SetUpControlTextColor(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inDepth;
+ Boolean inIsColorDevice;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &inDepth,
+ &inIsColorDevice))
+ return NULL;
+ _err = SetUpControlTextColor(_self->ob_itself,
+ inDepth,
+ inIsColorDevice);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *CtlObj_DragControl(_self, _args)
ControlObject *_self;
PyObject *_args;
@@ -561,6 +582,182 @@ static PyObject *CtlObj_SetControlMaximum(_self, _args)
return _res;
}
+static PyObject *CtlObj_GetControlViewSize(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ SInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlViewSize(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
+}
+
+static PyObject *CtlObj_SetControlViewSize(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ SInt32 newViewSize;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newViewSize))
+ return NULL;
+ SetControlViewSize(_self->ob_itself,
+ newViewSize);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *CtlObj_GetControl32BitValue(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ SInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControl32BitValue(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
+}
+
+static PyObject *CtlObj_SetControl32BitValue(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ SInt32 newValue;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newValue))
+ return NULL;
+ SetControl32BitValue(_self->ob_itself,
+ newValue);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *CtlObj_GetControl32BitMaximum(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ SInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControl32BitMaximum(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
+}
+
+static PyObject *CtlObj_SetControl32BitMaximum(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ SInt32 newMaximum;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newMaximum))
+ return NULL;
+ SetControl32BitMaximum(_self->ob_itself,
+ newMaximum);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *CtlObj_GetControl32BitMinimum(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ SInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControl32BitMinimum(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
+}
+
+static PyObject *CtlObj_SetControl32BitMinimum(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ SInt32 newMinimum;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newMinimum))
+ return NULL;
+ SetControl32BitMinimum(_self->ob_itself,
+ newMinimum);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *CtlObj_IsValidControlHandle(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsValidControlHandle(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *CtlObj_RemoveControlProperty(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType propertyCreator;
+ OSType propertyTag;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &propertyCreator,
+ PyMac_GetOSType, &propertyTag))
+ return NULL;
+ _err = RemoveControlProperty(_self->ob_itself,
+ propertyCreator,
+ propertyTag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *CtlObj_GetControlRegion(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ControlPartCode inPart;
+ RgnHandle outRegion;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &inPart,
+ ResObj_Convert, &outRegion))
+ return NULL;
+ _err = GetControlRegion(_self->ob_itself,
+ inPart,
+ outRegion);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *CtlObj_GetControlVariant(_self, _args)
ControlObject *_self;
PyObject *_args;
@@ -1051,6 +1248,8 @@ static PyMethodDef CtlObj_methods[] = {
"() -> None"},
{"SetUpControlBackground", (PyCFunction)CtlObj_SetUpControlBackground, 1,
"(SInt16 inDepth, Boolean inIsColorDevice) -> None"},
+ {"SetUpControlTextColor", (PyCFunction)CtlObj_SetUpControlTextColor, 1,
+ "(SInt16 inDepth, Boolean inIsColorDevice) -> None"},
{"DragControl", (PyCFunction)CtlObj_DragControl, 1,
"(Point startPoint, Rect limitRect, Rect slopRect, DragConstraint axis) -> None"},
{"TestControl", (PyCFunction)CtlObj_TestControl, 1,
@@ -1077,6 +1276,28 @@ static PyMethodDef CtlObj_methods[] = {
"() -> (SInt16 _rv)"},
{"SetControlMaximum", (PyCFunction)CtlObj_SetControlMaximum, 1,
"(SInt16 newMaximum) -> None"},
+ {"GetControlViewSize", (PyCFunction)CtlObj_GetControlViewSize, 1,
+ "() -> (SInt32 _rv)"},
+ {"SetControlViewSize", (PyCFunction)CtlObj_SetControlViewSize, 1,
+ "(SInt32 newViewSize) -> None"},
+ {"GetControl32BitValue", (PyCFunction)CtlObj_GetControl32BitValue, 1,
+ "() -> (SInt32 _rv)"},
+ {"SetControl32BitValue", (PyCFunction)CtlObj_SetControl32BitValue, 1,
+ "(SInt32 newValue) -> None"},
+ {"GetControl32BitMaximum", (PyCFunction)CtlObj_GetControl32BitMaximum, 1,
+ "() -> (SInt32 _rv)"},
+ {"SetControl32BitMaximum", (PyCFunction)CtlObj_SetControl32BitMaximum, 1,
+ "(SInt32 newMaximum) -> None"},
+ {"GetControl32BitMinimum", (PyCFunction)CtlObj_GetControl32BitMinimum, 1,
+ "() -> (SInt32 _rv)"},
+ {"SetControl32BitMinimum", (PyCFunction)CtlObj_SetControl32BitMinimum, 1,
+ "(SInt32 newMinimum) -> None"},
+ {"IsValidControlHandle", (PyCFunction)CtlObj_IsValidControlHandle, 1,
+ "() -> (Boolean _rv)"},
+ {"RemoveControlProperty", (PyCFunction)CtlObj_RemoveControlProperty, 1,
+ "(OSType propertyCreator, OSType propertyTag) -> None"},
+ {"GetControlRegion", (PyCFunction)CtlObj_GetControlRegion, 1,
+ "(ControlPartCode inPart, RgnHandle outRegion) -> None"},
{"GetControlVariant", (PyCFunction)CtlObj_GetControlVariant, 1,
"() -> (ControlVariant _rv)"},
{"SetControlReference", (PyCFunction)CtlObj_SetControlReference, 1,
diff --git a/Mac/Modules/ctl/ctlscan.py b/Mac/Modules/ctl/ctlscan.py
index dc954cf..63d32f3 100644
--- a/Mac/Modules/ctl/ctlscan.py
+++ b/Mac/Modules/ctl/ctlscan.py
@@ -59,20 +59,20 @@ class MyScanner(Scanner):
'GetTabContentRect',
'SetTabEnabled',
'SetDisclosureTriangleLastValue',
- # Unavailable in CW Pro 3 libraries
- 'SetUpControlTextColor',
- # Unavailable in Jack's CW Pro 5.1 libraries
- 'GetControlRegion',
- 'RemoveControlProperty',
- 'IsValidControlHandle',
- 'SetControl32BitMinimum',
- 'GetControl32BitMinimum',
- 'SetControl32BitMaximum',
- 'GetControl32BitMaximum',
- 'SetControl32BitValue',
- 'GetControl32BitValue',
- 'SetControlViewSize',
- 'GetControlViewSize',
+## # Unavailable in CW Pro 3 libraries
+## 'SetUpControlTextColor',
+## # Unavailable in Jack's CW Pro 5.1 libraries
+## 'GetControlRegion',
+## 'RemoveControlProperty',
+## 'IsValidControlHandle',
+## 'SetControl32BitMinimum',
+## 'GetControl32BitMinimum',
+## 'SetControl32BitMaximum',
+## 'GetControl32BitMaximum',
+## 'SetControl32BitValue',
+## 'GetControl32BitValue',
+## 'SetControlViewSize',
+## 'GetControlViewSize',
# Generally Bad News
'GetControlProperty',
'SetControlProperty',
diff --git a/Mac/Modules/dlg/Dlgmodule.c b/Mac/Modules/dlg/Dlgmodule.c
index 2abd785..fbbadd8 100644
--- a/Mac/Modules/dlg/Dlgmodule.c
+++ b/Mac/Modules/dlg/Dlgmodule.c
@@ -587,6 +587,106 @@ static PyObject *DlgObj_SizeDialogItem(_self, _args)
return _res;
}
+static PyObject *DlgObj_AppendDialogItemList(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 ditlID;
+ DITLMethod method;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &ditlID,
+ &method))
+ return NULL;
+ _err = AppendDialogItemList(_self->ob_itself,
+ ditlID,
+ method);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *DlgObj_SetDialogTimeout(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 inButtonToPress;
+ UInt32 inSecondsToWait;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inButtonToPress,
+ &inSecondsToWait))
+ return NULL;
+ _err = SetDialogTimeout(_self->ob_itself,
+ inButtonToPress,
+ inSecondsToWait);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *DlgObj_GetDialogTimeout(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 outButtonToPress;
+ UInt32 outSecondsToWait;
+ UInt32 outSecondsRemaining;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDialogTimeout(_self->ob_itself,
+ &outButtonToPress,
+ &outSecondsToWait,
+ &outSecondsRemaining);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hll",
+ outButtonToPress,
+ outSecondsToWait,
+ outSecondsRemaining);
+ return _res;
+}
+
+static PyObject *DlgObj_SetModalDialogEventMask(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventMask inMask;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inMask))
+ return NULL;
+ _err = SetModalDialogEventMask(_self->ob_itself,
+ inMask);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *DlgObj_GetModalDialogEventMask(_self, _args)
+ DialogObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventMask outMask;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetModalDialogEventMask(_self->ob_itself,
+ &outMask);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outMask);
+ return _res;
+}
+
static PyObject *DlgObj_GetDialogWindow(_self, _args)
DialogObject *_self;
PyObject *_args;
@@ -703,6 +803,16 @@ static PyMethodDef DlgObj_methods[] = {
"(SInt16 inItemNo, SInt16 inHoriz, SInt16 inVert) -> None"},
{"SizeDialogItem", (PyCFunction)DlgObj_SizeDialogItem, 1,
"(SInt16 inItemNo, SInt16 inWidth, SInt16 inHeight) -> None"},
+ {"AppendDialogItemList", (PyCFunction)DlgObj_AppendDialogItemList, 1,
+ "(SInt16 ditlID, DITLMethod method) -> None"},
+ {"SetDialogTimeout", (PyCFunction)DlgObj_SetDialogTimeout, 1,
+ "(SInt16 inButtonToPress, UInt32 inSecondsToWait) -> None"},
+ {"GetDialogTimeout", (PyCFunction)DlgObj_GetDialogTimeout, 1,
+ "() -> (SInt16 outButtonToPress, UInt32 outSecondsToWait, UInt32 outSecondsRemaining)"},
+ {"SetModalDialogEventMask", (PyCFunction)DlgObj_SetModalDialogEventMask, 1,
+ "(EventMask inMask) -> None"},
+ {"GetModalDialogEventMask", (PyCFunction)DlgObj_GetModalDialogEventMask, 1,
+ "() -> (EventMask outMask)"},
{"GetDialogWindow", (PyCFunction)DlgObj_GetDialogWindow, 1,
"() -> (DialogPtr _rv)"},
{"GetDialogDefaultItem", (PyCFunction)DlgObj_GetDialogDefaultItem, 1,
@@ -727,6 +837,12 @@ static PyObject *DlgObj_getattr(self, name)
#define DlgObj_setattr NULL
+#define DlgObj_compare NULL
+
+#define DlgObj_repr NULL
+
+#define DlgObj_hash NULL
+
PyTypeObject Dialog_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -738,6 +854,12 @@ PyTypeObject Dialog_Type = {
0, /*tp_print*/
(getattrfunc) DlgObj_getattr, /*tp_getattr*/
(setattrfunc) DlgObj_setattr, /*tp_setattr*/
+ (cmpfunc) DlgObj_compare, /*tp_compare*/
+ (reprfunc) DlgObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) DlgObj_hash, /*tp_hash*/
};
/* --------------------- End object type Dialog --------------------- */
@@ -1048,11 +1170,11 @@ static PyObject *Dlg_SetDialogFont(_self, _args)
PyObject *_args;
{
PyObject *_res = NULL;
- SInt16 value;
+ SInt16 fontNum;
if (!PyArg_ParseTuple(_args, "h",
- &value))
+ &fontNum))
return NULL;
- SetDialogFont(value);
+ SetDialogFont(fontNum);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
@@ -1173,7 +1295,7 @@ static PyMethodDef Dlg_methods[] = {
{"GetAlertStage", (PyCFunction)Dlg_GetAlertStage, 1,
"() -> (SInt16 _rv)"},
{"SetDialogFont", (PyCFunction)Dlg_SetDialogFont, 1,
- "(SInt16 value) -> None"},
+ "(SInt16 fontNum) -> None"},
{"ResetAlertStage", (PyCFunction)Dlg_ResetAlertStage, 1,
"() -> None"},
{"NewFeaturesDialog", (PyCFunction)Dlg_NewFeaturesDialog, 1,
diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py
index 6ef502a..eb5bbfe 100644
--- a/Mac/Modules/dlg/dlgscan.py
+++ b/Mac/Modules/dlg/dlgscan.py
@@ -50,7 +50,7 @@ class MyScanner(Scanner):
'FreeDialog',
'GetStdFilterProc',
'GetDialogParent',
- # Can't find these in the CW Pro 3 libraries
+## # Can't find these in the CW Pro 3 libraries
'SetDialogMovableModal',
'GetDialogControlNotificationProc',
]
@@ -87,5 +87,9 @@ class MyScanner(Scanner):
[("ExistingDialogPtr", "*", "*")]),
]
+ def writeinitialdefs(self):
+ self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
+
+
if __name__ == "__main__":
main()
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
index 526bfa4..4c44722 100644
--- a/Mac/Modules/dlg/dlgsupport.py
+++ b/Mac/Modules/dlg/dlgsupport.py
@@ -26,6 +26,7 @@ DialogItemType = Type("DialogItemType", "h")
DialogItemIndexZeroBased = Type("DialogItemIndexZeroBased", "h")
AlertType = Type("AlertType", "h")
StringPtr = Str255
+EventMask = Type("EventMask", "h")
includestuff = includestuff + """
#include <Dialogs.h>
diff --git a/Mac/Modules/fm/Fmmodule.c b/Mac/Modules/fm/Fmmodule.c
index 469e8d1..1d84a31 100644
--- a/Mac/Modules/fm/Fmmodule.c
+++ b/Mac/Modules/fm/Fmmodule.c
@@ -336,6 +336,42 @@ static PyObject *Fm_GetAppFont(_self, _args)
return _res;
}
+static PyObject *Fm_SetAntiAliasedTextEnabled(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean inEnable;
+ SInt16 inMinFontSize;
+ if (!PyArg_ParseTuple(_args, "bh",
+ &inEnable,
+ &inMinFontSize))
+ return NULL;
+ _err = SetAntiAliasedTextEnabled(inEnable,
+ inMinFontSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Fm_IsAntiAliasedTextEnabled(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ SInt16 outMinFontSize;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsAntiAliasedTextEnabled(&outMinFontSize);
+ _res = Py_BuildValue("bh",
+ _rv,
+ outMinFontSize);
+ return _res;
+}
+
static PyMethodDef Fm_methods[] = {
{"InitFonts", (PyCFunction)Fm_InitFonts, 1,
"() -> None"},
@@ -371,6 +407,10 @@ static PyMethodDef Fm_methods[] = {
"() -> (short _rv)"},
{"GetAppFont", (PyCFunction)Fm_GetAppFont, 1,
"() -> (short _rv)"},
+ {"SetAntiAliasedTextEnabled", (PyCFunction)Fm_SetAntiAliasedTextEnabled, 1,
+ "(Boolean inEnable, SInt16 inMinFontSize) -> None"},
+ {"IsAntiAliasedTextEnabled", (PyCFunction)Fm_IsAntiAliasedTextEnabled, 1,
+ "() -> (Boolean _rv, SInt16 outMinFontSize)"},
{NULL, NULL, 0}
};
diff --git a/Mac/Modules/fm/fmscan.py b/Mac/Modules/fm/fmscan.py
index d111964..b06e9cb 100644
--- a/Mac/Modules/fm/fmscan.py
+++ b/Mac/Modules/fm/fmscan.py
@@ -42,6 +42,8 @@ class MyScanner(Scanner):
return [
"FMInput_ptr", # Not needed for now
"FMOutPtr", # Ditto
+ "void_ptr", # Don't know how to do this right now
+ "FontInfo", # Ditto
]
def makerepairinstructions(self):
diff --git a/Mac/Modules/icn/Icnmodule.c b/Mac/Modules/icn/Icnmodule.c
index 03e6203..9420d37 100644
--- a/Mac/Modules/icn/Icnmodule.c
+++ b/Mac/Modules/icn/Icnmodule.c
@@ -604,6 +604,687 @@ static PyObject *Icn_PlotCIconHandle(_self, _args)
return _res;
}
+static PyObject *Icn_IconServicesTerminate(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ IconServicesTerminate();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_IconRefToIconFamily(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ IconSelectorValue whichIcons;
+ IconFamilyHandle iconFamily;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ResObj_Convert, &theIconRef,
+ &whichIcons))
+ return NULL;
+ _err = IconRefToIconFamily(theIconRef,
+ whichIcons,
+ &iconFamily);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, iconFamily);
+ return _res;
+}
+
+static PyObject *Icn_IconFamilyToIconSuite(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconFamilyHandle iconFamily;
+ IconSelectorValue whichIcons;
+ IconSuiteRef iconSuite;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ResObj_Convert, &iconFamily,
+ &whichIcons))
+ return NULL;
+ _err = IconFamilyToIconSuite(iconFamily,
+ whichIcons,
+ &iconSuite);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, iconSuite);
+ return _res;
+}
+
+static PyObject *Icn_IconSuiteToIconFamily(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconSuiteRef iconSuite;
+ IconSelectorValue whichIcons;
+ IconFamilyHandle iconFamily;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ResObj_Convert, &iconSuite,
+ &whichIcons))
+ return NULL;
+ _err = IconSuiteToIconFamily(iconSuite,
+ whichIcons,
+ &iconFamily);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, iconFamily);
+ return _res;
+}
+
+static PyObject *Icn_SetIconFamilyData(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconFamilyHandle iconFamily;
+ OSType iconType;
+ Handle h;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &iconFamily,
+ PyMac_GetOSType, &iconType,
+ ResObj_Convert, &h))
+ return NULL;
+ _err = SetIconFamilyData(iconFamily,
+ iconType,
+ h);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_GetIconFamilyData(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconFamilyHandle iconFamily;
+ OSType iconType;
+ Handle h;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &iconFamily,
+ PyMac_GetOSType, &iconType,
+ ResObj_Convert, &h))
+ return NULL;
+ _err = GetIconFamilyData(iconFamily,
+ iconType,
+ h);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_GetIconRefOwners(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ UInt16 owners;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = GetIconRefOwners(theIconRef,
+ &owners);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ owners);
+ return _res;
+}
+
+static PyObject *Icn_AcquireIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = AcquireIconRef(theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_ReleaseIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = ReleaseIconRef(theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_GetIconRefFromFile(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec theFile;
+ IconRef theIconRef;
+ SInt16 theLabel;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSSpec, &theFile))
+ return NULL;
+ _err = GetIconRefFromFile(&theFile,
+ &theIconRef,
+ &theLabel);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&h",
+ ResObj_New, theIconRef,
+ theLabel);
+ return _res;
+}
+
+static PyObject *Icn_GetIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
+ OSType creator;
+ OSType iconType;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "hO&O&",
+ &vRefNum,
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType))
+ return NULL;
+ _err = GetIconRef(vRefNum,
+ creator,
+ iconType,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
+}
+
+static PyObject *Icn_GetIconRefFromFolder(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
+ SInt32 parentFolderID;
+ SInt32 folderID;
+ SInt8 attributes;
+ SInt8 accessPrivileges;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "hllbb",
+ &vRefNum,
+ &parentFolderID,
+ &folderID,
+ &attributes,
+ &accessPrivileges))
+ return NULL;
+ _err = GetIconRefFromFolder(vRefNum,
+ parentFolderID,
+ folderID,
+ attributes,
+ accessPrivileges,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
+}
+
+static PyObject *Icn_RegisterIconRefFromIconFamily(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType iconType;
+ IconFamilyHandle iconFamily;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType,
+ ResObj_Convert, &iconFamily))
+ return NULL;
+ _err = RegisterIconRefFromIconFamily(creator,
+ iconType,
+ iconFamily,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
+}
+
+static PyObject *Icn_RegisterIconRefFromResource(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType iconType;
+ FSSpec resourceFile;
+ SInt16 resourceID;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&O&O&h",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType,
+ PyMac_GetFSSpec, &resourceFile,
+ &resourceID))
+ return NULL;
+ _err = RegisterIconRefFromResource(creator,
+ iconType,
+ &resourceFile,
+ resourceID,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
+}
+
+static PyObject *Icn_UnregisterIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType iconType;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType))
+ return NULL;
+ _err = UnregisterIconRef(creator,
+ iconType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_UpdateIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = UpdateIconRef(theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_OverrideIconRefFromResource(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ FSSpec resourceFile;
+ SInt16 resourceID;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ ResObj_Convert, &theIconRef,
+ PyMac_GetFSSpec, &resourceFile,
+ &resourceID))
+ return NULL;
+ _err = OverrideIconRefFromResource(theIconRef,
+ &resourceFile,
+ resourceID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_OverrideIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef oldIconRef;
+ IconRef newIconRef;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &oldIconRef,
+ ResObj_Convert, &newIconRef))
+ return NULL;
+ _err = OverrideIconRef(oldIconRef,
+ newIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_RemoveIconRefOverride(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = RemoveIconRefOverride(theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_CompositeIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef backgroundIconRef;
+ IconRef foregroundIconRef;
+ IconRef compositeIconRef;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &backgroundIconRef,
+ ResObj_Convert, &foregroundIconRef))
+ return NULL;
+ _err = CompositeIconRef(backgroundIconRef,
+ foregroundIconRef,
+ &compositeIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, compositeIconRef);
+ return _res;
+}
+
+static PyObject *Icn_IsIconRefComposite(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef compositeIconRef;
+ IconRef backgroundIconRef;
+ IconRef foregroundIconRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &compositeIconRef))
+ return NULL;
+ _err = IsIconRefComposite(compositeIconRef,
+ &backgroundIconRef,
+ &foregroundIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ ResObj_New, backgroundIconRef,
+ ResObj_New, foregroundIconRef);
+ return _res;
+}
+
+static PyObject *Icn_IsValidIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _rv = IsValidIconRef(theIconRef);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *Icn_PlotIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect theRect;
+ IconAlignmentType align;
+ IconTransformType transform;
+ IconServicesUsageFlags theIconServicesUsageFlags;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&hhlO&",
+ PyMac_GetRect, &theRect,
+ &align,
+ &transform,
+ &theIconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = PlotIconRef(&theRect,
+ align,
+ transform,
+ theIconServicesUsageFlags,
+ theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_PtInIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point testPt;
+ Rect iconRect;
+ IconAlignmentType align;
+ IconServicesUsageFlags theIconServicesUsageFlags;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&O&hlO&",
+ PyMac_GetPoint, &testPt,
+ PyMac_GetRect, &iconRect,
+ &align,
+ &theIconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _rv = PtInIconRef(&testPt,
+ &iconRect,
+ align,
+ theIconServicesUsageFlags,
+ theIconRef);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *Icn_RectInIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect testRect;
+ Rect iconRect;
+ IconAlignmentType align;
+ IconServicesUsageFlags iconServicesUsageFlags;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&O&hlO&",
+ PyMac_GetRect, &testRect,
+ PyMac_GetRect, &iconRect,
+ &align,
+ &iconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _rv = RectInIconRef(&testRect,
+ &iconRect,
+ align,
+ iconServicesUsageFlags,
+ theIconRef);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *Icn_IconRefToRgn(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle theRgn;
+ Rect iconRect;
+ IconAlignmentType align;
+ IconServicesUsageFlags iconServicesUsageFlags;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "O&O&hlO&",
+ ResObj_Convert, &theRgn,
+ PyMac_GetRect, &iconRect,
+ &align,
+ &iconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = IconRefToRgn(theRgn,
+ &iconRect,
+ align,
+ iconServicesUsageFlags,
+ theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_GetIconSizesFromIconRef(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconSelectorValue iconSelectorInput;
+ IconSelectorValue iconSelectorOutputPtr;
+ IconServicesUsageFlags iconServicesUsageFlags;
+ IconRef theIconRef;
+ if (!PyArg_ParseTuple(_args, "llO&",
+ &iconSelectorInput,
+ &iconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = GetIconSizesFromIconRef(iconSelectorInput,
+ &iconSelectorOutputPtr,
+ iconServicesUsageFlags,
+ theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ iconSelectorOutputPtr);
+ return _res;
+}
+
+static PyObject *Icn_FlushIconRefs(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType iconType;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType))
+ return NULL;
+ _err = FlushIconRefs(creator,
+ iconType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_FlushIconRefsByVolume(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
+ if (!PyArg_ParseTuple(_args, "h",
+ &vRefNum))
+ return NULL;
+ _err = FlushIconRefsByVolume(vRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_SetCustomIconsEnabled(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
+ Boolean enableCustomIcons;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &vRefNum,
+ &enableCustomIcons))
+ return NULL;
+ _err = SetCustomIconsEnabled(vRefNum,
+ enableCustomIcons);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Icn_GetCustomIconsEnabled(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
+ Boolean customIconsEnabled;
+ if (!PyArg_ParseTuple(_args, "h",
+ &vRefNum))
+ return NULL;
+ _err = GetCustomIconsEnabled(vRefNum,
+ &customIconsEnabled);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ customIconsEnabled);
+ return _res;
+}
+
static PyMethodDef Icn_methods[] = {
{"GetCIcon", (PyCFunction)Icn_GetCIcon, 1,
"(SInt16 iconID) -> (CIconHandle _rv)"},
@@ -655,6 +1336,68 @@ static PyMethodDef Icn_methods[] = {
"(Rect theRect, IconAlignmentType align, IconTransformType transform, Handle theSICN) -> None"},
{"PlotCIconHandle", (PyCFunction)Icn_PlotCIconHandle, 1,
"(Rect theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) -> None"},
+ {"IconServicesTerminate", (PyCFunction)Icn_IconServicesTerminate, 1,
+ "() -> None"},
+ {"IconRefToIconFamily", (PyCFunction)Icn_IconRefToIconFamily, 1,
+ "(IconRef theIconRef, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)"},
+ {"IconFamilyToIconSuite", (PyCFunction)Icn_IconFamilyToIconSuite, 1,
+ "(IconFamilyHandle iconFamily, IconSelectorValue whichIcons) -> (IconSuiteRef iconSuite)"},
+ {"IconSuiteToIconFamily", (PyCFunction)Icn_IconSuiteToIconFamily, 1,
+ "(IconSuiteRef iconSuite, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)"},
+ {"SetIconFamilyData", (PyCFunction)Icn_SetIconFamilyData, 1,
+ "(IconFamilyHandle iconFamily, OSType iconType, Handle h) -> None"},
+ {"GetIconFamilyData", (PyCFunction)Icn_GetIconFamilyData, 1,
+ "(IconFamilyHandle iconFamily, OSType iconType, Handle h) -> None"},
+ {"GetIconRefOwners", (PyCFunction)Icn_GetIconRefOwners, 1,
+ "(IconRef theIconRef) -> (UInt16 owners)"},
+ {"AcquireIconRef", (PyCFunction)Icn_AcquireIconRef, 1,
+ "(IconRef theIconRef) -> None"},
+ {"ReleaseIconRef", (PyCFunction)Icn_ReleaseIconRef, 1,
+ "(IconRef theIconRef) -> None"},
+ {"GetIconRefFromFile", (PyCFunction)Icn_GetIconRefFromFile, 1,
+ "(FSSpec theFile) -> (IconRef theIconRef, SInt16 theLabel)"},
+ {"GetIconRef", (PyCFunction)Icn_GetIconRef, 1,
+ "(SInt16 vRefNum, OSType creator, OSType iconType) -> (IconRef theIconRef)"},
+ {"GetIconRefFromFolder", (PyCFunction)Icn_GetIconRefFromFolder, 1,
+ "(SInt16 vRefNum, SInt32 parentFolderID, SInt32 folderID, SInt8 attributes, SInt8 accessPrivileges) -> (IconRef theIconRef)"},
+ {"RegisterIconRefFromIconFamily", (PyCFunction)Icn_RegisterIconRefFromIconFamily, 1,
+ "(OSType creator, OSType iconType, IconFamilyHandle iconFamily) -> (IconRef theIconRef)"},
+ {"RegisterIconRefFromResource", (PyCFunction)Icn_RegisterIconRefFromResource, 1,
+ "(OSType creator, OSType iconType, FSSpec resourceFile, SInt16 resourceID) -> (IconRef theIconRef)"},
+ {"UnregisterIconRef", (PyCFunction)Icn_UnregisterIconRef, 1,
+ "(OSType creator, OSType iconType) -> None"},
+ {"UpdateIconRef", (PyCFunction)Icn_UpdateIconRef, 1,
+ "(IconRef theIconRef) -> None"},
+ {"OverrideIconRefFromResource", (PyCFunction)Icn_OverrideIconRefFromResource, 1,
+ "(IconRef theIconRef, FSSpec resourceFile, SInt16 resourceID) -> None"},
+ {"OverrideIconRef", (PyCFunction)Icn_OverrideIconRef, 1,
+ "(IconRef oldIconRef, IconRef newIconRef) -> None"},
+ {"RemoveIconRefOverride", (PyCFunction)Icn_RemoveIconRefOverride, 1,
+ "(IconRef theIconRef) -> None"},
+ {"CompositeIconRef", (PyCFunction)Icn_CompositeIconRef, 1,
+ "(IconRef backgroundIconRef, IconRef foregroundIconRef) -> (IconRef compositeIconRef)"},
+ {"IsIconRefComposite", (PyCFunction)Icn_IsIconRefComposite, 1,
+ "(IconRef compositeIconRef) -> (IconRef backgroundIconRef, IconRef foregroundIconRef)"},
+ {"IsValidIconRef", (PyCFunction)Icn_IsValidIconRef, 1,
+ "(IconRef theIconRef) -> (Boolean _rv)"},
+ {"PlotIconRef", (PyCFunction)Icn_PlotIconRef, 1,
+ "(Rect theRect, IconAlignmentType align, IconTransformType transform, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) -> None"},
+ {"PtInIconRef", (PyCFunction)Icn_PtInIconRef, 1,
+ "(Point testPt, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) -> (Boolean _rv)"},
+ {"RectInIconRef", (PyCFunction)Icn_RectInIconRef, 1,
+ "(Rect testRect, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> (Boolean _rv)"},
+ {"IconRefToRgn", (PyCFunction)Icn_IconRefToRgn, 1,
+ "(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> None"},
+ {"GetIconSizesFromIconRef", (PyCFunction)Icn_GetIconSizesFromIconRef, 1,
+ "(IconSelectorValue iconSelectorInput, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> (IconSelectorValue iconSelectorOutputPtr)"},
+ {"FlushIconRefs", (PyCFunction)Icn_FlushIconRefs, 1,
+ "(OSType creator, OSType iconType) -> None"},
+ {"FlushIconRefsByVolume", (PyCFunction)Icn_FlushIconRefsByVolume, 1,
+ "(SInt16 vRefNum) -> None"},
+ {"SetCustomIconsEnabled", (PyCFunction)Icn_SetCustomIconsEnabled, 1,
+ "(SInt16 vRefNum, Boolean enableCustomIcons) -> None"},
+ {"GetCustomIconsEnabled", (PyCFunction)Icn_GetCustomIconsEnabled, 1,
+ "(SInt16 vRefNum) -> (Boolean customIconsEnabled)"},
{NULL, NULL, 0}
};
diff --git a/Mac/Modules/icn/icnscan.py b/Mac/Modules/icn/icnscan.py
index 627834f..c8c2e6b 100644
--- a/Mac/Modules/icn/icnscan.py
+++ b/Mac/Modules/icn/icnscan.py
@@ -45,6 +45,7 @@ class MyScanner(Scanner):
return [
"IconActionUPP",
"IconGetterUPP",
+ "CFragInitBlockPtr",
]
def makerepairinstructions(self):
diff --git a/Mac/Modules/icn/icnsupport.py b/Mac/Modules/icn/icnsupport.py
index 791629e..9ce66be 100644
--- a/Mac/Modules/icn/icnsupport.py
+++ b/Mac/Modules/icn/icnsupport.py
@@ -24,10 +24,13 @@ from macsupport import *
CIconHandle = OpaqueByValueType("CIconHandle", "ResObj")
IconSuiteRef = OpaqueByValueType("IconSuiteRef", "ResObj")
IconCacheRef = OpaqueByValueType("IconCacheRef", "ResObj")
+IconRef = OpaqueByValueType("IconRef", "ResObj")
+IconFamilyHandle = OpaqueByValueType("IconFamilyHandle", "ResObj")
RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
IconAlignmentType = Type("IconAlignmentType", "h")
IconTransformType = Type("IconTransformType", "h")
IconSelectorValue = Type("IconSelectorValue", "l")
+IconServicesUsageFlags = Type("IconServicesUsageFlags", "l")
RGBColor = OpaqueType("RGBColor", "QdRGB")
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
diff --git a/Mac/Modules/menu/Menumodule.c b/Mac/Modules/menu/Menumodule.c
index 42490ab..52308b7 100644
--- a/Mac/Modules/menu/Menumodule.c
+++ b/Mac/Modules/menu/Menumodule.c
@@ -104,6 +104,106 @@ static PyObject *MenuObj_DisposeMenu(_self, _args)
return _res;
}
+static PyObject *MenuObj_CalcMenuSize(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CalcMenuSize(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_CountMItems(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ short _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CountMItems(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
+}
+
+static PyObject *MenuObj_GetMenuFont(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 outFontID;
+ UInt16 outFontSize;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMenuFont(_self->ob_itself,
+ &outFontID,
+ &outFontSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hh",
+ outFontID,
+ outFontSize);
+ return _res;
+}
+
+static PyObject *MenuObj_SetMenuFont(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 inFontID;
+ UInt16 inFontSize;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &inFontID,
+ &inFontSize))
+ return NULL;
+ _err = SetMenuFont(_self->ob_itself,
+ inFontID,
+ inFontSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_GetMenuExcludesMarkColumn(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMenuExcludesMarkColumn(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *MenuObj_SetMenuExcludesMarkColumn(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean excludesMark;
+ if (!PyArg_ParseTuple(_args, "b",
+ &excludesMark))
+ return NULL;
+ _err = SetMenuExcludesMarkColumn(_self->ob_itself,
+ excludesMark);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *MenuObj_MacAppendMenu(_self, _args)
MenuObject *_self;
PyObject *_args;
@@ -139,22 +239,6 @@ static PyObject *MenuObj_InsertResMenu(_self, _args)
return _res;
}
-static PyObject *MenuObj_MacInsertMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- short beforeID;
- if (!PyArg_ParseTuple(_args, "h",
- &beforeID))
- return NULL;
- MacInsertMenu(_self->ob_itself,
- beforeID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-
static PyObject *MenuObj_AppendResMenu(_self, _args)
MenuObject *_self;
PyObject *_args;
@@ -206,6 +290,144 @@ static PyObject *MenuObj_DeleteMenuItem(_self, _args)
return _res;
}
+static PyObject *MenuObj_InsertFontResMenu(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ short afterItem;
+ short scriptFilter;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &afterItem,
+ &scriptFilter))
+ return NULL;
+ InsertFontResMenu(_self->ob_itself,
+ afterItem,
+ scriptFilter);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_InsertIntlResMenu(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ ResType theType;
+ short afterItem;
+ short scriptFilter;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetOSType, &theType,
+ &afterItem,
+ &scriptFilter))
+ return NULL;
+ InsertIntlResMenu(_self->ob_itself,
+ theType,
+ afterItem,
+ scriptFilter);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_AppendMenuItemText(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Str255 inString;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, inString))
+ return NULL;
+ _err = AppendMenuItemText(_self->ob_itself,
+ inString);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_InsertMenuItemText(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Str255 inString;
+ UInt16 afterItem;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetStr255, inString,
+ &afterItem))
+ return NULL;
+ _err = InsertMenuItemText(_self->ob_itself,
+ inString,
+ afterItem);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_PopUpMenuSelect(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ long _rv;
+ short top;
+ short left;
+ short popUpItem;
+ if (!PyArg_ParseTuple(_args, "hhh",
+ &top,
+ &left,
+ &popUpItem))
+ return NULL;
+ _rv = PopUpMenuSelect(_self->ob_itself,
+ top,
+ left,
+ popUpItem);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
+}
+
+static PyObject *MenuObj_MacInsertMenu(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ short beforeID;
+ if (!PyArg_ParseTuple(_args, "h",
+ &beforeID))
+ return NULL;
+ MacInsertMenu(_self->ob_itself,
+ beforeID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_CheckItem(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ short item;
+ Boolean checked;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &item,
+ &checked))
+ return NULL;
+ CheckItem(_self->ob_itself,
+ item,
+ checked);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *MenuObj_SetMenuItemText(_self, _args)
MenuObject *_self;
PyObject *_args;
@@ -391,19 +613,6 @@ static PyObject *MenuObj_GetItemStyle(_self, _args)
return _res;
}
-static PyObject *MenuObj_CalcMenuSize(_self, _args)
- MenuObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CalcMenuSize(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-
static PyObject *MenuObj_DisableItem(_self, _args)
MenuObject *_self;
PyObject *_args;
@@ -436,103 +645,6 @@ static PyObject *MenuObj_EnableItem(_self, _args)
return _res;
}
-static PyObject *MenuObj_PopUpMenuSelect(_self, _args)
- MenuObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- long _rv;
- short top;
- short left;
- short popUpItem;
- if (!PyArg_ParseTuple(_args, "hhh",
- &top,
- &left,
- &popUpItem))
- return NULL;
- _rv = PopUpMenuSelect(_self->ob_itself,
- top,
- left,
- popUpItem);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
-}
-
-static PyObject *MenuObj_CheckItem(_self, _args)
- MenuObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- short item;
- Boolean checked;
- if (!PyArg_ParseTuple(_args, "hb",
- &item,
- &checked))
- return NULL;
- CheckItem(_self->ob_itself,
- item,
- checked);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-
-static PyObject *MenuObj_CountMItems(_self, _args)
- MenuObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- short _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CountMItems(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
-}
-
-static PyObject *MenuObj_InsertFontResMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- short afterItem;
- short scriptFilter;
- if (!PyArg_ParseTuple(_args, "hh",
- &afterItem,
- &scriptFilter))
- return NULL;
- InsertFontResMenu(_self->ob_itself,
- afterItem,
- scriptFilter);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-
-static PyObject *MenuObj_InsertIntlResMenu(_self, _args)
- MenuObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- ResType theType;
- short afterItem;
- short scriptFilter;
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetOSType, &theType,
- &afterItem,
- &scriptFilter))
- return NULL;
- InsertIntlResMenu(_self->ob_itself,
- theType,
- afterItem,
- scriptFilter);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-
static PyObject *MenuObj_SetMenuItemCommandID(_self, _args)
MenuObject *_self;
PyObject *_args;
@@ -908,6 +1020,104 @@ static PyObject *MenuObj_GetMenuItemKeyGlyph(_self, _args)
return _res;
}
+static PyObject *MenuObj_MacEnableMenuItem(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ UInt16 item;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ MacEnableMenuItem(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_DisableMenuItem(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ UInt16 item;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ DisableMenuItem(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_IsMenuItemEnabled(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ UInt16 item;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ _rv = IsMenuItemEnabled(_self->ob_itself,
+ item);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *MenuObj_EnableMenuItemIcon(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ UInt16 item;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ EnableMenuItemIcon(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_DisableMenuItemIcon(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ UInt16 item;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ DisableMenuItemIcon(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *MenuObj_IsMenuItemIconEnabled(_self, _args)
+ MenuObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ UInt16 item;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ _rv = IsMenuItemIconEnabled(_self->ob_itself,
+ item);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
static PyObject *MenuObj_as_Resource(_self, _args)
MenuObject *_self;
PyObject *_args;
@@ -972,18 +1182,42 @@ static PyObject *MenuObj_InsertMenuItem(_self, _args)
static PyMethodDef MenuObj_methods[] = {
{"DisposeMenu", (PyCFunction)MenuObj_DisposeMenu, 1,
"() -> None"},
+ {"CalcMenuSize", (PyCFunction)MenuObj_CalcMenuSize, 1,
+ "() -> None"},
+ {"CountMItems", (PyCFunction)MenuObj_CountMItems, 1,
+ "() -> (short _rv)"},
+ {"GetMenuFont", (PyCFunction)MenuObj_GetMenuFont, 1,
+ "() -> (SInt16 outFontID, UInt16 outFontSize)"},
+ {"SetMenuFont", (PyCFunction)MenuObj_SetMenuFont, 1,
+ "(SInt16 inFontID, UInt16 inFontSize) -> None"},
+ {"GetMenuExcludesMarkColumn", (PyCFunction)MenuObj_GetMenuExcludesMarkColumn, 1,
+ "() -> (Boolean _rv)"},
+ {"SetMenuExcludesMarkColumn", (PyCFunction)MenuObj_SetMenuExcludesMarkColumn, 1,
+ "(Boolean excludesMark) -> None"},
{"MacAppendMenu", (PyCFunction)MenuObj_MacAppendMenu, 1,
"(Str255 data) -> None"},
{"InsertResMenu", (PyCFunction)MenuObj_InsertResMenu, 1,
"(ResType theType, short afterItem) -> None"},
- {"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
- "(short beforeID) -> None"},
{"AppendResMenu", (PyCFunction)MenuObj_AppendResMenu, 1,
"(ResType theType) -> None"},
{"MacInsertMenuItem", (PyCFunction)MenuObj_MacInsertMenuItem, 1,
"(Str255 itemString, short afterItem) -> None"},
{"DeleteMenuItem", (PyCFunction)MenuObj_DeleteMenuItem, 1,
"(short item) -> None"},
+ {"InsertFontResMenu", (PyCFunction)MenuObj_InsertFontResMenu, 1,
+ "(short afterItem, short scriptFilter) -> None"},
+ {"InsertIntlResMenu", (PyCFunction)MenuObj_InsertIntlResMenu, 1,
+ "(ResType theType, short afterItem, short scriptFilter) -> None"},
+ {"AppendMenuItemText", (PyCFunction)MenuObj_AppendMenuItemText, 1,
+ "(Str255 inString) -> None"},
+ {"InsertMenuItemText", (PyCFunction)MenuObj_InsertMenuItemText, 1,
+ "(Str255 inString, UInt16 afterItem) -> None"},
+ {"PopUpMenuSelect", (PyCFunction)MenuObj_PopUpMenuSelect, 1,
+ "(short top, short left, short popUpItem) -> (long _rv)"},
+ {"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
+ "(short beforeID) -> None"},
+ {"CheckItem", (PyCFunction)MenuObj_CheckItem, 1,
+ "(short item, Boolean checked) -> None"},
{"SetMenuItemText", (PyCFunction)MenuObj_SetMenuItemText, 1,
"(short item, Str255 itemString) -> None"},
{"GetMenuItemText", (PyCFunction)MenuObj_GetMenuItemText, 1,
@@ -1004,22 +1238,10 @@ static PyMethodDef MenuObj_methods[] = {
"(short item, StyleParameter chStyle) -> None"},
{"GetItemStyle", (PyCFunction)MenuObj_GetItemStyle, 1,
"(short item) -> (Style chStyle)"},
- {"CalcMenuSize", (PyCFunction)MenuObj_CalcMenuSize, 1,
- "() -> None"},
{"DisableItem", (PyCFunction)MenuObj_DisableItem, 1,
"(short item) -> None"},
{"EnableItem", (PyCFunction)MenuObj_EnableItem, 1,
"(short item) -> None"},
- {"PopUpMenuSelect", (PyCFunction)MenuObj_PopUpMenuSelect, 1,
- "(short top, short left, short popUpItem) -> (long _rv)"},
- {"CheckItem", (PyCFunction)MenuObj_CheckItem, 1,
- "(short item, Boolean checked) -> None"},
- {"CountMItems", (PyCFunction)MenuObj_CountMItems, 1,
- "() -> (short _rv)"},
- {"InsertFontResMenu", (PyCFunction)MenuObj_InsertFontResMenu, 1,
- "(short afterItem, short scriptFilter) -> None"},
- {"InsertIntlResMenu", (PyCFunction)MenuObj_InsertIntlResMenu, 1,
- "(ResType theType, short afterItem, short scriptFilter) -> None"},
{"SetMenuItemCommandID", (PyCFunction)MenuObj_SetMenuItemCommandID, 1,
"(SInt16 inItem, UInt32 inCommandID) -> None"},
{"GetMenuItemCommandID", (PyCFunction)MenuObj_GetMenuItemCommandID, 1,
@@ -1056,6 +1278,18 @@ static PyMethodDef MenuObj_methods[] = {
"(SInt16 inItem, SInt16 inGlyph) -> None"},
{"GetMenuItemKeyGlyph", (PyCFunction)MenuObj_GetMenuItemKeyGlyph, 1,
"(SInt16 inItem) -> (SInt16 outGlyph)"},
+ {"MacEnableMenuItem", (PyCFunction)MenuObj_MacEnableMenuItem, 1,
+ "(UInt16 item) -> None"},
+ {"DisableMenuItem", (PyCFunction)MenuObj_DisableMenuItem, 1,
+ "(UInt16 item) -> None"},
+ {"IsMenuItemEnabled", (PyCFunction)MenuObj_IsMenuItemEnabled, 1,
+ "(UInt16 item) -> (Boolean _rv)"},
+ {"EnableMenuItemIcon", (PyCFunction)MenuObj_EnableMenuItemIcon, 1,
+ "(UInt16 item) -> None"},
+ {"DisableMenuItemIcon", (PyCFunction)MenuObj_DisableMenuItemIcon, 1,
+ "(UInt16 item) -> None"},
+ {"IsMenuItemIconEnabled", (PyCFunction)MenuObj_IsMenuItemIconEnabled, 1,
+ "(UInt16 item) -> (Boolean _rv)"},
{"as_Resource", (PyCFunction)MenuObj_as_Resource, 1,
"Return this Menu as a Resource"},
{"AppendMenu", (PyCFunction)MenuObj_AppendMenu, 1,
@@ -1078,6 +1312,12 @@ static PyObject *MenuObj_getattr(self, name)
#define MenuObj_setattr NULL
+#define MenuObj_compare NULL
+
+#define MenuObj_repr NULL
+
+#define MenuObj_hash NULL
+
PyTypeObject Menu_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -1089,22 +1329,29 @@ PyTypeObject Menu_Type = {
0, /*tp_print*/
(getattrfunc) MenuObj_getattr, /*tp_getattr*/
(setattrfunc) MenuObj_setattr, /*tp_setattr*/
+ (cmpfunc) MenuObj_compare, /*tp_compare*/
+ (reprfunc) MenuObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) MenuObj_hash, /*tp_hash*/
};
/* ---------------------- End object type Menu ---------------------- */
-static PyObject *Menu_GetMBarHeight(_self, _args)
+static PyObject *Menu_InitProcMenu(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- short _rv;
- if (!PyArg_ParseTuple(_args, ""))
+ short resID;
+ if (!PyArg_ParseTuple(_args, "h",
+ &resID))
return NULL;
- _rv = GetMBarHeight();
- _res = Py_BuildValue("h",
- _rv);
+ InitProcMenu(resID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
return _res;
}
@@ -1156,21 +1403,6 @@ static PyObject *Menu_MacGetMenu(_self, _args)
return _res;
}
-static PyObject *Menu_MacDeleteMenu(_self, _args)
- PyObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- short menuID;
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
- return NULL;
- MacDeleteMenu(menuID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-
static PyObject *Menu_MenuKey(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -1187,122 +1419,120 @@ static PyObject *Menu_MenuKey(_self, _args)
return _res;
}
-static PyObject *Menu_HiliteMenu(_self, _args)
+static PyObject *Menu_MenuSelect(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- short menuID;
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
+ long _rv;
+ Point startPt;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &startPt))
return NULL;
- HiliteMenu(menuID);
- Py_INCREF(Py_None);
- _res = Py_None;
+ _rv = MenuSelect(startPt);
+ _res = Py_BuildValue("l",
+ _rv);
return _res;
}
-static PyObject *Menu_GetMenuHandle(_self, _args)
+static PyObject *Menu_MenuChoice(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- MenuHandle _rv;
- short menuID;
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
+ long _rv;
+ if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = GetMenuHandle(menuID);
- _res = Py_BuildValue("O&",
- MenuObj_New, _rv);
+ _rv = MenuChoice();
+ _res = Py_BuildValue("l",
+ _rv);
return _res;
}
-static PyObject *Menu_FlashMenuBar(_self, _args)
+static PyObject *Menu_MenuEvent(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- short menuID;
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
+ UInt32 _rv;
+ EventRecord inEvent;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &inEvent))
return NULL;
- FlashMenuBar(menuID);
- Py_INCREF(Py_None);
- _res = Py_None;
+ _rv = MenuEvent(&inEvent);
+ _res = Py_BuildValue("l",
+ _rv);
return _res;
}
-static PyObject *Menu_MenuChoice(_self, _args)
+static PyObject *Menu_GetMBarHeight(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- long _rv;
+ short _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = MenuChoice();
- _res = Py_BuildValue("l",
+ _rv = GetMBarHeight();
+ _res = Py_BuildValue("h",
_rv);
return _res;
}
-static PyObject *Menu_DeleteMCEntries(_self, _args)
+static PyObject *Menu_MacDrawMenuBar(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- short menuID;
- short menuItem;
- if (!PyArg_ParseTuple(_args, "hh",
- &menuID,
- &menuItem))
+ if (!PyArg_ParseTuple(_args, ""))
return NULL;
- DeleteMCEntries(menuID,
- menuItem);
+ MacDrawMenuBar();
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
-static PyObject *Menu_MacDrawMenuBar(_self, _args)
+static PyObject *Menu_InvalMenuBar(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- MacDrawMenuBar();
+ InvalMenuBar();
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
-static PyObject *Menu_InvalMenuBar(_self, _args)
+static PyObject *Menu_HiliteMenu(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
+ short menuID;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
return NULL;
- InvalMenuBar();
+ HiliteMenu(menuID);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
-static PyObject *Menu_InitProcMenu(_self, _args)
+static PyObject *Menu_GetNewMBar(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- short resID;
+ Handle _rv;
+ short menuBarID;
if (!PyArg_ParseTuple(_args, "h",
- &resID))
+ &menuBarID))
return NULL;
- InitProcMenu(resID);
- Py_INCREF(Py_None);
- _res = Py_None;
+ _rv = GetNewMBar(menuBarID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
return _res;
}
@@ -1335,6 +1565,80 @@ static PyObject *Menu_SetMenuBar(_self, _args)
return _res;
}
+static PyObject *Menu_GetMenuHandle(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ MenuHandle _rv;
+ short menuID;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ _rv = GetMenuHandle(menuID);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, _rv);
+ return _res;
+}
+
+static PyObject *Menu_MacDeleteMenu(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ short menuID;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ MacDeleteMenu(menuID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Menu_ClearMenuBar(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ClearMenuBar();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Menu_SetMenuFlash(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ short count;
+ if (!PyArg_ParseTuple(_args, "h",
+ &count))
+ return NULL;
+ SetMenuFlash(count);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Menu_FlashMenuBar(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ short menuID;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ FlashMenuBar(menuID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *Menu_SystemEdit(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -1366,78 +1670,91 @@ static PyObject *Menu_SystemMenu(_self, _args)
return _res;
}
-static PyObject *Menu_GetNewMBar(_self, _args)
+static PyObject *Menu_IsMenuBarVisible(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- Handle _rv;
- short menuBarID;
- if (!PyArg_ParseTuple(_args, "h",
- &menuBarID))
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = GetNewMBar(menuBarID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
+ _rv = IsMenuBarVisible();
+ _res = Py_BuildValue("b",
+ _rv);
return _res;
}
-static PyObject *Menu_ClearMenuBar(_self, _args)
+static PyObject *Menu_ShowMenuBar(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- ClearMenuBar();
+ ShowMenuBar();
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
-static PyObject *Menu_SetMenuFlash(_self, _args)
+static PyObject *Menu_HideMenuBar(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- short count;
- if (!PyArg_ParseTuple(_args, "h",
- &count))
+ if (!PyArg_ParseTuple(_args, ""))
return NULL;
- SetMenuFlash(count);
+ HideMenuBar();
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
-static PyObject *Menu_MenuSelect(_self, _args)
+static PyObject *Menu_DeleteMCEntries(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- long _rv;
- Point startPt;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &startPt))
+ short menuID;
+ short menuItem;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &menuID,
+ &menuItem))
return NULL;
- _rv = MenuSelect(startPt);
- _res = Py_BuildValue("l",
- _rv);
+ DeleteMCEntries(menuID,
+ menuItem);
+ Py_INCREF(Py_None);
+ _res = Py_None;
return _res;
}
-static PyObject *Menu_MenuEvent(_self, _args)
+static PyObject *Menu_InitContextualMenus(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
- UInt32 _rv;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = InitContextualMenus();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Menu_IsShowContextualMenuClick(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
EventRecord inEvent;
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &inEvent))
return NULL;
- _rv = MenuEvent(&inEvent);
- _res = Py_BuildValue("l",
+ _rv = IsShowContextualMenuClick(&inEvent);
+ _res = Py_BuildValue("b",
_rv);
return _res;
}
@@ -1518,52 +1835,62 @@ static PyObject *Menu_DrawMenuBar(_self, _args)
}
static PyMethodDef Menu_methods[] = {
- {"GetMBarHeight", (PyCFunction)Menu_GetMBarHeight, 1,
- "() -> (short _rv)"},
+ {"InitProcMenu", (PyCFunction)Menu_InitProcMenu, 1,
+ "(short resID) -> None"},
{"InitMenus", (PyCFunction)Menu_InitMenus, 1,
"() -> None"},
{"NewMenu", (PyCFunction)Menu_NewMenu, 1,
"(short menuID, Str255 menuTitle) -> (MenuHandle _rv)"},
{"MacGetMenu", (PyCFunction)Menu_MacGetMenu, 1,
"(short resourceID) -> (MenuHandle _rv)"},
- {"MacDeleteMenu", (PyCFunction)Menu_MacDeleteMenu, 1,
- "(short menuID) -> None"},
{"MenuKey", (PyCFunction)Menu_MenuKey, 1,
"(CharParameter ch) -> (long _rv)"},
- {"HiliteMenu", (PyCFunction)Menu_HiliteMenu, 1,
- "(short menuID) -> None"},
- {"GetMenuHandle", (PyCFunction)Menu_GetMenuHandle, 1,
- "(short menuID) -> (MenuHandle _rv)"},
- {"FlashMenuBar", (PyCFunction)Menu_FlashMenuBar, 1,
- "(short menuID) -> None"},
+ {"MenuSelect", (PyCFunction)Menu_MenuSelect, 1,
+ "(Point startPt) -> (long _rv)"},
{"MenuChoice", (PyCFunction)Menu_MenuChoice, 1,
"() -> (long _rv)"},
- {"DeleteMCEntries", (PyCFunction)Menu_DeleteMCEntries, 1,
- "(short menuID, short menuItem) -> None"},
+ {"MenuEvent", (PyCFunction)Menu_MenuEvent, 1,
+ "(EventRecord inEvent) -> (UInt32 _rv)"},
+ {"GetMBarHeight", (PyCFunction)Menu_GetMBarHeight, 1,
+ "() -> (short _rv)"},
{"MacDrawMenuBar", (PyCFunction)Menu_MacDrawMenuBar, 1,
"() -> None"},
{"InvalMenuBar", (PyCFunction)Menu_InvalMenuBar, 1,
"() -> None"},
- {"InitProcMenu", (PyCFunction)Menu_InitProcMenu, 1,
- "(short resID) -> None"},
+ {"HiliteMenu", (PyCFunction)Menu_HiliteMenu, 1,
+ "(short menuID) -> None"},
+ {"GetNewMBar", (PyCFunction)Menu_GetNewMBar, 1,
+ "(short menuBarID) -> (Handle _rv)"},
{"GetMenuBar", (PyCFunction)Menu_GetMenuBar, 1,
"() -> (Handle _rv)"},
{"SetMenuBar", (PyCFunction)Menu_SetMenuBar, 1,
"(Handle menuList) -> None"},
+ {"GetMenuHandle", (PyCFunction)Menu_GetMenuHandle, 1,
+ "(short menuID) -> (MenuHandle _rv)"},
+ {"MacDeleteMenu", (PyCFunction)Menu_MacDeleteMenu, 1,
+ "(short menuID) -> None"},
+ {"ClearMenuBar", (PyCFunction)Menu_ClearMenuBar, 1,
+ "() -> None"},
+ {"SetMenuFlash", (PyCFunction)Menu_SetMenuFlash, 1,
+ "(short count) -> None"},
+ {"FlashMenuBar", (PyCFunction)Menu_FlashMenuBar, 1,
+ "(short menuID) -> None"},
{"SystemEdit", (PyCFunction)Menu_SystemEdit, 1,
"(short editCmd) -> (Boolean _rv)"},
{"SystemMenu", (PyCFunction)Menu_SystemMenu, 1,
"(long menuResult) -> None"},
- {"GetNewMBar", (PyCFunction)Menu_GetNewMBar, 1,
- "(short menuBarID) -> (Handle _rv)"},
- {"ClearMenuBar", (PyCFunction)Menu_ClearMenuBar, 1,
+ {"IsMenuBarVisible", (PyCFunction)Menu_IsMenuBarVisible, 1,
+ "() -> (Boolean _rv)"},
+ {"ShowMenuBar", (PyCFunction)Menu_ShowMenuBar, 1,
"() -> None"},
- {"SetMenuFlash", (PyCFunction)Menu_SetMenuFlash, 1,
- "(short count) -> None"},
- {"MenuSelect", (PyCFunction)Menu_MenuSelect, 1,
- "(Point startPt) -> (long _rv)"},
- {"MenuEvent", (PyCFunction)Menu_MenuEvent, 1,
- "(EventRecord inEvent) -> (UInt32 _rv)"},
+ {"HideMenuBar", (PyCFunction)Menu_HideMenuBar, 1,
+ "() -> None"},
+ {"DeleteMCEntries", (PyCFunction)Menu_DeleteMCEntries, 1,
+ "(short menuID, short menuItem) -> None"},
+ {"InitContextualMenus", (PyCFunction)Menu_InitContextualMenus, 1,
+ "() -> None"},
+ {"IsShowContextualMenuClick", (PyCFunction)Menu_IsShowContextualMenuClick, 1,
+ "(EventRecord inEvent) -> (Boolean _rv)"},
{"OpenDeskAcc", (PyCFunction)Menu_OpenDeskAcc, 1,
"(Str255 name) -> None"},
{"as_Menu", (PyCFunction)Menu_as_Menu, 1,
diff --git a/Mac/Modules/menu/menuscan.py b/Mac/Modules/menu/menuscan.py
index b332657..fa87ba3 100644
--- a/Mac/Modules/menu/menuscan.py
+++ b/Mac/Modules/menu/menuscan.py
@@ -32,8 +32,12 @@ class MyScanner(Scanner):
def makeblacklistnames(self):
return [
- "IsShowContextualMenuClick", # Can't find it in the library
- "InitContextualMenus", # ditto
+## "IsShowContextualMenuClick", # Can't find it in the library
+## "InitContextualMenus", # ditto
+ "GetMenuItemProperty", # difficult for the moment
+ "GetMenuItemPropertySize",
+ "SetMenuItemProperty",
+ "RemoveMenuItemProperty",
]
def makeblacklisttypes(self):
diff --git a/Mac/Modules/qd/Qdmodule.c b/Mac/Modules/qd/Qdmodule.c
index 13caf5f..f8dba7e 100644
--- a/Mac/Modules/qd/Qdmodule.c
+++ b/Mac/Modules/qd/Qdmodule.c
@@ -223,6 +223,12 @@ static PyObject *GrafObj_getattr(self, name)
#define GrafObj_setattr NULL
+#define GrafObj_compare NULL
+
+#define GrafObj_repr NULL
+
+#define GrafObj_hash NULL
+
PyTypeObject GrafPort_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -234,6 +240,12 @@ PyTypeObject GrafPort_Type = {
0, /*tp_print*/
(getattrfunc) GrafObj_getattr, /*tp_getattr*/
(setattrfunc) GrafObj_setattr, /*tp_setattr*/
+ (cmpfunc) GrafObj_compare, /*tp_compare*/
+ (reprfunc) GrafObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) GrafObj_hash, /*tp_hash*/
};
/* -------------------- End object type GrafPort -------------------- */
@@ -312,6 +324,12 @@ static PyObject *BMObj_getattr(self, name)
#define BMObj_setattr NULL
+#define BMObj_compare NULL
+
+#define BMObj_repr NULL
+
+#define BMObj_hash NULL
+
PyTypeObject BitMap_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -323,6 +341,12 @@ PyTypeObject BitMap_Type = {
0, /*tp_print*/
(getattrfunc) BMObj_getattr, /*tp_getattr*/
(setattrfunc) BMObj_setattr, /*tp_setattr*/
+ (cmpfunc) BMObj_compare, /*tp_compare*/
+ (reprfunc) BMObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) BMObj_hash, /*tp_hash*/
};
/* --------------------- End object type BitMap --------------------- */
@@ -387,6 +411,12 @@ static PyObject *QDGA_getattr(self, name)
#define QDGA_setattr NULL
+#define QDGA_compare NULL
+
+#define QDGA_repr NULL
+
+#define QDGA_hash NULL
+
staticforward PyTypeObject QDGlobalsAccess_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -398,6 +428,12 @@ staticforward PyTypeObject QDGlobalsAccess_Type = {
0, /*tp_print*/
(getattrfunc) QDGA_getattr, /*tp_getattr*/
(setattrfunc) QDGA_setattr, /*tp_setattr*/
+ (cmpfunc) QDGA_compare, /*tp_compare*/
+ (reprfunc) QDGA_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) QDGA_hash, /*tp_hash*/
};
/* ---------------- End object type QDGlobalsAccess ----------------- */
diff --git a/Mac/Modules/qdoffs/Qdoffsmodule.c b/Mac/Modules/qdoffs/Qdoffsmodule.c
index fef251f..13ec478 100644
--- a/Mac/Modules/qdoffs/Qdoffsmodule.c
+++ b/Mac/Modules/qdoffs/Qdoffsmodule.c
@@ -137,6 +137,12 @@ static PyObject *GWorldObj_getattr(self, name)
#define GWorldObj_setattr NULL
+#define GWorldObj_compare NULL
+
+#define GWorldObj_repr NULL
+
+#define GWorldObj_hash NULL
+
PyTypeObject GWorld_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -148,6 +154,12 @@ PyTypeObject GWorld_Type = {
0, /*tp_print*/
(getattrfunc) GWorldObj_getattr, /*tp_getattr*/
(setattrfunc) GWorldObj_setattr, /*tp_setattr*/
+ (cmpfunc) GWorldObj_compare, /*tp_compare*/
+ (reprfunc) GWorldObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) GWorldObj_hash, /*tp_hash*/
};
/* --------------------- End object type GWorld --------------------- */
@@ -405,6 +417,22 @@ static PyObject *Qdoffs_SetPixelsState(_self, _args)
return _res;
}
+static PyObject *Qdoffs_GetPixRowBytes(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ long _rv;
+ PixMapHandle pm;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ _rv = GetPixRowBytes(pm);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
+}
+
static PyObject *Qdoffs_NewScreenBuffer(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -545,6 +573,8 @@ static PyMethodDef Qdoffs_methods[] = {
"(PixMapHandle pm) -> (GWorldFlags _rv)"},
{"SetPixelsState", (PyCFunction)Qdoffs_SetPixelsState, 1,
"(PixMapHandle pm, GWorldFlags state) -> None"},
+ {"GetPixRowBytes", (PyCFunction)Qdoffs_GetPixRowBytes, 1,
+ "(PixMapHandle pm) -> (long _rv)"},
{"NewScreenBuffer", (PyCFunction)Qdoffs_NewScreenBuffer, 1,
"(Rect globalRect, Boolean purgeable) -> (GDHandle gdh, PixMapHandle offscreenPixMap)"},
{"DisposeScreenBuffer", (PyCFunction)Qdoffs_DisposeScreenBuffer, 1,
diff --git a/Mac/Modules/qdoffs/qdoffsscan.py b/Mac/Modules/qdoffs/qdoffsscan.py
index 958da97..4f188a6 100644
--- a/Mac/Modules/qdoffs/qdoffsscan.py
+++ b/Mac/Modules/qdoffs/qdoffsscan.py
@@ -37,7 +37,7 @@ class MyScanner(Scanner):
return [
'DisposeGWorld', # Implied when the object is deleted
'NewGWorldFromHBITMAP', # Don't know what the args do
- 'GetGDeviceAttributes', # Doesn't seem to exist
+ 'GetGDeviceAttributes', # Windows-only
]
def makeblacklisttypes(self):
diff --git a/Mac/Modules/qt/Qtmodule.c b/Mac/Modules/qt/Qtmodule.c
index 540915e..a1dc764 100644
--- a/Mac/Modules/qt/Qtmodule.c
+++ b/Mac/Modules/qt/Qtmodule.c
@@ -1021,6 +1021,12 @@ static PyObject *MovieCtlObj_getattr(self, name)
#define MovieCtlObj_setattr NULL
+#define MovieCtlObj_compare NULL
+
+#define MovieCtlObj_repr NULL
+
+#define MovieCtlObj_hash NULL
+
PyTypeObject MovieController_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -1032,6 +1038,12 @@ PyTypeObject MovieController_Type = {
0, /*tp_print*/
(getattrfunc) MovieCtlObj_getattr, /*tp_getattr*/
(setattrfunc) MovieCtlObj_setattr, /*tp_setattr*/
+ (cmpfunc) MovieCtlObj_compare, /*tp_compare*/
+ (reprfunc) MovieCtlObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) MovieCtlObj_hash, /*tp_hash*/
};
/* ---------------- End object type MovieController ----------------- */
@@ -1446,6 +1458,12 @@ static PyObject *TimeBaseObj_getattr(self, name)
#define TimeBaseObj_setattr NULL
+#define TimeBaseObj_compare NULL
+
+#define TimeBaseObj_repr NULL
+
+#define TimeBaseObj_hash NULL
+
PyTypeObject TimeBase_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -1457,6 +1475,12 @@ PyTypeObject TimeBase_Type = {
0, /*tp_print*/
(getattrfunc) TimeBaseObj_getattr, /*tp_getattr*/
(setattrfunc) TimeBaseObj_setattr, /*tp_setattr*/
+ (cmpfunc) TimeBaseObj_compare, /*tp_compare*/
+ (reprfunc) TimeBaseObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) TimeBaseObj_hash, /*tp_hash*/
};
/* -------------------- End object type TimeBase -------------------- */
@@ -1735,6 +1759,12 @@ static PyObject *UserDataObj_getattr(self, name)
#define UserDataObj_setattr NULL
+#define UserDataObj_compare NULL
+
+#define UserDataObj_repr NULL
+
+#define UserDataObj_hash NULL
+
PyTypeObject UserData_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -1746,6 +1776,12 @@ PyTypeObject UserData_Type = {
0, /*tp_print*/
(getattrfunc) UserDataObj_getattr, /*tp_getattr*/
(setattrfunc) UserDataObj_setattr, /*tp_setattr*/
+ (cmpfunc) UserDataObj_compare, /*tp_compare*/
+ (reprfunc) UserDataObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) UserDataObj_hash, /*tp_hash*/
};
/* -------------------- End object type UserData -------------------- */
@@ -2806,6 +2842,12 @@ static PyObject *MediaObj_getattr(self, name)
#define MediaObj_setattr NULL
+#define MediaObj_compare NULL
+
+#define MediaObj_repr NULL
+
+#define MediaObj_hash NULL
+
PyTypeObject Media_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -2817,6 +2859,12 @@ PyTypeObject Media_Type = {
0, /*tp_print*/
(getattrfunc) MediaObj_getattr, /*tp_getattr*/
(setattrfunc) MediaObj_setattr, /*tp_setattr*/
+ (cmpfunc) MediaObj_compare, /*tp_compare*/
+ (reprfunc) MediaObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) MediaObj_hash, /*tp_hash*/
};
/* --------------------- End object type Media ---------------------- */
@@ -3974,6 +4022,12 @@ static PyObject *TrackObj_getattr(self, name)
#define TrackObj_setattr NULL
+#define TrackObj_compare NULL
+
+#define TrackObj_repr NULL
+
+#define TrackObj_hash NULL
+
PyTypeObject Track_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -3985,6 +4039,12 @@ PyTypeObject Track_Type = {
0, /*tp_print*/
(getattrfunc) TrackObj_getattr, /*tp_getattr*/
(setattrfunc) TrackObj_setattr, /*tp_setattr*/
+ (cmpfunc) TrackObj_compare, /*tp_compare*/
+ (reprfunc) TrackObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) TrackObj_hash, /*tp_hash*/
};
/* --------------------- End object type Track ---------------------- */
@@ -6109,6 +6169,12 @@ static PyObject *MovieObj_getattr(self, name)
#define MovieObj_setattr NULL
+#define MovieObj_compare NULL
+
+#define MovieObj_repr NULL
+
+#define MovieObj_hash NULL
+
PyTypeObject Movie_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -6120,11 +6186,35 @@ PyTypeObject Movie_Type = {
0, /*tp_print*/
(getattrfunc) MovieObj_getattr, /*tp_getattr*/
(setattrfunc) MovieObj_setattr, /*tp_setattr*/
+ (cmpfunc) MovieObj_compare, /*tp_compare*/
+ (reprfunc) MovieObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) MovieObj_hash, /*tp_hash*/
};
/* --------------------- End object type Movie ---------------------- */
+static PyObject *Qt_CheckQuickTimeRegistration(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ void * registrationKey;
+ long flags;
+ if (!PyArg_ParseTuple(_args, "sl",
+ &registrationKey,
+ &flags))
+ return NULL;
+ CheckQuickTimeRegistration(registrationKey,
+ flags);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *Qt_EnterMovies(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -6858,6 +6948,25 @@ static PyObject *Qt_VideoMediaGetStatistics(_self, _args)
return _res;
}
+static PyObject *Qt_VideoMediaGetStallCount(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ unsigned long stalls;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = VideoMediaGetStallCount(mh,
+ &stalls);
+ _res = Py_BuildValue("ll",
+ _rv,
+ stalls);
+ return _res;
+}
+
static PyObject *Qt_TextMediaAddTextSample(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -7667,6 +7776,8 @@ static PyObject *Qt_MoviesTask(_self, _args)
}
static PyMethodDef Qt_methods[] = {
+ {"CheckQuickTimeRegistration", (PyCFunction)Qt_CheckQuickTimeRegistration, 1,
+ "(void * registrationKey, long flags) -> None"},
{"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
"() -> None"},
{"ExitMovies", (PyCFunction)Qt_ExitMovies, 1,
@@ -7739,6 +7850,8 @@ static PyMethodDef Qt_methods[] = {
"(MediaHandler mh) -> (ComponentResult _rv)"},
{"VideoMediaGetStatistics", (PyCFunction)Qt_VideoMediaGetStatistics, 1,
"(MediaHandler mh) -> (ComponentResult _rv)"},
+ {"VideoMediaGetStallCount", (PyCFunction)Qt_VideoMediaGetStallCount, 1,
+ "(MediaHandler mh) -> (ComponentResult _rv, unsigned long stalls)"},
{"TextMediaAddTextSample", (PyCFunction)Qt_TextMediaAddTextSample, 1,
"(MediaHandler mh, Ptr text, unsigned long size, short fontNumber, short fontSize, Style textFace, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor textColor, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)"},
{"TextMediaAddTESample", (PyCFunction)Qt_TextMediaAddTESample, 1,
diff --git a/Mac/Modules/qt/qtscan.py b/Mac/Modules/qt/qtscan.py
index ee45c30..ce79380 100644
--- a/Mac/Modules/qt/qtscan.py
+++ b/Mac/Modules/qt/qtscan.py
@@ -57,38 +57,10 @@ class MyScanner(Scanner):
"AddTESample",
"AddHiliteSample",
"HiliteTextSample",
- # Missing in CW11 quicktime library
-# "SpriteMediaGetDisplayedSampleNumber",
-# "SpriteMediaGetIndImageDescription",
-# "SpriteMediaCountImages",
-# "SpriteMediaCountSprites",
-# "SpriteMediaHitTestSprites",
-# "SpriteMediaGetProperty",
-# "SpriteMediaSetProperty",
-# "TextMediaSetTextSampleData",
-# "TextMediaHiliteTextSample",
-# "TextMediaFindNextText",
-# "TextMediaAddHiliteSample",
-# "TextMediaAddTESample",
-# "TextMediaAddTextSample",
-# "VideoMediaGetStatistics",
-# "VideoMediaResetStatistics",
-# "EndFullScreen",
-# "NewMovieFromDataRef",
-# "MCPtInController",
-# "MCRemoveAMovie",
-# "MCRemoveAllMovies",
-# "MCInvalidate",
-# "InvalidateMovieRegion",
-# "GetMovieCompositeBufferFlags",
-# "SetMovieCompositeBufferFlags",
-# "SetTrackSoundLocalizationSettings",
-# "GetTrackSoundLocalizationSettings",
-# "GetMovieNaturalBoundsRect",
"MakeTrackTimeTable", # Uses long * return?
"MakeMediaTimeTable", # ditto
- "VideoMediaGetStallCount", # Undefined in CW Pro 3 library
+## "VideoMediaGetStallCount", # Undefined in CW Pro 3 library
]
def makeblacklisttypes(self):
diff --git a/Mac/Modules/res/Resmodule.c b/Mac/Modules/res/Resmodule.c
index 6eeb3b8..b5857e7 100644
--- a/Mac/Modules/res/Resmodule.c
+++ b/Mac/Modules/res/Resmodule.c
@@ -549,6 +549,12 @@ ResObj_setattr(self, name, value)
}
+#define ResObj_compare NULL
+
+#define ResObj_repr NULL
+
+#define ResObj_hash NULL
+
PyTypeObject Resource_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -560,6 +566,12 @@ PyTypeObject Resource_Type = {
0, /*tp_print*/
(getattrfunc) ResObj_getattr, /*tp_getattr*/
(setattrfunc) ResObj_setattr, /*tp_setattr*/
+ (cmpfunc) ResObj_compare, /*tp_compare*/
+ (reprfunc) ResObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) ResObj_hash, /*tp_hash*/
};
/* -------------------- End object type Resource -------------------- */
diff --git a/Mac/Modules/scrap/scrapscan.py b/Mac/Modules/scrap/scrapscan.py
index 95bf1bb..1a03b18 100644
--- a/Mac/Modules/scrap/scrapscan.py
+++ b/Mac/Modules/scrap/scrapscan.py
@@ -11,7 +11,7 @@ from scantools import Scanner
from bgenlocations import TOOLBOXDIR
LONG = "Scrap"
-SHORT = "Scrap"
+SHORT = "scrap"
def main():
input = "Scrap.h"
diff --git a/Mac/Modules/snd/Sndmodule.c b/Mac/Modules/snd/Sndmodule.c
index 84d77e1..019fa25 100644
--- a/Mac/Modules/snd/Sndmodule.c
+++ b/Mac/Modules/snd/Sndmodule.c
@@ -272,6 +272,48 @@ static PyObject *SndCh_SndChannelStatus(_self, _args)
return _res;
}
+static PyObject *SndCh_SndGetInfo(_self, _args)
+ SndChannelObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType selector;
+ void * infoPtr;
+ if (!PyArg_ParseTuple(_args, "O&w",
+ PyMac_GetOSType, &selector,
+ &infoPtr))
+ return NULL;
+ _err = SndGetInfo(_self->ob_itself,
+ selector,
+ infoPtr);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *SndCh_SndSetInfo(_self, _args)
+ SndChannelObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType selector;
+ void * infoPtr;
+ if (!PyArg_ParseTuple(_args, "O&w",
+ PyMac_GetOSType, &selector,
+ &infoPtr))
+ return NULL;
+ _err = SndSetInfo(_self->ob_itself,
+ selector,
+ infoPtr);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyMethodDef SndCh_methods[] = {
{"SndDoCommand", (PyCFunction)SndCh_SndDoCommand, 1,
"(SndCommand cmd, Boolean noWait) -> None"},
@@ -287,6 +329,10 @@ static PyMethodDef SndCh_methods[] = {
"(Boolean quietNow) -> None"},
{"SndChannelStatus", (PyCFunction)SndCh_SndChannelStatus, 1,
"(short theLength) -> (SCStatus theStatus)"},
+ {"SndGetInfo", (PyCFunction)SndCh_SndGetInfo, 1,
+ "(OSType selector, void * infoPtr) -> None"},
+ {"SndSetInfo", (PyCFunction)SndCh_SndSetInfo, 1,
+ "(OSType selector, void * infoPtr) -> None"},
{NULL, NULL, 0}
};
@@ -301,6 +347,12 @@ static PyObject *SndCh_getattr(self, name)
#define SndCh_setattr NULL
+#define SndCh_compare NULL
+
+#define SndCh_repr NULL
+
+#define SndCh_hash NULL
+
staticforward PyTypeObject SndChannel_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -312,6 +364,12 @@ staticforward PyTypeObject SndChannel_Type = {
0, /*tp_print*/
(getattrfunc) SndCh_getattr, /*tp_getattr*/
(setattrfunc) SndCh_setattr, /*tp_setattr*/
+ (cmpfunc) SndCh_compare, /*tp_compare*/
+ (reprfunc) SndCh_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) SndCh_hash, /*tp_hash*/
};
/* ------------------- End object type SndChannel ------------------- */
@@ -423,6 +481,12 @@ static int SPBObj_setattr(self, name, value)
else return -1;
}
+#define SPBObj_compare NULL
+
+#define SPBObj_repr NULL
+
+#define SPBObj_hash NULL
+
staticforward PyTypeObject SPB_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -434,6 +498,12 @@ staticforward PyTypeObject SPB_Type = {
0, /*tp_print*/
(getattrfunc) SPBObj_getattr, /*tp_getattr*/
(setattrfunc) SPBObj_setattr, /*tp_setattr*/
+ (cmpfunc) SPBObj_compare, /*tp_compare*/
+ (reprfunc) SPBObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) SPBObj_hash, /*tp_hash*/
};
/* ---------------------- End object type SPB ----------------------- */
@@ -859,6 +929,98 @@ static PyObject *Snd_GetSoundHeaderOffset(_self, _args)
return _res;
}
+static PyObject *Snd_GetCompressionInfo(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ short compressionID;
+ OSType format;
+ short numChannels;
+ short sampleSize;
+ CompressionInfo cp__out__;
+ if (!PyArg_ParseTuple(_args, "hO&hh",
+ &compressionID,
+ PyMac_GetOSType, &format,
+ &numChannels,
+ &sampleSize))
+ return NULL;
+ _err = GetCompressionInfo(compressionID,
+ format,
+ numChannels,
+ sampleSize,
+ &cp__out__);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("s#",
+ (char *)&cp__out__, (int)sizeof(CompressionInfo));
+ cp__error__: ;
+ return _res;
+}
+
+static PyObject *Snd_SetSoundPreference(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType theType;
+ Str255 name;
+ Handle settings;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theType,
+ ResObj_Convert, &settings))
+ return NULL;
+ _err = SetSoundPreference(theType,
+ name,
+ settings);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, name);
+ return _res;
+}
+
+static PyObject *Snd_GetSoundPreference(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType theType;
+ Str255 name;
+ Handle settings;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theType,
+ ResObj_Convert, &settings))
+ return NULL;
+ _err = GetSoundPreference(theType,
+ name,
+ settings);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, name);
+ return _res;
+}
+
+static PyObject *Snd_GetCompressionName(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType compressionType;
+ Str255 compressionName;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &compressionType))
+ return NULL;
+ _err = GetCompressionName(compressionType,
+ compressionName);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, compressionName);
+ return _res;
+}
+
static PyObject *Snd_SPBVersion(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -1220,6 +1382,14 @@ static PyMethodDef Snd_methods[] = {
"(long level) -> None"},
{"GetSoundHeaderOffset", (PyCFunction)Snd_GetSoundHeaderOffset, 1,
"(SndListHandle sndHandle) -> (long offset)"},
+ {"GetCompressionInfo", (PyCFunction)Snd_GetCompressionInfo, 1,
+ "(short compressionID, OSType format, short numChannels, short sampleSize) -> (CompressionInfo cp)"},
+ {"SetSoundPreference", (PyCFunction)Snd_SetSoundPreference, 1,
+ "(OSType theType, Handle settings) -> (Str255 name)"},
+ {"GetSoundPreference", (PyCFunction)Snd_GetSoundPreference, 1,
+ "(OSType theType, Handle settings) -> (Str255 name)"},
+ {"GetCompressionName", (PyCFunction)Snd_GetCompressionName, 1,
+ "(OSType compressionType) -> (Str255 compressionName)"},
{"SPBVersion", (PyCFunction)Snd_SPBVersion, 1,
"() -> (NumVersion _rv)"},
{"SPBSignInDevice", (PyCFunction)Snd_SPBSignInDevice, 1,
diff --git a/Mac/Modules/snd/sndscan.py b/Mac/Modules/snd/sndscan.py
index f2f19ec..676c889 100644
--- a/Mac/Modules/snd/sndscan.py
+++ b/Mac/Modules/snd/sndscan.py
@@ -46,12 +46,12 @@ class SoundScanner(Scanner):
'StopSound',
'SoundDone',
# These do not work for cfm68k:
- 'SndGetInfo',
- 'SndSetInfo',
- 'GetCompressionInfo',
- 'GetCompressionName',
- 'GetSoundPreference',
- 'SetSoundPreference',
+## 'SndGetInfo',
+## 'SndSetInfo',
+## 'GetCompressionInfo',
+## 'GetCompressionName',
+## 'GetSoundPreference',
+## 'SetSoundPreference',
# And old calls that are no longer supported
'SetSoundVol',
'GetSoundVol',
diff --git a/Mac/Modules/te/TEmodule.c b/Mac/Modules/te/TEmodule.c
index 1c7e4f4..5d5e05a 100644
--- a/Mac/Modules/te/TEmodule.c
+++ b/Mac/Modules/te/TEmodule.c
@@ -722,6 +722,24 @@ static PyObject *TEObj_TEFeatureFlag(_self, _args)
return _res;
}
+static PyObject *TEObj_TEGetHiliteRgn(_self, _args)
+ TEObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle region;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ _err = TEGetHiliteRgn(region,
+ _self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyMethodDef TEObj_methods[] = {
{"TESetText", (PyCFunction)TEObj_TESetText, 1,
"(Buffer text) -> None"},
@@ -793,6 +811,8 @@ static PyMethodDef TEObj_methods[] = {
"(long rangeStart, long rangeEnd) -> (long _rv)"},
{"TEFeatureFlag", (PyCFunction)TEObj_TEFeatureFlag, 1,
"(short feature, short action) -> (short _rv)"},
+ {"TEGetHiliteRgn", (PyCFunction)TEObj_TEGetHiliteRgn, 1,
+ "(RgnHandle region) -> None"},
{NULL, NULL, 0}
};
@@ -845,6 +865,12 @@ static PyObject *TEObj_getattr(self, name)
#define TEObj_setattr NULL
+#define TEObj_compare NULL
+
+#define TEObj_repr NULL
+
+#define TEObj_hash NULL
+
PyTypeObject TE_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -856,6 +882,12 @@ PyTypeObject TE_Type = {
0, /*tp_print*/
(getattrfunc) TEObj_getattr, /*tp_getattr*/
(setattrfunc) TEObj_setattr, /*tp_setattr*/
+ (cmpfunc) TEObj_compare, /*tp_compare*/
+ (reprfunc) TEObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) TEObj_hash, /*tp_hash*/
};
/* ----------------------- End object type TE ----------------------- */
diff --git a/Mac/Modules/te/tescan.py b/Mac/Modules/te/tescan.py
index 0e537ab..87a25da 100644
--- a/Mac/Modules/te/tescan.py
+++ b/Mac/Modules/te/tescan.py
@@ -39,7 +39,7 @@ class MyScanner(Scanner):
return [
"TEDispose",
"TEInit",
- "TEGetHiliteRgn",
+## "TEGetHiliteRgn",
]
def makeblacklisttypes(self):
diff --git a/Mac/Modules/win/Winmodule.c b/Mac/Modules/win/Winmodule.c
index 78c801d..f895911 100644
--- a/Mac/Modules/win/Winmodule.c
+++ b/Mac/Modules/win/Winmodule.c
@@ -44,6 +44,9 @@ extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Windows.h>
+extern PyObject *QdRGB_New(RGBColor *);
+extern int QdRGB_Convert(PyObject *, RGBColor *);
+
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
@@ -112,6 +115,72 @@ static PyObject *WinObj_MacCloseWindow(_self, _args)
return _res;
}
+static PyObject *WinObj_GetWindowOwnerCount(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 outCount;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowOwnerCount(_self->ob_itself,
+ &outCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outCount);
+ return _res;
+}
+
+static PyObject *WinObj_CloneWindow(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CloneWindow(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowClass(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowClass outClass;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowClass(_self->ob_itself,
+ &outClass);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outClass);
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowAttributes(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowAttributes outAttributes;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowAttributes(_self->ob_itself,
+ &outAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outAttributes);
+ return _res;
+}
+
static PyObject *WinObj_SetWinColor(_self, _args)
WindowObject *_self;
PyObject *_args;
@@ -128,6 +197,76 @@ static PyObject *WinObj_SetWinColor(_self, _args)
return _res;
}
+static PyObject *WinObj_SetWindowContentColor(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RGBColor color;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = SetWindowContentColor(_self->ob_itself,
+ &color);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &color);
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowContentColor(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RGBColor color;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowContentColor(_self->ob_itself,
+ &color);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &color);
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowContentPattern(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ PixPatHandle outPixPat;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &outPixPat))
+ return NULL;
+ _err = GetWindowContentPattern(_self->ob_itself,
+ outPixPat);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_SetWindowContentPattern(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ PixPatHandle pixPat;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pixPat))
+ return NULL;
+ _err = SetWindowContentPattern(_self->ob_itself,
+ pixPat);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *WinObj_ClipAbove(_self, _args)
WindowObject *_self;
PyObject *_args;
@@ -289,44 +428,6 @@ static PyObject *WinObj_HiliteWindow(_self, _args)
return _res;
}
-static PyObject *WinObj_GetWindowFeatures(_self, _args)
- WindowObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 outFeatures;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowFeatures(_self->ob_itself,
- &outFeatures);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outFeatures);
- return _res;
-}
-
-static PyObject *WinObj_GetWindowRegion(_self, _args)
- WindowObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowRegionCode inRegionCode;
- RgnHandle ioWinRgn;
- if (!PyArg_ParseTuple(_args, "hO&",
- &inRegionCode,
- ResObj_Convert, &ioWinRgn))
- return NULL;
- _err = GetWindowRegion(_self->ob_itself,
- inRegionCode,
- ioWinRgn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-
static PyObject *WinObj_SetWRefCon(_self, _args)
WindowObject *_self;
PyObject *_args;
@@ -401,6 +502,44 @@ static PyObject *WinObj_GetWVariant(_self, _args)
return _res;
}
+static PyObject *WinObj_GetWindowFeatures(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 outFeatures;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowFeatures(_self->ob_itself,
+ &outFeatures);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outFeatures);
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowRegion(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowRegionCode inRegionCode;
+ RgnHandle ioWinRgn;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &inRegionCode,
+ ResObj_Convert, &ioWinRgn))
+ return NULL;
+ _err = GetWindowRegion(_self->ob_itself,
+ inRegionCode,
+ ioWinRgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *WinObj_BeginUpdate(_self, _args)
WindowObject *_self;
PyObject *_args;
@@ -427,6 +566,78 @@ static PyObject *WinObj_EndUpdate(_self, _args)
return _res;
}
+static PyObject *WinObj_InvalWindowRgn(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RgnHandle region;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ _err = InvalWindowRgn(_self->ob_itself,
+ region);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_InvalWindowRect(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect bounds;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &bounds))
+ return NULL;
+ _err = InvalWindowRect(_self->ob_itself,
+ &bounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_ValidWindowRgn(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RgnHandle region;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ _err = ValidWindowRgn(_self->ob_itself,
+ region);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_ValidWindowRect(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect bounds;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &bounds))
+ return NULL;
+ _err = ValidWindowRect(_self->ob_itself,
+ &bounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *WinObj_DrawGrowIcon(_self, _args)
WindowObject *_self;
PyObject *_args;
@@ -471,7 +682,169 @@ static PyObject *WinObj_GetWTitle(_self, _args)
return _res;
}
-static PyObject *WinObj_IsWindowCollapsable(_self, _args)
+static PyObject *WinObj_SetWindowProxyFSSpec(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSSpec inFile;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSSpec, &inFile))
+ return NULL;
+ _err = SetWindowProxyFSSpec(_self->ob_itself,
+ &inFile);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowProxyFSSpec(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSSpec outFile;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowProxyFSSpec(_self->ob_itself,
+ &outFile);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFSSpec, outFile);
+ return _res;
+}
+
+static PyObject *WinObj_SetWindowProxyAlias(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ AliasHandle alias;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &alias))
+ return NULL;
+ _err = SetWindowProxyAlias(_self->ob_itself,
+ alias);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowProxyAlias(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ AliasHandle alias;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowProxyAlias(_self->ob_itself,
+ &alias);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, alias);
+ return _res;
+}
+
+static PyObject *WinObj_SetWindowProxyCreatorAndType(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType fileCreator;
+ OSType fileType;
+ SInt16 vRefNum;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ PyMac_GetOSType, &fileCreator,
+ PyMac_GetOSType, &fileType,
+ &vRefNum))
+ return NULL;
+ _err = SetWindowProxyCreatorAndType(_self->ob_itself,
+ fileCreator,
+ fileType,
+ vRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowProxyIcon(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ IconRef outIcon;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowProxyIcon(_self->ob_itself,
+ &outIcon);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, outIcon);
+ return _res;
+}
+
+static PyObject *WinObj_SetWindowProxyIcon(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ IconRef icon;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &icon))
+ return NULL;
+ _err = SetWindowProxyIcon(_self->ob_itself,
+ icon);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_RemoveWindowProxy(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = RemoveWindowProxy(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_TrackWindowProxyDrag(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point startPt;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &startPt))
+ return NULL;
+ _err = TrackWindowProxyDrag(_self->ob_itself,
+ startPt);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_IsWindowModified(_self, _args)
WindowObject *_self;
PyObject *_args;
{
@@ -479,38 +852,83 @@ static PyObject *WinObj_IsWindowCollapsable(_self, _args)
Boolean _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = IsWindowCollapsable(_self->ob_itself);
+ _rv = IsWindowModified(_self->ob_itself);
_res = Py_BuildValue("b",
_rv);
return _res;
}
-static PyObject *WinObj_IsWindowCollapsed(_self, _args)
+static PyObject *WinObj_SetWindowModified(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean modified;
+ if (!PyArg_ParseTuple(_args, "b",
+ &modified))
+ return NULL;
+ _err = SetWindowModified(_self->ob_itself,
+ modified);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_IsWindowPathSelectClick(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
Boolean _rv;
+ EventRecord event;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- _rv = IsWindowCollapsed(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
+ _rv = IsWindowPathSelectClick(_self->ob_itself,
+ &event);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildEventRecord, &event);
return _res;
}
-static PyObject *WinObj_CollapseWindow(_self, _args)
+static PyObject *WinObj_HiliteWindowFrameForDrag(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
OSStatus _err;
- Boolean inCollapseIt;
+ Boolean hilited;
if (!PyArg_ParseTuple(_args, "b",
- &inCollapseIt))
+ &hilited))
return NULL;
- _err = CollapseWindow(_self->ob_itself,
- inCollapseIt);
+ _err = HiliteWindowFrameForDrag(_self->ob_itself,
+ hilited);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_TransitionWindow(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowTransitionEffect effect;
+ WindowTransitionAction action;
+ Rect rect;
+ if (!PyArg_ParseTuple(_args, "llO&",
+ &effect,
+ &action,
+ PyMac_GetRect, &rect))
+ return NULL;
+ _err = TransitionWindow(_self->ob_itself,
+ effect,
+ action,
+ &rect);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
@@ -561,25 +979,6 @@ static PyObject *WinObj_SizeWindow(_self, _args)
return _res;
}
-static PyObject *WinObj_ZoomWindow(_self, _args)
- WindowObject *_self;
- PyObject *_args;
-{
- PyObject *_res = NULL;
- short partCode;
- Boolean front;
- if (!PyArg_ParseTuple(_args, "hb",
- &partCode,
- &front))
- return NULL;
- ZoomWindow(_self->ob_itself,
- partCode,
- front);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
-}
-
static PyObject *WinObj_GrowWindow(_self, _args)
WindowObject *_self;
PyObject *_args;
@@ -619,6 +1018,228 @@ static PyObject *WinObj_DragWindow(_self, _args)
return _res;
}
+static PyObject *WinObj_ZoomWindow(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ short partCode;
+ Boolean front;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &partCode,
+ &front))
+ return NULL;
+ ZoomWindow(_self->ob_itself,
+ partCode,
+ front);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_IsWindowCollapsable(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsWindowCollapsable(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *WinObj_IsWindowCollapsed(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsWindowCollapsed(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *WinObj_CollapseWindow(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean collapse;
+ if (!PyArg_ParseTuple(_args, "b",
+ &collapse))
+ return NULL;
+ _err = CollapseWindow(_self->ob_itself,
+ collapse);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_RepositionWindow(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr parentWindow;
+ WindowPositionMethod method;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ WinObj_Convert, &parentWindow,
+ &method))
+ return NULL;
+ _err = RepositionWindow(_self->ob_itself,
+ parentWindow,
+ method);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_SetWindowBounds(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowRegionCode regionCode;
+ Rect globalBounds;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &regionCode,
+ PyMac_GetRect, &globalBounds))
+ return NULL;
+ _err = SetWindowBounds(_self->ob_itself,
+ regionCode,
+ &globalBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowBounds(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowRegionCode regionCode;
+ Rect globalBounds;
+ if (!PyArg_ParseTuple(_args, "h",
+ &regionCode))
+ return NULL;
+ _err = GetWindowBounds(_self->ob_itself,
+ regionCode,
+ &globalBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &globalBounds);
+ return _res;
+}
+
+static PyObject *WinObj_MoveWindowStructure(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ short hGlobal;
+ short vGlobal;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &hGlobal,
+ &vGlobal))
+ return NULL;
+ _err = MoveWindowStructure(_self->ob_itself,
+ hGlobal,
+ vGlobal);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *WinObj_IsWindowInStandardState(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point idealSize;
+ Rect idealStandardState;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsWindowInStandardState(_self->ob_itself,
+ &idealSize,
+ &idealStandardState);
+ _res = Py_BuildValue("bO&O&",
+ _rv,
+ PyMac_BuildPoint, idealSize,
+ PyMac_BuildRect, &idealStandardState);
+ return _res;
+}
+
+static PyObject *WinObj_ZoomWindowIdeal(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 partCode;
+ Point ioIdealSize;
+ if (!PyArg_ParseTuple(_args, "h",
+ &partCode))
+ return NULL;
+ _err = ZoomWindowIdeal(_self->ob_itself,
+ partCode,
+ &ioIdealSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, ioIdealSize);
+ return _res;
+}
+
+static PyObject *WinObj_GetWindowIdealUserState(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect userState;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowIdealUserState(_self->ob_itself,
+ &userState);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &userState);
+ return _res;
+}
+
+static PyObject *WinObj_SetWindowIdealUserState(_self, _args)
+ WindowObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect userState;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = SetWindowIdealUserState(_self->ob_itself,
+ &userState);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &userState);
+ return _res;
+}
+
static PyObject *WinObj_HideWindow(_self, _args)
WindowObject *_self;
PyObject *_args;
@@ -1047,8 +1668,24 @@ static PyObject *WinObj_ShowWindow(_self, _args)
static PyMethodDef WinObj_methods[] = {
{"MacCloseWindow", (PyCFunction)WinObj_MacCloseWindow, 1,
"() -> None"},
+ {"GetWindowOwnerCount", (PyCFunction)WinObj_GetWindowOwnerCount, 1,
+ "() -> (UInt32 outCount)"},
+ {"CloneWindow", (PyCFunction)WinObj_CloneWindow, 1,
+ "() -> None"},
+ {"GetWindowClass", (PyCFunction)WinObj_GetWindowClass, 1,
+ "() -> (WindowClass outClass)"},
+ {"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
+ "() -> (WindowAttributes outAttributes)"},
{"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
"(WCTabHandle newColorTable) -> None"},
+ {"SetWindowContentColor", (PyCFunction)WinObj_SetWindowContentColor, 1,
+ "() -> (RGBColor color)"},
+ {"GetWindowContentColor", (PyCFunction)WinObj_GetWindowContentColor, 1,
+ "() -> (RGBColor color)"},
+ {"GetWindowContentPattern", (PyCFunction)WinObj_GetWindowContentPattern, 1,
+ "(PixPatHandle outPixPat) -> None"},
+ {"SetWindowContentPattern", (PyCFunction)WinObj_SetWindowContentPattern, 1,
+ "(PixPatHandle pixPat) -> None"},
{"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
"() -> None"},
{"SaveOld", (PyCFunction)WinObj_SaveOld, 1,
@@ -1071,10 +1708,6 @@ static PyMethodDef WinObj_methods[] = {
"() -> None"},
{"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1,
"(Boolean fHilite) -> None"},
- {"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1,
- "() -> (UInt32 outFeatures)"},
- {"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
- "(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> None"},
{"SetWRefCon", (PyCFunction)WinObj_SetWRefCon, 1,
"(long data) -> None"},
{"GetWRefCon", (PyCFunction)WinObj_GetWRefCon, 1,
@@ -1085,32 +1718,88 @@ static PyMethodDef WinObj_methods[] = {
"() -> (PicHandle _rv)"},
{"GetWVariant", (PyCFunction)WinObj_GetWVariant, 1,
"() -> (short _rv)"},
+ {"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1,
+ "() -> (UInt32 outFeatures)"},
+ {"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
+ "(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> None"},
{"BeginUpdate", (PyCFunction)WinObj_BeginUpdate, 1,
"() -> None"},
{"EndUpdate", (PyCFunction)WinObj_EndUpdate, 1,
"() -> None"},
+ {"InvalWindowRgn", (PyCFunction)WinObj_InvalWindowRgn, 1,
+ "(RgnHandle region) -> None"},
+ {"InvalWindowRect", (PyCFunction)WinObj_InvalWindowRect, 1,
+ "(Rect bounds) -> None"},
+ {"ValidWindowRgn", (PyCFunction)WinObj_ValidWindowRgn, 1,
+ "(RgnHandle region) -> None"},
+ {"ValidWindowRect", (PyCFunction)WinObj_ValidWindowRect, 1,
+ "(Rect bounds) -> None"},
{"DrawGrowIcon", (PyCFunction)WinObj_DrawGrowIcon, 1,
"() -> None"},
{"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1,
"(Str255 title) -> None"},
{"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1,
"() -> (Str255 title)"},
- {"IsWindowCollapsable", (PyCFunction)WinObj_IsWindowCollapsable, 1,
- "() -> (Boolean _rv)"},
- {"IsWindowCollapsed", (PyCFunction)WinObj_IsWindowCollapsed, 1,
+ {"SetWindowProxyFSSpec", (PyCFunction)WinObj_SetWindowProxyFSSpec, 1,
+ "(FSSpec inFile) -> None"},
+ {"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
+ "() -> (FSSpec outFile)"},
+ {"SetWindowProxyAlias", (PyCFunction)WinObj_SetWindowProxyAlias, 1,
+ "(AliasHandle alias) -> None"},
+ {"GetWindowProxyAlias", (PyCFunction)WinObj_GetWindowProxyAlias, 1,
+ "() -> (AliasHandle alias)"},
+ {"SetWindowProxyCreatorAndType", (PyCFunction)WinObj_SetWindowProxyCreatorAndType, 1,
+ "(OSType fileCreator, OSType fileType, SInt16 vRefNum) -> None"},
+ {"GetWindowProxyIcon", (PyCFunction)WinObj_GetWindowProxyIcon, 1,
+ "() -> (IconRef outIcon)"},
+ {"SetWindowProxyIcon", (PyCFunction)WinObj_SetWindowProxyIcon, 1,
+ "(IconRef icon) -> None"},
+ {"RemoveWindowProxy", (PyCFunction)WinObj_RemoveWindowProxy, 1,
+ "() -> None"},
+ {"TrackWindowProxyDrag", (PyCFunction)WinObj_TrackWindowProxyDrag, 1,
+ "(Point startPt) -> None"},
+ {"IsWindowModified", (PyCFunction)WinObj_IsWindowModified, 1,
"() -> (Boolean _rv)"},
- {"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1,
- "(Boolean inCollapseIt) -> None"},
+ {"SetWindowModified", (PyCFunction)WinObj_SetWindowModified, 1,
+ "(Boolean modified) -> None"},
+ {"IsWindowPathSelectClick", (PyCFunction)WinObj_IsWindowPathSelectClick, 1,
+ "() -> (Boolean _rv, EventRecord event)"},
+ {"HiliteWindowFrameForDrag", (PyCFunction)WinObj_HiliteWindowFrameForDrag, 1,
+ "(Boolean hilited) -> None"},
+ {"TransitionWindow", (PyCFunction)WinObj_TransitionWindow, 1,
+ "(WindowTransitionEffect effect, WindowTransitionAction action, Rect rect) -> None"},
{"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
"(short hGlobal, short vGlobal, Boolean front) -> None"},
{"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
"(short w, short h, Boolean fUpdate) -> None"},
- {"ZoomWindow", (PyCFunction)WinObj_ZoomWindow, 1,
- "(short partCode, Boolean front) -> None"},
{"GrowWindow", (PyCFunction)WinObj_GrowWindow, 1,
"(Point startPt, Rect bBox) -> (long _rv)"},
{"DragWindow", (PyCFunction)WinObj_DragWindow, 1,
"(Point startPt, Rect boundsRect) -> None"},
+ {"ZoomWindow", (PyCFunction)WinObj_ZoomWindow, 1,
+ "(short partCode, Boolean front) -> None"},
+ {"IsWindowCollapsable", (PyCFunction)WinObj_IsWindowCollapsable, 1,
+ "() -> (Boolean _rv)"},
+ {"IsWindowCollapsed", (PyCFunction)WinObj_IsWindowCollapsed, 1,
+ "() -> (Boolean _rv)"},
+ {"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1,
+ "(Boolean collapse) -> None"},
+ {"RepositionWindow", (PyCFunction)WinObj_RepositionWindow, 1,
+ "(WindowPtr parentWindow, WindowPositionMethod method) -> None"},
+ {"SetWindowBounds", (PyCFunction)WinObj_SetWindowBounds, 1,
+ "(WindowRegionCode regionCode, Rect globalBounds) -> None"},
+ {"GetWindowBounds", (PyCFunction)WinObj_GetWindowBounds, 1,
+ "(WindowRegionCode regionCode) -> (Rect globalBounds)"},
+ {"MoveWindowStructure", (PyCFunction)WinObj_MoveWindowStructure, 1,
+ "(short hGlobal, short vGlobal) -> None"},
+ {"IsWindowInStandardState", (PyCFunction)WinObj_IsWindowInStandardState, 1,
+ "() -> (Boolean _rv, Point idealSize, Rect idealStandardState)"},
+ {"ZoomWindowIdeal", (PyCFunction)WinObj_ZoomWindowIdeal, 1,
+ "(SInt16 partCode) -> (Point ioIdealSize)"},
+ {"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 1,
+ "() -> (Rect userState)"},
+ {"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
+ "() -> (Rect userState)"},
{"HideWindow", (PyCFunction)WinObj_HideWindow, 1,
"() -> None"},
{"MacShowWindow", (PyCFunction)WinObj_MacShowWindow, 1,
@@ -1181,6 +1870,12 @@ static PyObject *WinObj_getattr(self, name)
#define WinObj_setattr NULL
+#define WinObj_compare NULL
+
+#define WinObj_repr NULL
+
+#define WinObj_hash NULL
+
PyTypeObject Window_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -1192,6 +1887,12 @@ PyTypeObject Window_Type = {
0, /*tp_print*/
(getattrfunc) WinObj_getattr, /*tp_getattr*/
(setattrfunc) WinObj_setattr, /*tp_setattr*/
+ (cmpfunc) WinObj_compare, /*tp_compare*/
+ (reprfunc) WinObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) WinObj_hash, /*tp_hash*/
};
/* --------------------- End object type Window --------------------- */
@@ -1307,6 +2008,108 @@ static PyObject *Win_NewCWindow(_self, _args)
return _res;
}
+static PyObject *Win_CreateNewWindow(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowClass windowClass;
+ WindowAttributes attributes;
+ Rect bounds;
+ WindowPtr outWindow;
+ if (!PyArg_ParseTuple(_args, "llO&",
+ &windowClass,
+ &attributes,
+ PyMac_GetRect, &bounds))
+ return NULL;
+ _err = CreateNewWindow(windowClass,
+ attributes,
+ &bounds,
+ &outWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ WinObj_WhichWindow, outWindow);
+ return _res;
+}
+
+static PyObject *Win_CreateWindowFromResource(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 resID;
+ WindowPtr outWindow;
+ if (!PyArg_ParseTuple(_args, "h",
+ &resID))
+ return NULL;
+ _err = CreateWindowFromResource(resID,
+ &outWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ WinObj_WhichWindow, outWindow);
+ return _res;
+}
+
+static PyObject *Win_ShowFloatingWindows(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = ShowFloatingWindows();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Win_HideFloatingWindows(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = HideFloatingWindows();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
+static PyObject *Win_AreFloatingWindowsVisible(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = AreFloatingWindowsVisible();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *Win_FrontNonFloatingWindow(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ WindowPtr _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = FrontNonFloatingWindow();
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
+}
+
static PyObject *Win_SetDeskCPat(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -1345,15 +2148,15 @@ static PyObject *Win_MacFindWindow(_self, _args)
PyObject *_res = NULL;
short _rv;
Point thePoint;
- WindowPtr theWindow;
+ WindowPtr window;
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &thePoint))
return NULL;
_rv = MacFindWindow(thePoint,
- &theWindow);
+ &window);
_res = Py_BuildValue("hO&",
_rv,
- WinObj_WhichWindow, theWindow);
+ WinObj_WhichWindow, window);
return _res;
}
@@ -1412,6 +2215,37 @@ static PyObject *Win_GetCWMgrPort(_self, _args)
return _res;
}
+static PyObject *Win_IsValidWindowPtr(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Boolean _rv;
+ GrafPtr grafPort;
+ if (!PyArg_ParseTuple(_args, "O&",
+ GrafObj_Convert, &grafPort))
+ return NULL;
+ _rv = IsValidWindowPtr(grafPort);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
+}
+
+static PyObject *Win_InitFloatingWindows(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = InitFloatingWindows();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *Win_InvalRect(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -1478,11 +2312,11 @@ static PyObject *Win_CollapseAllWindows(_self, _args)
{
PyObject *_res = NULL;
OSStatus _err;
- Boolean inCollapseEm;
+ Boolean collapse;
if (!PyArg_ParseTuple(_args, "b",
- &inCollapseEm))
+ &collapse))
return NULL;
- _err = CollapseAllWindows(inCollapseEm);
+ _err = CollapseAllWindows(collapse);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
@@ -1564,12 +2398,24 @@ static PyMethodDef Win_methods[] = {
"(short windowID, WindowPtr behind) -> (WindowPtr _rv)"},
{"NewCWindow", (PyCFunction)Win_NewCWindow, 1,
"(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)"},
+ {"CreateNewWindow", (PyCFunction)Win_CreateNewWindow, 1,
+ "(WindowClass windowClass, WindowAttributes attributes, Rect bounds) -> (WindowPtr outWindow)"},
+ {"CreateWindowFromResource", (PyCFunction)Win_CreateWindowFromResource, 1,
+ "(SInt16 resID) -> (WindowPtr outWindow)"},
+ {"ShowFloatingWindows", (PyCFunction)Win_ShowFloatingWindows, 1,
+ "() -> None"},
+ {"HideFloatingWindows", (PyCFunction)Win_HideFloatingWindows, 1,
+ "() -> None"},
+ {"AreFloatingWindowsVisible", (PyCFunction)Win_AreFloatingWindowsVisible, 1,
+ "() -> (Boolean _rv)"},
+ {"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
+ "() -> (WindowPtr _rv)"},
{"SetDeskCPat", (PyCFunction)Win_SetDeskCPat, 1,
"(PixPatHandle deskPixPat) -> None"},
{"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1,
"() -> (Boolean _rv, EventRecord theEvent)"},
{"MacFindWindow", (PyCFunction)Win_MacFindWindow, 1,
- "(Point thePoint) -> (short _rv, WindowPtr theWindow)"},
+ "(Point thePoint) -> (short _rv, WindowPtr window)"},
{"FrontWindow", (PyCFunction)Win_FrontWindow, 1,
"() -> (WindowPtr _rv)"},
{"InitWindows", (PyCFunction)Win_InitWindows, 1,
@@ -1578,6 +2424,10 @@ static PyMethodDef Win_methods[] = {
"() -> (GrafPtr wPort)"},
{"GetCWMgrPort", (PyCFunction)Win_GetCWMgrPort, 1,
"() -> (CGrafPtr wMgrCPort)"},
+ {"IsValidWindowPtr", (PyCFunction)Win_IsValidWindowPtr, 1,
+ "(GrafPtr grafPort) -> (Boolean _rv)"},
+ {"InitFloatingWindows", (PyCFunction)Win_InitFloatingWindows, 1,
+ "() -> None"},
{"InvalRect", (PyCFunction)Win_InvalRect, 1,
"(Rect badRect) -> None"},
{"InvalRgn", (PyCFunction)Win_InvalRgn, 1,
@@ -1587,7 +2437,7 @@ static PyMethodDef Win_methods[] = {
{"ValidRgn", (PyCFunction)Win_ValidRgn, 1,
"(RgnHandle goodRgn) -> None"},
{"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
- "(Boolean inCollapseEm) -> None"},
+ "(Boolean collapse) -> None"},
{"PinRect", (PyCFunction)Win_PinRect, 1,
"(Rect theRect, Point thePt) -> (long _rv)"},
{"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py
index f15fb16..d9ca18b 100644
--- a/Mac/Modules/win/winscan.py
+++ b/Mac/Modules/win/winscan.py
@@ -37,12 +37,18 @@ class MyScanner(Scanner):
return [
'DisposeWindow', # Implied when the object is deleted
'CloseWindow',
+ 'SetWindowProperty', # For the moment
+ 'GetWindowProperty',
+ 'GetWindowPropertySize',
+ 'RemoveWindowProperty',
]
def makeblacklisttypes(self):
return [
'ProcPtr',
'DragGrayRgnUPP',
+ 'Collection', # For now, to be done later
+ 'DragReference', # Ditto, dragmodule doesn't export it yet.
]
def makerepairinstructions(self):
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
index 6150819..a6104d8 100644
--- a/Mac/Modules/win/winsupport.py
+++ b/Mac/Modules/win/winsupport.py
@@ -34,12 +34,26 @@ PicHandle = OpaqueByValueType("PicHandle", "ResObj")
WCTabHandle = OpaqueByValueType("WCTabHandle", "ResObj")
AuxWinHandle = OpaqueByValueType("AuxWinHandle", "ResObj")
PixPatHandle = OpaqueByValueType("PixPatHandle", "ResObj")
+AliasHandle = OpaqueByValueType("AliasHandle", "ResObj")
+IconRef = OpaqueByValueType("IconRef", "ResObj")
WindowRegionCode = Type("WindowRegionCode", "h")
+WindowClass = Type("WindowClass", "l")
+WindowAttributes = Type("WindowAttributes", "l")
+WindowPositionMethod = Type("WindowPositionMethod", "l")
+WindowTransitionEffect = Type("WindowTransitionEffect", "l")
+WindowTransitionAction = Type("WindowTransitionAction", "l")
+WindowRegionCode = Type("WindowRegionCode", "h")
+RGBColor = OpaqueType("RGBColor", "QdRGB")
+PropertyCreator = OSTypeType("PropertyCreator")
+PropertyTag = OSTypeType("PropertyTag")
includestuff = includestuff + """
#include <%s>""" % MACHEADERFILE + """
+extern PyObject *QdRGB_New(RGBColor *);
+extern int QdRGB_Convert(PyObject *, RGBColor *);
+
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
"""