1 # FindControlUnderMouse() returns an existing control, not a new one,
2 # so create this one by hand.
3 f
= Function(ExistingControlHandle
, 'FindControlUnderMouse',
4 (Point
, 'inWhere', InMode
),
5 (WindowRef
, 'inWindow', InMode
),
6 (SInt16
, 'outPart', OutMode
),
10 f
= Function(ControlHandle
, 'as_Control',
11 (Handle
, 'h', InMode
))
14 f
= Method(Handle
, 'as_Resource', (ControlHandle
, 'ctl', InMode
))
17 f
= Method(void
, 'GetControlRect', (ControlHandle
, 'ctl', InMode
), (Rect
, 'rect', OutMode
))
20 DisposeControl_body
= """
21 if (!PyArg_ParseTuple(_args, ""))
23 if ( _self->ob_itself ) {
24 SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
25 DisposeControl(_self->ob_itself);
26 _self->ob_itself = NULL;
33 f
= ManualGenerator("DisposeControl", DisposeControl_body
)
34 f
.docstring
= lambda : "() -> None"
38 # All CreateXxxXxxControl() functions return a new object in an output
39 # parameter; these should however be managed by us (we're creating them
40 # after all), so set the type to ControlRef.
42 if f
.name
.startswith("Create"):
43 v
= f
.argumentList
[-1]
44 if v
.type == ExistingControlHandle
: