]> granicus.if.org Git - python/commitdiff
Updated for Universal Headers 3.4.
authorJust van Rossum <just@letterror.com>
Wed, 12 Dec 2001 22:40:27 +0000 (22:40 +0000)
committerJust van Rossum <just@letterror.com>
Wed, 12 Dec 2001 22:40:27 +0000 (22:40 +0000)
Mac/Lib/Carbon/Controls.py
Mac/Modules/ctl/_Ctlmodule.c
Mac/Modules/ctl/ctlscan.py
Mac/Modules/ctl/ctlsupport.py

index 81a835c1eee1f745103d76fe618deaca7a9659cf..9cb74bad54c2f2e8bf2a8a140879bda9143242cf 100644 (file)
@@ -4,6 +4,11 @@ def FOUR_CHAR_CODE(x): return x
 from TextEdit import *
 from QuickDraw import *
 from Dragconst import *
+from CarbonEvents import *
+from Appearance import *
+kDataBrowserItemAnyState = -1
+kControlBevelButtonCenterPopupGlyphTag = -1
+kDataBrowserClientPropertyFlagsMask = 0xFF << 24  # kDataBrowserClientPropertyFlagsOffset
 
 kControlDefProcType = FOUR_CHAR_CODE('CDEF')
 kControlTemplateResourceType = FOUR_CHAR_CODE('CNTL')
@@ -12,20 +17,20 @@ kControlDefProcResourceType = FOUR_CHAR_CODE('CDEF')
 controlNotifyNothing = FOUR_CHAR_CODE('nada')
 controlNotifyClick = FOUR_CHAR_CODE('clik')
 controlNotifyFocus = FOUR_CHAR_CODE('focu')
-controlNotifyKey = FOUR_CHAR_CODE('key ')        
-kControlCanAutoInvalidate = 1L << 0                       
+controlNotifyKey = FOUR_CHAR_CODE('key ') 
+kControlCanAutoInvalidate = 1L << 0 
 staticTextProc = 256
 editTextProc = 272
 iconProc = 288
 userItemProc = 304
-pictItemProc = 320                           
+pictItemProc = 320   
 cFrameColor = 0
 cBodyColor = 1
 cTextColor = 2
 cThumbColor = 3
 kNumberCtlCTabEntries = 4
 kControlNoVariant = 0
-kControlUsesOwningWindowsFontVariant = 1 << 3               
+kControlUsesOwningWindowsFontVariant = 1 << 3 
 kControlNoPart = 0
 kControlIndicatorPart = 129
 kControlDisabledPart = 254
@@ -35,7 +40,7 @@ kControlStructureMetaPart = -1
 kControlContentMetaPart = -2
 kControlFocusNoPart = 0
 kControlFocusNextPart = -1
-kControlFocusPrevPart = -2                            
+kControlFocusPrevPart = -2    
 kControlCollectionTagBounds = FOUR_CHAR_CODE('boun')
 kControlCollectionTagValue = FOUR_CHAR_CODE('valu')
 kControlCollectionTagMinimum = FOUR_CHAR_CODE('min ')
@@ -44,10 +49,12 @@ kControlCollectionTagViewSize = FOUR_CHAR_CODE('view')
 kControlCollectionTagVisibility = FOUR_CHAR_CODE('visi')
 kControlCollectionTagRefCon = FOUR_CHAR_CODE('refc')
 kControlCollectionTagTitle = FOUR_CHAR_CODE('titl')
+kControlCollectionTagUnicodeTitle = FOUR_CHAR_CODE('uttl')
 kControlCollectionTagIDSignature = FOUR_CHAR_CODE('idsi')
 kControlCollectionTagIDID = FOUR_CHAR_CODE('idid')
-kControlCollectionTagCommand = FOUR_CHAR_CODE('cmd ')       
-kControlCollectionTagSubControls = FOUR_CHAR_CODE('subc')   
+kControlCollectionTagCommand = FOUR_CHAR_CODE('cmd ')
+kControlCollectionTagVarCode = FOUR_CHAR_CODE('varc') 
+kControlCollectionTagSubControls = FOUR_CHAR_CODE('subc') 
 kControlContentTextOnly = 0
 kControlNoContent = 0
 kControlContentIconSuiteRes = 1
@@ -65,7 +72,7 @@ kControlKeyScriptBehaviorRequiresRoman = FOUR_CHAR_CODE('rrmn')
 kControlFontBigSystemFont = -1
 kControlFontSmallSystemFont = -2
 kControlFontSmallBoldSystemFont = -3
-kControlFontViewSystemFont = -4                            
+kControlFontViewSystemFont = -4    
 kControlUseFontMask = 0x0001
 kControlUseFaceMask = 0x0002
 kControlUseSizeMask = 0x0004
@@ -75,13 +82,16 @@ kControlUseModeMask = 0x0020
 kControlUseJustMask = 0x0040
 kControlUseAllMask = 0x00FF
 kControlAddFontSizeMask = 0x0100
-kControlAddToMetaFontMask = 0x0200                        
+kControlAddToMetaFontMask = 0x0200 
+kControlUseThemeFontIDMask = 0x0080 
 kDoNotActivateAndIgnoreClick = 0
 kDoNotActivateAndHandleClick = 1
 kActivateAndIgnoreClick = 2
-kActivateAndHandleClick = 3                             
+kActivateAndHandleClick = 3     
 kControlFontStyleTag = FOUR_CHAR_CODE('font')
 kControlKeyFilterTag = FOUR_CHAR_CODE('fltr')
+kControlKindTag = FOUR_CHAR_CODE('kind')
+kControlSizeTag = FOUR_CHAR_CODE('size')
 kControlSupportsGhosting = 1 << 0
 kControlSupportsEmbedding = 1 << 1
 kControlSupportsFocus = 1 << 2
@@ -100,7 +110,8 @@ kControlSupportsGetRegion = 1 << 17
 kControlSupportsFlattening = 1 << 19
 kControlSupportsSetCursor = 1 << 20
 kControlSupportsContextualMenus = 1 << 21
-kControlSupportsClickActivation = 1 << 22                   
+kControlSupportsClickActivation = 1 << 22
+kControlIdlesWithTimer = 1 << 23 
 drawCntl = 0
 testCntl = 1
 calcCRgns = 2
@@ -139,7 +150,11 @@ kControlMsgDragWithin = 40
 kControlMsgDragReceive = 41
 kControlMsgDisplayDebugInfo = 46
 kControlMsgContextualMenuClick = 47
-kControlMsgGetClickActivation = 48                          
+kControlMsgGetClickActivation = 48    
+kControlSizeNormal = 0
+kControlSizeSmall = 1
+kControlSizeLarge = 2
+kControlSizeAuto = 0xFFFF
 kDrawControlEntireControl = 0
 kDrawControlIndicatorOnly = 129
 kDragControlEntireControl = 0
@@ -150,11 +165,13 @@ kControlKeyFilterPassKey = 1
 noConstraint = kNoConstraint
 hAxisOnly = 1
 vAxisOnly = 2
-kControlDefProcPtr = 0                             
-kControlPropertyPersistent = 0x00000001                    
-kDragTrackingEnterControl = kDragTrackingEnterWindow
-kDragTrackingInControl = kDragTrackingInWindow
-kDragTrackingLeaveControl = kDragTrackingLeaveWindow
+kControlDefProcPtr = 0
+kControlDefObjectClass = 1     
+kControlKindSignatureApple = FOUR_CHAR_CODE('appl')
+kControlPropertyPersistent = 0x00000001 
+kDragTrackingEnterControl = 2
+kDragTrackingInControl = 3
+kDragTrackingLeaveControl = 4
 useWFont = kControlUsesOwningWindowsFontVariant
 inThumb = kControlIndicatorPart
 kNoHiliteControlPart = kControlNoPart
@@ -162,7 +179,7 @@ kInIndicatorControlPart = kControlIndicatorPart
 kReservedControlPart = kControlDisabledPart
 kControlInactiveControlPart = kControlInactivePart
 kControlTabListResType = FOUR_CHAR_CODE('tab#')
-kControlListDescResType = FOUR_CHAR_CODE('ldes')        
+kControlListDescResType = FOUR_CHAR_CODE('ldes') 
 kControlCheckBoxUncheckedValue = 0
 kControlCheckBoxCheckedValue = 1
 kControlCheckBoxMixedValue = 2
@@ -212,7 +229,7 @@ kControlClockMinuteMonthPart = 10
 kControlClockSecondYearPart = 11
 kControlClockAMPMPart = 12
 kControlDataBrowserPart = 24
-kControlDataBrowserDraggedPart = 25                         
+kControlDataBrowserDraggedPart = 25   
 kControlBevelButtonSmallBevelProc = 32
 kControlBevelButtonNormalBevelProc = 33
 kControlBevelButtonLargeBevelProc = 34
@@ -229,9 +246,10 @@ kControlBehaviorSticky = 0x0200
 kControlBehaviorSingleValueMenu = 0
 kControlBehaviorMultiValueMenu = 0x4000
 kControlBehaviorOffsetContents = 0x8000
-kControlBehaviorCommandMenu = 0x2000                        
+kControlBehaviorCommandMenu = 0x2000 
 kControlBevelButtonMenuOnBottom = 0
 kControlBevelButtonMenuOnRight = (1 << 2)
+kControlKindBevelButton = FOUR_CHAR_CODE('bevl')
 kControlBevelButtonAlignSysDirection = -1
 kControlBevelButtonAlignCenter = 0
 kControlBevelButtonAlignLeft = 1
@@ -261,24 +279,42 @@ kControlBevelButtonGraphicOffsetTag = FOUR_CHAR_CODE('goff')
 kControlBevelButtonTextPlaceTag = FOUR_CHAR_CODE('tplc')
 kControlBevelButtonMenuValueTag = FOUR_CHAR_CODE('mval')
 kControlBevelButtonMenuHandleTag = FOUR_CHAR_CODE('mhnd')
-# kControlBevelButtonCenterPopupGlyphTag = FOUR_CHAR_CODE('pglc') 
+kControlBevelButtonMenuRefTag = FOUR_CHAR_CODE('mhnd')
+kControlBevelButtonOwnedMenuRefTag = FOUR_CHAR_CODE('omrf')
+# kControlBevelButtonCenterPopupGlyphTag = FOUR_CHAR_CODE('pglc')
+kControlBevelButtonKindTag = FOUR_CHAR_CODE('bebk') 
 kControlBevelButtonLastMenuTag = FOUR_CHAR_CODE('lmnu')
-kControlBevelButtonMenuDelayTag = FOUR_CHAR_CODE('mdly')    
-kControlBevelButtonScaleIconTag = FOUR_CHAR_CODE('scal')    
+kControlBevelButtonMenuDelayTag = FOUR_CHAR_CODE('mdly') 
+kControlBevelButtonScaleIconTag = FOUR_CHAR_CODE('scal') 
 kControlSliderProc = 48
 kControlSliderLiveFeedback = (1 << 0)
 kControlSliderHasTickMarks = (1 << 1)
 kControlSliderReverseDirection = (1 << 2)
 kControlSliderNonDirectional = (1 << 3)
+kControlSliderPointsDownOrRight = 0
+kControlSliderPointsUpOrLeft = 1
+kControlSliderDoesNotPoint = 2
+kControlKindSlider = FOUR_CHAR_CODE('sldr')
 kControlTriangleProc = 64
 kControlTriangleLeftFacingProc = 65
 kControlTriangleAutoToggleProc = 66
 kControlTriangleLeftFacingAutoToggleProc = 67
-kControlTriangleLastValueTag = FOUR_CHAR_CODE('last')       
+kControlDisclosureTrianglePointDefault = 0
+kControlDisclosureTrianglePointRight = 1
+kControlDisclosureTrianglePointLeft = 2
+kControlKindDisclosureTriangle = FOUR_CHAR_CODE('dist')
+kControlTriangleLastValueTag = FOUR_CHAR_CODE('last') 
 kControlProgressBarProc = 80
-# kControlProgressBarIndeterminateTag = FOUR_CHAR_CODE('inde') 
+kControlRelevanceBarProc = 81
+kControlKindProgressBar = FOUR_CHAR_CODE('prgb')
+kControlKindRelevanceBar = FOUR_CHAR_CODE('relb')
+kControlProgressBarIndeterminateTag = FOUR_CHAR_CODE('inde')
+kControlProgressBarAnimatingTag = FOUR_CHAR_CODE('anim') 
 kControlLittleArrowsProc = 96
+kControlKindLittleArrows = FOUR_CHAR_CODE('larr')
 kControlChasingArrowsProc = 112
+kControlKindChasingArrows = FOUR_CHAR_CODE('carr')
+kControlChasingArrowsAnimatingTag = FOUR_CHAR_CODE('anim') 
 kControlTabLargeProc = 128
 kControlTabSmallProc = 129
 kControlTabLargeNorthProc = 128
@@ -288,25 +324,41 @@ kControlTabSmallSouthProc = 131
 kControlTabLargeEastProc = 132
 kControlTabSmallEastProc = 133
 kControlTabLargeWestProc = 134
-kControlTabSmallWestProc = 135                           
+kControlTabSmallWestProc = 135   
+kControlTabDirectionNorth = 0
+kControlTabDirectionSouth = 1
+kControlTabDirectionEast = 2
+kControlTabDirectionWest = 3
+kControlTabSizeLarge = kControlSizeNormal
+kControlTabSizeSmall = kControlSizeSmall
+kControlKindTabs = FOUR_CHAR_CODE('tabs')
 kControlTabContentRectTag = FOUR_CHAR_CODE('rect')
 kControlTabEnabledFlagTag = FOUR_CHAR_CODE('enab')
-kControlTabFontStyleTag = kControlFontStyleTag          
-kControlTabInfoTag = FOUR_CHAR_CODE('tabi')        
+kControlTabFontStyleTag = kControlFontStyleTag 
+kControlTabInfoTag = FOUR_CHAR_CODE('tabi') 
+kControlTabImageContentTag = FOUR_CHAR_CODE('cont') 
 kControlTabInfoVersionZero = 0
+kControlTabInfoVersionOne = 1     
 kControlSeparatorLineProc = 144
+kControlKindSeparator = FOUR_CHAR_CODE('sepa')
 kControlGroupBoxTextTitleProc = 160
 kControlGroupBoxCheckBoxProc = 161
 kControlGroupBoxPopupButtonProc = 162
 kControlGroupBoxSecondaryTextTitleProc = 164
 kControlGroupBoxSecondaryCheckBoxProc = 165
 kControlGroupBoxSecondaryPopupButtonProc = 166
+kControlKindGroupBox = FOUR_CHAR_CODE('grpb')
+kControlKindCheckGroupBox = FOUR_CHAR_CODE('cgrp')
+kControlKindPopupGroupBox = FOUR_CHAR_CODE('pgrp')
 kControlGroupBoxMenuHandleTag = FOUR_CHAR_CODE('mhan')
-kControlGroupBoxFontStyleTag = kControlFontStyleTag         
-kControlGroupBoxTitleRectTag = FOUR_CHAR_CODE('trec')       
+kControlGroupBoxMenuRefTag = FOUR_CHAR_CODE('mhan')
+kControlGroupBoxFontStyleTag = kControlFontStyleTag 
+kControlGroupBoxTitleRectTag = FOUR_CHAR_CODE('trec') 
 kControlImageWellProc = 176
+kControlKindImageWell = FOUR_CHAR_CODE('well')
 kControlImageWellContentTag = FOUR_CHAR_CODE('cont')
-kControlImageWellTransformTag = FOUR_CHAR_CODE('tran')      
+kControlImageWellTransformTag = FOUR_CHAR_CODE('tran')
+kControlImageWellIsDragDestinationTag = FOUR_CHAR_CODE('drag') 
 kControlPopupArrowEastProc = 192
 kControlPopupArrowWestProc = 193
 kControlPopupArrowNorthProc = 194
@@ -319,24 +371,31 @@ kControlPopupArrowOrientationEast = 0
 kControlPopupArrowOrientationWest = 1
 kControlPopupArrowOrientationNorth = 2
 kControlPopupArrowOrientationSouth = 3
+kControlPopupArrowSizeNormal = 0
+kControlPopupArrowSizeSmall = 1
+kControlKindPopupArrow = FOUR_CHAR_CODE('parr')
 kControlPlacardProc = 224
+kControlKindPlacard = FOUR_CHAR_CODE('plac')
 kControlClockTimeProc = 240
 kControlClockTimeSecondsProc = 241
 kControlClockDateProc = 242
 kControlClockMonthYearProc = 243
 kControlClockTypeHourMinute = 0
 kControlClockTypeHourMinuteSecond = 1
-kControlClockTypeMonthDay = 2
-kControlClockTypeMonthDayYear = 3
+kControlClockTypeMonthDayYear = 2
+kControlClockTypeMonthYear = 3
 kControlClockFlagStandard = 0
 kControlClockNoFlags = 0
 kControlClockFlagDisplayOnly = 1
 kControlClockIsDisplayOnly = 1
 kControlClockFlagLive = 2
 kControlClockIsLive = 2
+kControlKindClock = FOUR_CHAR_CODE('clck')
 kControlClockLongDateTag = FOUR_CHAR_CODE('date')
-kControlClockFontStyleTag = kControlFontStyleTag          
+kControlClockFontStyleTag = kControlFontStyleTag
+kControlClockAnimatingTag = FOUR_CHAR_CODE('anim') 
 kControlUserPaneProc = 256
+kControlKindUserPane = FOUR_CHAR_CODE('upan')
 kControlUserItemDrawProcTag = FOUR_CHAR_CODE('uidp')
 kControlUserPaneDrawProcTag = FOUR_CHAR_CODE('draw')
 kControlUserPaneHitTestProcTag = FOUR_CHAR_CODE('hitt')
@@ -345,75 +404,246 @@ kControlUserPaneIdleProcTag = FOUR_CHAR_CODE('idle')
 kControlUserPaneKeyDownProcTag = FOUR_CHAR_CODE('keyd')
 kControlUserPaneActivateProcTag = FOUR_CHAR_CODE('acti')
 kControlUserPaneFocusProcTag = FOUR_CHAR_CODE('foci')
-kControlUserPaneBackgroundProcTag = FOUR_CHAR_CODE('back')  
+kControlUserPaneBackgroundProcTag = FOUR_CHAR_CODE('back') 
 kControlEditTextProc = 272
 kControlEditTextPasswordProc = 274
-kControlEditTextInlineInputProc = 276                       
+kControlEditTextInlineInputProc = 276 
+kControlKindEditText = FOUR_CHAR_CODE('etxt')
 kControlEditTextStyleTag = kControlFontStyleTag
 kControlEditTextTextTag = FOUR_CHAR_CODE('text')
 kControlEditTextTEHandleTag = FOUR_CHAR_CODE('than')
 kControlEditTextKeyFilterTag = kControlKeyFilterTag
 kControlEditTextSelectionTag = FOUR_CHAR_CODE('sele')
-kControlEditTextPasswordTag = FOUR_CHAR_CODE('pass')        
+kControlEditTextPasswordTag = FOUR_CHAR_CODE('pass') 
 kControlEditTextKeyScriptBehaviorTag = FOUR_CHAR_CODE('kscr')
 kControlEditTextLockedTag = FOUR_CHAR_CODE('lock')
 kControlEditTextFixedTextTag = FOUR_CHAR_CODE('ftxt')
 kControlEditTextValidationProcTag = FOUR_CHAR_CODE('vali')
 kControlEditTextInlinePreUpdateProcTag = FOUR_CHAR_CODE('prup')
 kControlEditTextInlinePostUpdateProcTag = FOUR_CHAR_CODE('poup') 
