diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2000-03-21 16:25:23 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-03-21 16:25:23 (GMT) |
commit | 1a7d5b12c0dff4b4ec139612713ce713bd696157 (patch) | |
tree | b1c2f658a63397986eff8540617e927bdd16d034 /Mac/Modules/ctl/ctlsupport.py | |
parent | 0e12bcd24333f8575a40b4fd525a5c029c9d217c (diff) | |
download | cpython-1a7d5b12c0dff4b4ec139612713ce713bd696157.zip cpython-1a7d5b12c0dff4b4ec139612713ce713bd696157.tar.gz cpython-1a7d5b12c0dff4b4ec139612713ce713bd696157.tar.bz2 |
Added a GetControlRect() method to controls which returns the bounding rectangle. To my surprise this call is missing from the C API...
Diffstat (limited to 'Mac/Modules/ctl/ctlsupport.py')
-rw-r--r-- | Mac/Modules/ctl/ctlsupport.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py index ea9dcef..ac75332 100644 --- a/Mac/Modules/ctl/ctlsupport.py +++ b/Mac/Modules/ctl/ctlsupport.py @@ -46,6 +46,7 @@ includestuff = includestuff + """ #define as_Control(h) ((ControlHandle)h) #define as_Resource(ctl) ((Handle)ctl) +#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect)) #define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */ @@ -100,6 +101,7 @@ PyObject *CtlObj_NewUnmanaged(itself) it = PyObject_NEW(ControlObject, &Control_Type); if (it == NULL) return NULL; it->ob_itself = itself; + it->ob_callbackdict = NULL; return (PyObject *)it; } |