summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/ctl/ctlsupport.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-12-10 23:43:49 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-12-10 23:43:49 (GMT)
commitf7d5aa61d34cb7816ead2757860e5a66f7da0dcb (patch)
treefaba3f23c2f0fdfa74a156d441f6fa8945c337f8 /Mac/Modules/ctl/ctlsupport.py
parentc6c283840316dec54244b311657511e95e742eb0 (diff)
downloadcpython-f7d5aa61d34cb7816ead2757860e5a66f7da0dcb.zip
cpython-f7d5aa61d34cb7816ead2757860e5a66f7da0dcb.tar.gz
cpython-f7d5aa61d34cb7816ead2757860e5a66f7da0dcb.tar.bz2
Adapted to Universal Headers 3.3.2. More to follow.
Diffstat (limited to 'Mac/Modules/ctl/ctlsupport.py')
-rw-r--r--Mac/Modules/ctl/ctlsupport.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py
index 064e1c5..ab2a999 100644
--- a/Mac/Modules/ctl/ctlsupport.py
+++ b/Mac/Modules/ctl/ctlsupport.py
@@ -32,6 +32,8 @@ ControlPartCode = Type("ControlPartCode", "h")
DragConstraint = Type("DragConstraint", "H")
ControlVariant = Type("ControlVariant", "h")
IconTransformType = Type("IconTransformType", "h")
+EventModifiers = Type("EventModifiers", "H")
+ClickActivationResult = Type("ClickActivationResult", "l")
ControlButtonGraphicAlignment = Type("ControlButtonGraphicAlignment", "h")
ControlButtonTextAlignment = Type("ControlButtonTextAlignment", "h")
ControlButtonTextPlacement = Type("ControlButtonTextPlacement", "h")
@@ -40,9 +42,14 @@ ControlFocusPart = Type("ControlFocusPart", "h")
ControlFontStyleRec = OpaqueType('ControlFontStyleRec', 'ControlFontStyle')
ControlFontStyleRec_ptr = ControlFontStyleRec
+ControlID = OpaqueType('ControlID', 'PyControlID')
+ControlID_ptr = ControlID
includestuff = includestuff + """
#include <%s>""" % MACHEADERFILE + """
+#ifndef kControlCheckBoxUncheckedValue
+#include <ControlDefinitions.h>
+#endif
staticforward PyObject *CtlObj_WhichControl(ControlHandle);
@@ -80,6 +87,26 @@ ControlFontStyle_Convert(v, itself)
QdRGB_Convert, &itself->backColor);
}
+/*
+** Parse/generate ControlID records
+*/
+static PyObject *
+PyControlID_New(itself)
+ ControlID *itself;
+{
+
+ return Py_BuildValue("O&l", PyMac_BuildOSType, itself->signature, itself->id);
+}
+
+static int
+PyControlID_Convert(v, itself)
+ PyObject *v;
+ ControlID *itself;
+{
+ return PyArg_ParseTuple(v, "O&l", PyMac_GetOSType, &itself->signature, &itself->id);
+}
+
+
/* TrackControl and HandleControlClick callback support */
static PyObject *tracker;
static ControlActionUPP mytracker_upp;