blob: 97534e2bdbd4415ef4000722363c8bbd91cfbb48 [file] [log] [blame]
Jack Jansene0581891999-02-07 14:02:03 +00001f = Function(ControlHandle, 'as_Control',
2 (Handle, 'h', InMode))
3functions.append(f)
4
Jack Jansen5d56f4b1995-06-18 20:16:33 +00005as_resource_body = """
6return ResObj_New((Handle)_self->ob_itself);
7"""
8
9f = ManualGenerator("as_Resource", as_resource_body)
10f.docstring = lambda : "Return this Control as a Resource"
11
12methods.append(f)
Jack Jansencfb60ee1996-10-01 10:46:46 +000013
14DisposeControl_body = """
15 if (!PyArg_ParseTuple(_args, ""))
16 return NULL;
17 if ( _self->ob_itself ) {
Jack Jansena755e681997-09-20 17:40:22 +000018 SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
Jack Jansencfb60ee1996-10-01 10:46:46 +000019 DisposeControl(_self->ob_itself);
20 _self->ob_itself = NULL;
21 }
22 Py_INCREF(Py_None);
23 _res = Py_None;
24 return _res;
25"""
26
27f = ManualGenerator("DisposeControl", DisposeControl_body)
28f.docstring = lambda : "() -> None"
29
30methods.append(f)