diff options
author | Gian Mario Tagliaretti <gianmt@gnome.org> | 2010-04-05 22:26:23 +0200 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@gnome.org> | 2010-04-05 22:26:23 +0200 |
commit | d8007ffa9f86023f64852c1d3a375d2255a760e3 (patch) | |
tree | bc1f354c58b1f4d949c3b8bcfce67227d3c98261 /gtk/gtk.override | |
parent | a6c70981f84b0e8f24d004c6bd87c821e960cb67 (diff) | |
download | pygtk-d8007ffa9f86023f64852c1d3a375d2255a760e3.tar.gz |
Manually wrap GtkWidget.set_allocation
Diffstat (limited to 'gtk/gtk.override')
-rw-r--r-- | gtk/gtk.override | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gtk/gtk.override b/gtk/gtk.override index 516e10f7..7f34a85f 100644 --- a/gtk/gtk.override +++ b/gtk/gtk.override @@ -8797,3 +8797,26 @@ _wrap_gtk_cell_renderer_get_padding(PyGObject *self) return Py_BuildValue("(ii)", xpad, ypad); } +%% +override gtk_widget_set_allocation kwargs +static PyObject * +_wrap_gtk_widget_set_allocation(PyGObject *self, + PyObject *args, + PyObject *kwargs) +{ + static char *kwlist[] = { "allocation", NULL }; + PyObject *py_allocation; + GdkRectangle allocation = { 0, 0, 0, 0 }; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:Gtk.Widget.set_allocation", + kwlist, &py_allocation)) + return NULL; + + if (!pygdk_rectangle_from_pyobject(py_allocation, &allocation)) + return NULL; + + gtk_widget_set_allocation(GTK_WIDGET(self->obj), &allocation); + + Py_INCREF(Py_None); + return Py_None; +} |