[Python-checkins] CVS: python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.5,1.6 ctlscan.py,1.20,1.21 ctlsupport.py,1.43,1.44

Just van Rossum jvr@users.sourceforge.net
Wed, 12 Dec 2001 14:38:29 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl
In directory usw-pr-cvs1:/tmp/cvs-serv20455

Modified Files:
	_Ctlmodule.c ctlscan.py ctlsupport.py 
Log Message:
Updated for Universal Headers 3.4.

Index: _Ctlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** _Ctlmodule.c	2001/12/08 18:02:52	1.5
--- _Ctlmodule.c	2001/12/12 22:38:27	1.6
***************
*** 476,480 ****
  {
  	PyObject *_res = NULL;
! 	SInt16 _rv;
  	SInt16 inKeyCode;
  	SInt16 inCharCode;
--- 476,480 ----
  {
  	PyObject *_res = NULL;
! 	ControlPartCode _rv;
  	SInt16 inKeyCode;
[...2355 lines suppressed...]
+ 	{"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)"},

Index: ctlscan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlscan.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** ctlscan.py	2001/06/20 21:31:23	1.20
--- ctlscan.py	2001/12/12 22:38:27	1.21
***************
*** 37,40 ****
--- 37,45 ----
  		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")
  
***************
*** 49,53 ****
  			'GetControlData',	# Generated manually
  			'kControlBevelButtonCenterPopupGlyphTag', # Constant with funny definition
! 			'kControlProgressBarIndeterminateTag', # ditto
  			# The following are unavailable for static 68k (appearance manager)
  ##			'GetBevelButtonMenuValue',
--- 54,59 ----
  			'GetControlData',	# Generated manually
  			'kControlBevelButtonCenterPopupGlyphTag', # Constant with funny definition
! 			'kDataBrowserClientPropertyFlagsMask',  # ditto
! 			'kDataBrowserItemAnyState',   # and ditto
  			# The following are unavailable for static 68k (appearance manager)
  ##			'GetBevelButtonMenuValue',
***************
*** 81,84 ****
--- 87,98 ----
  			'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',
  			]
  
***************
*** 139,142 ****
--- 153,173 ----
  			'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',
  			]
  

Index: ctlsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlsupport.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** ctlsupport.py	2001/11/30 14:16:32	1.43
--- ctlsupport.py	2001/12/12 22:38:27	1.44
***************
*** 49,52 ****
--- 49,84 ----
  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