comparison finch/libgnt/pygnt/gnt.override @ 18717:d3542cffbb42

Allow un/setting flags for widgets.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 29 Jul 2007 16:36:05 +0000
parents 5e1412f4e67a
children 1ad1a4e8dfea
comparison
equal deleted inserted replaced
18716:0873698f8cce 18717:d3542cffbb42
37 import gobject.GObject as PyGObject_Type 37 import gobject.GObject as PyGObject_Type
38 %% 38 %%
39 ignore-glob 39 ignore-glob
40 *_get_gtype 40 *_get_gtype
41 %% 41 %%
42 define set_flag
43 static PyObject *
44 _wrap_set_flag(PyGObject *self, PyObject *args, PyObject *kwargs)
45 {
46 static char *kwlist[] = {"flags", NULL};
47 PyGObject *widget;
48 int flags;
49
50 if (!PyArg_ParseTuple(args, "O!i:gnt.set_flag", &PyGntWidget_Type, &widget,
51 &flags)) {
52 return NULL;
53 }
54
55 GNT_WIDGET_SET_FLAGS(widget->obj, flags);
56
57 Py_INCREF(Py_None);
58 return Py_None;
59 }
60 %%
61 define unset_flag
62 static PyObject *
63 _wrap_unset_flag(PyGObject *self, PyObject *args, PyObject *kwargs)
64 {
65 static char *kwlist[] = {"flags", NULL};
66 PyGObject *widget;
67 int flags;
68
69 if (!PyArg_ParseTuple(args, "O!i:gnt.unset_flag", &PyGntWidget_Type, &widget,
70 &flags)) {
71 return NULL;
72 }
73
74 GNT_WIDGET_UNSET_FLAGS(widget->obj, flags);
75
76 Py_INCREF(Py_None);
77 return Py_None;
78 }
79
80