--- gdkpixbuf.override 2007-01-16 13:50:15.000000000 +0100 +++ /usr/src/pygtk-unlocked/gtk/gdkpixbuf.override 2007-03-06 23:04:19.000000000 +0100 @@ -148,6 +148,33 @@ return PyString_FromStringAndSize((char*)pixels, rowstride*height); } + +%% +override gdk_pixbuf_scale_simple kwargs +static PyObject * +_wrap_gdk_pixbuf_scale_simple(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { "dest_width", "dest_height", "interp_type", NULL }; + int dest_width, dest_height; + PyObject *py_interp_type = NULL, *py_ret; + GdkPixbuf *ret; + GdkInterpType interp_type; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs,"iiO:GdkPixbuf.scale_simple", kwlist, &dest_width, &dest_height, &py_interp_type)) + return NULL; + if (pyg_enum_get_value(GDK_TYPE_INTERP_TYPE, py_interp_type, (gpointer)&interp_type)) + return NULL; + + pyg_begin_allow_threads; + ret = gdk_pixbuf_scale_simple(GDK_PIXBUF(self->obj), dest_width, dest_height, interp_type); + pyg_end_allow_threads; + + py_ret = pygobject_new((GObject *)ret); + if (ret != NULL) + g_object_unref(ret); + return py_ret; +} + %% override gdk_pixbuf_save kwargs static PyObject * @@ -449,6 +476,32 @@ return ret; } %% +override gdk_pixbuf_new_from_file kwargs +static PyObject * +_wrap_gdk_pixbuf_new_from_file(PyObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { "filename", NULL }; + char *filename; + PyObject *py_ret; + GdkPixbuf *ret; + GError *error = NULL; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:pixbuf_new_from_file", kwlist, &filename)) + return NULL; + + pyg_begin_allow_threads; + ret = gdk_pixbuf_new_from_file(filename, &error); + pyg_end_allow_threads; + + if (pyg_error_check(&error)) + return NULL; + py_ret = pygobject_new((GObject *)ret); + if (ret != NULL) + g_object_unref(ret); + return py_ret; +} + +%% override gdk_pixbuf_loader_new_with_type kwargs static int _wrap_gdk_pixbuf_loader_new_with_type(PyGObject *self,