diff options
author | James Henstridge <james@daa.com.au> | 2003-07-31 13:17:33 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2003-07-31 13:17:33 +0000 |
commit | e5687c0dc54011a83a97d9ec4c3676e5046b5c81 (patch) | |
tree | a87c4ef5721207187c86c88381209d59c4b89d45 | |
parent | 5dde78e335bb41025520841809729401cf68ff14 (diff) | |
download | pygobject-e5687c0dc54011a83a97d9ec4c3676e5046b5c81.tar.gz |
add wrapper (from bug #118676).pygtk-2-0-anchorPYGTK_2_0_0PYGTK_1_99_18PYGTK_1_99_17
2003-07-31 James Henstridge <james@daa.com.au>
* pygobject.c (pygobject_handler_is_connected): add wrapper (from
bug #118676).
-rw-r--r-- | gobject/pygobject.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gobject/pygobject.c b/gobject/pygobject.c index a76e35b1..76e94cba 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -802,6 +802,21 @@ pygobject_disconnect(PyGObject *self, PyObject *args) } static PyObject * +pygobject_handler_is_connected(PyGObject *self, PyObject *args) +{ + guint handler_id; + PyObject *ret; + + if (!PyArg_ParseTuple(args, "i:GObject.handler_is_connected", &handler_id)) + return NULL; + + ret = g_signal_handler_is_connected(self->obj, handler_id) + ? Py_True : Py_False; + Py_INCREF(ret); + return ret; +} + +static PyObject * pygobject_handler_block(PyGObject *self, PyObject *args) { guint handler_id; @@ -1012,6 +1027,7 @@ static PyMethodDef pygobject_methods[] = { { "connect_object_after", (PyCFunction)pygobject_connect_object_after, METH_VARARGS }, { "disconnect", (PyCFunction)pygobject_disconnect, METH_VARARGS }, { "handler_disconnect", (PyCFunction)pygobject_disconnect, METH_VARARGS }, + { "handler_is_connected", (PyCFunction)pygobject_handler_is_connected, METH_VARARGS }, { "handler_block", (PyCFunction)pygobject_handler_block, METH_VARARGS }, { "handler_unblock", (PyCFunction)pygobject_handler_unblock,METH_VARARGS }, { "emit", (PyCFunction)pygobject_emit, METH_VARARGS }, |