Added 'list_only' option (and modified 'run()' to respect it).
[python/dscho.git] / Mac / Modules / ctl / ctledit.py
blob97534e2bdbd4415ef4000722363c8bbd91cfbb48
1 f = Function(ControlHandle, 'as_Control',
2 (Handle, 'h', InMode))
3 functions.append(f)
5 as_resource_body = """
6 return ResObj_New((Handle)_self->ob_itself);
7 """
9 f = ManualGenerator("as_Resource", as_resource_body)
10 f.docstring = lambda : "Return this Control as a Resource"
12 methods.append(f)
14 DisposeControl_body = """
15 if (!PyArg_ParseTuple(_args, ""))
16 return NULL;
17 if ( _self->ob_itself ) {
18 SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
19 DisposeControl(_self->ob_itself);
20 _self->ob_itself = NULL;
22 Py_INCREF(Py_None);
23 _res = Py_None;
24 return _res;
25 """
27 f = ManualGenerator("DisposeControl", DisposeControl_body)
28 f.docstring = lambda : "() -> None"
30 methods.append(f)