Mercurial > pidgin.yaz
view 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 |
line wrap: on
line source
%% headers #include <Python.h> #include "pygobject.h" #include "gnt.h" #include "gntbindable.h" #include "gntwidget.h" #include "gntbox.h" #include "gntbutton.h" #include "gntcheckbox.h" #include "gntcolors.h" #include "gntcombobox.h" #include "gntentry.h" #include "gntfilesel.h" #include "gntkeys.h" #include "gntlabel.h" #include "gntline.h" #include "gntmenu.h" #include "gntmenuitem.h" #include "gntmenuitemcheck.h" #include "gntslider.h" #include "gntstyle.h" #include "gnttextview.h" #include "gnttree.h" #include "gntutils.h" #include "gntwindow.h" #include "gntwm.h" #include "gntws.h" #include "common.h" %% include gntfilesel.override gnttree.override %% modulename gnt %% import gobject.GObject as PyGObject_Type %% ignore-glob *_get_gtype %% define set_flag static PyObject * _wrap_set_flag(PyGObject *self, PyObject *args, PyObject *kwargs) { static char *kwlist[] = {"flags", NULL}; PyGObject *widget; int flags; if (!PyArg_ParseTuple(args, "O!i:gnt.set_flag", &PyGntWidget_Type, &widget, &flags)) { return NULL; } GNT_WIDGET_SET_FLAGS(widget->obj, flags); Py_INCREF(Py_None); return Py_None; } %% define unset_flag static PyObject * _wrap_unset_flag(PyGObject *self, PyObject *args, PyObject *kwargs) { static char *kwlist[] = {"flags", NULL}; PyGObject *widget; int flags; if (!PyArg_ParseTuple(args, "O!i:gnt.unset_flag", &PyGntWidget_Type, &widget, &flags)) { return NULL; } GNT_WIDGET_UNSET_FLAGS(widget->obj, flags); Py_INCREF(Py_None); return Py_None; }