+kControlEditTextCFStringTag = FOUR_CHAR_CODE('cfst') 
 kControlStaticTextProc = 288
+kControlKindStaticText = FOUR_CHAR_CODE('stxt')
 kControlStaticTextStyleTag = kControlFontStyleTag
 kControlStaticTextTextTag = FOUR_CHAR_CODE('text')
-kControlStaticTextTextHeightTag = FOUR_CHAR_CODE('thei')    
-kControlStaticTextTruncTag = FOUR_CHAR_CODE('trun')        
+kControlStaticTextTextHeightTag = FOUR_CHAR_CODE('thei') 
+kControlStaticTextTruncTag = FOUR_CHAR_CODE('trun') 
+kControlStaticTextCFStringTag = FOUR_CHAR_CODE('cfst') 
 kControlPictureProc = 304
-kControlPictureNoTrackProc = 305                           
-kControlPictureHandleTag = FOUR_CHAR_CODE('pich')        
+kControlPictureNoTrackProc = 305   
+kControlKindPicture = FOUR_CHAR_CODE('pict')
+kControlPictureHandleTag = FOUR_CHAR_CODE('pich') 
 kControlIconProc = 320
 kControlIconNoTrackProc = 321
 kControlIconSuiteProc = 322
-kControlIconSuiteNoTrackProc = 323                          
+kControlIconSuiteNoTrackProc = 323   
 kControlIconRefProc = 324
-kControlIconRefNoTrackProc = 325                           
+kControlIconRefNoTrackProc = 325   
+kControlKindIcon = FOUR_CHAR_CODE('icon')
 kControlIconTransformTag = FOUR_CHAR_CODE('trfm')
-kControlIconAlignmentTag = FOUR_CHAR_CODE('algn')        
+kControlIconAlignmentTag = FOUR_CHAR_CODE('algn') 
 kControlIconResourceIDTag = FOUR_CHAR_CODE('ires')
-kControlIconContentTag = FOUR_CHAR_CODE('cont')        
+kControlIconContentTag = FOUR_CHAR_CODE('cont') 
 kControlWindowHeaderProc = 336
-kControlWindowListViewHeaderProc = 337                      
+kControlWindowListViewHeaderProc = 337 
+kControlKindWindowHeader = FOUR_CHAR_CODE('whed')
 kControlListBoxProc = 352
 kControlListBoxAutoSizeProc = 353
+kControlKindListBox = FOUR_CHAR_CODE('lbox')
 kControlListBoxListHandleTag = FOUR_CHAR_CODE('lhan')
 kControlListBoxKeyFilterTag = kControlKeyFilterTag
-kControlListBoxFontStyleTag = kControlFontStyleTag          
+kControlListBoxFontStyleTag = kControlFontStyleTag 
 kControlListBoxDoubleClickTag = FOUR_CHAR_CODE('dblc')
-kControlListBoxLDEFTag = FOUR_CHAR_CODE('ldef')        
+kControlListBoxLDEFTag = FOUR_CHAR_CODE('ldef') 
 kControlPushButtonProc = 368
 kControlCheckBoxProc = 369
 kControlRadioButtonProc = 370
 kControlPushButLeftIconProc = 374
-kControlPushButRightIconProc = 375                          
+kControlPushButRightIconProc = 375   
 kControlCheckBoxAutoToggleProc = 371
 kControlRadioButtonAutoToggleProc = 372
+kControlPushButtonIconOnLeft = 6
+kControlPushButtonIconOnRight = 7
+kControlKindPushButton = FOUR_CHAR_CODE('push')
+kControlKindPushIconButton = FOUR_CHAR_CODE('picn')
+kControlKindRadioButton = FOUR_CHAR_CODE('rdio')
+kControlKindCheckBox = FOUR_CHAR_CODE('cbox')
 kControlPushButtonDefaultTag = FOUR_CHAR_CODE('dflt')
-kControlPushButtonCancelTag = FOUR_CHAR_CODE('cncl')        
+kControlPushButtonCancelTag = FOUR_CHAR_CODE('cncl') 
 kControlScrollBarProc = 384
-kControlScrollBarLiveProc = 386                           
+kControlScrollBarLiveProc = 386   
+kControlKindScrollBar = FOUR_CHAR_CODE('sbar')
+kControlScrollBarShowsArrowsTag = FOUR_CHAR_CODE('arro') 
 kControlPopupButtonProc = 400
 kControlPopupFixedWidthVariant = 1 << 0
 kControlPopupVariableWidthVariant = 1 << 1
 kControlPopupUseAddResMenuVariant = 1 << 2
 kControlPopupUseWFontVariant = kControlUsesOwningWindowsFontVariant
+kControlKindPopupButton = FOUR_CHAR_CODE('popb')
 kControlPopupButtonMenuHandleTag = FOUR_CHAR_CODE('mhan')
-kControlPopupButtonMenuIDTag = FOUR_CHAR_CODE('mnid')       
-kControlPopupButtonExtraHeightTag = FOUR_CHAR_CODE('exht')  
+kControlPopupButtonMenuRefTag = FOUR_CHAR_CODE('mhan')
+kControlPopupButtonMenuIDTag = FOUR_CHAR_CODE('mnid') 
+kControlPopupButtonExtraHeightTag = FOUR_CHAR_CODE('exht')
+kControlPopupButtonOwnedMenuRefTag = FOUR_CHAR_CODE('omrf')
+kControlPopupButtonCheckCurrentTag = FOUR_CHAR_CODE('chck') 
 kControlRadioGroupProc = 416
+kControlKindRadioGroup = FOUR_CHAR_CODE('rgrp')
 kControlScrollTextBoxProc = 432
 kControlScrollTextBoxAutoScrollProc = 433
+kControlKindScrollingTextBox = FOUR_CHAR_CODE('stbx')
 kControlScrollTextBoxDelayBeforeAutoScrollTag = FOUR_CHAR_CODE('stdl')
 kControlScrollTextBoxDelayBetweenAutoScrollTag = FOUR_CHAR_CODE('scdl')
 kControlScrollTextBoxAutoScrollAmountTag = FOUR_CHAR_CODE('samt')
-kControlScrollTextBoxContentsTag = FOUR_CHAR_CODE('tres')   
+kControlScrollTextBoxContentsTag = FOUR_CHAR_CODE('tres')
+kControlScrollTextBoxAnimatingTag = FOUR_CHAR_CODE('anim') 
+kControlKindDisclosureButton = FOUR_CHAR_CODE('disb')
+kControlDisclosureButtonClosed = 0
+kControlDisclosureButtonDisclosed = 1
+kControlRoundButtonNormalSize = kControlSizeNormal
+kControlRoundButtonLargeSize = kControlSizeLarge
+kControlRoundButtonContentTag = FOUR_CHAR_CODE('cont')
+kControlRoundButtonSizeTag = FOUR_CHAR_CODE('size') 
+kControlKindRoundButton = FOUR_CHAR_CODE('rndb')
+kControlKindDataBrowser = FOUR_CHAR_CODE('datb')
+errDataBrowserNotConfigured = -4970
+errDataBrowserItemNotFound = -4971
+errDataBrowserItemNotAdded = -4975
+errDataBrowserPropertyNotFound = -4972
+errDataBrowserInvalidPropertyPart = -4973
+errDataBrowserInvalidPropertyData = -4974
+errDataBrowserPropertyNotSupported = -4979 
+kControlDataBrowserIncludesFrameAndFocusTag = FOUR_CHAR_CODE('brdr')
+kControlDataBrowserKeyFilterTag = kControlEditTextKeyFilterTag
+kControlDataBrowserEditTextKeyFilterTag = kControlDataBrowserKeyFilterTag
+kControlDataBrowserEditTextValidationProcTag = kControlEditTextValidationProcTag
+kDataBrowserNoView = 0x3F3F3F3F
+kDataBrowserListView = FOUR_CHAR_CODE('lstv')
+kDataBrowserColumnView = FOUR_CHAR_CODE('clmv')
+kDataBrowserDragSelect = 1 << 0
+kDataBrowserSelectOnlyOne = 1 << 1
+kDataBrowserResetSelection = 1 << 2
+kDataBrowserCmdTogglesSelection = 1 << 3
+kDataBrowserNoDisjointSelection = 1 << 4
+kDataBrowserAlwaysExtendSelection = 1 << 5
+kDataBrowserNeverEmptySelectionSet = 1 << 6 
+kDataBrowserOrderUndefined = 0
+kDataBrowserOrderIncreasing = 1
+kDataBrowserOrderDecreasing = 2
+kDataBrowserNoItem = 0L    
+kDataBrowserItemNoState = 0
+# kDataBrowserItemAnyState = (unsigned long)(-1)
+kDataBrowserItemIsSelected = 1 << 0
+kDataBrowserContainerIsOpen = 1 << 1
+kDataBrowserItemIsDragTarget = 1 << 2 
+kDataBrowserRevealOnly = 0
+kDataBrowserRevealAndCenterInView = 1 << 0
+kDataBrowserRevealWithoutSelecting = 1 << 1
+kDataBrowserItemsAdd = 0
+kDataBrowserItemsAssign = 1
+kDataBrowserItemsToggle = 2
+kDataBrowserItemsRemove = 3     
+kDataBrowserSelectionAnchorUp = 0
+kDataBrowserSelectionAnchorDown = 1
+kDataBrowserSelectionAnchorLeft = 2
+kDataBrowserSelectionAnchorRight = 3
+kDataBrowserEditMsgUndo = kHICommandUndo
+kDataBrowserEditMsgRedo = kHICommandRedo
+kDataBrowserEditMsgCut = kHICommandCut
+kDataBrowserEditMsgCopy = kHICommandCopy
+kDataBrowserEditMsgPaste = kHICommandPaste
+kDataBrowserEditMsgClear = kHICommandClear
+kDataBrowserEditMsgSelectAll = kHICommandSelectAll
+kDataBrowserItemAdded = 1
+kDataBrowserItemRemoved = 2
+kDataBrowserEditStarted = 3
+kDataBrowserEditStopped = 4
+kDataBrowserItemSelected = 5
+kDataBrowserItemDeselected = 6
+kDataBrowserItemDoubleClicked = 7
+kDataBrowserContainerOpened = 8
+kDataBrowserContainerClosing = 9
+kDataBrowserContainerClosed = 10
+kDataBrowserContainerSorting = 11
+kDataBrowserContainerSorted = 12
+kDataBrowserUserToggledContainer = 16
+kDataBrowserTargetChanged = 15
+kDataBrowserUserStateChanged = 13
+kDataBrowserSelectionSetChanged = 14  
+kDataBrowserItemNoProperty = 0L
+kDataBrowserItemIsActiveProperty = 1L
+kDataBrowserItemIsSelectableProperty = 2L
+kDataBrowserItemIsEditableProperty = 3L
+kDataBrowserItemIsContainerProperty = 4L
+kDataBrowserContainerIsOpenableProperty = 5L
+kDataBrowserContainerIsClosableProperty = 6L
+kDataBrowserContainerIsSortableProperty = 7L
+kDataBrowserItemSelfIdentityProperty = 8L
+kDataBrowserContainerAliasIDProperty = 9L
+kDataBrowserColumnViewPreviewProperty = 10L
+kDataBrowserItemParentContainerProperty = 11L 
+kDataBrowserCustomType = 0x3F3F3F3F
+kDataBrowserIconType = FOUR_CHAR_CODE('icnr')
+kDataBrowserTextType = FOUR_CHAR_CODE('text')
+kDataBrowserDateTimeType = FOUR_CHAR_CODE('date')
+kDataBrowserSliderType = FOUR_CHAR_CODE('sldr')
+kDataBrowserCheckboxType = FOUR_CHAR_CODE('chbx')
+kDataBrowserProgressBarType = FOUR_CHAR_CODE('prog')
+kDataBrowserRelevanceRankType = FOUR_CHAR_CODE('rank')
+kDataBrowserPopupMenuType = FOUR_CHAR_CODE('menu')
+kDataBrowserIconAndTextType = FOUR_CHAR_CODE('ticn') 
+kDataBrowserPropertyEnclosingPart = 0L
+kDataBrowserPropertyContentPart = FOUR_CHAR_CODE('----')
+kDataBrowserPropertyDisclosurePart = FOUR_CHAR_CODE('disc')
+kDataBrowserPropertyTextPart = kDataBrowserTextType
+kDataBrowserPropertyIconPart = kDataBrowserIconType
+kDataBrowserPropertySliderPart = kDataBrowserSliderType
+kDataBrowserPropertyCheckboxPart = kDataBrowserCheckboxType
+kDataBrowserPropertyProgressBarPart = kDataBrowserProgressBarType
+kDataBrowserPropertyRelevanceRankPart = kDataBrowserRelevanceRankType
+kDataBrowserUniversalPropertyFlagsMask = 0xFF
+kDataBrowserPropertyIsMutable = 1 << 0
+kDataBrowserDefaultPropertyFlags = 0 << 0
+kDataBrowserUniversalPropertyFlags = kDataBrowserUniversalPropertyFlagsMask
+kDataBrowserPropertyIsEditable = kDataBrowserPropertyIsMutable 
+kDataBrowserPropertyFlagsOffset = 8
+kDataBrowserPropertyFlagsMask = 0xFF << kDataBrowserPropertyFlagsOffset
+kDataBrowserCheckboxTriState = 1 << kDataBrowserPropertyFlagsOffset
+kDataBrowserDateTimeRelative = 1 << (kDataBrowserPropertyFlagsOffset)
+kDataBrowserDateTimeDateOnly = 1 << (kDataBrowserPropertyFlagsOffset + 1)
+kDataBrowserDateTimeTimeOnly = 1 << (kDataBrowserPropertyFlagsOffset + 2)
+kDataBrowserDateTimeSecondsToo = 1 << (kDataBrowserPropertyFlagsOffset + 3)
+kDataBrowserSliderPlainThumb = kThemeThumbPlain << kDataBrowserPropertyFlagsOffset
+kDataBrowserSliderUpwardThumb = kThemeThumbUpward << kDataBrowserPropertyFlagsOffset
+kDataBrowserSliderDownwardThumb = kThemeThumbDownward << kDataBrowserPropertyFlagsOffset
+kDataBrowserDoNotTruncateText = 3 << kDataBrowserPropertyFlagsOffset
+kDataBrowserTruncateTextAtEnd = 2 << kDataBrowserPropertyFlagsOffset
+kDataBrowserTruncateTextMiddle = 0 << kDataBrowserPropertyFlagsOffset
+kDataBrowserTruncateTextAtStart = 1 << kDataBrowserPropertyFlagsOffset
+kDataBrowserPropertyModificationFlags = kDataBrowserPropertyFlagsMask
+kDataBrowserRelativeDateTime = kDataBrowserDateTimeRelative 
+kDataBrowserViewSpecificFlagsOffset = 16
+kDataBrowserViewSpecificFlagsMask = 0xFF << kDataBrowserViewSpecificFlagsOffset
+kDataBrowserViewSpecificPropertyFlags = kDataBrowserViewSpecificFlagsMask 
+kDataBrowserClientPropertyFlagsOffset = 24
+# kDataBrowserClientPropertyFlagsMask = (unsigned long)(0xFF << kDataBrowserClientPropertyFlagsOffset)
+kDataBrowserLatestCallbacks = 0
+kDataBrowserContentHit = 1
+kDataBrowserNothingHit = 0
+kDataBrowserStopTracking = -1
+kDataBrowserLatestCustomCallbacks = 0
+kDataBrowserTableViewMinimalHilite = 0
+kDataBrowserTableViewFillHilite = 1
+kDataBrowserTableViewSelectionColumn = 1 << kDataBrowserViewSpecificFlagsOffset
+kDataBrowserTableViewLastColumn = -1
+kDataBrowserListViewMovableColumn = 1 << (kDataBrowserViewSpecificFlagsOffset + 1)
+kDataBrowserListViewSortableColumn = 1 << (kDataBrowserViewSpecificFlagsOffset + 2)
+kDataBrowserListViewSelectionColumn = kDataBrowserTableViewSelectionColumn
+kDataBrowserListViewDefaultColumnFlags = kDataBrowserListViewMovableColumn + kDataBrowserListViewSortableColumn
+kDataBrowserListViewLatestHeaderDesc = 0
+kDataBrowserListViewAppendColumn = kDataBrowserTableViewLastColumn
+kControlEditUnicodeTextPostUpdateProcTag = FOUR_CHAR_CODE('upup')
+kControlEditUnicodeTextProc = 912
+kControlEditUnicodeTextPasswordProc = 914
 kControlCheckboxUncheckedValue = kControlCheckBoxUncheckedValue
 kControlCheckboxCheckedValue = kControlCheckBoxCheckedValue
 kControlCheckboxMixedValue = kControlCheckBoxMixedValue
index 1b60da83972f5ace8e1a5fddb25d43515ff471c3..c7dfefc7eb3f175e440eab7b43413144ea67597b 100644 (file)
@@ -475,7 +475,7 @@ static PyObject *CtlObj_GetControlClickActivation(ControlObject *_self, PyObject
 static PyObject *CtlObj_HandleControlKey(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       SInt16 _rv;
+       ControlPartCode _rv;
        SInt16 inKeyCode;
        SInt16 inCharCode;
        EventModifiers inModifiers;
@@ -596,6 +596,43 @@ static PyObject *CtlObj_GetControlTitle(ControlObject *_self, PyObject *_args)
        return _res;
 }
 
+static PyObject *CtlObj_SetControlTitleWithCFString(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       CFStringRef inString;
+#ifndef SetControlTitleWithCFString
+       PyMac_PRECHECK(SetControlTitleWithCFString);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             CFStringRefObj_Convert, &inString))
+               return NULL;
+       _err = SetControlTitleWithCFString(_self->ob_itself,
+                                          inString);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_CopyControlTitleAsCFString(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       CFStringRef outString;
+#ifndef CopyControlTitleAsCFString
+       PyMac_PRECHECK(CopyControlTitleAsCFString);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = CopyControlTitleAsCFString(_self->ob_itself,
+                                         &outString);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CFStringRefObj_New, outString);
+       return _res;
+}
+
 static PyObject *CtlObj_GetControlValue(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -878,6 +915,43 @@ static PyObject *CtlObj_GetControlID(ControlObject *_self, PyObject *_args)
 }
 #endif
 
+static PyObject *CtlObj_SetControlCommandID(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 inCommandID;
+#ifndef SetControlCommandID
+       PyMac_PRECHECK(SetControlCommandID);
+#endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &inCommandID))
+               return NULL;
+       _err = SetControlCommandID(_self->ob_itself,
+                                  inCommandID);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetControlCommandID(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 outCommandID;
+#ifndef GetControlCommandID
+       PyMac_PRECHECK(GetControlCommandID);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetControlCommandID(_self->ob_itself,
+                                  &outCommandID);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            outCommandID);
+       return _res;
+}
+
 static PyObject *CtlObj_RemoveControlProperty(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1675,1052 +1749,3239 @@ static PyObject *CtlObj_SetImageWellTransform(ControlObject *_self, PyObject *_a
        return _res;
 }
 
-static PyObject *CtlObj_as_Resource(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_GetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       Handle _rv;
-#ifndef as_Resource
-       PyMac_PRECHECK(as_Resource);
+       OSStatus _err;
+       OSType style;
+#ifndef GetDataBrowserViewStyle
+       PyMac_PRECHECK(GetDataBrowserViewStyle);
 #endif
        if (!PyArg_ParseTuple(_args, ""))
                return NULL;
-       _rv = as_Resource(_self->ob_itself);
+       _err = GetDataBrowserViewStyle(_self->ob_itself,
+                                      &style);
+       if (_err != noErr) return PyMac_Error(_err);
        _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
+                            PyMac_BuildOSType, style);
        return _res;
 }
 
