[pygtk] Manually wrap GtkWidget.set_allocation



commit d8007ffa9f86023f64852c1d3a375d2255a760e3
Author: Gian Mario Tagliaretti <gianmt gnome org>
Date:   Mon Apr 5 22:26:23 2010 +0200

    Manually wrap GtkWidget.set_allocation

 gtk/gtk.override |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtk.override b/gtk/gtk.override
index 516e10f..7f34a85 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;
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]