[cairo-commit] pycairo/cairo cairogtkmodule.c,1.25,1.26
Steve Chaplin
commit at pdx.freedesktop.org
Thu May 26 20:02:52 PDT 2005
Committed by: stevech1097
Update of /cvs/cairo/pycairo/cairo
In directory gabe:/tmp/cvs-serv25541/cairo
Modified Files:
cairogtkmodule.c
Log Message:
SC
Index: cairogtkmodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/cairogtkmodule.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- cairogtkmodule.c 19 May 2005 04:47:56 -0000 1.25
+++ cairogtkmodule.c 27 May 2005 03:02:50 -0000 1.26
@@ -88,11 +88,12 @@
(PyObject *)py_pixbuf);
}
+#ifndef HAVE_GTK28
/* copied from gtk+/gdk/gdkcairo.c and gtk+/gdk/x11/gdkdrawable-x11.c
* gdk_cairo_create() should be available in gtk 2.8
*/
static cairo_t *
-_gdk_cairo_create (GdkDrawable *drawable)
+gdk_cairo_create (GdkDrawable *drawable)
{
int width, height;
cairo_t *cr = NULL;
@@ -125,10 +126,11 @@
}
return cr;
}
+#endif
/* gdk.cairo_create() should be available in pygtk 2.8 */
static PyObject *
-gdk_cairo_create(PyObject *self, PyObject *args)
+pygdk_cairo_create(PyObject *self, PyObject *args)
{
cairo_t *cr;
PyGObject *py_drawable;
@@ -137,7 +139,7 @@
&PyGdkDrawable_Type, &py_drawable))
return NULL;
- cr = _gdk_cairo_create (GDK_DRAWABLE(py_drawable->obj));
+ cr = gdk_cairo_create (GDK_DRAWABLE(py_drawable->obj));
if (!cr) {
PyErr_SetString(PyExc_RuntimeError, "could not create context");
return NULL;
@@ -145,11 +147,10 @@
return PycairoContext_FromContext (cr, (PyObject *)py_drawable);
}
-
static PyMethodDef cairogtk_functions[] = {
- { "gdk_cairo_create", (PyCFunction)gdk_cairo_create, METH_VARARGS },
+ { "gdk_cairo_create", (PyCFunction)pygdk_cairo_create, METH_VARARGS },
{ "surface_create_for_pixbuf",
- (PyCFunction)surface_create_for_pixbuf, METH_VARARGS },
+ (PyCFunction)surface_create_for_pixbuf, METH_VARARGS },
{ NULL, NULL, 0 }
};
More information about the cairo-commit
mailing list