-static PyObject *CtlObj_GetControlRect(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_SetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       Rect rect;
-#ifndef GetControlRect
-       PyMac_PRECHECK(GetControlRect);
+       OSStatus _err;
+       OSType style;
+#ifndef SetDataBrowserViewStyle
+       PyMac_PRECHECK(SetDataBrowserViewStyle);
 #endif
-       if (!PyArg_ParseTuple(_args, ""))
+       if (!PyArg_ParseTuple(_args, "O&",
+                             PyMac_GetOSType, &style))
                return NULL;
-       GetControlRect(_self->ob_itself,
-                      &rect);
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildRect, &rect);
+       _err = SetDataBrowserViewStyle(_self->ob_itself,
+                                      style);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
        return _res;
 }
 
-static PyObject *CtlObj_DisposeControl(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_EnableDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-
-               if (!PyArg_ParseTuple(_args, ""))
-                       return NULL;
-               if ( _self->ob_itself ) {
-                       SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
-                       DisposeControl(_self->ob_itself);
-                       _self->ob_itself = NULL;
-               }
-               Py_INCREF(Py_None);
-               _res = Py_None;
-               return _res;
-
+       Boolean _rv;
+       UInt32 command;
+#ifndef EnableDataBrowserEditCommand
+       PyMac_PRECHECK(EnableDataBrowserEditCommand);
+#endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &command))
+               return NULL;
+       _rv = EnableDataBrowserEditCommand(_self->ob_itself,
+                                          command);
+       _res = Py_BuildValue("b",
+                            _rv);
+       return _res;
 }
 
-static PyObject *CtlObj_TrackControl(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_ExecuteDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-
-       ControlPartCode _rv;
-       Point startPoint;
-       ControlActionUPP upp = 0;
-       PyObject *callback = 0;
-
-       if (!PyArg_ParseTuple(_args, "O&|O",
-                             PyMac_GetPoint, &startPoint, &callback))
+       OSStatus _err;
+       UInt32 command;
+#ifndef ExecuteDataBrowserEditCommand
+       PyMac_PRECHECK(ExecuteDataBrowserEditCommand);
+#endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &command))
                return NULL;
-       if (callback && callback != Py_None) {
-               if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
-                       upp = (ControlActionUPP)-1;
-               else {
-                       settrackfunc(callback);
-                       upp = mytracker_upp;
-               }
-       }
-       _rv = TrackControl(_self->ob_itself,
-                          startPoint,
-                          upp);
-       clrtrackfunc();
-       _res = Py_BuildValue("h",
-                            _rv);
+       _err = ExecuteDataBrowserEditCommand(_self->ob_itself,
+                                            command);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
        return _res;
-
 }
 
-static PyObject *CtlObj_HandleControlClick(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_GetDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-
-       ControlPartCode _rv;
-       Point startPoint;
-       SInt16 modifiers;
-       ControlActionUPP upp = 0;
-       PyObject *callback = 0;
-
-       if (!PyArg_ParseTuple(_args, "O&h|O",
-                             PyMac_GetPoint, &startPoint,
-                             &modifiers,
-                             &callback))
+       OSStatus _err;
+       UInt32 first;
+       UInt32 last;
+#ifndef GetDataBrowserSelectionAnchor
+       PyMac_PRECHECK(GetDataBrowserSelectionAnchor);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
                return NULL;
-       if (callback && callback != Py_None) {
-               if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
-                       upp = (ControlActionUPP)-1;
-               else {
-                       settrackfunc(callback);
-                       upp = mytracker_upp;
-               }
-       }
-       _rv = HandleControlClick(_self->ob_itself,
-                          startPoint,
-                          modifiers,
-                          upp);
-       clrtrackfunc();
-       _res = Py_BuildValue("h",
-                            _rv);
+       _err = GetDataBrowserSelectionAnchor(_self->ob_itself,
+                                            &first,
+                                            &last);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("ll",
+                            first,
+                            last);
        return _res;
-
 }
 
-static PyObject *CtlObj_SetControlData(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_MoveDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       Size bufferSize;
-       Ptr buffer;
-
-       if (!PyArg_ParseTuple(_args, "hO&s#",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName,
-                             &buffer, &bufferSize))
+       OSStatus _err;
+       UInt32 direction;
+       Boolean extendSelection;
+#ifndef MoveDataBrowserSelectionAnchor
+       PyMac_PRECHECK(MoveDataBrowserSelectionAnchor);
+#endif
+       if (!PyArg_ParseTuple(_args, "lb",
+                             &direction,
+                             &extendSelection))
                return NULL;
-
-       _err = SetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             bufferSize,
-                             buffer);
-
-       if (_err != noErr)
-               return PyMac_Error(_err);
+       _err = MoveDataBrowserSelectionAnchor(_self->ob_itself,
+                                             direction,
+                                             extendSelection);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
        _res = Py_None;
        return _res;
-
 }
 
-static PyObject *CtlObj_GetControlData(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_OpenDataBrowserContainer(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       Size bufferSize;
-       Ptr buffer;
-       Size outSize;
-
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName))
+       OSStatus _err;
+       UInt32 container;
+#ifndef OpenDataBrowserContainer
+       PyMac_PRECHECK(OpenDataBrowserContainer);
+#endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &container))
                return NULL;
-
-       /* allocate a buffer for the data */
-       _err = GetControlDataSize(_self->ob_itself,
-                                 inPart,
-                                 inTagName,
-                                 &bufferSize);
-       if (_err != noErr)
-               return PyMac_Error(_err);
-       buffer = PyMem_NEW(char, bufferSize);
-       if (buffer == NULL)
-               return PyErr_NoMemory();
-
-       _err = GetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             bufferSize,
-                             buffer,
-                             &outSize);
-
-       if (_err != noErr) {
-               PyMem_DEL(buffer);
-               return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("s#", buffer, outSize);
-       PyMem_DEL(buffer);
+       _err = OpenDataBrowserContainer(_self->ob_itself,
+                                       container);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
        return _res;
-
 }
 
-static PyObject *CtlObj_SetControlData_Handle(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_CloseDataBrowserContainer(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       Handle buffer;
-
-       if (!PyArg_ParseTuple(_args, "hO&O&",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName,
-                             OptResObj_Convert, &buffer))
+       OSStatus _err;
+       UInt32 container;
+#ifndef CloseDataBrowserContainer
+       PyMac_PRECHECK(CloseDataBrowserContainer);
+#endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &container))
                return NULL;
-
-       _err = SetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             sizeof(buffer),
-                             (Ptr)&buffer);
-
-       if (_err != noErr)
-               return PyMac_Error(_err);
+       _err = CloseDataBrowserContainer(_self->ob_itself,
+                                        container);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
        _res = Py_None;
        return _res;
-
 }
 
-static PyObject *CtlObj_GetControlData_Handle(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_SortDataBrowserContainer(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 container;
+       Boolean sortChildren;
+#ifndef SortDataBrowserContainer
+       PyMac_PRECHECK(SortDataBrowserContainer);
+#endif
+       if (!PyArg_ParseTuple(_args, "lb",
+                             &container,
+                             &sortChildren))
+               return NULL;
+       _err = SortDataBrowserContainer(_self->ob_itself,
+                                       container,
+                                       sortChildren);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       Size bufferSize;
-       Handle hdl;
-
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName))
+static PyObject *CtlObj_GetDataBrowserItems(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 container;
+       Boolean recurse;
+       UInt32 state;
+       Handle items;
+#ifndef GetDataBrowserItems
+       PyMac_PRECHECK(GetDataBrowserItems);
+#endif
+       if (!PyArg_ParseTuple(_args, "lblO&",
+                             &container,
+                             &recurse,
+                             &state,
+                             ResObj_Convert, &items))
                return NULL;
+       _err = GetDataBrowserItems(_self->ob_itself,
+                                  container,
+                                  recurse,
+                                  state,
+                                  items);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-       /* Check it is handle-sized */
-       _err = GetControlDataSize(_self->ob_itself,
-                                 inPart,
-                                 inTagName,
-                                 &bufferSize);
-       if (_err != noErr)
-               return PyMac_Error(_err);
-       if (bufferSize != sizeof(Handle)) {
-               PyErr_SetString(Ctl_Error, "GetControlDataSize() != sizeof(Handle)");
+static PyObject *CtlObj_GetDataBrowserItemCount(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 container;
+       Boolean recurse;
+       UInt32 state;
+       UInt32 numItems;
+#ifndef GetDataBrowserItemCount
+       PyMac_PRECHECK(GetDataBrowserItemCount);
+#endif
+       if (!PyArg_ParseTuple(_args, "lbl",
+                             &container,
+                             &recurse,
+                             &state))
                return NULL;
-       }
+       _err = GetDataBrowserItemCount(_self->ob_itself,
+                                      container,
+                                      recurse,
+                                      state,
+                                      &numItems);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            numItems);
+       return _res;
+}
 
-       _err = GetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             sizeof(Handle),
-                             (Ptr)&hdl,
-                             &bufferSize);
+static PyObject *CtlObj_IsDataBrowserItemSelected(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       Boolean _rv;
+       UInt32 item;
+#ifndef IsDataBrowserItemSelected
+       PyMac_PRECHECK(IsDataBrowserItemSelected);
+#endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &item))
+               return NULL;
+       _rv = IsDataBrowserItemSelected(_self->ob_itself,
+                                       item);
+       _res = Py_BuildValue("b",
+                            _rv);
+       return _res;
+}
 
-       if (_err != noErr) {
-               return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&", OptResObj_New, hdl);
+static PyObject *CtlObj_GetDataBrowserItemState(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 item;
+       UInt32 state;
+#ifndef GetDataBrowserItemState
+       PyMac_PRECHECK(GetDataBrowserItemState);
+#endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &item))
+               return NULL;
+       _err = GetDataBrowserItemState(_self->ob_itself,
+                                      item,
+                                      &state);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            state);
        return _res;
+}
 
+static PyObject *CtlObj_RevealDataBrowserItem(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 item;
+       UInt32 propertyID;
+       UInt8 options;
+#ifndef RevealDataBrowserItem
+       PyMac_PRECHECK(RevealDataBrowserItem);
+#endif
+       if (!PyArg_ParseTuple(_args, "llb",
+                             &item,
+                             &propertyID,
+                             &options))
+               return NULL;
+       _err = RevealDataBrowserItem(_self->ob_itself,
+                                    item,
+                                    propertyID,
+                                    options);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
 }
 
-static PyObject *CtlObj_SetControlData_Callback(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_SetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
+       OSStatus _err;
+       Boolean active;
+#ifndef SetDataBrowserActiveItems
+       PyMac_PRECHECK(SetDataBrowserActiveItems);
+#endif
+       if (!PyArg_ParseTuple(_args, "b",
+                             &active))
+               return NULL;
+       _err = SetDataBrowserActiveItems(_self->ob_itself,
+                                        active);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-       OSErr _err;
-       ControlPartCode inPart;
-       ResType inTagName;
-       PyObject *callback;
-       UniversalProcPtr c_callback;
+static PyObject *CtlObj_GetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       Boolean active;
+#ifndef GetDataBrowserActiveItems
+       PyMac_PRECHECK(GetDataBrowserActiveItems);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserActiveItems(_self->ob_itself,
+                                        &active);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("b",
+                            active);
+       return _res;
+}
 
-       if (!PyArg_ParseTuple(_args, "hO&O",
-                             &inPart,
-                             PyMac_GetOSType, &inTagName,
-                             &callback))
+static PyObject *CtlObj_SetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       Rect insetRect;
+#ifndef SetDataBrowserScrollBarInset
+       PyMac_PRECHECK(SetDataBrowserScrollBarInset);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
                return NULL;
+       _err = SetDataBrowserScrollBarInset(_self->ob_itself,
+                                           &insetRect);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            PyMac_BuildRect, &insetRect);
+       return _res;
+}
 
-       if ( setcallback((PyObject *)_self, inTagName, callback, &c_callback) < 0 )
+static PyObject *CtlObj_GetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       Rect insetRect;
+#ifndef GetDataBrowserScrollBarInset
+       PyMac_PRECHECK(GetDataBrowserScrollBarInset);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
                return NULL;
-       _err = SetControlData(_self->ob_itself,
-                             inPart,
-                             inTagName,
-                             sizeof(c_callback),
-                             (Ptr)&c_callback);
+       _err = GetDataBrowserScrollBarInset(_self->ob_itself,
+                                           &insetRect);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            PyMac_BuildRect, &insetRect);
+       return _res;
+}
 
-       if (_err != noErr)
-               return PyMac_Error(_err);
+static PyObject *CtlObj_SetDataBrowserTarget(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 target;
+#ifndef SetDataBrowserTarget
+       PyMac_PRECHECK(SetDataBrowserTarget);
+#endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &target))
+               return NULL;
+       _err = SetDataBrowserTarget(_self->ob_itself,
+                                   target);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
        _res = Py_None;
        return _res;
-
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *CtlObj_GetPopupData(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_GetDataBrowserTarget(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 target;
+#ifndef GetDataBrowserTarget
+       PyMac_PRECHECK(GetDataBrowserTarget);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserTarget(_self->ob_itself,
+                                   &target);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            target);
+       return _res;
+}
 
-       PopupPrivateDataHandle hdl;
+static PyObject *CtlObj_SetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt16 order;
+#ifndef SetDataBrowserSortOrder
+       PyMac_PRECHECK(SetDataBrowserSortOrder);
+#endif
+       if (!PyArg_ParseTuple(_args, "H",
+                             &order))
+               return NULL;
+       _err = SetDataBrowserSortOrder(_self->ob_itself,
+                                      order);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-       if ( (*_self->ob_itself)->contrlData == NULL ) {
-               PyErr_SetString(Ctl_Error, "No contrlData handle in control");
-               return 0;
-       }
-       hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
-       HLock((Handle)hdl);
-       _res = Py_BuildValue("O&i", MenuObj_New, (*hdl)->mHandle, (int)(*hdl)->mID);
-       HUnlock((Handle)hdl);
+static PyObject *CtlObj_GetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt16 order;
+#ifndef GetDataBrowserSortOrder
+       PyMac_PRECHECK(GetDataBrowserSortOrder);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserSortOrder(_self->ob_itself,
+                                      &order);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("H",
+                            order);
        return _res;
+}
 
+static PyObject *CtlObj_SetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 top;
+       UInt32 left;
+#ifndef SetDataBrowserScrollPosition
+       PyMac_PRECHECK(SetDataBrowserScrollPosition);
+#endif
+       if (!PyArg_ParseTuple(_args, "ll",
+                             &top,
+                             &left))
+               return NULL;
+       _err = SetDataBrowserScrollPosition(_self->ob_itself,
+                                           top,
+                                           left);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
 }
-#endif
 
-#if !TARGET_API_MAC_CARBON
+static PyObject *CtlObj_GetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 top;
+       UInt32 left;
+#ifndef GetDataBrowserScrollPosition
+       PyMac_PRECHECK(GetDataBrowserScrollPosition);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserScrollPosition(_self->ob_itself,
+                                           &top,
+                                           &left);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("ll",
+                            top,
+                            left);
+       return _res;
+}
 
-static PyObject *CtlObj_SetPopupData(ControlObject *_self, PyObject *_args)
+static PyObject *CtlObj_SetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
+       OSStatus _err;
+       Boolean horiz;
+       Boolean vert;
+#ifndef SetDataBrowserHasScrollBars
+       PyMac_PRECHECK(SetDataBrowserHasScrollBars);
+#endif
+       if (!PyArg_ParseTuple(_args, "bb",
+                             &horiz,
+                             &vert))
+               return NULL;
+       _err = SetDataBrowserHasScrollBars(_self->ob_itself,
+                                          horiz,
+                                          vert);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-       PopupPrivateDataHandle hdl;
-       MenuHandle mHandle;
-       short mID;
+static PyObject *CtlObj_GetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       Boolean horiz;
+       Boolean vert;
+#ifndef GetDataBrowserHasScrollBars
+       PyMac_PRECHECK(GetDataBrowserHasScrollBars);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserHasScrollBars(_self->ob_itself,
+                                          &horiz,
+                                          &vert);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("bb",
+                            horiz,
+                            vert);
+       return _res;
+}
 
-       if (!PyArg_ParseTuple(_args, "O&h", MenuObj_Convert, &mHandle, &mID) )
-               return 0;
-       if ( (*_self->ob_itself)->contrlData == NULL ) {
-               PyErr_SetString(Ctl_Error, "No contrlData handle in control");
-               return 0;
-       }
-       hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
-       (*hdl)->mHandle = mHandle;
-       (*hdl)->mID = mID;
+static PyObject *CtlObj_SetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 property;
+#ifndef SetDataBrowserSortProperty
+       PyMac_PRECHECK(SetDataBrowserSortProperty);
+#endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &property))
+               return NULL;
+       _err = SetDataBrowserSortProperty(_self->ob_itself,
+                                         property);
+       if (_err != noErr) return PyMac_Error(_err);
        Py_INCREF(Py_None);
-       return Py_None;
+       _res = Py_None;
+       return _res;
+}
 
+static PyObject *CtlObj_GetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 property;
+#ifndef GetDataBrowserSortProperty
+       PyMac_PRECHECK(GetDataBrowserSortProperty);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserSortProperty(_self->ob_itself,
+                                         &property);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            property);
+       return _res;
 }
+
+static PyObject *CtlObj_SetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 selectionFlags;
+#ifndef SetDataBrowserSelectionFlags
+       PyMac_PRECHECK(SetDataBrowserSelectionFlags);
 #endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &selectionFlags))
