summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/ctl/ctlsupport.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-12-12 10:31:54 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-12-12 10:31:54 (GMT)
commit6c7e326eaaa2d814e0d299054f78e5bd187489ab (patch)
tree5343213d9e164e76a47517111dd41b46f7fd4877 /Mac/Modules/ctl/ctlsupport.py
parent6bf45c67523a8e81963ce645979ac85f4f75ef33 (diff)
downloadcpython-6c7e326eaaa2d814e0d299054f78e5bd187489ab.zip
cpython-6c7e326eaaa2d814e0d299054f78e5bd187489ab.tar.gz
cpython-6c7e326eaaa2d814e0d299054f78e5bd187489ab.tar.bz2
Getting rid of pre-Carbon (MacOS8) support. All code depending on
TARGET_API_MAC_OS8 (or !TARGET_API_MAC_CARBON) is gone. Also some TARGET_API_MAC_OSX conditional code is gone, because it is no longer used on OSX-only Python (only in MacPython-OS9).
Diffstat (limited to 'Mac/Modules/ctl/ctlsupport.py')
-rw-r--r--Mac/Modules/ctl/ctlsupport.py42
1 files changed, 1 insertions, 41 deletions
diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py
index 2fa5757..2fc51cf 100644
--- a/Mac/Modules/ctl/ctlsupport.py
+++ b/Mac/Modules/ctl/ctlsupport.py
@@ -132,11 +132,7 @@ static PyObject *CtlObj_WhichControl(ControlHandle);
#define as_Control(h) ((ControlHandle)h)
#define as_Resource(ctl) ((Handle)ctl)
-#if TARGET_API_MAC_CARBON
#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
-#else
-#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
-#endif
#define MAXTABS 32 /* maximum number of tabs that we support in a tabs control */
/*
@@ -769,42 +765,6 @@ f = ManualGenerator("SetControlData_Callback", setcontroldata_callback_body);
f.docstring = lambda: "(callbackfunc) -> None"
object.add(f)
-# And manual generators to get/set popup menu information
-getpopupdata_body = """
-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;
-"""
-f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#if !TARGET_API_MAC_CARBON")
-object.add(f)
-
-setpopupdata_body = """
-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;
-"""
-f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#if !TARGET_API_MAC_CARBON")
-object.add(f)
createtabscontrol_body = """\
@@ -862,7 +822,7 @@ _res = Py_BuildValue("O&",
CtlObj_New, outControl);
return _res;"""
-f = ManualGenerator("CreateTabsControl", createtabscontrol_body, condition="#if TARGET_API_MAC_CARBON")
+f = ManualGenerator("CreateTabsControl", createtabscontrol_body)
f.docstring = lambda: "(WindowPtr window, Rect boundsRect, UInt16 size, UInt16 direction, ControlTabEntry tabArray) -> (ControlHandle outControl)"
module.add(f)