#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" */
return _res;
}
+static PyObject *CtlObj_GetControlRect(_self, _args)
+ ControlObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Rect rect;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetControlRect(_self->ob_itself,
+ &rect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &rect);
+ return _res;
+}
+
static PyObject *CtlObj_DisposeControl(_self, _args)
ControlObject *_self;
PyObject *_args;
"(ControlPartCode inPart, ResType inTagName) -> (Size outMaxSize)"},
{"as_Resource", (PyCFunction)CtlObj_as_Resource, 1,
"() -> (Handle _rv)"},
+ {"GetControlRect", (PyCFunction)CtlObj_GetControlRect, 1,
+ "() -> (Rect rect)"},
{"DisposeControl", (PyCFunction)CtlObj_DisposeControl, 1,
"() -> None"},
{"TrackControl", (PyCFunction)CtlObj_TrackControl, 1,
it = PyObject_NEW(ControlObject, &Control_Type);
if (it == NULL) return NULL;
it->ob_itself = itself;
+ it->ob_callbackdict = NULL;
return (PyObject *)it;
}
f = Method(Handle, 'as_Resource', (ControlHandle, 'ctl', InMode))
methods.append(f)
+f = Method(void, 'GetControlRect', (ControlHandle, 'ctl', InMode), (Rect, 'rect', OutMode))
+methods.append(f)
+
DisposeControl_body = """
if (!PyArg_ParseTuple(_args, ""))
return NULL;
#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" */
it = PyObject_NEW(ControlObject, &Control_Type);
if (it == NULL) return NULL;
it->ob_itself = itself;
+ it->ob_callbackdict = NULL;
return (PyObject *)it;
}