+               return NULL;
+       _err = SetDataBrowserSelectionFlags(_self->ob_itself,
+                                           selectionFlags);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-static PyMethodDef CtlObj_methods[] = {
-       {"HiliteControl", (PyCFunction)CtlObj_HiliteControl, 1,
-        "(ControlPartCode hiliteState) -> None"},
-       {"ShowControl", (PyCFunction)CtlObj_ShowControl, 1,
-        "() -> None"},
-       {"HideControl", (PyCFunction)CtlObj_HideControl, 1,
-        "() -> None"},
-       {"IsControlActive", (PyCFunction)CtlObj_IsControlActive, 1,
-        "() -> (Boolean _rv)"},
-       {"IsControlVisible", (PyCFunction)CtlObj_IsControlVisible, 1,
-        "() -> (Boolean _rv)"},
-       {"ActivateControl", (PyCFunction)CtlObj_ActivateControl, 1,
-        "() -> None"},
-       {"DeactivateControl", (PyCFunction)CtlObj_DeactivateControl, 1,
-        "() -> None"},
-       {"SetControlVisibility", (PyCFunction)CtlObj_SetControlVisibility, 1,
-        "(Boolean inIsVisible, Boolean inDoDraw) -> None"},
-       {"Draw1Control", (PyCFunction)CtlObj_Draw1Control, 1,
-        "() -> None"},
-       {"GetBestControlRect", (PyCFunction)CtlObj_GetBestControlRect, 1,
-        "() -> (Rect outRect, SInt16 outBaseLineOffset)"},
-       {"SetControlFontStyle", (PyCFunction)CtlObj_SetControlFontStyle, 1,
-        "(ControlFontStyleRec inStyle) -> None"},
-       {"DrawControlInCurrentPort", (PyCFunction)CtlObj_DrawControlInCurrentPort, 1,
-        "() -> 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,
-        "(Point testPoint) -> (ControlPartCode _rv)"},
-
-#if TARGET_API_MAC_CARBON
-       {"HandleControlContextualMenuClick", (PyCFunction)CtlObj_HandleControlContextualMenuClick, 1,
-        "(Point inWhere) -> (Boolean menuDisplayed)"},
+static PyObject *CtlObj_GetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 selectionFlags;
+#ifndef GetDataBrowserSelectionFlags
+       PyMac_PRECHECK(GetDataBrowserSelectionFlags);
 #endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserSelectionFlags(_self->ob_itself,
+                                           &selectionFlags);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            selectionFlags);
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"GetControlClickActivation", (PyCFunction)CtlObj_GetControlClickActivation, 1,
-        "(Point inWhere, EventModifiers inModifiers) -> (ClickActivationResult outResult)"},
-#endif
-       {"HandleControlKey", (PyCFunction)CtlObj_HandleControlKey, 1,
-        "(SInt16 inKeyCode, SInt16 inCharCode, EventModifiers inModifiers) -> (SInt16 _rv)"},
+static PyObject *CtlObj_SetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 property;
+       UInt32 flags;
+#ifndef SetDataBrowserPropertyFlags
+       PyMac_PRECHECK(SetDataBrowserPropertyFlags);
+#endif
+       if (!PyArg_ParseTuple(_args, "ll",
+                             &property,
+                             &flags))
+               return NULL;
+       _err = SetDataBrowserPropertyFlags(_self->ob_itself,
+                                          property,
+                                          flags);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"HandleControlSetCursor", (PyCFunction)CtlObj_HandleControlSetCursor, 1,
-        "(Point localPoint, EventModifiers modifiers) -> (Boolean cursorWasSet)"},
+static PyObject *CtlObj_GetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 property;
+       UInt32 flags;
+#ifndef GetDataBrowserPropertyFlags
+       PyMac_PRECHECK(GetDataBrowserPropertyFlags);
 #endif
-       {"MoveControl", (PyCFunction)CtlObj_MoveControl, 1,
-        "(SInt16 h, SInt16 v) -> None"},
-       {"SizeControl", (PyCFunction)CtlObj_SizeControl, 1,
-        "(SInt16 w, SInt16 h) -> None"},
-       {"SetControlTitle", (PyCFunction)CtlObj_SetControlTitle, 1,
-        "(Str255 title) -> None"},
-       {"GetControlTitle", (PyCFunction)CtlObj_GetControlTitle, 1,
-        "() -> (Str255 title)"},
-       {"GetControlValue", (PyCFunction)CtlObj_GetControlValue, 1,
-        "() -> (SInt16 _rv)"},
-       {"SetControlValue", (PyCFunction)CtlObj_SetControlValue, 1,
-        "(SInt16 newValue) -> None"},
-       {"GetControlMinimum", (PyCFunction)CtlObj_GetControlMinimum, 1,
-        "() -> (SInt16 _rv)"},
-       {"SetControlMinimum", (PyCFunction)CtlObj_SetControlMinimum, 1,
-        "(SInt16 newMinimum) -> None"},
-       {"GetControlMaximum", (PyCFunction)CtlObj_GetControlMaximum, 1,
-        "() -> (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)"},
+       if (!PyArg_ParseTuple(_args, "l",
+                             &property))
+               return NULL;
+       _err = GetDataBrowserPropertyFlags(_self->ob_itself,
+                                          property,
+                                          &flags);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            flags);
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"SetControlID", (PyCFunction)CtlObj_SetControlID, 1,
-        "(ControlID inID) -> None"},
+static PyObject *CtlObj_SetDataBrowserEditText(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       CFStringRef text;
+#ifndef SetDataBrowserEditText
+       PyMac_PRECHECK(SetDataBrowserEditText);
 #endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             CFStringRefObj_Convert, &text))
+               return NULL;
+       _err = SetDataBrowserEditText(_self->ob_itself,
+                                     text);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"GetControlID", (PyCFunction)CtlObj_GetControlID, 1,
-        "() -> (ControlID outID)"},
+static PyObject *CtlObj_GetDataBrowserEditText(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       CFMutableStringRef text;
+#ifndef GetDataBrowserEditText
+       PyMac_PRECHECK(GetDataBrowserEditText);
 #endif
-       {"RemoveControlProperty", (PyCFunction)CtlObj_RemoveControlProperty, 1,
-        "(OSType propertyCreator, OSType propertyTag) -> None"},
+       if (!PyArg_ParseTuple(_args, "O&",
+                             CFMutableStringRefObj_Convert, &text))
+               return NULL;
+       _err = GetDataBrowserEditText(_self->ob_itself,
+                                     text);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"GetControlPropertyAttributes", (PyCFunction)CtlObj_GetControlPropertyAttributes, 1,
-        "(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)"},
-#endif
+static PyObject *CtlObj_SetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 item;
+       UInt32 property;
+#ifndef SetDataBrowserEditItem
+       PyMac_PRECHECK(SetDataBrowserEditItem);
+#endif
+       if (!PyArg_ParseTuple(_args, "ll",
+                             &item,
+                             &property))
+               return NULL;
+       _err = SetDataBrowserEditItem(_self->ob_itself,
+                                     item,
+                                     property);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"ChangeControlPropertyAttributes", (PyCFunction)CtlObj_ChangeControlPropertyAttributes, 1,
-        "(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None"},
+static PyObject *CtlObj_GetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 item;
+       UInt32 property;
+#ifndef GetDataBrowserEditItem
+       PyMac_PRECHECK(GetDataBrowserEditItem);
 #endif
-       {"GetControlRegion", (PyCFunction)CtlObj_GetControlRegion, 1,
-        "(ControlPartCode inPart, RgnHandle outRegion) -> None"},
-       {"GetControlVariant", (PyCFunction)CtlObj_GetControlVariant, 1,
-        "() -> (ControlVariant _rv)"},
-       {"SetControlReference", (PyCFunction)CtlObj_SetControlReference, 1,
-        "(SInt32 data) -> None"},
-       {"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
-        "() -> (SInt32 _rv)"},
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserEditItem(_self->ob_itself,
+                                     &item,
+                                     &property);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("ll",
+                            item,
+                            property);
+       return _res;
+}
 
-#if !TARGET_API_MAC_CARBON
-       {"GetAuxiliaryControlRecord", (PyCFunction)CtlObj_GetAuxiliaryControlRecord, 1,
-        "() -> (Boolean _rv, AuxCtlHandle acHndl)"},
+static PyObject *CtlObj_GetDataBrowserItemPartBounds(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 item;
+       UInt32 property;
+       OSType part;
+       Rect bounds;
+#ifndef GetDataBrowserItemPartBounds
+       PyMac_PRECHECK(GetDataBrowserItemPartBounds);
 #endif
+       if (!PyArg_ParseTuple(_args, "llO&",
+                             &item,
+                             &property,
+                             PyMac_GetOSType, &part))
+               return NULL;
+       _err = GetDataBrowserItemPartBounds(_self->ob_itself,
+                                           item,
+                                           property,
+                                           part,
+                                           &bounds);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            PyMac_BuildRect, &bounds);
+       return _res;
+}
 
-#if !TARGET_API_MAC_CARBON
-       {"SetControlColor", (PyCFunction)CtlObj_SetControlColor, 1,
-        "(CCTabHandle newColorTable) -> None"},
+static PyObject *CtlObj_RemoveDataBrowserTableViewColumn(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 column;
+#ifndef RemoveDataBrowserTableViewColumn
+       PyMac_PRECHECK(RemoveDataBrowserTableViewColumn);
 #endif
-       {"EmbedControl", (PyCFunction)CtlObj_EmbedControl, 1,
-        "(ControlHandle inContainer) -> None"},
-       {"AutoEmbedControl", (PyCFunction)CtlObj_AutoEmbedControl, 1,
-        "(WindowPtr inWindow) -> None"},
-       {"GetSuperControl", (PyCFunction)CtlObj_GetSuperControl, 1,
-        "() -> (ControlHandle outParent)"},
-       {"CountSubControls", (PyCFunction)CtlObj_CountSubControls, 1,
-        "() -> (UInt16 outNumChildren)"},
-       {"GetIndexedSubControl", (PyCFunction)CtlObj_GetIndexedSubControl, 1,
-        "(UInt16 inIndex) -> (ControlHandle outSubControl)"},
-       {"SetControlSupervisor", (PyCFunction)CtlObj_SetControlSupervisor, 1,
-        "(ControlHandle inBoss) -> None"},
-       {"GetControlFeatures", (PyCFunction)CtlObj_GetControlFeatures, 1,
-        "() -> (UInt32 outFeatures)"},
-       {"GetControlDataSize", (PyCFunction)CtlObj_GetControlDataSize, 1,
-        "(ControlPartCode inPart, ResType inTagName) -> (Size outMaxSize)"},
+       if (!PyArg_ParseTuple(_args, "l",
+                             &column))
+               return NULL;
+       _err = RemoveDataBrowserTableViewColumn(_self->ob_itself,
+                                               column);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"HandleControlDragTracking", (PyCFunction)CtlObj_HandleControlDragTracking, 1,
-        "(DragTrackingMessage inMessage, DragReference inDrag) -> (Boolean outLikesDrag)"},
+static PyObject *CtlObj_GetDataBrowserTableViewColumnCount(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 numColumns;
+#ifndef GetDataBrowserTableViewColumnCount
+       PyMac_PRECHECK(GetDataBrowserTableViewColumnCount);
 #endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserTableViewColumnCount(_self->ob_itself,
+                                                 &numColumns);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            numColumns);
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
-        "(DragReference inDrag) -> None"},
+static PyObject *CtlObj_SetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 hiliteStyle;
+#ifndef SetDataBrowserTableViewHiliteStyle
+       PyMac_PRECHECK(SetDataBrowserTableViewHiliteStyle);
 #endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &hiliteStyle))
+               return NULL;
+       _err = SetDataBrowserTableViewHiliteStyle(_self->ob_itself,
+                                                 hiliteStyle);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
-        "(Boolean tracks) -> None"},
+static PyObject *CtlObj_GetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 hiliteStyle;
+#ifndef GetDataBrowserTableViewHiliteStyle
+       PyMac_PRECHECK(GetDataBrowserTableViewHiliteStyle);
 #endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserTableViewHiliteStyle(_self->ob_itself,
+                                                 &hiliteStyle);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            hiliteStyle);
+       return _res;
+}
 
-#if TARGET_API_MAC_CARBON
-       {"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
-        "() -> (Boolean tracks)"},
+static PyObject *CtlObj_SetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt16 height;
+#ifndef SetDataBrowserTableViewRowHeight
+       PyMac_PRECHECK(SetDataBrowserTableViewRowHeight);
 #endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
-        "() -> (Rect bounds)"},
+       if (!PyArg_ParseTuple(_args, "H",
+                             &height))
+               return NULL;
+       _err = SetDataBrowserTableViewRowHeight(_self->ob_itself,
+                                               height);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt16 height;
+#ifndef GetDataBrowserTableViewRowHeight
+       PyMac_PRECHECK(GetDataBrowserTableViewRowHeight);
 #endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserTableViewRowHeight(_self->ob_itself,
+                                               &height);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("H",
+                            height);
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"IsControlHilited", (PyCFunction)CtlObj_IsControlHilited, 1,
-        "() -> (Boolean _rv)"},
+static PyObject *CtlObj_SetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt16 width;
+#ifndef SetDataBrowserTableViewColumnWidth
+       PyMac_PRECHECK(SetDataBrowserTableViewColumnWidth);
 #endif
+       if (!PyArg_ParseTuple(_args, "H",
+                             &width))
+               return NULL;
+       _err = SetDataBrowserTableViewColumnWidth(_self->ob_itself,
+                                                 width);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"GetControlHilite", (PyCFunction)CtlObj_GetControlHilite, 1,
-        "() -> (UInt16 _rv)"},
+static PyObject *CtlObj_GetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt16 width;
+#ifndef GetDataBrowserTableViewColumnWidth
+       PyMac_PRECHECK(GetDataBrowserTableViewColumnWidth);
 #endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserTableViewColumnWidth(_self->ob_itself,
+                                                 &width);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("H",
+                            width);
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"GetControlOwner", (PyCFunction)CtlObj_GetControlOwner, 1,
-        "() -> (WindowPtr _rv)"},
+static PyObject *CtlObj_SetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 item;
+       UInt16 height;
+#ifndef SetDataBrowserTableViewItemRowHeight
+       PyMac_PRECHECK(SetDataBrowserTableViewItemRowHeight);
+#endif
+       if (!PyArg_ParseTuple(_args, "lH",
+                             &item,
+                             &height))
+               return NULL;
+       _err = SetDataBrowserTableViewItemRowHeight(_self->ob_itself,
+                                                   item,
+                                                   height);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 item;
+       UInt16 height;
+#ifndef GetDataBrowserTableViewItemRowHeight
+       PyMac_PRECHECK(GetDataBrowserTableViewItemRowHeight);
 #endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &item))
+               return NULL;
+       _err = GetDataBrowserTableViewItemRowHeight(_self->ob_itself,
+                                                   item,
+                                                   &height);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("H",
+                            height);
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
-        "() -> (Handle _rv)"},
+static PyObject *CtlObj_SetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 column;
+       UInt16 width;
+#ifndef SetDataBrowserTableViewNamedColumnWidth
+       PyMac_PRECHECK(SetDataBrowserTableViewNamedColumnWidth);
+#endif
+       if (!PyArg_ParseTuple(_args, "lH",
+                             &column,
+                             &width))
+               return NULL;
+       _err = SetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
+                                                      column,
+                                                      width);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 column;
+       UInt16 width;
+#ifndef GetDataBrowserTableViewNamedColumnWidth
+       PyMac_PRECHECK(GetDataBrowserTableViewNamedColumnWidth);
 #endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &column))
+               return NULL;
+       _err = GetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
+                                                      column,
+                                                      &width);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("H",
+                            width);
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"GetControlPopupMenuHandle", (PyCFunction)CtlObj_GetControlPopupMenuHandle, 1,
-        "() -> (MenuHandle _rv)"},
+static PyObject *CtlObj_SetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       Boolean variableWidthColumns;
+       Boolean variableHeightRows;
+#ifndef SetDataBrowserTableViewGeometry
+       PyMac_PRECHECK(SetDataBrowserTableViewGeometry);
 #endif
+       if (!PyArg_ParseTuple(_args, "bb",
+                             &variableWidthColumns,
+                             &variableHeightRows))
+               return NULL;
+       _err = SetDataBrowserTableViewGeometry(_self->ob_itself,
+                                              variableWidthColumns,
+                                              variableHeightRows);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"GetControlPopupMenuID", (PyCFunction)CtlObj_GetControlPopupMenuID, 1,
-        "() -> (short _rv)"},
+static PyObject *CtlObj_GetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       Boolean variableWidthColumns;
+       Boolean variableHeightRows;
+#ifndef GetDataBrowserTableViewGeometry
+       PyMac_PRECHECK(GetDataBrowserTableViewGeometry);
 #endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserTableViewGeometry(_self->ob_itself,
+                                              &variableWidthColumns,
+                                              &variableHeightRows);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("bb",
+                            variableWidthColumns,
+                            variableHeightRows);
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"SetControlDataHandle", (PyCFunction)CtlObj_SetControlDataHandle, 1,
-        "(Handle dataHandle) -> None"},
+static PyObject *CtlObj_GetDataBrowserTableViewItemID(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 row;
+       UInt32 item;
+#ifndef GetDataBrowserTableViewItemID
+       PyMac_PRECHECK(GetDataBrowserTableViewItemID);
 #endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &row))
+               return NULL;
+       _err = GetDataBrowserTableViewItemID(_self->ob_itself,
+                                            row,
+                                            &item);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            item);
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"SetControlBounds", (PyCFunction)CtlObj_SetControlBounds, 1,
-        "(Rect bounds) -> None"},
+static PyObject *CtlObj_SetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 item;
+       UInt32 row;
+#ifndef SetDataBrowserTableViewItemRow
+       PyMac_PRECHECK(SetDataBrowserTableViewItemRow);
+#endif
+       if (!PyArg_ParseTuple(_args, "ll",
+                             &item,
+                             &row))
+               return NULL;
+       _err = SetDataBrowserTableViewItemRow(_self->ob_itself,
+                                             item,
+                                             row);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 item;
+       UInt32 row;
+#ifndef GetDataBrowserTableViewItemRow
+       PyMac_PRECHECK(GetDataBrowserTableViewItemRow);
 #endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &item))
+               return NULL;
+       _err = GetDataBrowserTableViewItemRow(_self->ob_itself,
+                                             item,
+                                             &row);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            row);
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"SetControlPopupMenuHandle", (PyCFunction)CtlObj_SetControlPopupMenuHandle, 1,
-        "(MenuHandle popupMenu) -> None"},
+static PyObject *CtlObj_SetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 column;
+       UInt32 position;
+#ifndef SetDataBrowserTableViewColumnPosition
+       PyMac_PRECHECK(SetDataBrowserTableViewColumnPosition);
+#endif
+       if (!PyArg_ParseTuple(_args, "ll",
+                             &column,
+                             &position))
+               return NULL;
+       _err = SetDataBrowserTableViewColumnPosition(_self->ob_itself,
+                                                    column,
+                                                    position);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 column;
+       UInt32 position;
+#ifndef GetDataBrowserTableViewColumnPosition
+       PyMac_PRECHECK(GetDataBrowserTableViewColumnPosition);
 #endif
