0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 03:01:36 +01:00
cpython/Mac/Modules/ctl/ctledit.py

31 lines
712 B
Python
Raw Normal View History

f = Function(ControlHandle, 'as_Control',
(Handle, 'h', InMode))
functions.append(f)
as_resource_body = """
return ResObj_New((Handle)_self->ob_itself);
"""
f = ManualGenerator("as_Resource", as_resource_body)
f.docstring = lambda : "Return this Control as a Resource"
methods.append(f)
DisposeControl_body = """
if (!PyArg_ParseTuple(_args, ""))
return NULL;
if ( _self->ob_itself ) {
1997-09-20 19:40:22 +02:00
SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
DisposeControl(_self->ob_itself);
_self->ob_itself = NULL;
}
Py_INCREF(Py_None);
_res = Py_None;
return _res;
"""
f = ManualGenerator("DisposeControl", DisposeControl_body)
f.docstring = lambda : "() -> None"
methods.append(f)