[Python-checkins]
python/dist/src/Mac/Modules/ctl _Ctlmodule.c, 1.27,
1.28 ctlscan.py, 1.32, 1.33
jackjansen at users.sourceforge.net
jackjansen at users.sourceforge.net
Wed Dec 3 18:20:44 EST 2003
Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl
In directory sc8-pr-cvs1:/tmp/cvs-serv22913/ctl
Modified Files:
_Ctlmodule.c ctlscan.py
Log Message:
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Completely untested.
Index: _Ctlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** _Ctlmodule.c 20 Nov 2003 13:30:56 -0000 1.27
--- _Ctlmodule.c 3 Dec 2003 23:20:11 -0000 1.28
***************
*** 1386,1398 ****
PyObject *_res = NULL;
OSStatus _err;
! Boolean tracks;
#ifndef SetControlDragTrackingEnabled
PyMac_PRECHECK(SetControlDragTrackingEnabled);
#endif
if (!PyArg_ParseTuple(_args, "b",
! &tracks))
return NULL;
_err = SetControlDragTrackingEnabled(_self->ob_itself,
! tracks);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
--- 1386,1398 ----
PyObject *_res = NULL;
OSStatus _err;
! Boolean inTracks;
#ifndef SetControlDragTrackingEnabled
PyMac_PRECHECK(SetControlDragTrackingEnabled);
#endif
if (!PyArg_ParseTuple(_args, "b",
! &inTracks))
return NULL;
_err = SetControlDragTrackingEnabled(_self->ob_itself,
! inTracks);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
***************
*** 1405,1409 ****
PyObject *_res = NULL;
OSStatus _err;
! Boolean tracks;
#ifndef IsControlDragTrackingEnabled
PyMac_PRECHECK(IsControlDragTrackingEnabled);
--- 1405,1409 ----
PyObject *_res = NULL;
OSStatus _err;
! Boolean outTracks;
#ifndef IsControlDragTrackingEnabled
PyMac_PRECHECK(IsControlDragTrackingEnabled);
***************
*** 1412,1419 ****
return NULL;
_err = IsControlDragTrackingEnabled(_self->ob_itself,
! &tracks);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("b",
! tracks);
return _res;
}
--- 1412,1419 ----
return NULL;
_err = IsControlDragTrackingEnabled(_self->ob_itself,
! &outTracks);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("b",
! outTracks);
return _res;
}
***************
*** 3609,3615 ****
PyDoc_STR("(DragReference inDrag) -> None")},
{"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
! PyDoc_STR("(Boolean tracks) -> None")},
{"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
! PyDoc_STR("() -> (Boolean tracks)")},
{"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
PyDoc_STR("() -> (Rect bounds)")},
--- 3609,3615 ----
PyDoc_STR("(DragReference inDrag) -> None")},
{"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
! PyDoc_STR("(Boolean inTracks) -> None")},
{"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
! PyDoc_STR("() -> (Boolean outTracks)")},
{"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
PyDoc_STR("() -> (Rect bounds)")},
***************
*** 3991,4005 ****
{
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;
--- 3991,4005 ----
{
PyObject *_res = NULL;
! WindowPtr inWindow;
! RgnHandle inUpdateRegion;
#ifndef UpdateControls
PyMac_PRECHECK(UpdateControls);
#endif
if (!PyArg_ParseTuple(_args, "O&O&",
! WinObj_Convert, &inWindow,
! ResObj_Convert, &inUpdateRegion))
return NULL;
! UpdateControls(inWindow,
! inUpdateRegion);
Py_INCREF(Py_None);
_res = Py_None;
***************
*** 4232,4246 ****
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);
--- 4232,4246 ----
PyObject *_res = NULL;
OSStatus _err;
! WindowPtr inWindow;
! Boolean inTracks;
#ifndef SetAutomaticControlDragTrackingEnabledForWindow
PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
#endif
if (!PyArg_ParseTuple(_args, "O&b",
! WinObj_Convert, &inWindow,
! &inTracks))
return NULL;
! _err = SetAutomaticControlDragTrackingEnabledForWindow(inWindow,
! inTracks);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
***************
*** 4253,4269 ****
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;
}
--- 4253,4269 ----
PyObject *_res = NULL;
OSStatus _err;
! WindowPtr inWindow;
! Boolean outTracks;
#ifndef IsAutomaticControlDragTrackingEnabledForWindow
PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
#endif
if (!PyArg_ParseTuple(_args, "O&",
! WinObj_Convert, &inWindow))
return NULL;
! _err = IsAutomaticControlDragTrackingEnabledForWindow(inWindow,
! &outTracks);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("b",
! outTracks);
return _res;
}
***************
*** 4363,4373 ****
PyObject *_res = NULL;
OSStatus _err;
! WindowPtr window;
! Rect boundsRect;
! UInt16 orientation;
! CFStringRef title;
! SInt32 initialValue;
! Boolean drawTitle;
! Boolean autoToggles;
ControlHandle outControl;
#ifndef CreateDisclosureTriangleControl
--- 4363,4373 ----
PyObject *_res = NULL;
OSStatus _err;
! WindowPtr inWindow;
! Rect inBoundsRect;
! UInt16 inOrientation;
! CFStringRef inTitle;
! SInt32 inInitialValue;
! Boolean inDrawTitle;
! Boolean inAutoToggles;
ControlHandle outControl;
#ifndef CreateDisclosureTriangleControl
***************
*** 4375,4393 ****
#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);
--- 4375,4393 ----
#endif
if (!PyArg_ParseTuple(_args, "O&O&HO&lbb",
! WinObj_Convert, &inWindow,
! PyMac_GetRect, &inBoundsRect,
! &inOrientation,
! CFStringRefObj_Convert, &inTitle,
! &inInitialValue,
! &inDrawTitle,
! &inAutoToggles))
return NULL;
! _err = CreateDisclosureTriangleControl(inWindow,
! &inBoundsRect,
! inOrientation,
! inTitle,
! inInitialValue,
! inDrawTitle,
! inAutoToggles,
&outControl);
if (_err != noErr) return PyMac_Error(_err);
***************
*** 4883,4890 ****
PyObject *_res = NULL;
OSStatus _err;
! WindowPtr window;
! Rect boundsRect;
! ControlButtonContentInfo icon;
! Boolean dontTrack;
ControlHandle outControl;
#ifndef CreateIconControl
--- 4883,4890 ----
PyObject *_res = NULL;
OSStatus _err;
! WindowPtr inWindow;
! Rect inBoundsRect;
! ControlButtonContentInfo inIconContent;
! Boolean inDontTrack;
ControlHandle outControl;
#ifndef CreateIconControl
***************
*** 4892,4904 ****
#endif
if (!PyArg_ParseTuple(_args, "O&O&O&b",
! WinObj_Convert, &window,
! PyMac_GetRect, &boundsRect,
! ControlButtonContentInfo_Convert, &icon,
! &dontTrack))
return NULL;
! _err = CreateIconControl(window,
! &boundsRect,
! &icon,
! dontTrack,
&outControl);
if (_err != noErr) return PyMac_Error(_err);
--- 4892,4904 ----
#endif
if (!PyArg_ParseTuple(_args, "O&O&O&b",
! WinObj_Convert, &inWindow,
! PyMac_GetRect, &inBoundsRect,
! ControlButtonContentInfo_Convert, &inIconContent,
! &inDontTrack))
return NULL;
! _err = CreateIconControl(inWindow,
! &inBoundsRect,
! &inIconContent,
! inDontTrack,
&outControl);
if (_err != noErr) return PyMac_Error(_err);
***************
*** 5423,5427 ****
PyDoc_STR("(WindowPtr theWindow) -> None")},
{"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
! PyDoc_STR("(WindowPtr theWindow, RgnHandle updateRegion) -> None")},
{"FindControl", (PyCFunction)Ctl_FindControl, 1,
PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
--- 5423,5427 ----
PyDoc_STR("(WindowPtr theWindow) -> None")},
{"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
! PyDoc_STR("(WindowPtr inWindow, RgnHandle inUpdateRegion) -> None")},
{"FindControl", (PyCFunction)Ctl_FindControl, 1,
PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
***************
*** 5447,5453 ****
PyDoc_STR("(WindowPtr inWindow) -> None")},
{"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
! PyDoc_STR("(WindowPtr theWindow, Boolean tracks) -> None")},
{"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
! PyDoc_STR("(WindowPtr theWindow) -> (Boolean tracks)")},
{"CreateBevelButtonControl", (PyCFunction)Ctl_CreateBevelButtonControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)")},
--- 5447,5453 ----
PyDoc_STR("(WindowPtr inWindow) -> None")},
{"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
! PyDoc_STR("(WindowPtr inWindow, Boolean inTracks) -> None")},
{"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
! PyDoc_STR("(WindowPtr inWindow) -> (Boolean outTracks)")},
{"CreateBevelButtonControl", (PyCFunction)Ctl_CreateBevelButtonControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)")},
***************
*** 5455,5459 ****
PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
{"CreateDisclosureTriangleControl", (PyCFunction)Ctl_CreateDisclosureTriangleControl, 1,
! PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 orientation, CFStringRef title, SInt32 initialValue, Boolean drawTitle, Boolean autoToggles) -> (ControlHandle outControl)")},
{"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
--- 5455,5459 ----
PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
{"CreateDisclosureTriangleControl", (PyCFunction)Ctl_CreateDisclosureTriangleControl, 1,
! PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, UInt16 inOrientation, CFStringRef inTitle, SInt32 inInitialValue, Boolean inDrawTitle, Boolean inAutoToggles) -> (ControlHandle outControl)")},
{"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
***************
*** 5489,5493 ****
PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
{"CreateIconControl", (PyCFunction)Ctl_CreateIconControl, 1,
! PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo icon, Boolean dontTrack) -> (ControlHandle outControl)")},
{"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
--- 5489,5493 ----
PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
{"CreateIconControl", (PyCFunction)Ctl_CreateIconControl, 1,
! PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, ControlButtonContentInfo inIconContent, Boolean inDontTrack) -> (ControlHandle outControl)")},
{"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
Index: ctlscan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlscan.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** ctlscan.py 19 Nov 2003 16:34:03 -0000 1.32
--- ctlscan.py 3 Dec 2003 23:20:11 -0000 1.33
***************
*** 126,129 ****
--- 126,130 ----
## 'DataBrowserListViewColumnDesc',
'CFDataRef',
+ 'DataBrowserListViewHeaderDesc', # difficult struct
]
More information about the Python-checkins
mailing list