+       if (!PyArg_ParseTuple(_args, "l",
+                             &column))
+               return NULL;
+       _err = GetDataBrowserTableViewColumnPosition(_self->ob_itself,
+                                                    column,
+                                                    &position);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            position);
+       return _res;
+}
 
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
-       {"SetControlPopupMenuID", (PyCFunction)CtlObj_SetControlPopupMenuID, 1,
-        "(short menuID) -> None"},
+static PyObject *CtlObj_GetDataBrowserTableViewColumnProperty(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 column;
+       UInt32 property;
+#ifndef GetDataBrowserTableViewColumnProperty
+       PyMac_PRECHECK(GetDataBrowserTableViewColumnProperty);
 #endif
-       {"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
-        "() -> (SInt16 outValue)"},
-       {"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
-        "(SInt16 inValue) -> None"},
-       {"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
-        "() -> (MenuHandle outHandle)"},
-       {"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
-        "(IconTransformType transform) -> None"},
-       {"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
-        "(SInt16 inValue) -> None"},
-       {"GetTabContentRect", (PyCFunction)CtlObj_GetTabContentRect, 1,
-        "() -> (Rect outContentRect)"},
-       {"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
-        "(SInt16 inTabToHilite, Boolean inEnabled) -> None"},
-       {"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
-        "(IconTransformType inTransform) -> None"},
-       {"as_Resource", (PyCFunction)CtlObj_as_Resource, 1,
-        "() -> (Handle _rv)"},
-       {"GetControlRect", (PyCFunction)CtlObj_GetControlRect, 1,
-        "() -> (Rect rect)"},
-       {"DisposeControl", (PyCFunction)CtlObj_DisposeControl, 1,
-        "() -> None"},
-       {"TrackControl", (PyCFunction)CtlObj_TrackControl, 1,
-        "(Point startPoint [,trackercallback]) -> (ControlPartCode _rv)"},
-       {"HandleControlClick", (PyCFunction)CtlObj_HandleControlClick, 1,
-        "(Point startPoint, Integer modifiers, [,trackercallback]) -> (ControlPartCode _rv)"},
-       {"SetControlData", (PyCFunction)CtlObj_SetControlData, 1,
-        "(stuff) -> None"},
-       {"GetControlData", (PyCFunction)CtlObj_GetControlData, 1,
-        "(part, type) -> String"},
-       {"SetControlData_Handle", (PyCFunction)CtlObj_SetControlData_Handle, 1,
-        "(ResObj) -> None"},
-       {"GetControlData_Handle", (PyCFunction)CtlObj_GetControlData_Handle, 1,
-        "(part, type) -> ResObj"},
-       {"SetControlData_Callback", (PyCFunction)CtlObj_SetControlData_Callback, 1,
-        "(callbackfunc) -> None"},
+       if (!PyArg_ParseTuple(_args, "l",
+                             &column))
+               return NULL;
+       _err = GetDataBrowserTableViewColumnProperty(_self->ob_itself,
+                                                    column,
+                                                    &property);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            property);
+       return _res;
+}
+
+static PyObject *CtlObj_AutoSizeDataBrowserListViewColumns(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+#ifndef AutoSizeDataBrowserListViewColumns
+       PyMac_PRECHECK(AutoSizeDataBrowserListViewColumns);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = AutoSizeDataBrowserListViewColumns(_self->ob_itself);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_SetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt16 height;
+#ifndef SetDataBrowserListViewHeaderBtnHeight
+       PyMac_PRECHECK(SetDataBrowserListViewHeaderBtnHeight);
+#endif
+       if (!PyArg_ParseTuple(_args, "H",
+                             &height))
+               return NULL;
+       _err = SetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
+                                                    height);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt16 height;
+#ifndef GetDataBrowserListViewHeaderBtnHeight
+       PyMac_PRECHECK(GetDataBrowserListViewHeaderBtnHeight);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
+                                                    &height);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("H",
+                            height);
+       return _res;
+}
+
+static PyObject *CtlObj_SetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       Boolean usePlainBackground;
+#ifndef SetDataBrowserListViewUsePlainBackground
+       PyMac_PRECHECK(SetDataBrowserListViewUsePlainBackground);
+#endif
+       if (!PyArg_ParseTuple(_args, "b",
+                             &usePlainBackground))
+               return NULL;
+       _err = SetDataBrowserListViewUsePlainBackground(_self->ob_itself,
+                                                       usePlainBackground);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       Boolean usePlainBackground;
+#ifndef GetDataBrowserListViewUsePlainBackground
+       PyMac_PRECHECK(GetDataBrowserListViewUsePlainBackground);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserListViewUsePlainBackground(_self->ob_itself,
+                                                       &usePlainBackground);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("b",
+                            usePlainBackground);
+       return _res;
+}
+
+static PyObject *CtlObj_SetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 column;
+       Boolean expandableRows;
+#ifndef SetDataBrowserListViewDisclosureColumn
+       PyMac_PRECHECK(SetDataBrowserListViewDisclosureColumn);
+#endif
+       if (!PyArg_ParseTuple(_args, "lb",
+                             &column,
+                             &expandableRows))
+               return NULL;
+       _err = SetDataBrowserListViewDisclosureColumn(_self->ob_itself,
+                                                     column,
+                                                     expandableRows);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 column;
+       Boolean expandableRows;
+#ifndef GetDataBrowserListViewDisclosureColumn
+       PyMac_PRECHECK(GetDataBrowserListViewDisclosureColumn);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserListViewDisclosureColumn(_self->ob_itself,
+                                                     &column,
+                                                     &expandableRows);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("lb",
+                            column,
+                            expandableRows);
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserColumnViewPath(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       Handle path;
+#ifndef GetDataBrowserColumnViewPath
+       PyMac_PRECHECK(GetDataBrowserColumnViewPath);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             ResObj_Convert, &path))
+               return NULL;
+       _err = GetDataBrowserColumnViewPath(_self->ob_itself,
+                                           path);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserColumnViewPathLength(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       UInt32 pathLength;
+#ifndef GetDataBrowserColumnViewPathLength
+       PyMac_PRECHECK(GetDataBrowserColumnViewPathLength);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserColumnViewPathLength(_self->ob_itself,
+                                                 &pathLength);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("l",
+                            pathLength);
+       return _res;
+}
+
+static PyObject *CtlObj_SetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       OSType propertyType;
+#ifndef SetDataBrowserColumnViewDisplayType
+       PyMac_PRECHECK(SetDataBrowserColumnViewDisplayType);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             PyMac_GetOSType, &propertyType))
+               return NULL;
+       _err = SetDataBrowserColumnViewDisplayType(_self->ob_itself,
+                                                  propertyType);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *CtlObj_GetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       OSType propertyType;
+#ifndef GetDataBrowserColumnViewDisplayType
+       PyMac_PRECHECK(GetDataBrowserColumnViewDisplayType);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _err = GetDataBrowserColumnViewDisplayType(_self->ob_itself,
+                                                  &propertyType);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            PyMac_BuildOSType, propertyType);
+       return _res;
+}
+
+static PyObject *CtlObj_as_Resource(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       Handle _rv;
+#ifndef as_Resource
+       PyMac_PRECHECK(as_Resource);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _rv = as_Resource(_self->ob_itself);
+       _res = Py_BuildValue("O&",
+                            ResObj_New, _rv);
+       return _res;
+}
+
+static PyObject *CtlObj_GetControlRect(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       Rect rect;
+#ifndef GetControlRect
+       PyMac_PRECHECK(GetControlRect);
+#endif
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       GetControlRect(_self->ob_itself,
+                      &rect);
+       _res = Py_BuildValue("O&",
+                            PyMac_BuildRect, &rect);
+       return _res;
+}
+
+static PyObject *CtlObj_DisposeControl(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+               if (!PyArg_ParseTuple(_args, ""))
+                       return NULL;
+               if ( _self->ob_itself ) {
+                       SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
+                       DisposeControl(_self->ob_itself);
+                       _self->ob_itself = NULL;
+               }
+               Py_INCREF(Py_None);
+               _res = Py_None;
+               return _res;
+
+}
+
+static PyObject *CtlObj_TrackControl(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+       ControlPartCode _rv;
+       Point startPoint;
+       ControlActionUPP upp = 0;
+       PyObject *callback = 0;
+
+       if (!PyArg_ParseTuple(_args, "O&|O",
+                             PyMac_GetPoint, &startPoint, &callback))
+               return NULL;
+       if (callback && callback != Py_None) {
+               if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
+                       upp = (ControlActionUPP)-1;
+               else {
+                       settrackfunc(callback);
+                       upp = mytracker_upp;
+               }
+       }
+       _rv = TrackControl(_self->ob_itself,
+                          startPoint,
+                          upp);
+       clrtrackfunc();
+       _res = Py_BuildValue("h",
+                            _rv);
+       return _res;
+
+}
+
+static PyObject *CtlObj_HandleControlClick(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+       ControlPartCode _rv;
+       Point startPoint;
+       SInt16 modifiers;
+       ControlActionUPP upp = 0;
+       PyObject *callback = 0;
+
+       if (!PyArg_ParseTuple(_args, "O&h|O",
+                             PyMac_GetPoint, &startPoint,
+                             &modifiers,
+                             &callback))
+               return NULL;
+       if (callback && callback != Py_None) {
+               if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
+                       upp = (ControlActionUPP)-1;
+               else {
+                       settrackfunc(callback);
+                       upp = mytracker_upp;
+               }
+       }
+       _rv = HandleControlClick(_self->ob_itself,
+                          startPoint,
+                          modifiers,
+                          upp);
+       clrtrackfunc();
+       _res = Py_BuildValue("h",
+                            _rv);
+       return _res;
+
+}
+
+static PyObject *CtlObj_SetControlData(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+       OSErr _err;
+       ControlPartCode inPart;
+       ResType inTagName;
+       Size bufferSize;
+       Ptr buffer;
+
+       if (!PyArg_ParseTuple(_args, "hO&s#",
+                             &inPart,
+                             PyMac_GetOSType, &inTagName,
+                             &buffer, &bufferSize))
+               return NULL;
+
+       _err = SetControlData(_self->ob_itself,
+                             inPart,
+                             inTagName,
+                             bufferSize,
+                             buffer);
+
+       if (_err != noErr)
+               return PyMac_Error(_err);
+       _res = Py_None;
+       return _res;
+
+}
+
+static PyObject *CtlObj_GetControlData(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+       OSErr _err;
+       ControlPartCode inPart;
+       ResType inTagName;
+       Size bufferSize;
+       Ptr buffer;
+       Size outSize;
+
+       if (!PyArg_ParseTuple(_args, "hO&",
+                             &inPart,
+                             PyMac_GetOSType, &inTagName))
+               return NULL;
+
+       /* allocate a buffer for the data */
+       _err = GetControlDataSize(_self->ob_itself,
+                                 inPart,
+                                 inTagName,
+                                 &bufferSize);
+       if (_err != noErr)
+               return PyMac_Error(_err);
+       buffer = PyMem_NEW(char, bufferSize);
+       if (buffer == NULL)
+               return PyErr_NoMemory();
+
+       _err = GetControlData(_self->ob_itself,
+                             inPart,
+                             inTagName,
+                             bufferSize,
+                             buffer,
+                             &outSize);
+
+       if (_err != noErr) {
+               PyMem_DEL(buffer);
+               return PyMac_Error(_err);
+       }
+       _res = Py_BuildValue("s#", buffer, outSize);
+       PyMem_DEL(buffer);
+       return _res;
+
+}
+
+static PyObject *CtlObj_SetControlData_Handle(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+       OSErr _err;
+       ControlPartCode inPart;
+       ResType inTagName;
+       Handle buffer;
+
+       if (!PyArg_ParseTuple(_args, "hO&O&",
+                             &inPart,
+                             PyMac_GetOSType, &inTagName,
+                             OptResObj_Convert, &buffer))
+               return NULL;
+
+       _err = SetControlData(_self->ob_itself,
+                             inPart,
+                             inTagName,
+                             sizeof(buffer),
+                             (Ptr)&buffer);
+
+       if (_err != noErr)
+               return PyMac_Error(_err);
+       _res = Py_None;
+       return _res;
+
+}
+
+static PyObject *CtlObj_GetControlData_Handle(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+       OSErr _err;
+       ControlPartCode inPart;
+       ResType inTagName;
+       Size bufferSize;
+       Handle hdl;
+
+       if (!PyArg_ParseTuple(_args, "hO&",
+                             &inPart,
+                             PyMac_GetOSType, &inTagName))
+               return NULL;
+
+       /* Check it is handle-sized */
+       _err = GetControlDataSize(_self->ob_itself,
+                                 inPart,
+                                 inTagName,
+                                 &bufferSize);
+       if (_err != noErr)
+               return PyMac_Error(_err);
+       if (bufferSize != sizeof(Handle)) {
+               PyErr_SetString(Ctl_Error, "GetControlDataSize() != sizeof(Handle)");
+               return NULL;
+       }
+
+       _err = GetControlData(_self->ob_itself,
+                             inPart,
+                             inTagName,
+                             sizeof(Handle),
+                             (Ptr)&hdl,
+                             &bufferSize);
+
+       if (_err != noErr) {
+               return PyMac_Error(_err);
+       }
+       _res = Py_BuildValue("O&", OptResObj_New, hdl);
+       return _res;
+
+}
+
+static PyObject *CtlObj_SetControlData_Callback(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+       OSErr _err;
+       ControlPartCode inPart;
+       ResType inTagName;
+       PyObject *callback;
+       UniversalProcPtr c_callback;
+
+       if (!PyArg_ParseTuple(_args, "hO&O",
+                             &inPart,
+                             PyMac_GetOSType, &inTagName,
+                             &callback))
+               return NULL;
+
+       if ( setcallback((PyObject *)_self, inTagName, callback, &c_callback) < 0 )
+               return NULL;
+       _err = SetControlData(_self->ob_itself,
+                             inPart,
+                             inTagName,
+                             sizeof(c_callback),
+                             (Ptr)&c_callback);
+
+       if (_err != noErr)
+               return PyMac_Error(_err);
+       _res = Py_None;
+       return _res;
+
+}
+
+#if !TARGET_API_MAC_CARBON
+
+static PyObject *CtlObj_GetPopupData(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+       PopupPrivateDataHandle hdl;
+
+       if ( (*_self->ob_itself)->contrlData == NULL ) {
+               PyErr_SetString(Ctl_Error, "No contrlData handle in control");
+               return 0;
+       }
+       hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
+       HLock((Handle)hdl);
+       _res = Py_BuildValue("O&i", MenuObj_New, (*hdl)->mHandle, (int)(*hdl)->mID);
+       HUnlock((Handle)hdl);
+       return _res;
+
+}
+#endif
+
+#if !TARGET_API_MAC_CARBON
+
+static PyObject *CtlObj_SetPopupData(ControlObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+
+       PopupPrivateDataHandle hdl;
+       MenuHandle mHandle;
+       short mID;
+
+       if (!PyArg_ParseTuple(_args, "O&h", MenuObj_Convert, &mHandle, &mID) )
+               return 0;
+       if ( (*_self->ob_itself)->contrlData == NULL ) {
+               PyErr_SetString(Ctl_Error, "No contrlData handle in control");
+               return 0;
+       }
+       hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
+       (*hdl)->mHandle = mHandle;
+       (*hdl)->mID = mID;
+       Py_INCREF(Py_None);
+       return Py_None;
+
+}
+#endif
+
+static PyMethodDef CtlObj_methods[] = {
+       {"HiliteControl", (PyCFunction)CtlObj_HiliteControl, 1,
+        "(ControlPartCode hiliteState) -> None"},
+       {"ShowControl", (PyCFunction)CtlObj_ShowControl, 1,
+        "() -> None"},
+       {"HideControl", (PyCFunction)CtlObj_HideControl, 1,
+        "() -> None"},
+       {"IsControlActive", (PyCFunction)CtlObj_IsControlActive, 1,
+        "() -> (Boolean _rv)"},
+       {"IsControlVisible", (PyCFunction)CtlObj_IsControlVisible, 1,
+        "() -> (Boolean _rv)"},
+       {"ActivateControl", (PyCFunction)CtlObj_ActivateControl, 1,
+        "() -> None"},
+       {"DeactivateControl", (PyCFunction)CtlObj_DeactivateControl, 1,
+        "() -> None"},
+       {"SetControlVisibility", (PyCFunction)CtlObj_SetControlVisibility, 1,
+        "(Boolean inIsVisible, Boolean inDoDraw) -> None"},
+       {"Draw1Control", (PyCFunction)CtlObj_Draw1Control, 1,
+        "() -> None"},
+       {"GetBestControlRect", (PyCFunction)CtlObj_GetBestControlRect, 1,
+        "() -> (Rect outRect, SInt16 outBaseLineOffset)"},
+       {"SetControlFontStyle", (PyCFunction)CtlObj_SetControlFontStyle, 1,
+        "(ControlFontStyleRec inStyle) -> None"},
+       {"DrawControlInCurrentPort", (PyCFunction)CtlObj_DrawControlInCurrentPort, 1,
+        "() -> 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,
+        "(Point testPoint) -> (ControlPartCode _rv)"},
+
+#if TARGET_API_MAC_CARBON
+       {"HandleControlContextualMenuClick", (PyCFunction)CtlObj_HandleControlContextualMenuClick, 1,
+        "(Point inWhere) -> (Boolean menuDisplayed)"},
+#endif
+
+#if TARGET_API_MAC_CARBON
+       {"GetControlClickActivation", (PyCFunction)CtlObj_GetControlClickActivation, 1,
+        "(Point inWhere, EventModifiers inModifiers) -> (ClickActivationResult outResult)"},
+#endif
+       {"HandleControlKey", (PyCFunction)CtlObj_HandleControlKey, 1,
+        "(SInt16 inKeyCode, SInt16 inCharCode, EventModifiers inModifiers) -> (ControlPartCode _rv)"},
+
+#if TARGET_API_MAC_CARBON
+       {"HandleControlSetCursor", (PyCFunction)CtlObj_HandleControlSetCursor, 1,
+        "(Point localPoint, EventModifiers modifiers) -> (Boolean cursorWasSet)"},
+#endif
+       {"MoveControl", (PyCFunction)CtlObj_MoveControl, 1,
+        "(SInt16 h, SInt16 v) -> None"},
+       {"SizeControl", (PyCFunction)CtlObj_SizeControl, 1,
+        "(SInt16 w, SInt16 h) -> None"},
+       {"SetControlTitle", (PyCFunction)CtlObj_SetControlTitle, 1,
+        "(Str255 title) -> None"},
+       {"GetControlTitle", (PyCFunction)CtlObj_GetControlTitle, 1,
+        "() -> (Str255 title)"},
+       {"SetControlTitleWithCFString", (PyCFunction)CtlObj_SetControlTitleWithCFString, 1,
+        "(CFStringRef inString) -> None"},
+       {"CopyControlTitleAsCFString", (PyCFunction)CtlObj_CopyControlTitleAsCFString, 1,
+        "() -> (CFStringRef outString)"},
+       {"GetControlValue", (PyCFunction)CtlObj_GetControlValue, 1,
+        "() -> (SInt16 _rv)"},
+       {"SetControlValue", (PyCFunction)CtlObj_SetControlValue, 1,
+        "(SInt16 newValue) -> None"},
+       {"GetControlMinimum", (PyCFunction)CtlObj_GetControlMinimum, 1,
+        "() -> (SInt16 _rv)"},
+       {"SetControlMinimum", (PyCFunction)CtlObj_SetControlMinimum, 1,
+        "(SInt16 newMinimum) -> None"},
+       {"GetControlMaximum", (PyCFunction)CtlObj_GetControlMaximum, 1,
+        "() -> (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)"},
+
+#if TARGET_API_MAC_CARBON
+       {"SetControlID", (PyCFunction)CtlObj_SetControlID, 1,
+        "(ControlID inID) -> None"},
+#endif
+
+#if TARGET_API_MAC_CARBON
+       {"GetControlID", (PyCFunction)CtlObj_GetControlID, 1,
+        "() -> (ControlID outID)"},
+#endif
+       {"SetControlCommandID", (PyCFunction)CtlObj_SetControlCommandID, 1,
+        "(UInt32 inCommandID) -> None"},
+       {"GetControlCommandID", (PyCFunction)CtlObj_GetControlCommandID, 1,
+        "() -> (UInt32 outCommandID)"},
+       {"RemoveControlProperty", (PyCFunction)CtlObj_RemoveControlProperty, 1,
+        "(OSType propertyCreator, OSType propertyTag) -> None"},
+
+#if TARGET_API_MAC_CARBON
+       {"GetControlPropertyAttributes", (PyCFunction)CtlObj_GetControlPropertyAttributes, 1,
+        "(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)"},
+#endif
+
+#if TARGET_API_MAC_CARBON
+       {"ChangeControlPropertyAttributes", (PyCFunction)CtlObj_ChangeControlPropertyAttributes, 1,
+        "(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None"},
+#endif
+       {"GetControlRegion", (PyCFunction)CtlObj_GetControlRegion, 1,
+        "(ControlPartCode inPart, RgnHandle outRegion) -> None"},
+       {"GetControlVariant", (PyCFunction)CtlObj_GetControlVariant, 1,
+        "() -> (ControlVariant _rv)"},
+       {"SetControlReference", (PyCFunction)CtlObj_SetControlReference, 1,
+        "(SInt32 data) -> None"},
+       {"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
+        "() -> (SInt32 _rv)"},
+
+#if !TARGET_API_MAC_CARBON
+       {"GetAuxiliaryControlRecord", (PyCFunction)CtlObj_GetAuxiliaryControlRecord, 1,
+        "() -> (Boolean _rv, AuxCtlHandle acHndl)"},
+#endif
+
+#if !TARGET_API_MAC_CARBON
+       {"SetControlColor", (PyCFunction)CtlObj_SetControlColor, 1,
+        "(CCTabHandle newColorTable) -> None"},
+#endif
+       {"EmbedControl", (PyCFunction)CtlObj_EmbedControl, 1,
+        "(ControlHandle inContainer) -> None"},
+       {"AutoEmbedControl", (PyCFunction)CtlObj_AutoEmbedControl, 1,
+        "(WindowPtr inWindow) -> None"},
+       {"GetSuperControl", (PyCFunction)CtlObj_GetSuperControl, 1,
+        "() -> (ControlHandle outParent)"},
+       {"CountSubControls", (PyCFunction)CtlObj_CountSubControls, 1,
+        "() -> (UInt16 outNumChildren)"},
+       {"GetIndexedSubControl", (PyCFunction)CtlObj_GetIndexedSubControl, 1,
+        "(UInt16 inIndex) -> (ControlHandle outSubControl)"},
+       {"SetControlSupervisor", (PyCFunction)CtlObj_SetControlSupervisor, 1,
+        "(ControlHandle inBoss) -> None"},
+       {"GetControlFeatures", (PyCFunction)CtlObj_GetControlFeatures, 1,
+        "() -> (UInt32 outFeatures)"},
+       {"GetControlDataSize", (PyCFunction)CtlObj_GetControlDataSize, 1,
+        "(ControlPartCode inPart, ResType inTagName) -> (Size outMaxSize)"},
+
+#if TARGET_API_MAC_CARBON
+       {"HandleControlDragTracking", (PyCFunction)CtlObj_HandleControlDragTracking, 1,
+        "(DragTrackingMessage inMessage, DragReference inDrag) -> (Boolean outLikesDrag)"},
+#endif
+
+#if TARGET_API_MAC_CARBON
+       {"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
+        "(DragReference inDrag) -> None"},
+#endif
+
+#if TARGET_API_MAC_CARBON
+       {"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
+        "(Boolean tracks) -> None"},
+#endif
+
+#if TARGET_API_MAC_CARBON
+       {"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
+        "() -> (Boolean tracks)"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
+        "() -> (Rect bounds)"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"IsControlHilited", (PyCFunction)CtlObj_IsControlHilited, 1,
+        "() -> (Boolean _rv)"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"GetControlHilite", (PyCFunction)CtlObj_GetControlHilite, 1,
+        "() -> (UInt16 _rv)"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"GetControlOwner", (PyCFunction)CtlObj_GetControlOwner, 1,
+        "() -> (WindowPtr _rv)"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
+        "() -> (Handle _rv)"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"GetControlPopupMenuHandle", (PyCFunction)CtlObj_GetControlPopupMenuHandle, 1,
+        "() -> (MenuHandle _rv)"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"GetControlPopupMenuID", (PyCFunction)CtlObj_GetControlPopupMenuID, 1,
+        "() -> (short _rv)"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"SetControlDataHandle", (PyCFunction)CtlObj_SetControlDataHandle, 1,
+        "(Handle dataHandle) -> None"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"SetControlBounds", (PyCFunction)CtlObj_SetControlBounds, 1,
+        "(Rect bounds) -> None"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"SetControlPopupMenuHandle", (PyCFunction)CtlObj_SetControlPopupMenuHandle, 1,
+        "(MenuHandle popupMenu) -> None"},
+#endif
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+       {"SetControlPopupMenuID", (PyCFunction)CtlObj_SetControlPopupMenuID, 1,
+        "(short menuID) -> None"},
+#endif
+       {"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
+        "() -> (SInt16 outValue)"},
+       {"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
+        "(SInt16 inValue) -> None"},
+       {"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
+        "() -> (MenuHandle outHandle)"},
+       {"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
+        "(IconTransformType transform) -> None"},
+       {"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
+        "(SInt16 inValue) -> None"},
+       {"GetTabContentRect", (PyCFunction)CtlObj_GetTabContentRect, 1,
+        "() -> (Rect outContentRect)"},
+       {"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
+        "(SInt16 inTabToHilite, Boolean inEnabled) -> None"},
+       {"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
+        "(IconTransformType inTransform) -> None"},
+       {"GetDataBrowserViewStyle", (PyCFunction)CtlObj_GetDataBrowserViewStyle, 1,
+        "() -> (OSType style)"},
+       {"SetDataBrowserViewStyle", (PyCFunction)CtlObj_SetDataBrowserViewStyle, 1,
+        "(OSType style) -> None"},
+       {"EnableDataBrowserEditCommand", (PyCFunction)CtlObj_EnableDataBrowserEditCommand, 1,
+        "(UInt32 command) -> (Boolean _rv)"},
+       {"ExecuteDataBrowserEditCommand", (PyCFunction)CtlObj_ExecuteDataBrowserEditCommand, 1,
+        "(UInt32 command) -> None"},
+       {"GetDataBrowserSelectionAnchor", (PyCFunction)CtlObj_GetDataBrowserSelectionAnchor, 1,
+        "() -> (UInt32 first, UInt32 last)"},
+       {"MoveDataBrowserSelectionAnchor", (PyCFunction)CtlObj_MoveDataBrowserSelectionAnchor, 1,
+        "(UInt32 direction, Boolean extendSelection) -> None"},
+       {"OpenDataBrowserContainer", (PyCFunction)CtlObj_OpenDataBrowserContainer, 1,
+        "(UInt32 container) -> None"},
+       {"CloseDataBrowserContainer", (PyCFunction)CtlObj_CloseDataBrowserContainer, 1,
+        "(UInt32 container) -> None"},
+       {"SortDataBrowserContainer", (PyCFunction)CtlObj_SortDataBrowserContainer, 1,
+        "(UInt32 container, Boolean sortChildren) -> None"},
+       {"GetDataBrowserItems", (PyCFunction)CtlObj_GetDataBrowserItems, 1,
+        "(UInt32 container, Boolean recurse, UInt32 state, Handle items) -> None"},
+       {"GetDataBrowserItemCount", (PyCFunction)CtlObj_GetDataBrowserItemCount, 1,
+        "(UInt32 container, Boolean recurse, UInt32 state) -> (UInt32 numItems)"},
+       {"IsDataBrowserItemSelected", (PyCFunction)CtlObj_IsDataBrowserItemSelected, 1,
+        "(UInt32 item) -> (Boolean _rv)"},
+       {"GetDataBrowserItemState", (PyCFunction)CtlObj_GetDataBrowserItemState, 1,
+        "(UInt32 item) -> (UInt32 state)"},
+       {"RevealDataBrowserItem", (PyCFunction)CtlObj_RevealDataBrowserItem, 1,
+        "(UInt32 item, UInt32 propertyID, UInt8 options) -> None"},
+       {"SetDataBrowserActiveItems", (PyCFunction)CtlObj_SetDataBrowserActiveItems, 1,
+        "(Boolean active) -> None"},
+       {"GetDataBrowserActiveItems", (PyCFunction)CtlObj_GetDataBrowserActiveItems, 1,
+        "() -> (Boolean active)"},
+       {"SetDataBrowserScrollBarInset", (PyCFunction)CtlObj_SetDataBrowserScrollBarInset, 1,
+        "() -> (Rect insetRect)"},
+       {"GetDataBrowserScrollBarInset", (PyCFunction)CtlObj_GetDataBrowserScrollBarInset, 1,
+        "() -> (Rect insetRect)"},
+       {"SetDataBrowserTarget", (PyCFunction)CtlObj_SetDataBrowserTarget, 1,
+        "(UInt32 target) -> None"},
+       {"GetDataBrowserTarget", (PyCFunction)CtlObj_GetDataBrowserTarget, 1,
+        "() -> (UInt32 target)"},
+       {"SetDataBrowserSortOrder", (PyCFunction)CtlObj_SetDataBrowserSortOrder, 1,
+        "(UInt16 order) -> None"},
+       {"GetDataBrowserSortOrder", (PyCFunction)CtlObj_GetDataBrowserSortOrder, 1,
+        "() -> (UInt16 order)"},
+       {"SetDataBrowserScrollPosition", (PyCFunction)CtlObj_SetDataBrowserScrollPosition, 1,
+        "(UInt32 top, UInt32 left) -> None"},
+       {"GetDataBrowserScrollPosition", (PyCFunction)CtlObj_GetDataBrowserScrollPosition, 1,
+        "() -> (UInt32 top, UInt32 left)"},
+       {"SetDataBrowserHasScrollBars", (PyCFunction)CtlObj_SetDataBrowserHasScrollBars, 1,
+        "(Boolean horiz, Boolean vert) -> None"},
+       {"GetDataBrowserHasScrollBars", (PyCFunction)CtlObj_GetDataBrowserHasScrollBars, 1,
+        "() -> (Boolean horiz, Boolean vert)"},
+       {"SetDataBrowserSortProperty", (PyCFunction)CtlObj_SetDataBrowserSortProperty, 1,
+        "(UInt32 property) -> None"},
+       {"GetDataBrowserSortProperty", (PyCFunction)CtlObj_GetDataBrowserSortProperty, 1,
+        "() -> (UInt32 property)"},
+       {"SetDataBrowserSelectionFlags", (PyCFunction)CtlObj_SetDataBrowserSelectionFlags, 1,
+        "(UInt32 selectionFlags) -> None"},
+       {"GetDataBrowserSelectionFlags", (PyCFunction)CtlObj_GetDataBrowserSelectionFlags, 1,
+        "() -> (UInt32 selectionFlags)"},
+       {"SetDataBrowserPropertyFlags", (PyCFunction)CtlObj_SetDataBrowserPropertyFlags, 1,
+        "(UInt32 property, UInt32 flags) -> None"},
+       {"GetDataBrowserPropertyFlags", (PyCFunction)CtlObj_GetDataBrowserPropertyFlags, 1,
+        "(UInt32 property) -> (UInt32 flags)"},
+       {"SetDataBrowserEditText", (PyCFunction)CtlObj_SetDataBrowserEditText, 1,
+        "(CFStringRef text) -> None"},
+       {"GetDataBrowserEditText", (PyCFunction)CtlObj_GetDataBrowserEditText, 1,
+        "(CFMutableStringRef text) -> None"},
+       {"SetDataBrowserEditItem", (PyCFunction)CtlObj_SetDataBrowserEditItem, 1,
+        "(UInt32 item, UInt32 property) -> None"},
+       {"GetDataBrowserEditItem", (PyCFunction)CtlObj_GetDataBrowserEditItem, 1,
+        "() -> (UInt32 item, UInt32 property)"},
+       {"GetDataBrowserItemPartBounds", (PyCFunction)CtlObj_GetDataBrowserItemPartBounds, 1,
+        "(UInt32 item, UInt32 property, OSType part) -> (Rect bounds)"},
+       {"RemoveDataBrowserTableViewColumn", (PyCFunction)CtlObj_RemoveDataBrowserTableViewColumn, 1,
+        "(UInt32 column) -> None"},
+       {"GetDataBrowserTableViewColumnCount", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnCount, 1,
+        "() -> (UInt32 numColumns)"},
+       {"SetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_SetDataBrowserTableViewHiliteStyle, 1,
+        "(UInt32 hiliteStyle) -> None"},
+       {"GetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_GetDataBrowserTableViewHiliteStyle, 1,
+        "() -> (UInt32 hiliteStyle)"},
+       {"SetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewRowHeight, 1,
+        "(UInt16 height) -> None"},
+       {"GetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewRowHeight, 1,
+        "() -> (UInt16 height)"},
+       {"SetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnWidth, 1,
+        "(UInt16 width) -> None"},
+       {"GetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnWidth, 1,
+        "() -> (UInt16 width)"},
+       {"SetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRowHeight, 1,
+        "(UInt32 item, UInt16 height) -> None"},
+       {"GetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRowHeight, 1,
+        "(UInt32 item) -> (UInt16 height)"},
+       {"SetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewNamedColumnWidth, 1,
+        "(UInt32 column, UInt16 width) -> None"},
+       {"GetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewNamedColumnWidth, 1,
+        "(UInt32 column) -> (UInt16 width)"},
+       {"SetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_SetDataBrowserTableViewGeometry, 1,
+        "(Boolean variableWidthColumns, Boolean variableHeightRows) -> None"},
+       {"GetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_GetDataBrowserTableViewGeometry, 1,
+        "() -> (Boolean variableWidthColumns, Boolean variableHeightRows)"},
+       {"GetDataBrowserTableViewItemID", (PyCFunction)CtlObj_GetDataBrowserTableViewItemID, 1,
+        "(UInt32 row) -> (UInt32 item)"},
+       {"SetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRow, 1,
+        "(UInt32 item, UInt32 row) -> None"},
+       {"GetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRow, 1,
+        "(UInt32 item) -> (UInt32 row)"},
+       {"SetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnPosition, 1,
+        "(UInt32 column, UInt32 position) -> None"},
+       {"GetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnPosition, 1,
+        "(UInt32 column) -> (UInt32 position)"},
+       {"GetDataBrowserTableViewColumnProperty", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnProperty, 1,
+        "(UInt32 column) -> (UInt32 property)"},
+       {"AutoSizeDataBrowserListViewColumns", (PyCFunction)CtlObj_AutoSizeDataBrowserListViewColumns, 1,
+        "() -> None"},
+       {"SetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_SetDataBrowserListViewHeaderBtnHeight, 1,
+        "(UInt16 height) -> None"},
+       {"GetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_GetDataBrowserListViewHeaderBtnHeight, 1,
+        "() -> (UInt16 height)"},
+       {"SetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_SetDataBrowserListViewUsePlainBackground, 1,
+        "(Boolean usePlainBackground) -> None"},
+       {"GetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_GetDataBrowserListViewUsePlainBackground, 1,
+        "() -> (Boolean usePlainBackground)"},
+       {"SetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_SetDataBrowserListViewDisclosureColumn, 1,
+        "(UInt32 column, Boolean expandableRows) -> None"},
+       {"GetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_GetDataBrowserListViewDisclosureColumn, 1,
+        "() -> (UInt32 column, Boolean expandableRows)"},
+       {"GetDataBrowserColumnViewPath", (PyCFunction)CtlObj_GetDataBrowserColumnViewPath, 1,
+        "(Handle path) -> None"},
+       {"GetDataBrowserColumnViewPathLength", (PyCFunction)CtlObj_GetDataBrowserColumnViewPathLength, 1,
+        "() -> (UInt32 pathLength)"},
+       {"SetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_SetDataBrowserColumnViewDisplayType, 1,
+        "(OSType propertyType) -> None"},
+       {"GetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_GetDataBrowserColumnViewDisplayType, 1,
+        "() -> (OSType propertyType)"},
+       {"as_Resource", (PyCFunction)CtlObj_as_Resource, 1,
+        "() -> (Handle _rv)"},
+       {"GetControlRect", (PyCFunction)CtlObj_GetControlRect, 1,
+        "() -> (Rect rect)"},
+       {"DisposeControl", (PyCFunction)CtlObj_DisposeControl, 1,
+        "() -> None"},
+       {"TrackControl", (PyCFunction)CtlObj_TrackControl, 1,
+        "(Point startPoint [,trackercallback]) -> (ControlPartCode _rv)"},
+       {"HandleControlClick", (PyCFunction)CtlObj_HandleControlClick, 1,
+        "(Point startPoint, Integer modifiers, [,trackercallback]) -> (ControlPartCode _rv)"},
+       {"SetControlData", (PyCFunction)CtlObj_SetControlData, 1,
+        "(stuff) -> None"},
+       {"GetControlData", (PyCFunction)CtlObj_GetControlData, 1,
+        "(part, type) -> String"},
+       {"SetControlData_Handle", (PyCFunction)CtlObj_SetControlData_Handle, 1,
+        "(ResObj) -> None"},
+       {"GetControlData_Handle", (PyCFunction)CtlObj_GetControlData_Handle, 1,
+        "(part, type) -> ResObj"},
+       {"SetControlData_Callback", (PyCFunction)CtlObj_SetControlData_Callback, 1,
+        "(callbackfunc) -> None"},
+
+#if !TARGET_API_MAC_CARBON
+       {"GetPopupData", (PyCFunction)CtlObj_GetPopupData, 1,
+        NULL},
+#endif
+
+#if !TARGET_API_MAC_CARBON
+       {"SetPopupData", (PyCFunction)CtlObj_SetPopupData, 1,
+        NULL},
+#endif
+       {NULL, NULL, 0}
+};
+
+PyMethodChain CtlObj_chain = { CtlObj_methods, NULL };
+
+static PyObject *CtlObj_getattr(ControlObject *self, char *name)
+{
+       return Py_FindMethodInChain(&CtlObj_chain, (PyObject *)self, name);
+}
+
+#define CtlObj_setattr NULL
+
+static int CtlObj_compare(ControlObject *self, ControlObject *other)
+{
+       unsigned long v, w;
+
+       if (!CtlObj_Check((PyObject *)other))
+       {
+               v=(unsigned long)self;
+               w=(unsigned long)other;
+       }
+       else
+       {
+               v=(unsigned long)self->ob_itself;
+               w=(unsigned long)other->ob_itself;
+       }
+       if( v < w ) return -1;
+       if( v > w ) return 1;
+       return 0;
+}
+
+#define CtlObj_repr NULL
+
+static long CtlObj_hash(ControlObject *self)
+{
+       return (long)self->ob_itself;
+}
+
+PyTypeObject Control_Type = {
+       PyObject_HEAD_INIT(NULL)
+       0, /*ob_size*/
+       "_Ctl.Control", /*tp_name*/
+       sizeof(ControlObject), /*tp_basicsize*/
+       0, /*tp_itemsize*/
+       /* methods */
+       (destructor) CtlObj_dealloc, /*tp_dealloc*/
+       0, /*tp_print*/
+       (getattrfunc) CtlObj_getattr, /*tp_getattr*/
+       (setattrfunc) CtlObj_setattr, /*tp_setattr*/
+       (cmpfunc) CtlObj_compare, /*tp_compare*/
+       (reprfunc) CtlObj_repr, /*tp_repr*/
+       (PyNumberMethods *)0, /* tp_as_number */
+       (PySequenceMethods *)0, /* tp_as_sequence */
+       (PyMappingMethods *)0, /* tp_as_mapping */
+       (hashfunc) CtlObj_hash, /*tp_hash*/
+};
+
+/* -------------------- End object type Control --------------------- */
+
+
+static PyObject *Ctl_NewControl(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       ControlHandle _rv;
+       WindowPtr owningWindow;
+       Rect boundsRect;
+       Str255 controlTitle;
+       Boolean initiallyVisible;
+       SInt16 initialValue;
+       SInt16 minimumValue;
+       SInt16 maximumValue;
+       SInt16 procID;
+       SInt32 controlReference;
+#ifndef NewControl
+       PyMac_PRECHECK(NewControl);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&O&bhhhhl",
+                             WinObj_Convert, &owningWindow,
+                             PyMac_GetRect, &boundsRect,
+                             PyMac_GetStr255, controlTitle,
+                             &initiallyVisible,
+                             &initialValue,
+                             &minimumValue,
+                             &maximumValue,
+                             &procID,
+                             &controlReference))
+               return NULL;
+       _rv = NewControl(owningWindow,
+                        &boundsRect,
+                        controlTitle,
+                        initiallyVisible,
+                        initialValue,
+                        minimumValue,
+                        maximumValue,
+                        procID,
+                        controlReference);
+       _res = Py_BuildValue("O&",
+                            CtlObj_New, _rv);
+       return _res;
+}
+
+static PyObject *Ctl_GetNewControl(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       ControlHandle _rv;
+       SInt16 resourceID;
+       WindowPtr owningWindow;
+#ifndef GetNewControl
+       PyMac_PRECHECK(GetNewControl);
+#endif
+       if (!PyArg_ParseTuple(_args, "hO&",
+                             &resourceID,
+                             WinObj_Convert, &owningWindow))
+               return NULL;
+       _rv = GetNewControl(resourceID,
+                           owningWindow);
+       _res = Py_BuildValue("O&",
+                            CtlObj_New, _rv);
+       return _res;
+}
+
+static PyObject *Ctl_DrawControls(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       WindowPtr theWindow;
+#ifndef DrawControls
+       PyMac_PRECHECK(DrawControls);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &theWindow))
+               return NULL;
+       DrawControls(theWindow);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *Ctl_UpdateControls(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       WindowPtr theWindow;
+       RgnHandle updateRegion;
+#ifndef UpdateControls
+       PyMac_PRECHECK(UpdateControls);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&",
+                             WinObj_Convert, &theWindow,
+                             ResObj_Convert, &updateRegion))
+               return NULL;
+       UpdateControls(theWindow,
+                      updateRegion);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *Ctl_FindControl(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       ControlPartCode _rv;
+       Point testPoint;
+       WindowPtr theWindow;
+       ControlHandle theControl;
+#ifndef FindControl
+       PyMac_PRECHECK(FindControl);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&",
+                             PyMac_GetPoint, &testPoint,
+                             WinObj_Convert, &theWindow))
+               return NULL;
+       _rv = FindControl(testPoint,
+                         theWindow,
+                         &theControl);
+       _res = Py_BuildValue("hO&",
+                            _rv,
+                            CtlObj_WhichControl, theControl);
+       return _res;
+}
+
+static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       ControlHandle _rv;
+       Point inWhere;
+       WindowPtr inWindow;
+       SInt16 outPart;
+#ifndef FindControlUnderMouse
+       PyMac_PRECHECK(FindControlUnderMouse);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&",
+                             PyMac_GetPoint, &inWhere,
+                             WinObj_Convert, &inWindow))
+               return NULL;
+       _rv = FindControlUnderMouse(inWhere,
+                                   inWindow,
+                                   &outPart);
+       _res = Py_BuildValue("O&h",
+                            CtlObj_New, _rv,
+                            outPart);
+       return _res;
+}
+
+static PyObject *Ctl_IdleControls(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       WindowPtr inWindow;
+#ifndef IdleControls
+       PyMac_PRECHECK(IdleControls);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &inWindow))
+               return NULL;
+       IdleControls(inWindow);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+#if TARGET_API_MAC_CARBON
+
+static PyObject *Ctl_GetControlByID(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       WindowPtr inWindow;
+       ControlID inID;
+       ControlHandle outControl;
+#ifndef GetControlByID
+       PyMac_PRECHECK(GetControlByID);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&",
+                             WinObj_Convert, &inWindow,
+                             PyControlID_Convert, &inID))
+               return NULL;
+       _err = GetControlByID(inWindow,
+                             &inID,
+                             &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
+       return _res;
+}
+#endif
+
+static PyObject *Ctl_DumpControlHierarchy(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSErr _err;
+       WindowPtr inWindow;
+       FSSpec inDumpFile;
+#ifndef DumpControlHierarchy
+       PyMac_PRECHECK(DumpControlHierarchy);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&",
+                             WinObj_Convert, &inWindow,
+                             PyMac_GetFSSpec, &inDumpFile))
+               return NULL;
+       _err = DumpControlHierarchy(inWindow,
+                                   &inDumpFile);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *Ctl_CreateRootControl(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSErr _err;
+       WindowPtr inWindow;
+       ControlHandle outControl;
+#ifndef CreateRootControl
+       PyMac_PRECHECK(CreateRootControl);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &inWindow))
+               return NULL;
+       _err = CreateRootControl(inWindow,
+                                &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
+       return _res;
+}
+
+static PyObject *Ctl_GetRootControl(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSErr _err;
+       WindowPtr inWindow;
+       ControlHandle outControl;
+#ifndef GetRootControl
+       PyMac_PRECHECK(GetRootControl);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &inWindow))
+               return NULL;
+       _err = GetRootControl(inWindow,
+                             &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
+       return _res;
+}
+
+static PyObject *Ctl_GetKeyboardFocus(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSErr _err;
+       WindowPtr inWindow;
+       ControlHandle outControl;
+#ifndef GetKeyboardFocus
+       PyMac_PRECHECK(GetKeyboardFocus);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &inWindow))
+               return NULL;
+       _err = GetKeyboardFocus(inWindow,
+                               &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
+       return _res;
+}
+
+static PyObject *Ctl_SetKeyboardFocus(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSErr _err;
+       WindowPtr inWindow;
+       ControlHandle inControl;
+       ControlFocusPart inPart;
+#ifndef SetKeyboardFocus
+       PyMac_PRECHECK(SetKeyboardFocus);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&h",
+                             WinObj_Convert, &inWindow,
+                             CtlObj_Convert, &inControl,
+                             &inPart))
+               return NULL;
+       _err = SetKeyboardFocus(inWindow,
+                               inControl,
+                               inPart);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
+static PyObject *Ctl_AdvanceKeyboardFocus(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSErr _err;
+       WindowPtr inWindow;
+#ifndef AdvanceKeyboardFocus
+       PyMac_PRECHECK(AdvanceKeyboardFocus);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &inWindow))
+               return NULL;
+       _err = AdvanceKeyboardFocus(inWindow);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if !TARGET_API_MAC_CARBON
-       {"GetPopupData", (PyCFunction)CtlObj_GetPopupData, 1,
-        NULL},
+static PyObject *Ctl_ReverseKeyboardFocus(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSErr _err;
+       WindowPtr inWindow;
+#ifndef ReverseKeyboardFocus
+       PyMac_PRECHECK(ReverseKeyboardFocus);
 #endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &inWindow))
+               return NULL;
+       _err = ReverseKeyboardFocus(inWindow);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-#if !TARGET_API_MAC_CARBON
-       {"SetPopupData", (PyCFunction)CtlObj_SetPopupData, 1,
-        NULL},
+static PyObject *Ctl_ClearKeyboardFocus(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSErr _err;
+       WindowPtr inWindow;
+#ifndef ClearKeyboardFocus
+       PyMac_PRECHECK(ClearKeyboardFocus);
 #endif
-       {NULL, NULL, 0}
-};
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &inWindow))
+               return NULL;
+       _err = ClearKeyboardFocus(inWindow);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
 
