pygtk r2969 - in trunk: . gtk



Author: gianmt
Date: Thu May  1 21:53:53 2008
New Revision: 2969
URL: http://svn.gnome.org/viewvc/pygtk?rev=2969&view=rev

Log:
Wrap gdk_region_get_rectangles, (bug #517099)

Modified:
   trunk/ChangeLog
   trunk/gtk/gdk.override

Modified: trunk/gtk/gdk.override
==============================================================================
--- trunk/gtk/gdk.override	(original)
+++ trunk/gtk/gdk.override	Thu May  1 21:53:53 2008
@@ -513,6 +513,26 @@
     return pyg_boxed_new(GDK_TYPE_RECTANGLE, &rect, TRUE, TRUE);
 }
 %%
+override gdk_region_get_rectangles noargs
+static PyObject *
+_wrap_gdk_region_get_rectangles(PyGObject *self)
+{
+    GdkRectangle    *rect;
+    gint            n_rect, i;
+    PyObject        *py_rects;
+
+    gdk_region_get_rectangles(pyg_boxed_get(self, GdkRegion), &rect, &n_rect);
+
+    py_rects = PyList_New(n_rect);    
+    
+    for (i = 0; i < n_rect; i++)
+	PyList_SetItem(py_rects, i, pyg_boxed_new(GDK_TYPE_RECTANGLE,
+						   &rect[i], TRUE, TRUE));
+
+    g_free(rect);
+    return py_rects;
+}
+%%
 override-attr GdkDevice.axes
 static PyObject *
 _wrap_gdk_device__get_axes(PyGObject *self, void *closure)



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