-PyMethodChain CtlObj_chain = { CtlObj_methods, NULL };
+#if TARGET_API_MAC_CARBON
 
-static PyObject *CtlObj_getattr(ControlObject *self, char *name)
+static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
 {
-       return Py_FindMethodInChain(&CtlObj_chain, (PyObject *)self, name);
+       PyObject *_res = NULL;
+       OSStatus _err;
+       WindowPtr theWindow;
+       Boolean tracks;
+#ifndef SetAutomaticControlDragTrackingEnabledForWindow
+       PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&b",
+                             WinObj_Convert, &theWindow,
+                             &tracks))
+               return NULL;
+       _err = SetAutomaticControlDragTrackingEnabledForWindow(theWindow,
+                                                              tracks);
+       if (_err != noErr) return PyMac_Error(_err);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
 }
+#endif
 
-#define CtlObj_setattr NULL
+#if TARGET_API_MAC_CARBON
 
-static int CtlObj_compare(ControlObject *self, ControlObject *other)
+static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
 {
-       unsigned long v, w;
-
-       if (!CtlObj_Check((PyObject *)other))
-       {
-               v=(unsigned long)self;
-               w=(unsigned long)other;
-       }
-       else
-       {
-               v=(unsigned long)self->ob_itself;
-               w=(unsigned long)other->ob_itself;
-       }
-       if( v < w ) return -1;
-       if( v > w ) return 1;
-       return 0;
+       PyObject *_res = NULL;
+       OSStatus _err;
+       WindowPtr theWindow;
+       Boolean tracks;
+#ifndef IsAutomaticControlDragTrackingEnabledForWindow
+       PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&",
+                             WinObj_Convert, &theWindow))
+               return NULL;
+       _err = IsAutomaticControlDragTrackingEnabledForWindow(theWindow,
+                                                             &tracks);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("b",
+                            tracks);
+       return _res;
 }
+#endif
 
-#define CtlObj_repr NULL
-
-static long CtlObj_hash(ControlObject *self)
+static PyObject *Ctl_CreateDisclosureTriangleControl(PyObject *_self, PyObject *_args)
 {
-       return (long)self->ob_itself;
+       PyObject *_res = NULL;
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       UInt16 orientation;
+       CFStringRef title;
+       SInt32 initialValue;
+       Boolean drawTitle;
+       Boolean autoToggles;
+       ControlHandle outControl;
+#ifndef CreateDisclosureTriangleControl
+       PyMac_PRECHECK(CreateDisclosureTriangleControl);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&HO&lbb",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             &orientation,
+                             CFStringRefObj_Convert, &title,
+                             &initialValue,
+                             &drawTitle,
+                             &autoToggles))
+               return NULL;
+       _err = CreateDisclosureTriangleControl(window,
+                                              &boundsRect,
+                                              orientation,
+                                              title,
+                                              initialValue,
+                                              drawTitle,
+                                              autoToggles,
+                                              &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
+       return _res;
 }
 
-PyTypeObject Control_Type = {
-       PyObject_HEAD_INIT(NULL)
-       0, /*ob_size*/
-       "_Ctl.Control", /*tp_name*/
-       sizeof(ControlObject), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       /* methods */
-       (destructor) CtlObj_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       (getattrfunc) CtlObj_getattr, /*tp_getattr*/
-       (setattrfunc) CtlObj_setattr, /*tp_setattr*/
-       (cmpfunc) CtlObj_compare, /*tp_compare*/
-       (reprfunc) CtlObj_repr, /*tp_repr*/
-       (PyNumberMethods *)0, /* tp_as_number */
-       (PySequenceMethods *)0, /* tp_as_sequence */
-       (PyMappingMethods *)0, /* tp_as_mapping */
-       (hashfunc) CtlObj_hash, /*tp_hash*/
-};
+static PyObject *Ctl_CreateProgressBarControl(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       SInt32 value;
+       SInt32 minimum;
+       SInt32 maximum;
+       Boolean indeterminate;
+       ControlHandle outControl;
+#ifndef CreateProgressBarControl
+       PyMac_PRECHECK(CreateProgressBarControl);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&lllb",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             &value,
+                             &minimum,
+                             &maximum,
+                             &indeterminate))
+               return NULL;
+       _err = CreateProgressBarControl(window,
+                                       &boundsRect,
+                                       value,
+                                       minimum,
+                                       maximum,
+                                       indeterminate,
+                                       &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
+       return _res;
+}
 
-/* -------------------- End object type Control --------------------- */
+static PyObject *Ctl_CreateLittleArrowsControl(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       SInt32 value;
+       SInt32 minimum;
+       SInt32 maximum;
+       SInt32 increment;
+       ControlHandle outControl;
+#ifndef CreateLittleArrowsControl
+       PyMac_PRECHECK(CreateLittleArrowsControl);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&llll",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             &value,
+                             &minimum,
+                             &maximum,
+                             &increment))
+               return NULL;
+       _err = CreateLittleArrowsControl(window,
+                                        &boundsRect,
+                                        value,
+                                        minimum,
+                                        maximum,
+                                        increment,
+                                        &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
+       return _res;
+}
 
+static PyObject *Ctl_CreateChasingArrowsControl(PyObject *_self, PyObject *_args)
+{
+       PyObject *_res = NULL;
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       ControlHandle outControl;
+#ifndef CreateChasingArrowsControl
+       PyMac_PRECHECK(CreateChasingArrowsControl);
+#endif
+       if (!PyArg_ParseTuple(_args, "O&O&",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect))
+               return NULL;
+       _err = CreateChasingArrowsControl(window,
+                                         &boundsRect,
+                                         &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
+       return _res;
+}
 
-static PyObject *Ctl_NewControl(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateSeparatorControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       ControlHandle _rv;
-       WindowPtr owningWindow;
+       OSStatus _err;
+       WindowPtr window;
        Rect boundsRect;
-       Str255 controlTitle;
-       Boolean initiallyVisible;
-       SInt16 initialValue;
-       SInt16 minimumValue;
-       SInt16 maximumValue;
-       SInt16 procID;
-       SInt32 controlReference;
-#ifndef NewControl
-       PyMac_PRECHECK(NewControl);
+       ControlHandle outControl;
+#ifndef CreateSeparatorControl
+       PyMac_PRECHECK(CreateSeparatorControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&bhhhhl",
-                             WinObj_Convert, &owningWindow,
-                             PyMac_GetRect, &boundsRect,
-                             PyMac_GetStr255, controlTitle,
-                             &initiallyVisible,
-                             &initialValue,
-                             &minimumValue,
-                             &maximumValue,
-                             &procID,
-                             &controlReference))
+       if (!PyArg_ParseTuple(_args, "O&O&",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect))
                return NULL;
-       _rv = NewControl(owningWindow,
-                        &boundsRect,
-                        controlTitle,
-                        initiallyVisible,
-                        initialValue,
-                        minimumValue,
-                        maximumValue,
-                        procID,
-                        controlReference);
+       _err = CreateSeparatorControl(window,
+                                     &boundsRect,
+                                     &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
        _res = Py_BuildValue("O&",
-                            CtlObj_New, _rv);
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_GetNewControl(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateGroupBoxControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       ControlHandle _rv;
-       SInt16 resourceID;
-       WindowPtr owningWindow;
-#ifndef GetNewControl
-       PyMac_PRECHECK(GetNewControl);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       CFStringRef title;
+       Boolean primary;
+       ControlHandle outControl;
+#ifndef CreateGroupBoxControl
+       PyMac_PRECHECK(CreateGroupBoxControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "hO&",
-                             &resourceID,
-                             WinObj_Convert, &owningWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&O&b",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             CFStringRefObj_Convert, &title,
+                             &primary))
                return NULL;
-       _rv = GetNewControl(resourceID,
-                           owningWindow);
+       _err = CreateGroupBoxControl(window,
+                                    &boundsRect,
+                                    title,
+                                    primary,
+                                    &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
        _res = Py_BuildValue("O&",
-                            CtlObj_New, _rv);
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_DrawControls(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateCheckGroupBoxControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       WindowPtr theWindow;
-#ifndef DrawControls
-       PyMac_PRECHECK(DrawControls);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       CFStringRef title;
+       SInt32 initialValue;
+       Boolean primary;
+       Boolean autoToggle;
+       ControlHandle outControl;
+#ifndef CreateCheckGroupBoxControl
+       PyMac_PRECHECK(CreateCheckGroupBoxControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &theWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&O&lbb",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             CFStringRefObj_Convert, &title,
+                             &initialValue,
+                             &primary,
+                             &autoToggle))
                return NULL;
-       DrawControls(theWindow);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _err = CreateCheckGroupBoxControl(window,
+                                         &boundsRect,
+                                         title,
+                                         initialValue,
+                                         primary,
+                                         autoToggle,
+                                         &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_UpdateControls(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreatePopupGroupBoxControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       WindowPtr theWindow;
-       RgnHandle updateRegion;
-#ifndef UpdateControls
-       PyMac_PRECHECK(UpdateControls);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       CFStringRef title;
+       Boolean primary;
+       SInt16 menuID;
+       Boolean variableWidth;
+       SInt16 titleWidth;
+       SInt16 titleJustification;
+       Style titleStyle;
+       ControlHandle outControl;
+#ifndef CreatePopupGroupBoxControl
+       PyMac_PRECHECK(CreatePopupGroupBoxControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &theWindow,
-                             ResObj_Convert, &updateRegion))
+       if (!PyArg_ParseTuple(_args, "O&O&O&bhbhhb",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             CFStringRefObj_Convert, &title,
+                             &primary,
+                             &menuID,
+                             &variableWidth,
+                             &titleWidth,
+                             &titleJustification,
+                             &titleStyle))
                return NULL;
-       UpdateControls(theWindow,
-                      updateRegion);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _err = CreatePopupGroupBoxControl(window,
+                                         &boundsRect,
+                                         title,
+                                         primary,
+                                         menuID,
+                                         variableWidth,
+                                         titleWidth,
+                                         titleJustification,
+                                         titleStyle,
+                                         &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_FindControl(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreatePopupArrowControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       ControlPartCode _rv;
-       Point testPoint;
-       WindowPtr theWindow;
-       ControlHandle theControl;
-#ifndef FindControl
-       PyMac_PRECHECK(FindControl);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       UInt16 orientation;
+       UInt16 size;
+       ControlHandle outControl;
+#ifndef CreatePopupArrowControl
+       PyMac_PRECHECK(CreatePopupArrowControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &testPoint,
-                             WinObj_Convert, &theWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&HH",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             &orientation,
+                             &size))
                return NULL;
-       _rv = FindControl(testPoint,
-                         theWindow,
-                         &theControl);
-       _res = Py_BuildValue("hO&",
-                            _rv,
-                            CtlObj_WhichControl, theControl);
+       _err = CreatePopupArrowControl(window,
+                                      &boundsRect,
+                                      orientation,
+                                      size,
+                                      &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreatePlacardControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       ControlHandle _rv;
-       Point inWhere;
-       WindowPtr inWindow;
-       SInt16 outPart;
-#ifndef FindControlUnderMouse
-       PyMac_PRECHECK(FindControlUnderMouse);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       ControlHandle outControl;
+#ifndef CreatePlacardControl
+       PyMac_PRECHECK(CreatePlacardControl);
 #endif
        if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetPoint, &inWhere,
-                             WinObj_Convert, &inWindow))
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect))
                return NULL;
-       _rv = FindControlUnderMouse(inWhere,
-                                   inWindow,
-                                   &outPart);
-       _res = Py_BuildValue("O&h",
-                            CtlObj_New, _rv,
-                            outPart);
+       _err = CreatePlacardControl(window,
+                                   &boundsRect,
+                                   &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_IdleControls(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateClockControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       WindowPtr inWindow;
-#ifndef IdleControls
-       PyMac_PRECHECK(IdleControls);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       UInt16 clockType;
+       UInt32 clockFlags;
+       ControlHandle outControl;
+#ifndef CreateClockControl
+       PyMac_PRECHECK(CreateClockControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&Hl",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             &clockType,
+                             &clockFlags))
                return NULL;
-       IdleControls(inWindow);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _err = CreateClockControl(window,
+                                 &boundsRect,
+                                 clockType,
+                                 clockFlags,
+                                 &outControl);
+       if (_err != noErr) return PyMac_Error(_err);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
-static PyObject *Ctl_GetControlByID(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateUserPaneControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
        OSStatus _err;
-       WindowPtr inWindow;
-       ControlID inID;
+       WindowPtr window;
+       Rect boundsRect;
+       UInt32 features;
        ControlHandle outControl;
-#ifndef GetControlByID
-       PyMac_PRECHECK(GetControlByID);
+#ifndef CreateUserPaneControl
+       PyMac_PRECHECK(CreateUserPaneControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &inWindow,
-                             PyControlID_Convert, &inID))
+       if (!PyArg_ParseTuple(_args, "O&O&l",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             &features))
                return NULL;
-       _err = GetControlByID(inWindow,
-                             &inID,
-                             &outControl);
+       _err = CreateUserPaneControl(window,
+                                    &boundsRect,
+                                    features,
+                                    &outControl);
        if (_err != noErr) return PyMac_Error(_err);
        _res = Py_BuildValue("O&",
                             CtlObj_WhichControl, outControl);
        return _res;
 }
-#endif
 
-static PyObject *Ctl_DumpControlHierarchy(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateEditTextControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-       FSSpec inDumpFile;
-#ifndef DumpControlHierarchy
-       PyMac_PRECHECK(DumpControlHierarchy);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       CFStringRef text;
+       Boolean isPassword;
+       Boolean useInlineInput;
+       ControlFontStyleRec style;
+       ControlHandle outControl;
+#ifndef CreateEditTextControl
+       PyMac_PRECHECK(CreateEditTextControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             WinObj_Convert, &inWindow,
-                             PyMac_GetFSSpec, &inDumpFile))
+       if (!PyArg_ParseTuple(_args, "O&O&O&bbO&",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             CFStringRefObj_Convert, &text,
+                             &isPassword,
+                             &useInlineInput,
+                             ControlFontStyle_Convert, &style))
                return NULL;
-       _err = DumpControlHierarchy(inWindow,
-                                   &inDumpFile);
+       _err = CreateEditTextControl(window,
+                                    &boundsRect,
+                                    text,
+                                    isPassword,
+                                    useInlineInput,
+                                    &style,
+                                    &outControl);
        if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_CreateRootControl(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateStaticTextControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       CFStringRef text;
+       ControlFontStyleRec style;
        ControlHandle outControl;
-#ifndef CreateRootControl
-       PyMac_PRECHECK(CreateRootControl);
+#ifndef CreateStaticTextControl
+       PyMac_PRECHECK(CreateStaticTextControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             CFStringRefObj_Convert, &text,
+                             ControlFontStyle_Convert, &style))
                return NULL;
-       _err = CreateRootControl(inWindow,
-                                &outControl);
+       _err = CreateStaticTextControl(window,
+                                      &boundsRect,
+                                      text,
+                                      &style,
+                                      &outControl);
        if (_err != noErr) return PyMac_Error(_err);
        _res = Py_BuildValue("O&",
                             CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_GetRootControl(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateWindowHeaderControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       Boolean isListHeader;
        ControlHandle outControl;
-#ifndef GetRootControl
-       PyMac_PRECHECK(GetRootControl);
+#ifndef CreateWindowHeaderControl
+       PyMac_PRECHECK(CreateWindowHeaderControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&b",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             &isListHeader))
                return NULL;
-       _err = GetRootControl(inWindow,
-                             &outControl);
+       _err = CreateWindowHeaderControl(window,
+                                        &boundsRect,
+                                        isListHeader,
+                                        &outControl);
        if (_err != noErr) return PyMac_Error(_err);
        _res = Py_BuildValue("O&",
                             CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_GetKeyboardFocus(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreatePushButtonControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       CFStringRef title;
        ControlHandle outControl;
-#ifndef GetKeyboardFocus
-       PyMac_PRECHECK(GetKeyboardFocus);
+#ifndef CreatePushButtonControl
+       PyMac_PRECHECK(CreatePushButtonControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&O&",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             CFStringRefObj_Convert, &title))
                return NULL;
-       _err = GetKeyboardFocus(inWindow,
-                               &outControl);
+       _err = CreatePushButtonControl(window,
+                                      &boundsRect,
+                                      title,
+                                      &outControl);
        if (_err != noErr) return PyMac_Error(_err);
        _res = Py_BuildValue("O&",
                             CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_SetKeyboardFocus(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateRadioButtonControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-       ControlHandle inControl;
-       ControlFocusPart inPart;
-#ifndef SetKeyboardFocus
-       PyMac_PRECHECK(SetKeyboardFocus);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       CFStringRef title;
+       SInt32 initialValue;
+       Boolean autoToggle;
+       ControlHandle outControl;
+#ifndef CreateRadioButtonControl
+       PyMac_PRECHECK(CreateRadioButtonControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             WinObj_Convert, &inWindow,
-                             CtlObj_Convert, &inControl,
-                             &inPart))
+       if (!PyArg_ParseTuple(_args, "O&O&O&lb",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             CFStringRefObj_Convert, &title,
+                             &initialValue,
+                             &autoToggle))
                return NULL;
-       _err = SetKeyboardFocus(inWindow,
-                               inControl,
-                               inPart);
+       _err = CreateRadioButtonControl(window,
+                                       &boundsRect,
+                                       title,
+                                       initialValue,
+                                       autoToggle,
+                                       &outControl);
        if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_AdvanceKeyboardFocus(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateCheckBoxControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-#ifndef AdvanceKeyboardFocus
-       PyMac_PRECHECK(AdvanceKeyboardFocus);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       CFStringRef title;
+       SInt32 initialValue;
+       Boolean autoToggle;
+       ControlHandle outControl;
+#ifndef CreateCheckBoxControl
+       PyMac_PRECHECK(CreateCheckBoxControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&O&lb",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             CFStringRefObj_Convert, &title,
+                             &initialValue,
+                             &autoToggle))
                return NULL;
-       _err = AdvanceKeyboardFocus(inWindow);
+       _err = CreateCheckBoxControl(window,
+                                    &boundsRect,
+                                    title,
+                                    initialValue,
+                                    autoToggle,
+                                    &outControl);
        if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_ReverseKeyboardFocus(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreatePopupButtonControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-#ifndef ReverseKeyboardFocus
-       PyMac_PRECHECK(ReverseKeyboardFocus);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       CFStringRef title;
+       SInt16 menuID;
+       Boolean variableWidth;
+       SInt16 titleWidth;
+       SInt16 titleJustification;
+       Style titleStyle;
+       ControlHandle outControl;
+#ifndef CreatePopupButtonControl
+       PyMac_PRECHECK(CreatePopupButtonControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&O&hbhhb",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             CFStringRefObj_Convert, &title,
+                             &menuID,
+                             &variableWidth,
+                             &titleWidth,
+                             &titleJustification,
+                             &titleStyle))
                return NULL;
-       _err = ReverseKeyboardFocus(inWindow);
+       _err = CreatePopupButtonControl(window,
+                                       &boundsRect,
+                                       title,
+                                       menuID,
+                                       variableWidth,
+                                       titleWidth,
+                                       titleJustification,
+                                       titleStyle,
+                                       &outControl);
        if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-static PyObject *Ctl_ClearKeyboardFocus(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateRadioGroupControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
-       OSErr _err;
-       WindowPtr inWindow;
-#ifndef ClearKeyboardFocus
-       PyMac_PRECHECK(ClearKeyboardFocus);
+       OSStatus _err;
+       WindowPtr window;
+       Rect boundsRect;
+       ControlHandle outControl;
+#ifndef CreateRadioGroupControl
+       PyMac_PRECHECK(CreateRadioGroupControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &inWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect))
                return NULL;
-       _err = ClearKeyboardFocus(inWindow);
+       _err = CreateRadioGroupControl(window,
+                                      &boundsRect,
+                                      &outControl);
        if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
-static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateScrollingTextBoxControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
        OSStatus _err;
-       WindowPtr theWindow;
-       Boolean tracks;
-#ifndef SetAutomaticControlDragTrackingEnabledForWindow
-       PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
+       WindowPtr window;
+       Rect boundsRect;
+       SInt16 contentResID;
+       Boolean autoScroll;
+       UInt32 delayBeforeAutoScroll;
+       UInt32 delayBetweenAutoScroll;
+       UInt16 autoScrollAmount;
+       ControlHandle outControl;
+#ifndef CreateScrollingTextBoxControl
+       PyMac_PRECHECK(CreateScrollingTextBoxControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&b",
-                             WinObj_Convert, &theWindow,
-                             &tracks))
+       if (!PyArg_ParseTuple(_args, "O&O&hbllH",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             &contentResID,
+                             &autoScroll,
+                             &delayBeforeAutoScroll,
+                             &delayBetweenAutoScroll,
+                             &autoScrollAmount))
                return NULL;
-       _err = SetAutomaticControlDragTrackingEnabledForWindow(theWindow,
-                                                              tracks);
+       _err = CreateScrollingTextBoxControl(window,
+                                            &boundsRect,
+                                            contentResID,
+                                            autoScroll,
+                                            delayBeforeAutoScroll,
+                                            delayBetweenAutoScroll,
+                                            autoScrollAmount,
+                                            &outControl);
        if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
-static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
+static PyObject *Ctl_CreateDataBrowserControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
        OSStatus _err;
-       WindowPtr theWindow;
-       Boolean tracks;
-#ifndef IsAutomaticControlDragTrackingEnabledForWindow
-       PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
+       WindowPtr window;
+       Rect boundsRect;
+       OSType style;
+       ControlHandle outControl;
+#ifndef CreateDataBrowserControl
+       PyMac_PRECHECK(CreateDataBrowserControl);
 #endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             WinObj_Convert, &theWindow))
+       if (!PyArg_ParseTuple(_args, "O&O&O&",
+                             WinObj_Convert, &window,
+                             PyMac_GetRect, &boundsRect,
+                             PyMac_GetOSType, &style))
                return NULL;
-       _err = IsAutomaticControlDragTrackingEnabledForWindow(theWindow,
-                                                             &tracks);
+       _err = CreateDataBrowserControl(window,
+                                       &boundsRect,
+                                       style,
+                                       &outControl);
        if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("b",
-                            tracks);
+       _res = Py_BuildValue("O&",
+                            CtlObj_WhichControl, outControl);
        return _res;
 }
-#endif
 
 static PyObject *Ctl_as_Control(PyObject *_self, PyObject *_args)
 {
@@ -2785,6 +5046,50 @@ static PyMethodDef Ctl_methods[] = {
        {"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
         "(WindowPtr theWindow) -> (Boolean tracks)"},
 #endif
+       {"CreateDisclosureTriangleControl", (PyCFunction)Ctl_CreateDisclosureTriangleControl, 1,
+        "(WindowPtr window, Rect boundsRect, UInt16 orientation, CFStringRef title, SInt32 initialValue, Boolean drawTitle, Boolean autoToggles) -> (ControlHandle outControl)"},
+       {"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
+        "(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)"},
+       {"CreateLittleArrowsControl", (PyCFunction)Ctl_CreateLittleArrowsControl, 1,
+        "(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 increment) -> (ControlHandle outControl)"},
+       {"CreateChasingArrowsControl", (PyCFunction)Ctl_CreateChasingArrowsControl, 1,
+        "(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)"},
+       {"CreateSeparatorControl", (PyCFunction)Ctl_CreateSeparatorControl, 1,
+        "(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)"},
+       {"CreateGroupBoxControl", (PyCFunction)Ctl_CreateGroupBoxControl, 1,
+        "(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary) -> (ControlHandle outControl)"},
+       {"CreateCheckGroupBoxControl", (PyCFunction)Ctl_CreateCheckGroupBoxControl, 1,
+        "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean primary, Boolean autoToggle) -> (ControlHandle outControl)"},
+       {"CreatePopupGroupBoxControl", (PyCFunction)Ctl_CreatePopupGroupBoxControl, 1,
+        "(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)"},
+       {"CreatePopupArrowControl", (PyCFunction)Ctl_CreatePopupArrowControl, 1,
+        "(WindowPtr window, Rect boundsRect, UInt16 orientation, UInt16 size) -> (ControlHandle outControl)"},
+       {"CreatePlacardControl", (PyCFunction)Ctl_CreatePlacardControl, 1,
+        "(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)"},
+       {"CreateClockControl", (PyCFunction)Ctl_CreateClockControl, 1,
+        "(WindowPtr window, Rect boundsRect, UInt16 clockType, UInt32 clockFlags) -> (ControlHandle outControl)"},
+       {"CreateUserPaneControl", (PyCFunction)Ctl_CreateUserPaneControl, 1,
+        "(WindowPtr window, Rect boundsRect, UInt32 features) -> (ControlHandle outControl)"},
+       {"CreateEditTextControl", (PyCFunction)Ctl_CreateEditTextControl, 1,
+        "(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, Boolean useInlineInput, ControlFontStyleRec style) -> (ControlHandle outControl)"},
+       {"CreateStaticTextControl", (PyCFunction)Ctl_CreateStaticTextControl, 1,
+        "(WindowPtr window, Rect boundsRect, CFStringRef text, ControlFontStyleRec style) -> (ControlHandle outControl)"},
+       {"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
+        "(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)"},
+       {"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1,
+        "(WindowPtr window, Rect boundsRect, CFStringRef title) -> (ControlHandle outControl)"},
+       {"CreateRadioButtonControl", (PyCFunction)Ctl_CreateRadioButtonControl, 1,
+        "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)"},
+       {"CreateCheckBoxControl", (PyCFunction)Ctl_CreateCheckBoxControl, 1,
+        "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)"},
+       {"CreatePopupButtonControl", (PyCFunction)Ctl_CreatePopupButtonControl, 1,
+        "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)"},
+       {"CreateRadioGroupControl", (PyCFunction)Ctl_CreateRadioGroupControl, 1,
+        "(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)"},
+       {"CreateScrollingTextBoxControl", (PyCFunction)Ctl_CreateScrollingTextBoxControl, 1,
+        "(WindowPtr window, Rect boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount) -> (ControlHandle outControl)"},
+       {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1,
+        "(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)"},
        {"as_Control", (PyCFunction)Ctl_as_Control, 1,
         "(Handle h) -> (ControlHandle _rv)"},
        {NULL, NULL, 0}
index 50de24780aafc70ee3d565f60cbd3e274572c70d..de7353cbfe657f455ab486f5d48c04c4e7a050e7 100644 (file)
@@ -36,6 +36,11 @@ class MyScanner(Scanner):
                self.defsfile.write("from TextEdit import *\n")
                self.defsfile.write("from QuickDraw import *\n")
                self.defsfile.write("from Dragconst import *\n")
+               self.defsfile.write("from CarbonEvents import *\n")
+               self.defsfile.write("from Appearance import *\n")
+               self.defsfile.write("kDataBrowserItemAnyState = -1\n")
+               self.defsfile.write("kControlBevelButtonCenterPopupGlyphTag = -1\n")
+               self.defsfile.write("kDataBrowserClientPropertyFlagsMask = 0xFF << 24  # kDataBrowserClientPropertyFlagsOffset\n")
                self.defsfile.write("\n")
 
        def makeblacklistnames(self):
@@ -48,7 +53,8 @@ class MyScanner(Scanner):
                        'SetControlData',       # Generated manually
                        'GetControlData',       # Generated manually
                        'kControlBevelButtonCenterPopupGlyphTag', # Constant with funny definition
-                       'kControlProgressBarIndeterminateTag', # ditto
+                       'kDataBrowserClientPropertyFlagsMask',  # ditto
+                       'kDataBrowserItemAnyState',   # and ditto
                        # The following are unavailable for static 68k (appearance manager)
 ##                     'GetBevelButtonMenuValue',
 ##                     'SetBevelButtonMenuValue',
@@ -80,6 +86,14 @@ class MyScanner(Scanner):
                        'SetControlProperty',
                        'GetControlPropertySize',
                        'SendControlMessage', # Parameter changed from long to void* from UH3.3 to UH3.4
+                       # unavailable in Just's CW6 + UH 3.4 libs
+                       'CreateDisclosureButtonControl',
+                       'CreateRelevanceBarControl',
+                       'DisableControl',
+                       'EnableControl',
+                       'IsControlEnabled',
+                       'CreateEditUnicodeTextControl',
+                       'CopyDataBrowserEditText',
                        ]
 
        def makegreylist(self):
@@ -138,6 +152,23 @@ class MyScanner(Scanner):
                        'ControlDefSpec', # Don't know how to do this yet
                        'ControlDefSpec_ptr', # ditto
                        'Collection', # Ditto
+                       # not-yet-supported stuff in Universal Headers 3.4:
+                       'ControlColorUPP',
+                       'ControlKind',  # XXX easy: 2-tuple containing 2 OSType's
+                       'ControlTabEntry_ptr', # XXX needed for tabs
+                       'ControlButtonContentInfo',  # XXX ugh: a union
+                       'ControlButtonContentInfo_ptr',  # XXX ugh: a union
+                       'ListDefSpec_ptr',  # XXX see _Listmodule.c, tricky but possible
+                       'DataBrowserItemID_ptr',  # XXX array of UInt32, for BrowserView
+                       'DataBrowserItemUPP',
+                       'DataBrowserItemDataRef', # XXX void *
+                       'DataBrowserCallbacks', # difficult struct
+                       'DataBrowserCallbacks_ptr',
+                       'DataBrowserCustomCallbacks',
+                       'DataBrowserCustomCallbacks_ptr',
+                       'DataBrowserTableViewColumnDesc',
+                       'DataBrowserListViewColumnDesc',
+                       'CFDataRef',
                        ]
 
        def makerepairinstructions(self):
index 384ba9f86f5de3a4f9c5e9301ebd02bae1ee5d4a..2d9c3f4c731bf4ee9235afe11a37dedb1b87ff1b 100644 (file)
@@ -48,6 +48,38 @@ ControlID_ptr = ControlID
 DragTrackingMessage = Type("DragTrackingMessage", "h")
 DragReference = OpaqueByValueType("DragReference", "DragObj")
 
+CFStringRef = OpaqueByValueType("CFStringRef", "CFStringRefObj")
+CFMutableStringRef = OpaqueByValueType("CFMutableStringRef", "CFMutableStringRefObj")
+CFDataRef = OpaqueByValueType("CFDataRef", "CFDataRefObj")
+
+ControlTabSize = UInt16
+ControlTabDirection = UInt16
+ControlPopupArrowOrientation = UInt16
+ControlPopupArrowSize = UInt16
+ControlClockType = UInt16
+ControlClockFlags = UInt32
+ControlRoundButtonSize = SInt16
+DataBrowserViewStyle = OSType
+DataBrowserItemID = UInt32
+DataBrowserEditCommand = UInt32
+DataBrowserSelectionAnchorDirection = UInt32
+DataBrowserItemState = UInt32
+DataBrowserPropertyID = UInt32
+DataBrowserRevealOptions = UInt8
+DataBrowserSortOrder = UInt16
+DataBrowserSelectionFlags = UInt32
+DataBrowserPropertyFlags = UInt32
+DataBrowserPropertyPart = OSType
+DataBrowserTableViewColumnID = DataBrowserPropertyID
+#DataBrowserTableViewColumnDesc = DataBrowserPropertyDesc
+DataBrowserTableViewHiliteStyle = UInt32
+DataBrowserTableViewRowIndex = UInt32
+DataBrowserTableViewColumnIndex = UInt32
+DataBrowserPropertyType = OSType
+ControlDisclosureTriangleOrientation = UInt16
+
+
+
 includestuff = includestuff + """
 #ifdef WITHOUT_FRAMEWORKS
 #include <Controls.h>